/* =====================================================================
   AGD Pendik — Tasarım Sistemi
   Mobil öncelikli, modern, erişilebilir arayüz
   ===================================================================== */

:root {
    /* Marka renkleri (kurumsal mavi + altın aksan) */
    --c-primary:        #016eb4;
    --c-primary-dark:   #005d99;
    --c-primary-darker: #00446f;
    --c-primary-light:  #e6f3fb;
    --c-primary-100:    #cce7f7;
    --c-accent:         #c79a3b;
    --c-accent-light:   #f7eedb;

    --c-bg:       #f4f7f6;
    --c-surface:  #ffffff;
    --c-surface-2:#fbfdfc;
    --c-text:     #16211d;
    --c-muted:    #67817a;
    --c-border:   #e4ece9;
    --c-border-2: #eef3f1;

    --c-placeholder: #9fb3ac;
    --c-topbar-bg: rgba(255,255,255,.85);
    --c-bottom-nav-bg: rgba(255,255,255,.96);
    --c-warn-text: #5d4213;

    --c-ok:      #1f9d6a;
    --c-ok-bg:   #e4f6ee;
    --c-warn:    #c6871f;
    --c-warn-bg: #fbf0d8;
    --c-danger:  #d1495b;
    --c-danger-bg:#fbe6e9;
    --c-info:    #2f7dc4;
    --c-info-bg: #e5f0fa;

    --radius:    14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(16,40,33,.06), 0 1px 3px rgba(16,40,33,.05);
    --shadow:    0 4px 14px rgba(16,40,33,.07);
    --shadow-lg: 0 12px 34px rgba(16,40,33,.12);

    --sidebar-w: 264px;
    --topbar-h:  64px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}


body.theme-light { color-scheme: light; }
body.theme-dark {
    color-scheme: dark;
    --c-bg: #0f1720;
    --c-surface: #17212b;
    --c-surface-2: #1d2a35;
    --c-text: #edf5f2;
    --c-muted: #9fb3ac;
    --c-border: #2b3a44;
    --c-border-2: #24323c;
    --c-primary-light: rgba(1,110,180,.18);
    --c-primary-100: rgba(1,110,180,.32);
    --c-accent-light: rgba(199,154,59,.18);
    --c-ok-bg: rgba(31,157,106,.18);
    --c-warn-bg: rgba(198,135,31,.18);
    --c-danger-bg: rgba(209,73,91,.18);
    --c-info-bg: rgba(47,125,196,.18);
    --c-placeholder: #71869a;
    --c-topbar-bg: rgba(23,33,43,.88);
    --c-warn-text: #f3d38f;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.24), 0 1px 3px rgba(0,0,0,.18);
    --shadow: 0 8px 24px rgba(0,0,0,.24);
    --shadow-lg: 0 18px 48px rgba(0,0,0,.34);
}
@media (prefers-color-scheme: dark) {
    body.theme-system {
        color-scheme: dark;
        --c-bg: #0f1720;
        --c-surface: #17212b;
        --c-surface-2: #1d2a35;
        --c-text: #edf5f2;
        --c-muted: #9fb3ac;
        --c-border: #2b3a44;
        --c-border-2: #24323c;
        --c-primary-light: rgba(1,110,180,.18);
        --c-primary-100: rgba(1,110,180,.32);
        --c-accent-light: rgba(199,154,59,.18);
        --c-ok-bg: rgba(31,157,106,.18);
        --c-warn-bg: rgba(198,135,31,.18);
        --c-danger-bg: rgba(209,73,91,.18);
        --c-info-bg: rgba(47,125,196,.18);
        --c-placeholder: #71869a;
        --c-topbar-bg: rgba(23,33,43,.88);
        --c-bottom-nav-bg: rgba(23,33,43,.96);
        --c-warn-text: #f3d38f;
        --shadow-sm: 0 1px 2px rgba(0,0,0,.24), 0 1px 3px rgba(0,0,0,.18);
        --shadow: 0 8px 24px rgba(0,0,0,.24);
        --shadow-lg: 0 18px 48px rgba(0,0,0,.34);
    }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: var(--c-bg);
    color: var(--c-text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-dark); }
