/* =====================================================================
   Akter Teknik Asansör — Yönetim Paneli — style.css
   Ana site (akterteknikasansor.com.tr) ile aynı tema:
   antrasit zemin + altın vurgu, Cormorant Garamond (başlık) + Manrope (metin)
   ===================================================================== */

:root {
    color-scheme: dark;

    --black:        #131417;
    --anthracite:   #1c1e22;
    --steel:        #2a2d33;
    --line:         #3a3d44;
    --gold:         #D4AF37;
    --gold-soft:    #C5A059;
    --gold-light:   #e6c968;
    --cream:        #f4efe0;

    --brand:        var(--gold);
    --brand-600:    var(--gold-soft);
    --brand-700:    var(--gold-light);
    --brand-soft:   rgba(212, 175, 55, 0.12);
    --brand-tint:   rgba(212, 175, 55, 0.14);

    --app-bg:       var(--black);
    --surface:      var(--anthracite);
    --surface-2:    #222428;
    --border:       #2e3136;
    --border-strong:var(--line);

    --ink:          #ecebe7;
    --ink-soft:     #b9b8b2;
    --muted:        #8d8c87;

    --success:      #34d399;
    --warning:      #fbbf24;
    --danger:       #f87171;

    --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --sans:  'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
    --radius:    14px;
}

* { -webkit-tap-highlight-color: transparent; }

html { background: var(--black); }
body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--black);
    -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(212,175,55,.35); color: #fff; }

.font-display { font-family: var(--serif); letter-spacing: .01em; }

.bg-app { background: var(--app-bg); }

/* =====================================================================
   MARKA (logo)
   ===================================================================== */
.akter-emblem {
    display: block; flex: none;
    background: url("brand/emblem.webp") center/contain no-repeat;
    filter: drop-shadow(0 2px 6px rgba(212,175,55,.25));
}
.akter-logo { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.akter-logo .akter-emblem { width: 44px; height: 44px; }
.akter-logo-text { line-height: 1.1; min-width: 0; }
.akter-logo-text strong {
    display: block; font-family: var(--serif); font-weight: 700;
    font-size: 1.3rem; letter-spacing: .06em; color: var(--gold);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.akter-logo-text span {
    display: block; font-size: .7rem; color: var(--muted); letter-spacing: .1em;
    white-space: nowrap;
}
@media (max-width: 420px) {
    .akter-logo .akter-emblem { width: 38px; height: 38px; }
    .akter-logo-text strong { font-size: 1.12rem; }
}

/* =====================================================================
   GİRİŞ SAYFALARI
   ===================================================================== */
.auth-page {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(19,20,23,.78) 0%, rgba(19,20,23,.86) 55%, rgba(19,20,23,.96) 100%),
        url("brand/arkaplan-lobi.jpg") center/cover no-repeat fixed,
        var(--black);
    overflow: hidden;
    position: relative;
}
.auth-aurora {
    position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(700px 360px at 50% 0%, rgba(212,175,55,.10), transparent 70%);
}

.auth-brand { text-align: center; margin-bottom: 1.75rem; }
.auth-brand .akter-emblem { width: 92px; height: 92px; margin: 0 auto 1rem; }
.auth-brand h1 {
    font-family: var(--serif); font-weight: 700; color: var(--gold);
    font-size: 1.85rem; letter-spacing: .08em; line-height: 1.1;
}
.auth-brand p {
    margin-top: .45rem; font-size: .78rem; letter-spacing: .22em;
    text-transform: uppercase; color: var(--muted);
}
.auth-title {
    font-family: var(--serif); font-weight: 700; font-size: 1.6rem;
    color: var(--cream); line-height: 1.15;
}
.auth-text { font-size: .9rem; color: var(--ink-soft); line-height: 1.6; }
.auth-foot { text-align: center; font-size: .75rem; color: var(--muted); margin-top: 1.5rem; letter-spacing: .04em; }
.link-gold { font-size: .875rem; font-weight: 600; color: var(--gold); text-decoration: none; }
.link-gold:hover { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }

.brand-mark {
    width: 64px; height: 64px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-soft); color: var(--gold); font-size: 1.6rem;
}

.glass-card {
    background: rgba(28,30,34,.94);
    border: 1px solid rgba(212,175,55,.28);
    border-radius: 18px;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.03);
}

.field label {
    display: block; font-size: 0.82rem; font-weight: 600; letter-spacing: .02em;
    color: var(--ink-soft); margin-bottom: 0.45rem;
}
.field-input { position: relative; display: flex; align-items: center; }
.field-input > i:first-child {
    position: absolute; left: 0.9rem; color: var(--gold-soft); font-size: 0.9rem;
}
.field-input input {
    width: 100%; padding: 0.8rem 0.9rem 0.8rem 2.5rem;
    border: 1px solid var(--line); border-radius: 12px;
    font-size: 0.95rem; color: var(--ink); background: var(--black);
    transition: border-color .15s, box-shadow .15s;
}
.field-input input:not([class*="pl-"]):first-child { padding-left: .9rem; }
.field-input input::placeholder { color: #6f6e6a; }
.field-input input:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--brand-tint);
}
.field-input input:-webkit-autofill {
    -webkit-text-fill-color: var(--ink);
    -webkit-box-shadow: 0 0 0 1000px var(--black) inset;
    caret-color: var(--ink);
}
.toggle-pass {
    position: absolute; right: 0.6rem; padding: 0.4rem;
    color: var(--muted); background: none; border: none; cursor: pointer;
}
.toggle-pass:hover { color: var(--gold); }

