/* =========================================================================
   Samandağ Belediyesi - Keşif Takip Sistemi
   Tasarım sistemi (bağımsız, derleme gerektirmez)
   ========================================================================= */

/* ---------------------------------- Tokens ---------------------------------- */

:root {
    --brand-50:  #ecfeff;
    --brand-100: #cffafe;
    --brand-200: #a5f3fc;
    --brand-300: #67e8f9;
    --brand-400: #22d3ee;
    --brand-500: #06b6d4;
    --brand-600: #0891b2;
    --brand-700: #0e7490;
    --brand-800: #155e75;
    --brand-900: #164e63;

    --c-info:    #0284c7;
    --c-primary: #2563eb;
    --c-warn:    #d97706;
    --c-purple:  #7c3aed;
    --c-danger:  #dc2626;
    --c-success: #16a34a;
    --c-muted:   #64748b;

    --bg:         #f1f5f9;
    --bg-soft:    #f8fafc;
    --surface:    #ffffff;
    --surface-2:  #f8fafc;
    --surface-3:  #f1f5f9;
    --border:     #e2e8f0;
    --border-2:   #cbd5e1;
    --text:       #0f172a;
    --text-2:     #475569;
    --text-3:     #94a3b8;
    --sidebar:    #0f2733;
    --sidebar-2:  #143544;
    --sidebar-tx: #cbd5e1;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
    --shadow:    0 4px 12px rgba(15, 23, 42, .07), 0 1px 3px rgba(15, 23, 42, .05);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, .14);

    --r-sm: 8px;
    --r:    12px;
    --r-lg: 16px;
    --r-xl: 22px;

    --sidebar-w: 268px;
    --header-h: 62px;

    --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
}

html[data-theme="dark"] {
    --bg:        #0b1220;
    --bg-soft:   #0f172a;
    --surface:   #131c2e;
    --surface-2: #182338;
    --surface-3: #1e2b42;
    --border:    #24334d;
    --border-2:  #33456a;
    --text:      #e8eefc;
    --text-2:    #a3b1cc;
    --text-3:    #6b7c9c;
    --sidebar:   #0a1420;
    --sidebar-2: #12202e;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow:    0 6px 16px rgba(0, 0, 0, .4);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, .55);
}

/* ---------------------------------- Reset ---------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 .6rem; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }

::selection { background: var(--brand-200); color: var(--brand-900); }

/* ------------------------------- Yardımcılar ------------------------------- */