.icon { flex: none; vertical-align: middle; }
h1,h2,h3,h4 { margin: 0 0 .4em; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }

/* ---------------- App shell ---------------- */
.app { min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: linear-gradient(185deg, var(--c-primary-darker), var(--c-primary));
    color: #d9efe7;
    display: flex; flex-direction: column;
    z-index: 60;
    transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.sidebar-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-logo {
    width: 42px; height: 42px; flex: none;
    border-radius: 12px;
    background: rgba(255,255,255,.96);
    display: grid; place-items: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.brand-logo img { width: 100%; height: 100%; display: block; object-fit: contain; padding: 4px; }
.sidebar .brand-logo { width: 64px; height: 64px; border-radius: 16px; }
.auth-brand-logo { width: 64px !important; height: 64px !important; border-radius: 16px; }
.brand-text strong { display: block; color: #fff; font-size: 15px; line-height: 1.1; }
.brand-text span { font-size: 11.5px; color: #9fc9bb; letter-spacing: .02em; }

.nav { flex: 1; overflow-y: auto; padding: 14px 12px 20px; }
.nav-section { margin-top: 16px; padding: 0 12px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #79a596; font-weight: 700; }
.nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; margin: 2px 0;
    border-radius: 11px;
    color: #c4e3d8; font-weight: 500; font-size: 14.5px;
    transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-link.active { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 3px 0 0 var(--c-accent); }
.nav-link .icon { opacity: .9; }
.nav-link .nav-badge { margin-left: auto; background: var(--c-accent); color: var(--c-primary-darker); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 20px; }

.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user .avatar { background: rgba(255,255,255,.16); color: #fff; }
.sidebar-user .su-meta { min-width: 0; }
.sidebar-user .su-meta strong { display:block; color:#fff; font-size:13.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-user .su-meta span { font-size:11.5px; color:#9fc9bb; }

/* main */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 40;
    height: var(--topbar-h);
    background: var(--c-topbar-bg);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--c-border);
    display: flex; align-items: center; gap: 14px;
    padding: 0 22px;
}
.topbar h1 { font-size: 18px; margin: 0; }
.topbar .tb-sub { font-size: 12.5px; color: var(--c-muted); font-weight: 500; }
.topbar-spacer { flex: 1; }
.icon-btn {
    position: relative;
    width: 42px; height: 42px; border-radius: 12px;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text);
    display: grid; place-items: center; cursor: pointer;
    transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--c-primary-light); border-color: var(--c-primary-100); color: var(--c-primary-dark); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; min-width: 17px; height: 17px; padding: 0 4px; background: var(--c-danger); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 20px; display: grid; place-items: center; border: 2px solid var(--c-surface); }

.menu-btn { display: none; }

.content { padding: 22px; flex: 1; max-width: 1240px; width: 100%; }
.impersonation-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin: 0 0 14px; padding: 10px 12px;
    border: 1px solid var(--c-warn-bg); border-left: 4px solid var(--c-warn);
    border-radius: var(--radius-sm); background: var(--c-warn-bg); color: var(--c-warn-text);
    font-size: 13px; font-weight: 600;
}
.impersonation-bar > div { display: flex; align-items: center; gap: 8px; }

/* ---------------- Avatar ---------------- */
.avatar {
    width: 40px; height: 40px; flex: none;
    border-radius: 50%;
    background: var(--c-primary-light); color: var(--c-primary-dark);
    display: grid; place-items: center;
    font-weight: 700; font-size: 14px;
}
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }

/* ---------------- Page header ---------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; margin: 0 0 2px; }
.page-head p { margin: 0; color: var(--c-muted); font-size: 13.5px; }

/* ---------------- Cards ---------------- */
.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--c-border-2); }
.card-head h3 { margin: 0; font-size: 15.5px; }
.card-head .icon { color: var(--c-primary); }
.card-head .ch-action { margin-left: auto; }