.alert-error {
    display: flex; align-items: center; gap: 0.6rem;
    background: rgba(239,68,68,.10); color: #fca5a5; border: 1px solid rgba(248,113,113,.35);
    padding: 0.75rem 0.9rem; border-radius: 12px; font-size: 0.9rem;
}

/* =====================================================================
   BUTONLAR
   ===================================================================== */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    background: var(--gold);
    color: #1a1507; font-weight: 700; font-size: 0.95rem; letter-spacing: .01em;
    padding: 0.7rem 1.15rem; border-radius: 12px; border: none; cursor: pointer;
    box-shadow: 0 6px 18px rgba(212,175,55,0.22);
    transition: transform .12s, box-shadow .15s, background .15s;
    text-decoration: none;
}
.btn-primary:hover { background: #e2bf4c; box-shadow: 0 10px 24px rgba(212,175,55,0.30); }
.btn-primary:active { transform: translateY(1px); }

.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    background: transparent; color: var(--ink-soft); font-weight: 600; font-size: 0.9rem;
    padding: 0.65rem 1.1rem; border-radius: 12px; border: 1px solid var(--line);
    cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--gold-soft); color: var(--gold); }

.btn-danger {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    background: #dc2626; color: #fff; font-weight: 600; font-size: 0.9rem;
    padding: 0.65rem 1.1rem; border-radius: 12px; border: none; cursor: pointer;
    transition: filter .15s;
}
.btn-danger:hover { filter: brightness(1.1); }

/* =====================================================================
   UYGULAMA KABUĞU (header / sidebar)
   ===================================================================== */
.app-header {
    background: rgba(19,20,23,.94);
    border-bottom: 1px solid rgba(212,175,55,.22);
    box-shadow: 0 1px 0 rgba(0,0,0,.4);
    height: 64px;
}
.app-header > div { height: 100%; }
.brand-mark-sm {
    width: 38px; height: 38px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-soft); color: var(--gold);
}
.user-chip { display: flex; align-items: center; gap: 0.6rem; }
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-soft); color: var(--gold); border: 1px solid rgba(212,175,55,.35);
    font-weight: 700; font-size: 0.8rem;
}
.btn-logout {
    display: inline-flex; align-items: center;
    background: transparent; color: #fca5a5; font-weight: 600; font-size: 0.85rem;
    padding: 0.5rem 0.9rem; border-radius: 10px; border: 1px solid rgba(248,113,113,.35);
    cursor: pointer; transition: background .15s, border-color .15s;
}
.btn-logout:hover { background: rgba(239,68,68,.10); border-color: rgba(248,113,113,.6); }

.app-sidebar {
    background: var(--anthracite);
    border-right: 1px solid var(--border);
}
.nav-eyebrow {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--gold-soft);
    padding: 0.25rem 0.75rem 0.6rem;
}
.nav-item {
    width: 100%; display: flex; align-items: center; gap: 0.75rem;
    padding: 0.7rem 0.85rem; border-radius: 11px; border: none; cursor: pointer;
    background: transparent; color: var(--ink-soft); font-weight: 500; font-size: 0.92rem;
    text-align: left; transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--surface-2); color: var(--gold); }
.nav-item-icon { width: 20px; text-align: center; font-size: 0.95rem; }
.nav-item-active {
    background: var(--brand-tint); color: var(--gold); font-weight: 600;
    box-shadow: inset 3px 0 0 var(--gold);
}
.nav-item-active:hover { background: var(--brand-tint); }
.sidebar-transition { transition: transform 0.3s ease-in-out; }

/* =====================================================================
   İÇERİK YARDIMCILARI
   ===================================================================== */
.page-title { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; color: var(--cream); line-height: 1.15; letter-spacing: .01em; }
.page-subtitle { color: var(--muted); font-size: 0.9rem; margin-top: 0.2rem; }

.surface {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
}

.card-hover { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(212,175,55,.35); }

.input-modern {
    width: 100%; padding: 0.6rem 0.85rem;
    border: 1px solid var(--line); border-radius: 10px;
    font-size: 0.95rem; color: var(--ink); background: var(--black);
    transition: border-color .15s, box-shadow .15s;
}
.input-modern::placeholder { color: #6f6e6a; }
.input-modern:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--brand-tint);
}
select.input-modern option { background: var(--anthracite); color: var(--ink); }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 0.4rem; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.85rem; color: var(--ink-soft); }