.muted   { color: var(--text-2); }
.dim     { color: var(--text-3); }
.small   { font-size: 12.5px; }
.tiny    { font-size: 11.5px; }
.bold    { font-weight: 700; }
.semi    { font-weight: 600; }
.mono    { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; }
.center  { text-align: center; }
.right   { text-align: right; }
.nowrap  { white-space: nowrap; }
.hidden  { display: none !important; }
.flex    { display: flex; }
.grow    { flex: 1 1 auto; min-width: 0; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.wrap    { flex-wrap: wrap; }
.gap-1 { gap: .35rem; } .gap-2 { gap: .6rem; } .gap-3 { gap: .9rem; } .gap-4 { gap: 1.25rem; }
.mt-1 { margin-top: .35rem; } .mt-2 { margin-top: .7rem; } .mt-3 { margin-top: 1.1rem; } .mt-4 { margin-top: 1.6rem; }
.mb-1 { margin-bottom: .35rem; } .mb-2 { margin-bottom: .7rem; } .mb-3 { margin-bottom: 1.1rem; } .mb-4 { margin-bottom: 1.6rem; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

@media (max-width: 900px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------- Uygulama iskeleti ------------------------- */

.app { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
    color: var(--sidebar-tx);
    display: flex;
    flex-direction: column;
    z-index: 60;
    transition: transform .25s ease;
    box-shadow: 4px 0 24px rgba(2, 12, 20, .12);
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: 1.05rem 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar__logo {
    width: 42px; height: 42px;
    flex: 0 0 42px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--brand-400), var(--brand-700));
    display: grid; place-items: center;
    color: #fff;
    box-shadow: 0 6px 16px rgba(6, 182, 212, .35);
}

.sidebar__title { color: #fff; font-size: 14.5px; font-weight: 700; line-height: 1.2; }
.sidebar__sub   { font-size: 11.5px; color: #7f95a6; margin-top: 2px; }

.sidebar__nav { flex: 1 1 auto; overflow-y: auto; padding: .85rem .7rem 1.5rem; }
.sidebar__nav::-webkit-scrollbar { width: 6px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }

.nav-group {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #64798c;
    font-weight: 700;
    padding: 1rem .75rem .4rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .62rem .75rem;
    border-radius: 10px;
    color: var(--sidebar-tx);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav-link.is-active { background: linear-gradient(90deg, var(--brand-600), var(--brand-800)); color: #fff; box-shadow: 0 4px 14px rgba(8, 145, 178, .35); }
.nav-link svg { flex: 0 0 18px; opacity: .9; }
.nav-link .badge-count {
    margin-left: auto;
    background: var(--c-danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 7px;
}

.sidebar__foot { padding: .8rem 1rem; border-top: 1px solid rgba(255,255,255,.08); font-size: 11px; color: #64798c; }

.overlay {
    position: fixed; inset: 0;
    background: rgba(2, 12, 20, .55);
    backdrop-filter: blur(2px);
    z-index: 55;
    opacity: 0; pointer-events: none;
    transition: opacity .2s;
}
.overlay.is-open { opacity: 1; pointer-events: auto; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    position: sticky; top: 0; z-index: 40;
    height: var(--header-h);
    display: flex; align-items: center; gap: .75rem;
    padding: 0 1.1rem;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.topbar__title { font-size: 16px; font-weight: 700; }
.topbar__crumb { font-size: 11.5px; color: var(--text-3); }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 38px; height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    transition: .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

.hamburger { display: none; }

.content { flex: 1 1 auto; padding: 1.2rem 1.1rem 5.5rem; max-width: 1500px; width: 100%; }

@media (max-width: 1023px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.is-open { transform: translateX(0); }
    .main { margin-left: 0; }
    .hamburger { display: inline-grid; }
    .content { padding: 1rem .8rem 5.5rem; }
}

/* ------------------------------ Alt gezinti (mobil) ------------------------ */

.bottomnav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 45;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom));
}
.bottomnav__inner { display: flex; }
.bottomnav a {
    flex: 1 1 0;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: .4rem .2rem;
    font-size: 10.5px; font-weight: 600;
    color: var(--text-3);
    border-radius: 10px;
}
.bottomnav a:hover { text-decoration: none; }
.bottomnav a.is-active { color: var(--brand-700); background: var(--brand-50); }
html[data-theme="dark"] .bottomnav a.is-active { background: rgba(8,145,178,.16); color: var(--brand-300); }

@media (max-width: 1023px) { .bottomnav { display: block; } }

/* ---------------------------------- Kart ---------------------------------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card + .card { margin-top: 1rem; }

.card__head {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
    padding: .9rem 1.1rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.card__title { font-size: 14.5px; font-weight: 700; }
.card__sub { font-size: 12px; color: var(--text-3); }
.card__body { padding: 1.1rem; }
.card__body--tight { padding: .6rem; }
.card__foot { padding: .8rem 1.1rem; border-top: 1px solid var(--border); background: var(--surface-2); }

/* ------------------------------- Sayfa başlığı ----------------------------- */

.page-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1.1rem;
}
.page-head h1 { font-size: 21px; }
.page-head p { margin: .2rem 0 0; font-size: 13px; color: var(--text-2); }
.page-head__actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* --------------------------------- Butonlar -------------------------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    padding: .58rem 1rem;
    font-size: 14px; font-weight: 600; font-family: inherit;
    border-radius: 10px;
    border: 1px solid transparent;
    background: var(--surface-3);
    color: var(--text);
    cursor: pointer;
    transition: .15s;
    white-space: nowrap;
    text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .55; pointer-events: none; }

.btn--primary { background: linear-gradient(135deg, var(--brand-600), var(--brand-800)); color: #fff; box-shadow: 0 4px 14px rgba(8,145,178,.3); }
.btn--primary:hover { color: #fff; }
.btn--success { background: var(--c-success); color: #fff; }
.btn--danger  { background: var(--c-danger); color: #fff; }
.btn--warn    { background: var(--c-warn); color: #fff; }
.btn--dark    { background: var(--sidebar); color: #fff; }
.btn--ghost   { background: transparent; border-color: var(--border-2); color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-3); color: var(--text); }
.btn--light   { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn--sm { padding: .38rem .7rem; font-size: 12.5px; border-radius: 8px; }
.btn--lg { padding: .8rem 1.4rem; font-size: 15px; border-radius: 12px; }
.btn--block { display: flex; width: 100%; }
.btn--icon { padding: .45rem; width: 34px; height: 34px; }

.btn-row { display: flex; gap: .45rem; flex-wrap: wrap; }

/* --------------------------------- Rozetler -------------------------------- */

.badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: 11.5px; font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--plain::before { display: none; }

.badge--info    { background: color-mix(in srgb, var(--c-info) 13%, transparent);    color: var(--c-info); }
.badge--primary { background: color-mix(in srgb, var(--c-primary) 13%, transparent); color: var(--c-primary); }
.badge--warn    { background: color-mix(in srgb, var(--c-warn) 15%, transparent);    color: var(--c-warn); }
.badge--purple  { background: color-mix(in srgb, var(--c-purple) 13%, transparent);  color: var(--c-purple); }
.badge--danger  { background: color-mix(in srgb, var(--c-danger) 13%, transparent);  color: var(--c-danger); }
.badge--success { background: color-mix(in srgb, var(--c-success) 14%, transparent); color: var(--c-success); }
.badge--muted   { background: color-mix(in srgb, var(--c-muted) 14%, transparent);   color: var(--c-muted); }
.badge--brand   { background: var(--brand-50); color: var(--brand-800); }
html[data-theme="dark"] .badge--brand { background: rgba(8,145,178,.18); color: var(--brand-300); }

/* -------------------------------- İstatistik ------------------------------- */

.stat {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: .95rem 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.stat::after {
    content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
    background: var(--brand-500);
}
.stat--info::after    { background: var(--c-info); }
.stat--primary::after { background: var(--c-primary); }
.stat--warn::after    { background: var(--c-warn); }
.stat--purple::after  { background: var(--c-purple); }
.stat--danger::after  { background: var(--c-danger); }
.stat--success::after { background: var(--c-success); }
.stat--muted::after   { background: var(--c-muted); }

.stat__label { font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.stat__value { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: .15rem; }
.stat__hint  { font-size: 11.5px; color: var(--text-3); margin-top: .1rem; }
.stat__icon  { position: absolute; top: .8rem; right: .85rem; opacity: .18; }

a.stat { color: inherit; display: block; transition: .15s; }
a.stat:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-1px); }

/* --------------------------------- Formlar --------------------------------- */

.field { margin-bottom: .95rem; }
.field__label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: .32rem; }
.field__label .req { color: var(--c-danger); }
.field__hint { font-size: 11.5px; color: var(--text-3); margin-top: .25rem; }
.field__error { font-size: 12px; color: var(--c-danger); margin-top: .25rem; font-weight: 600; }

.input, .select, .textarea {
    width: 100%;
    padding: .58rem .75rem;
    font-size: 14.5px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: 10px;
    transition: .15s;
    appearance: none;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 18%, transparent);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface-3); color: var(--text-3); }
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }

.select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .7rem center;
    padding-right: 2.1rem;
}

.has-error .input, .has-error .select, .has-error .textarea { border-color: var(--c-danger); }

select[multiple].select { padding: .4rem; background-image: none; min-height: 120px; }

.check {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: 14px; cursor: pointer; user-select: none;
}
.check input { width: 18px; height: 18px; accent-color: var(--brand-600); cursor: pointer; }

.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
    width: 44px; height: 25px; border-radius: 999px;
    background: var(--border-2); position: relative; transition: .2s; flex: 0 0 44px;
}
.switch__track::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 19px; height: 19px; border-radius: 50%;
    background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .switch__track { background: var(--c-success); }
.switch input:checked + .switch__track::after { transform: translateX(19px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 25%, transparent); }

.input-group { position: relative; }
.input-group .input { padding-right: 2.4rem; }
.input-group__btn {
    position: absolute; top: 50%; right: .35rem; transform: translateY(-50%);
    border: 0; background: transparent; color: var(--text-3); cursor: pointer;
    padding: .3rem; border-radius: 8px; display: grid; place-items: center;
}
.input-group__btn:hover { color: var(--text); background: var(--surface-3); }

/* --------------------------------- Tablolar -------------------------------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table { width: 100%; border-collapse: collapse; font-size: 13.8px; }
.table th {
    text-align: left;
    font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--text-3);
    padding: .6rem .8rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td {
    padding: .7rem .8rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table--compact td, .table--compact th { padding: .45rem .6rem; }

.table__actions { display: flex; gap: .3rem; justify-content: flex-start; }

/* Mobilde tabloyu kartlara dönüştür */
@media (max-width: 780px) {
    .table--stack thead { display: none; }
    .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
    .table--stack tr {
        border: 1px solid var(--border);
        border-radius: var(--r);
        margin-bottom: .6rem;
        background: var(--surface);
        padding: .2rem .1rem;
        box-shadow: var(--shadow-sm);
    }
    .table--stack tr:hover { background: var(--surface); }
    .table--stack td {
        border: 0;
        border-bottom: 1px dashed var(--border);
        display: flex; align-items: center; justify-content: space-between; gap: .8rem;
        padding: .5rem .75rem;
    }
    .table--stack td:last-child { border-bottom: 0; }
    .table--stack td::before {
        content: attr(data-label);
        font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
        color: var(--text-3);
        flex: 0 0 auto;
    }
    .table--stack td > * { text-align: right; }
    .table--stack .table__actions { justify-content: flex-end; }
}

/* --------------------------------- Filtreler ------------------------------- */

.filters { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.filters .field { margin-bottom: 0; }
.filters__actions { display: flex; gap: .45rem; }

.chip-row { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .3rem .7rem;
    border-radius: 999px;
    border: 1px solid var(--border-2);
    background: var(--surface);
    color: var(--text-2);
    font-size: 12.5px; font-weight: 600;
    cursor: pointer;
}
.chip:hover { background: var(--surface-3); text-decoration: none; }
.chip.is-active { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }

/* --------------------------------- Uyarılar -------------------------------- */

.alert {
    display: flex; align-items: flex-start; gap: .65rem;
    padding: .8rem 1rem;
    border-radius: var(--r);
    font-size: 13.5px; font-weight: 500;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}
.alert svg { flex: 0 0 18px; margin-top: 1px; }
.alert--success { background: color-mix(in srgb, var(--c-success) 10%, var(--surface)); border-color: color-mix(in srgb, var(--c-success) 30%, transparent); color: color-mix(in srgb, var(--c-success) 80%, var(--text)); }
.alert--error   { background: color-mix(in srgb, var(--c-danger) 10%, var(--surface));  border-color: color-mix(in srgb, var(--c-danger) 30%, transparent);  color: color-mix(in srgb, var(--c-danger) 80%, var(--text)); }
.alert--warn    { background: color-mix(in srgb, var(--c-warn) 12%, var(--surface));    border-color: color-mix(in srgb, var(--c-warn) 30%, transparent);    color: color-mix(in srgb, var(--c-warn) 85%, var(--text)); }
.alert--info    { background: color-mix(in srgb, var(--c-info) 10%, var(--surface));    border-color: color-mix(in srgb, var(--c-info) 30%, transparent);    color: color-mix(in srgb, var(--c-info) 80%, var(--text)); }

/* ---------------------------------- Boş durum ------------------------------ */

.empty { text-align: center; padding: 2.6rem 1rem; color: var(--text-3); }
.empty svg { opacity: .35; margin-bottom: .6rem; }
.empty__title { font-size: 15px; font-weight: 700; color: var(--text-2); }
.empty__text { font-size: 13px; margin-top: .2rem; }

/* --------------------------------- Zaman çizgisi --------------------------- */

.timeline { position: relative; padding-left: 1.35rem; }
.timeline::before {
    content: ""; position: absolute; top: .4rem; bottom: .4rem; left: 7px;
    width: 2px; background: var(--border);
}
.timeline__item { position: relative; padding-bottom: 1.05rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
    position: absolute; left: -1.35rem; top: 3px;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--brand-500);
    z-index: 1;
}
.timeline__dot--success { border-color: var(--c-success); }
.timeline__dot--danger  { border-color: var(--c-danger); }
.timeline__dot--warn    { border-color: var(--c-warn); }
.timeline__dot--muted   { border-color: var(--c-muted); }
.timeline__title { font-size: 13.5px; font-weight: 700; }
.timeline__meta { font-size: 11.5px; color: var(--text-3); }
.timeline__note {
    margin-top: .35rem; padding: .5rem .7rem;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 10px; font-size: 13px; color: var(--text-2);
    white-space: pre-line;
}

/* ------------------------------ Seviye göstergesi -------------------------- */

.levels { display: flex; align-items: center; gap: .3rem; }
.level-step {
    flex: 1 1 0;
    height: 7px;
    border-radius: 4px;
    background: var(--border);
    position: relative;
}
.level-step.is-done { background: var(--c-success); }
.level-step.is-active { background: var(--brand-500); }

.progress { height: 8px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.progress__bar { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--brand-500), var(--brand-700)); transition: width .3s; }
.progress__bar--success { background: linear-gradient(90deg, #4ade80, var(--c-success)); }

/* --------------------------------- Grafikler ------------------------------- */

.chart { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: .5rem; }
.chart__col { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.chart__bar {
    width: 100%; max-width: 34px;
    border-radius: 5px 5px 2px 2px;
    background: linear-gradient(180deg, var(--brand-400), var(--brand-700));
    min-height: 3px;
    transition: .2s;
}
.chart__col:hover .chart__bar { filter: brightness(1.12); }
.chart__label { font-size: 9.5px; color: var(--text-3); white-space: nowrap; }
.chart__value { font-size: 10.5px; font-weight: 700; color: var(--text-2); }

.hbar { display: flex; align-items: center; gap: .6rem; margin-bottom: .55rem; font-size: 13px; }
.hbar__label { flex: 0 0 34%; color: var(--text-2); font-weight: 600; }
.hbar__track { flex: 1 1 auto; height: 9px; background: var(--surface-3); border-radius: 5px; overflow: hidden; }
.hbar__fill { height: 100%; border-radius: 5px; background: var(--brand-600); }
.hbar__value { flex: 0 0 auto; font-weight: 700; font-size: 12.5px; min-width: 34px; text-align: right; }

/* --------------------------------- Modal ----------------------------------- */

.modal {
    position: fixed; inset: 0; z-index: 90;
    display: none;
    align-items: center; justify-content: center;
    padding: 1rem;
}
.modal.is-open { display: flex; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(2, 12, 20, .58); backdrop-filter: blur(3px); }
.modal__box {
    position: relative;
    width: 100%; max-width: 520px;
    max-height: 90vh; overflow-y: auto;
    background: var(--surface);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    animation: pop .18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal__head { padding: 1.05rem 1.2rem .5rem; }
.modal__title { font-size: 16.5px; font-weight: 700; }
.modal__sub { font-size: 12.5px; color: var(--text-3); margin-top: .15rem; }
.modal__body { padding: .6rem 1.2rem 1rem; }
.modal__foot { padding: .85rem 1.2rem; border-top: 1px solid var(--border); display: flex; gap: .5rem; justify-content: flex-end; background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl); }

/* --------------------------------- Açılır menü ----------------------------- */

.dropdown { position: relative; }
.dropdown__menu {
    position: absolute; top: calc(100% + 6px); left: 0;
    min-width: 208px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--shadow-lg);
    padding: .35rem;
    z-index: 70;
    display: none;
}
.dropdown.is-open .dropdown__menu { display: block; }
.dropdown__item {
    display: flex; align-items: center; gap: .55rem;
    padding: .5rem .65rem;
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--text);
    width: 100%;
    border: 0; background: transparent; cursor: pointer;
    font-family: inherit; text-align: left;
}
.dropdown__menu--end { left: auto; right: 0; }
.dropdown__item:hover { background: var(--surface-3); text-decoration: none; }
.dropdown__item--danger { color: var(--c-danger); }
.dropdown__sep { height: 1px; background: var(--border); margin: .3rem 0; }

/* --------------------------------- Avatar ---------------------------------- */

.avatar {
    width: 36px; height: 36px; flex: 0 0 36px;
    border-radius: 11px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-800));
    color: #fff; font-weight: 700; font-size: 13px;
}
.avatar--sm { width: 28px; height: 28px; flex-basis: 28px; font-size: 11px; border-radius: 9px; }
.avatar--lg { width: 56px; height: 56px; flex-basis: 56px; font-size: 19px; border-radius: 17px; }
.avatar--buro  { background: linear-gradient(135deg, #60a5fa, #1d4ed8); }
.avatar--saha  { background: linear-gradient(135deg, #34d399, #047857); }
.avatar--mudur { background: linear-gradient(135deg, #f472b6, #9d174d); }

/* ------------------------------ Tanım listesi ------------------------------ */

.dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: .1rem 1rem; font-size: 14px; }
.dl dt { color: var(--text-3); font-size: 12.5px; font-weight: 600; padding: .42rem 0; }
.dl dd { margin: 0; padding: .42rem 0; font-weight: 600; overflow-wrap: anywhere; }
.dl dt + dd { border-bottom: 1px dashed var(--border); }
.dl dt { border-bottom: 1px dashed var(--border); }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: 0; }

@media (max-width: 560px) {
    .dl { grid-template-columns: 1fr; gap: 0; }
    .dl dt { padding-bottom: 0; border-bottom: 0; }
    .dl dd { padding-top: .1rem; }
}

/* ------------------------------- Sayfalama --------------------------------- */

.pagination { display: flex; gap: .25rem; flex-wrap: wrap; align-items: center; justify-content: center; padding: .9rem; }
.pagination a, .pagination span {
    min-width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 .55rem;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    font-size: 13px; font-weight: 600;
}
.pagination a:hover { background: var(--surface-3); text-decoration: none; color: var(--text); }
.pagination .is-active span { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.pagination .is-disabled span { opacity: .45; }

/* --------------------------------- Sekmeler -------------------------------- */

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab {
    padding: .6rem .9rem;
    font-size: 13.5px; font-weight: 600;
    color: var(--text-2);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    background: transparent; border-top: 0; border-left: 0; border-right: 0;
    font-family: inherit;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.is-active { color: var(--brand-700); border-bottom-color: var(--brand-600); }

/* ------------------------------- Giriş ekranı ------------------------------ */

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: var(--bg);
}
.auth__aside {
    position: relative;
    background: linear-gradient(150deg, #0b3a4a 0%, #0e7490 55%, #06b6d4 130%);
    color: #fff;
    padding: 3rem 3.2rem;
    display: flex; flex-direction: column; justify-content: space-between;
    overflow: hidden;
}
.auth__aside::before, .auth__aside::after {
    content: ""; position: absolute; border-radius: 50%;
    background: rgba(255, 255, 255, .07);
}
.auth__aside::before { width: 420px; height: 420px; top: -140px; left: -120px; }
.auth__aside::after  { width: 300px; height: 300px; bottom: -110px; right: -70px; }
.auth__brand { display: flex; align-items: center; gap: .8rem; position: relative; }
.auth__logo {
    width: 52px; height: 52px; border-radius: 16px;
    background: rgba(255,255,255,.16); backdrop-filter: blur(6px);
    display: grid; place-items: center;
    border: 1px solid rgba(255,255,255,.25);
}
.auth__headline { position: relative; }
.auth__headline h2 { font-size: 30px; line-height: 1.2; letter-spacing: -.02em; }
.auth__headline p { margin-top: .8rem; font-size: 15px; color: rgba(255,255,255,.82); max-width: 42ch; }
.auth__features { position: relative; display: grid; gap: .7rem; margin-top: 1.6rem; }
.auth__feature { display: flex; align-items: center; gap: .6rem; font-size: 14px; color: rgba(255,255,255,.9); }
.auth__feature span { width: 26px; height: 26px; border-radius: 9px; background: rgba(255,255,255,.16); display: grid; place-items: center; flex: 0 0 26px; }
.auth__foot { position: relative; font-size: 12px; color: rgba(255,255,255,.6); }

.auth__main { display: grid; place-items: center; padding: 2rem 1.2rem; }
.auth__card { width: 100%; max-width: 400px; }
.auth__card h1 { font-size: 23px; }
.auth__card > p { color: var(--text-2); font-size: 14px; margin-bottom: 1.4rem; }
.auth__mobile-brand { display: none; align-items: center; gap: .7rem; margin-bottom: 1.4rem; }

@media (max-width: 940px) {
    .auth { grid-template-columns: 1fr; }
    .auth__aside { display: none; }
    .auth__mobile-brand { display: flex; }
}

/* ---------------------------------- Yazdırma ------------------------------- */

@media print {
    .sidebar, .topbar, .bottomnav, .no-print, .page-head__actions { display: none !important; }
    .main { margin: 0; }
    .content { padding: 0; }
    .card { box-shadow: none; border-color: #ddd; break-inside: avoid; }
    body { background: #fff; font-size: 12px; }
}

/* ---------------------------------- Ekstra --------------------------------- */

.sticky-actions {
    position: sticky; bottom: 0;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    padding: .75rem 1.1rem;
    display: flex; gap: .5rem; flex-wrap: wrap;
    z-index: 20;
}

.kv { display: flex; align-items: center; gap: .4rem; font-size: 12.5px; color: var(--text-2); }
.kv svg { opacity: .6; }

.divider-text {
    display: flex; align-items: center; gap: .8rem;
    color: var(--text-3); font-size: 12px; margin: 1.1rem 0;
}
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.scroll-x { overflow-x: auto; }

.link-muted { color: var(--text-2); }
.link-muted:hover { color: var(--brand-700); }

.code-pill {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 12.5px; font-weight: 700;
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: .12rem .45rem;
    letter-spacing: .02em;
}

.pin { display: inline-flex; gap: .4rem; }
.pin input {
    width: 44px; height: 52px;
    text-align: center; font-size: 21px; font-weight: 700;
    border: 1px solid var(--border-2); border-radius: 12px;
    background: var(--surface); color: var(--text);
}
.pin input:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 18%, transparent); }

/* ------------------------------ Sayfa yerleşimleri ------------------------- */

.grid-main { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }

@media (max-width: 1100px) {
    .grid-main { grid-template-columns: minmax(0, 1fr); }
}

.hidden-mobile { display: none; }
@media (min-width: 640px) { .hidden-mobile { display: inline; } }

details > summary { list-style: none; padding: .35rem 0; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸ "; }
details[open] > summary::before { content: "▾ "; }

/* Hata sayfaları */
.errorpage {
    min-height: 100vh;
    display: grid; place-items: center;
    padding: 2rem 1rem;
    text-align: center;
}
.errorpage__code {
    font-size: 76px; font-weight: 800; line-height: 1;
    background: linear-gradient(135deg, var(--brand-400), var(--brand-800));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Sistem Yöneticisi rozet/avatar rengi */
.avatar--admin { background: linear-gradient(135deg, #fb923c, #b91c1c); }

/* ------------------------- Üst bar: tema ve hesap butonu ------------------- */

.theme-btn { flex: 0 0 38px; }
.theme-btn .theme-btn__sun  { color: #d97706; display: grid; place-items: center; }
.theme-btn .theme-btn__moon { color: var(--brand-300); display: grid; place-items: center; }
.theme-btn span.hidden { display: none !important; }

.user-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    height: 38px;
    max-width: 220px;
    padding: 0 .6rem 0 .3rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.user-btn:hover { background: var(--surface-3); }
.user-btn:focus-visible {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 20%, transparent);
}

.user-btn__name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.1;
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Açılır menü oku */
.user-btn::after {
    content: "";
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-right: 1.7px solid var(--text-3);
    border-bottom: 1.7px solid var(--text-3);
    transform: rotate(45deg);
    transition: transform .18s;
}
.dropdown.is-open .user-btn::after { transform: rotate(-135deg); margin-top: 2px; }

/* Mobilde yalnızca avatar kalsın; isim üst barı taşırmasın */
@media (max-width: 640px) {
    .user-btn { max-width: none; padding: 0 .4rem 0 .3rem; }
    .user-btn__name { display: none; }
}