/* grids */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* ---------------- Stat cards ---------------- */
.stat {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    display: flex; align-items: flex-start; gap: 14px;
    position: relative; overflow: hidden;
}
.stat .stat-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--c-primary-light); color: var(--c-primary); }
.stat.amber .stat-ic { background: var(--c-accent-light); color: var(--c-accent); }
.stat.blue  .stat-ic { background: var(--c-info-bg); color: var(--c-info); }
.stat.red   .stat-ic { background: var(--c-danger-bg); color: var(--c-danger); }
.stat .stat-val { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.stat .stat-lbl { color: var(--c-muted); font-size: 13px; margin-top: 4px; }

/* hero / welcome card */
.hero {
    border-radius: var(--radius-lg);
    background: linear-gradient(125deg, var(--c-primary-dark), var(--c-primary) 60%, #11906f);
    color: #fff; padding: 26px 28px;
    position: relative; overflow: hidden;
    box-shadow: var(--shadow);
}
.hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.07); }
.hero::before { content: ''; position: absolute; right: 60px; bottom: -70px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.05); }
.hero h2 { color: #fff; font-size: 23px; margin-bottom: 6px; position: relative; }
.hero p { margin: 0; color: #d4ede4; position: relative; max-width: 60ch; }
.hero .hero-role { display: inline-flex; align-items:center; gap:7px; margin-top:14px; background: rgba(255,255,255,.16); padding: 6px 13px; border-radius: 30px; font-size: 13px; font-weight: 600; position: relative; }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 16px; border-radius: 11px;
    font-family: inherit; font-size: 14px; font-weight: 600;
    border: 1px solid transparent; cursor: pointer;
    transition: background .15s, box-shadow .15s, transform .05s, border-color .15s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: 0 2px 8px rgba(13,122,95,.28); }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; }
.btn-ghost { background: var(--c-surface); color: var(--c-text); border-color: var(--c-border); }
.btn-ghost:hover { background: var(--c-primary-light); border-color: var(--c-primary-100); color: var(--c-primary-dark); }
.btn-accent { background: var(--c-accent); color: #3a2c08; }
.btn-accent:hover { background: #b88a2e; color:#3a2c08; }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-danger:hover { background: #b53b4c; color:#fff; }
.btn-women-panel { background: #ffb6c1; color: #6f2431; border-color: #ffb6c1; box-shadow: 0 2px 8px rgba(255, 182, 193, .35); }
.btn-women-panel:hover { background: #ffa6b4; border-color: #ffa6b4; color: #5c1d28; }
.auth-women-panel-bottom { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); width: min(410px, calc(100% - 48px)); z-index: 2; }
.auth-women-panel-bottom:active { transform: translateX(-50%) translateY(1px); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------------- Badges ---------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 30px; font-size: 12px; font-weight: 600; line-height: 1.6; }
.badge.ok { background: var(--c-ok-bg); color: var(--c-ok); }
.badge.warn { background: var(--c-warn-bg); color: var(--c-warn); }
.badge.danger { background: var(--c-danger-bg); color: var(--c-danger); }
.badge.info { background: var(--c-info-bg); color: var(--c-info); }
.badge.muted { background: var(--c-border-2); color: var(--c-muted); }
.badge.accent { background: var(--c-accent-light); color: var(--c-accent); }
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl thead th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--c-border); white-space: nowrap; }
.tbl tbody td { padding: 12px 14px; border-bottom: 1px solid var(--c-border-2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--c-surface-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user .cu-name { font-weight: 600; }
.cell-user .cu-sub { font-size: 12px; color: var(--c-muted); }

/* ---------------- Forms ---------------- */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label.lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--c-text); }
label.lbl .req { color: var(--c-danger); }
.input, .select, textarea.input {
    width: 100%; padding: 11px 13px;
    border: 1px solid var(--c-border); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 14.5px; color: var(--c-text);
    background: var(--c-surface);
    transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, textarea.input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-100); }
.input::placeholder { color: var(--c-placeholder); }
textarea.input { resize: vertical; min-height: 92px; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--c-muted); }
.input-icon .input { padding-left: 40px; }
.help { font-size: 12px; color: var(--c-muted); margin-top: 5px; }