/* Tablolar */
.table-modern { width: 100%; border-collapse: collapse; }
.table-modern thead th {
    text-align: left; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--gold-soft);
    padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); background: #191b1f;
}
.table-modern tbody td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table-modern tbody tr:last-child td { border-bottom: none; }
.table-modern tbody tr:hover { background: #212328; }
.table-avatar {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-soft); color: var(--gold); font-weight: 700; font-size: 0.78rem;
}

/* Rozetler */
.badge {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.28rem 0.65rem; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600;
}
.badge i { font-size: 0.7rem; }
.badge-admin   { background: rgba(212,175,55,.14); color: var(--gold-light); }
.badge-manager { background: rgba(167,139,250,.14); color: #c4b5fd; }
.badge-staff   { background: rgba(52,211,153,.12); color: #6ee7b7; }

.status-dot { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; font-weight: 600; }
.status-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.status-active  { color: #6ee7b7; }
.status-active::before  { background: var(--success); box-shadow: 0 0 0 3px rgba(52,211,153,0.15); }
.status-passive { color: #fcd34d; }
.status-passive::before { background: var(--warning); box-shadow: 0 0 0 3px rgba(251,191,36,0.15); }

/* İkon butonları */
.icon-btn {
    width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
    background: transparent; color: var(--ink-soft); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; font-size: 0.82rem;
    transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--gold); border-color: var(--gold-soft); }
.icon-btn-danger:hover { background: rgba(239,68,68,.12); color: #fca5a5; border-color: rgba(248,113,113,.5); }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.icon-btn:disabled:hover { background: transparent; color: var(--ink-soft); border-color: var(--line); }

.alert-danger-box {
    display: flex; gap: 0.75rem; align-items: flex-start;
    background: rgba(239,68,68,.10); border: 1px solid rgba(248,113,113,.35); color: #fca5a5;
    padding: 0.9rem 1rem; border-radius: 12px;
}
.alert-danger-box > i { margin-top: 0.15rem; }

/* =====================================================================
   MODAL
   ===================================================================== */
.modal-panel {
    background: var(--anthracite);
    border: 1px solid rgba(212,175,55,.22);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    animation: modalPop .18s ease-out;
}
@keyframes modalPop {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* =====================================================================
   BİLDİRİMLER (toast)
   ===================================================================== */
.toast {
    display: flex; align-items: center; gap: 0.6rem;
    min-width: 240px; max-width: 360px;
    padding: 0.8rem 1rem; border-radius: 12px;
    background: var(--steel); color: var(--ink); box-shadow: var(--shadow-md);
    border: 1px solid var(--line);
    font-size: 0.9rem; font-weight: 500;
    opacity: 0; transform: translateX(120%);
    transition: opacity .3s ease, transform .3s cubic-bezier(.2,.8,.2,1);
}
.toast.toast-in { opacity: 1; transform: translateX(0); }
.toast i { font-size: 1.05rem; }
.toast-success { border-left: 4px solid var(--success); }
.toast-success i { color: var(--success); }
.toast-error   { border-left: 4px solid var(--danger); }
.toast-error i { color: var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-warning i { color: var(--warning); }
.toast-info    { border-left: 4px solid var(--gold); }
.toast-info i  { color: var(--gold); }

/* =====================================================================
   MOBİL & DOKUNMATİK İYİLEŞTİRMELER
   ===================================================================== */
@media (max-width: 768px) {
    .card-hover:hover { transform: none; box-shadow: var(--shadow-sm); }
    input, select, textarea { font-size: 16px !important; }  /* iOS zoom engeli */
    button, .touch-target { min-height: 44px; min-width: 44px; }
    .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .modal-mobile { margin: 1rem; max-height: calc(100vh - 2rem); width: calc(100vw - 2rem); }
    .auth-page { background-attachment: scroll, scroll, scroll; }
    .page-title { font-size: 1.6rem; }
}
.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@supports (-webkit-touch-callout: none) {
    .ios-fix { -webkit-appearance: none; border-radius: 0; }
}

/* Erişilebilirlik: klavye odağı */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* Klavye kullanıcıları için "İçeriğe geç" bağlantısı */
.skip-link {
    position: absolute; left: 0.75rem; top: -3rem; z-index: 100;
    background: var(--gold); color: #1a1507; padding: 0.5rem 0.9rem; border-radius: 8px;
    font-weight: 700; transition: top 0.15s ease;
}
.skip-link:focus { top: 0.75rem; }

#modalContent:focus { outline: none; }

/* Makbuz yazdırma: yalnızca makbuz alanı basılır (kâğıtta açık renk) */
@media print {
    body * { visibility: hidden !important; }
    #receiptArea, #receiptArea * { visibility: visible !important; color: #000 !important; background: #fff !important; border-color: #ccc !important; }
    #receiptArea { position: absolute; left: 0; top: 0; width: 100%; }
    .no-print { display: none !important; }
}

.toast span { white-space: pre-line; }
.icon-btn + .icon-btn { margin-left: 0.35rem; }