/* segmented radios (yoklama vb.) */
.seg { display: inline-flex; border: 1px solid var(--c-border); border-radius: 10px; overflow: hidden; background: var(--c-surface); }
.seg label { padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--c-muted); border-right: 1px solid var(--c-border); }
.seg label:last-child { border-right: 0; }
.seg input { display: none; }
.seg input:checked + span { color: #fff; }
.seg label:has(input[value="geldi"]:checked), .seg label.on-ok { background: var(--c-ok); color:#fff; }
.seg label:has(input[value="gelmedi"]:checked), .seg label.on-danger { background: var(--c-danger); color:#fff; }
.seg label:has(input[value="izinli"]:checked), .seg label.on-warn { background: var(--c-warn); color:#fff; }


/* ---------------- Theme selector ---------------- */
.theme-options { display: grid; gap: 10px; }
.theme-option { display: block; cursor: pointer; }
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-option-box {
    display: grid;
    grid-template-columns: 22px 1fr;
    column-gap: 10px;
    row-gap: 2px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface-2);
    color: var(--c-text);
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.theme-option .icon { color: var(--c-primary); }
.theme-option strong { display: block; font-size: 14px; line-height: 1.25; }
.theme-option small { grid-column: 2; color: var(--c-muted); font-size: 12px; display: block; }
.theme-option input:checked + .theme-option-box {
    border-color: var(--c-primary);
    background: var(--c-primary-light);
    box-shadow: 0 0 0 3px var(--c-primary-100);
}

/* ---------------- Progress ---------------- */
.progress { height: 8px; border-radius: 20px; background: var(--c-border); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--c-primary), #15a37f); }
.progress.amber > span { background: linear-gradient(90deg, var(--c-accent), #e3bd6b); }

/* ---------------- Alerts / flash ---------------- */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; border: 1px solid; }
.alert.success { background: var(--c-ok-bg); border-color: #bfe6d3; color: #14724e; }
.alert.error   { background: var(--c-danger-bg); border-color: #f1c4cb; color: #a4313f; }
.alert.warning { background: var(--c-warn-bg); border-color: #ecd29a; color: #8a5f12; }
.alert.info    { background: var(--c-info-bg); border-color: #c2ddf2; color: #235d92; }

/* toast container */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--c-surface); border: 1px solid var(--c-border); border-left: 4px solid var(--c-primary); box-shadow: var(--shadow-lg); padding: 12px 16px; border-radius: 10px; font-size: 14px; animation: slideIn .25s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ---------------- Empty state ---------------- */
.empty-state { text-align: center; padding: 44px 24px; color: var(--c-muted); }
.empty-state .empty-icon { width: 76px; height: 76px; border-radius: 50%; background: var(--c-primary-light); color: var(--c-primary); display: grid; place-items: center; margin: 0 auto 16px; }
.empty-state h2, .empty-state h3 { color: var(--c-text); margin-bottom: 6px; }
.empty-state p { max-width: 44ch; margin: 0 auto 18px; }

/* lists */
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--c-border-2); }
.list-item:last-child { border-bottom: 0; }
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 600; font-size: 14px; }
.list-item .li-sub { font-size: 12.5px; color: var(--c-muted); }
.list-item.unread { background: var(--c-primary-light); }

/* misc utils */
.muted { color: var(--c-muted); }
.text-sm { font-size: 13px; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}
.mb-0{margin-bottom:0}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.flex { display: flex; } .items-center { align-items: center; } .gap { gap: 10px; } .gap-lg { gap: 16px; }
.between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.right { text-align: right; } .center { text-align: center; }
.divider { height: 1px; background: var(--c-border-2); margin: 16px 0; }
.tag-source { font-size: 11.5px; color: var(--c-muted); background: var(--c-border-2); padding: 2px 8px; border-radius: 6px; }


/* Birim hiyerarsisi */
.unit-name { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.unit-toggle,
.unit-toggle-placeholder { width: 28px; height: 28px; flex: none; }
.unit-toggle {
    display: inline-grid; place-items: center; border: 1px solid var(--c-border-2);
    border-radius: 8px; background: var(--c-surface); color: var(--c-primary);
    cursor: pointer; transition: background .15s, border-color .15s, transform .15s;
}
.unit-toggle:hover { background: var(--c-primary-light); border-color: rgba(9,90,69,.22); }
.unit-toggle .icon { transition: transform .15s; }
.unit-toggle[aria-expanded="true"] .icon { transform: rotate(90deg); }
.unit-child-row td { background: var(--c-surface-2); }
.unit-child-row td:first-child { padding-left: 42px; }
.unit-child-name { color: var(--c-text); }
.unit-branch { width: 28px; flex: none; color: var(--c-muted); font-weight: 700; text-align: center; }

/* drawer backdrop (mobile) */
.backdrop { display: none; position: fixed; inset: 0; background: rgba(10,30,24,.45); z-index: 55; }
.backdrop.show { display: block; }

/* bottom nav (mobile) */
.bottom-nav { display: none; }

/* ============== Login / auth pages ============== */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-aside {
    background: linear-gradient(160deg, var(--c-primary-darker), var(--c-primary-dark) 55%, var(--c-primary));
    color: #fff; padding: 56px 52px; position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.auth-aside::after { content: ''; position: absolute; right: -80px; bottom: -80px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,.06); }
.auth-aside::before { content: ''; position: absolute; left: -60px; top: 40px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.05); }
.auth-aside .a-brand { display: flex; align-items: center; gap: 12px; position: relative; }
.auth-aside .a-hero { margin-top: auto; position: relative; }
.auth-aside .a-hero h1 { color: #fff; font-size: 34px; line-height: 1.15; }
.auth-aside .a-hero p { color: #cfe8df; font-size: 16px; max-width: 42ch; }
.auth-aside .a-features { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.auth-aside .a-feat { display: flex; align-items: center; gap: 12px; color: #dcf0e8; font-size: 14.5px; }
.auth-aside .a-feat .icon-wrap { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.13); display: grid; place-items: center; flex: none; }

.auth-main {
    display: grid; place-items: center; padding: 40px 24px; background: var(--c-bg);
    position: relative; overflow: hidden;
}
.auth-main::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(104vw, 1240px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: url('c3bcd17f-78a1-4954-bec2-145f8b39d5d2 (1).png') center / contain no-repeat;
    opacity: .055;
    filter: grayscale(100%);
    pointer-events: none;
}
.auth-card { width: 100%; max-width: 410px; position: relative; z-index: 1; }
.auth-card .ac-head { margin-bottom: 24px; }
.auth-card .ac-head h2 { font-size: 25px; margin-bottom: 4px; }
.auth-card .ac-head p { color: var(--c-muted); margin: 0; }
.auth-logo-sm { display: none; }



.auth-footer {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 12px;
    z-index: 2;
    text-align: center;
    color: var(--c-muted);
    font-size: 12px;
}
.auth-footer a { color: inherit; font-weight: 700; text-decoration: none; }
.auth-footer a:hover { color: var(--c-primary); }
.auth-main .auth-women-panel-bottom { bottom: 48px; }

/* ============== Women panel auth ============== */
.women-auth-wrap,
.women-panel-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 18%, rgba(255, 182, 193, .34), transparent 32%),
        radial-gradient(circle at 84% 78%, rgba(1, 110, 180, .12), transparent 28%),
        linear-gradient(135deg, #fff8fa 0%, #f7fbff 100%);
}
.women-auth-main,
.women-panel-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 36px 18px;
    position: relative;
    overflow: hidden;
}
.women-auth-main::before,
.women-panel-shell::before {
    content: '';
    position: absolute;
    width: min(92vw, 720px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(255, 182, 193, .18);
    right: -180px;
    top: -180px;
}
.women-auth-main::after,
.women-panel-shell::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(92vw, 760px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: url('c3bcd17f-78a1-4954-bec2-145f8b39d5d2 (1).png') center / contain no-repeat;
    opacity: .045;
    filter: grayscale(100%);
    pointer-events: none;
}
.women-auth-card,
.women-panel-card {
    width: 100%;
    max-width: 430px;
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(255, 182, 193, .42);
    border-radius: 22px;
    padding: 30px;
    box-shadow: 0 24px 70px rgba(83, 35, 48, .12);
    backdrop-filter: blur(12px);
}
.women-panel-card { max-width: 720px; }
.women-auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}
.women-auth-brand.compact { margin-bottom: 22px; }
.women-auth-brand strong { display: block; color: #33141c; font-size: 17px; }
.women-auth-brand span { display: block; color: #9a6070; font-size: 13px; margin-top: 2px; }
.women-auth-head h2 { color: #251018; }
.women-auth-head p { color: #835463; }
.btn-women-login {
    background: #ffb6c1;
    color: #6f2431;
    border-color: #ffb6c1;
    box-shadow: 0 8px 18px rgba(255, 182, 193, .38);
}
.btn-women-login:hover { background: #ffa6b4; border-color: #ffa6b4; color: #5c1d28; }
.women-auth-links { margin-top: 18px; text-align: center; font-size: 14px; }
.women-auth-links a { color: #016eb4; font-weight: 700; }
.women-panel-card h1 { margin: 0 0 8px; color: #251018; font-size: 30px; }
.women-panel-card p { color: #725565; margin: 0 0 22px; max-width: 58ch; }


/* Women login mirrors the main auth layout with a soft pink theme. */
.women-login-aside {
    background:
        radial-gradient(circle at 12% 14%, rgba(255,255,255,.34), transparent 26%),
        radial-gradient(circle at 92% 92%, rgba(255,255,255,.24), transparent 24%),
        linear-gradient(155deg, #ffd7df 0%, #ffb6c1 48%, #f59bad 100%);
    color: #33141c;
}
.women-login-aside::before { background: rgba(255,255,255,.25); }
.women-login-aside::after { background: rgba(255,255,255,.20); }
.women-login-aside .a-hero h1 { color: #33141c; }
.women-login-aside .a-hero p { color: #724351; }
.women-login-aside .a-feat { color: #5f2c3b; font-weight: 700; }
.women-login-aside .a-feat .icon-wrap { background: rgba(255,255,255,.42); color: #8d3148; }
.women-login-main {
    background:
        radial-gradient(circle at 78% 28%, rgba(255, 182, 193, .20), transparent 32%),
        linear-gradient(135deg, #fff8fa 0%, #f7fbff 100%);
}
.women-login-main::before { opacity: .055; }
.women-login-card { max-width: 410px; }
.women-login-card .input:focus,
.women-auth-card .input:focus { border-color: #ff9aac; box-shadow: 0 0 0 4px rgba(255, 182, 193, .22); }
@media (max-width: 900px) {
    .women-login-aside { display: none; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: none; }
    .main { margin-left: 0; }
    .menu-btn { display: grid; }
    .content { padding: 16px 14px 88px; }   /* alt nav için boşluk */
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-main::before { width: min(176vw, 840px); left: 50%; transform: translate(-50%, -50%); opacity: .04; }
    .auth-logo-sm { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 22px; }
    .auth-women-panel-bottom { position: static; transform: none; width: 100%; max-width: 410px; margin: 22px auto 0; }
    .auth-footer { position: static; margin-top: 22px; }
    .auth-main .auth-women-panel-bottom { bottom: auto; }


    /* alt navigasyon çubuğu */
    .bottom-nav {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
        background: var(--c-bottom-nav-bg); backdrop-filter: blur(8px);
        border-top: 1px solid var(--c-border);
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        justify-content: space-around;
    }
    .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; padding: 6px 2px; color: var(--c-muted); font-size: 10.5px; font-weight: 600; border-radius: 10px; }
    .bottom-nav a.active { color: var(--c-primary); background: var(--c-primary-light); }
}
@media (max-width: 620px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .page-head { align-items: flex-start; }
    .topbar { padding: 0 14px; }
    .topbar h1 { font-size: 16px; }
    .hero { padding: 22px; }
    .hero h2 { font-size: 20px; }

    /* tabloları kart görünümüne çevir */
    .tbl.responsive thead { display: none; }
    .tbl.responsive, .tbl.responsive tbody, .tbl.responsive tr, .tbl.responsive td { display: block; width: 100%; }
    .tbl.responsive tr { border: 1px solid var(--c-border); border-radius: 12px; margin-bottom: 12px; padding: 6px 4px; background: var(--c-surface); }
    .tbl.responsive td { border: 0; padding: 8px 14px; display: flex; justify-content: space-between; gap: 14px; align-items: center; text-align: right; }
    .tbl.responsive td::before { content: attr(data-label); font-size: 12px; font-weight: 700; color: var(--c-muted); text-transform: uppercase; letter-spacing: .03em; text-align: left; }
    .tbl.responsive td:empty { display: none; }
    .tbl.responsive .cell-user { justify-content: flex-end; }
    .tbl.responsive .unit-name { justify-content: flex-end; min-width: 0; }
    .tbl.responsive .unit-child-row { margin-left: 14px; width: calc(100% - 14px); }
    .tbl.responsive .unit-child-row td:first-child { padding-left: 14px; }
    .card-pad { padding: 14px; }
    .card-head { padding: 14px; align-items: flex-start; flex-wrap: wrap; }
    .page-head { gap: 10px; margin-bottom: 14px; }
    .page-head h2 { font-size: 20px; }
    .page-head p { font-size: 13px; }
    .topbar { height: 58px; gap: 10px; }
    .topbar .tb-sub { display: none; }
    .topbar .avatar, .topbar .icon-btn { width: 38px; height: 38px; border-radius: 11px; }
    .sidebar { width: min(86vw, var(--sidebar-w)); }
    .sidebar-brand { padding: 14px 16px; }
    .sidebar .brand-logo { width: 52px; height: 52px; border-radius: 14px; }
    .brand-text strong { font-size: 14px; }
    .brand-text span { font-size: 11px; }
    .nav { padding: 10px 10px 18px; }
    .nav-link { padding: 10px 11px; font-size: 14px; }
    .nav-section { margin-top: 13px; padding: 0 10px 5px; }
    .sidebar-foot { padding: 10px; }
    .content { max-width: none; overflow-x: hidden; }
    .card, .stat, .hero { border-radius: 12px; }
    .stat { padding: 14px; }
    .stat .stat-val { font-size: 23px; }
    .btn { min-height: 42px; white-space: normal; }
    .btn-block { width: 100%; }
    .list-item { align-items: flex-start; gap: 10px; }
    .li-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; margin-top: 8px; }
    .input, .select, textarea.input { min-height: 44px; font-size: 16px; }
    .seg { width: 100%; overflow-x: auto; }
    .seg a, .seg button { flex: 1 0 auto; }
    .support-person { align-items: flex-start; }
    .support-item { padding: 12px; align-items: flex-start; }
    .dropdown-card { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(14px + env(safe-area-inset-bottom)); width: auto; max-height: min(70vh, 520px); overflow: auto; }
}
@media (max-width: 420px) {
    body { font-size: 14px; }
    .content { padding: 12px 10px 84px; }
    .topbar { padding: 0 10px; }
    .topbar h1 { font-size: 15px; max-width: 48vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .icon-btn { width: 38px; height: 38px; }
    .card-pad { padding: 12px; }
    .card-head { padding: 12px; }
    .page-head h2 { font-size: 18px; }
    .auth-card, .women-auth-card, .women-login-card { width: 100%; padding: 22px 18px; }
    .support-item em { font-size: 14px; word-break: break-word; }
}

/* Kadın paneli: aynı uygulama kabuğu, ayrı ekosistem rengi */
.kadin-panel-app {
    --c-primary: #ff8fa3;
    --c-primary-dark: #ef6f8a;
    --c-primary-darker: #8d3148;
    --c-primary-light: #fff0f3;
    --c-primary-100: #ffd6de;
    --c-accent: #fff4c7;
}
.theme-dark.kadin-panel-app {
    --c-primary-light: rgba(255,143,163,.18);
    --c-primary-100: rgba(255,143,163,.32);
    --c-accent-light: rgba(255,244,199,.16);
}
@media (prefers-color-scheme: dark) {
    .theme-system.kadin-panel-app {
        --c-primary-light: rgba(255,143,163,.18);
        --c-primary-100: rgba(255,143,163,.32);
        --c-accent-light: rgba(255,244,199,.16);
    }
}
.kadin-panel-app .sidebar {
    background: linear-gradient(185deg, #6f243d, #d95878 58%, #ff9aac);
}
.kadin-panel-app .sidebar-brand,
.kadin-panel-app .sidebar-foot {
    border-color: rgba(255,255,255,.16);
}
.kadin-panel-app .nav-link.active,
.kadin-panel-app .nav-link:hover {
    background: rgba(255,255,255,.20);
}
.kadin-panel-app .nav-link.active::before {
    background: #fff4c7;
}
.kadin-panel-app .nav-section,
.kadin-panel-app .brand-text span,
.kadin-panel-app .sidebar-user .su-meta span {
    color: rgba(255,255,255,.72);
}
.kadin-panel-app .sidebar .brand-logo {
    background: rgba(255,255,255,.92);
    box-shadow: 0 12px 30px rgba(111,36,61,.24);
}
.kadin-panel-app .hero {
    background: linear-gradient(125deg, #8d3148, #ef6f8a 58%, #ffc1cc);
}
.kadin-panel-app .btn-primary {
    background: #ef6f8a;
    box-shadow: 0 2px 8px rgba(239,111,138,.28);
}
.kadin-panel-app .btn-primary:hover {
    background: #d95878;
}

/* Sidebar scrollbar: panel temasına uyumlu */
.nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.42) rgba(255,255,255,.08);
}
.nav::-webkit-scrollbar { width: 10px; }
.nav::-webkit-scrollbar-track { background: rgba(255,255,255,.08); border-radius: 999px; }
.nav::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255,255,255,.52), rgba(255,255,255,.24));
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
}
.nav::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,.60); }
.kadin-panel-app .nav { scrollbar-color: rgba(255,244,247,.58) rgba(255,255,255,.12); }
.kadin-panel-app .nav::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255,244,247,.72), rgba(255,182,193,.34));
    border: 2px solid transparent;
    background-clip: padding-box;
}

.support-person { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.support-person h3 { margin: 0 0 4px; }
.support-person p { margin: 0; color: var(--c-muted); }
.support-list { display: grid; gap: 12px; }
.support-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--c-border);
    border-radius: 14px;
    background: var(--c-surface-2);
    color: var(--c-text);
}
.support-item:hover { border-color: var(--c-primary-100); background: var(--c-primary-light); color: var(--c-text); }
.support-icon {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: var(--c-primary-light);
    color: var(--c-primary);
}
.support-item strong { display: block; font-size: 13px; color: var(--c-muted); }
.support-item em { display: block; font-style: normal; font-weight: 700; font-size: 16px; color: var(--c-text); }

/* Inline action dropdowns */
.inline-details {
    position: relative;
    display: inline-block;
}
.inline-details > summary {
    list-style: none;
    cursor: pointer;
}
.inline-details > summary::-webkit-details-marker {
    display: none;
}
.dropdown-card {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 25;
    width: min(360px, calc(100vw - 48px));
    padding: 14px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    box-shadow: var(--shadow-lg);
}
.dropdown-card .form-row {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}
.dropdown-card .form-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}



.class-tabs-card {
  margin-bottom: 14px;
}

.class-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--c-primary) 45%, transparent) color-mix(in srgb, var(--c-primary) 10%, transparent);
}

.class-tab {
  min-width: 150px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--c-text);
  background: var(--c-surface);
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.class-tab:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--c-primary) 42%, var(--c-border));
}

.class-tab small {
  display: block;
  margin-top: 4px;
  color: var(--c-muted);
  font-size: 11px;
  font-weight: 700;
}

.class-tab.active {
  border-color: var(--c-primary);
  background: color-mix(in srgb, var(--c-primary) 12%, var(--c-surface));
  color: var(--c-primary);
}

.class-tab.active small {
  color: color-mix(in srgb, var(--c-primary) 70%, var(--c-muted));
}


.support-layout .card,
.admin-support-grid .card {
  min-width: 0;
}

.support-message {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface-2);
  line-height: 1.65;
  color: var(--c-text);
}

.support-meta,
.support-attachment {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
}

.support-meta strong,
.support-attachment strong {
  display: block;
  margin-bottom: 6px;
  color: var(--c-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.support-meta span {
  word-break: break-word;
}

.support-attachment img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  margin-top: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  background: var(--c-bg);
}

@media (max-width: 900px) {
  .support-layout,
  .admin-support-grid {
    grid-template-columns: 1fr !important;
  }
}
