/* ==========================================================================
   U-ETDS Operasyon Paneli — tasarım sistemi
   Mobil öncelikli. Bileşen sınıfları: card, btn, field, input, badge, plate,
   table, tabs, toolbar, stat, drawer, steps, empty, callout, kv, pager.
   ========================================================================== */

:root {
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --brand: #ff6a13;
    --brand-600: #ea5a06;
    --brand-700: #c24a05;
    --brand-50: #fff4ec;
    --brand-100: #ffe4d1;
    --brand-glow: rgba(255, 106, 19, .35);

    --navy-950: #060b16;
    --navy-900: #0a1222;
    --navy-850: #0d1730;
    --navy-800: #111e3b;
    --navy-700: #1a2a4f;
    --navy-500: #3b4f7d;

    --bg: #f2f4f8;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #eef2f7;
    --line: #e5e9f0;
    --line-strong: #d3d9e3;
    --text: #0e1626;
    --text-2: #4a5568;
    --text-3: #667085;
    --line-hover: #b9c2d1;

    --success: #12b76a; --success-bg: #ecfdf3; --success-ink: #067647;
    --warning: #f79009; --warning-bg: #fffaeb; --warning-ink: #b54708;
    --danger:  #f04438; --danger-bg:  #fef3f2; --danger-ink:  #b42318;
    --info:    #2e90fa; --info-bg:    #eff8ff; --info-ink:    #175cd3;
    --muted:   #98a2b3; --muted-bg:   #f2f4f7; --muted-ink:   #475467;

    --radius-xs: 8px;
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
    --shadow: 0 2px 4px -2px rgba(16, 24, 40, .05), 0 12px 24px -6px rgba(16, 24, 40, .10);
    --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .28);
    --ring: 0 0 0 4px rgba(255, 106, 19, .16);

    --sidebar-w: 272px;
    --topbar-h: 64px;
    --nav-h: 68px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --safe-b: env(safe-area-inset-bottom, 0px);

    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #070c18;
    --surface: #0d1526;
    --surface-2: #111b30;
    --surface-3: #16223b;
    --line: #1d2a44;
    --line-strong: #283a5c;
    --text: #e8edf6;
    --text-2: #a7b2c6;
    --text-3: #6b7790;
    --line-hover: #3a4f78;
    --brand-50: rgba(255, 106, 19, .12);
    --brand-100: rgba(255, 106, 19, .22);
    --success-bg: rgba(18, 183, 106, .14); --success-ink: #4ade80;
    --warning-bg: rgba(247, 144, 9, .14);  --warning-ink: #fbbf24;
    --danger-bg:  rgba(240, 68, 56, .14);  --danger-ink:  #f87171;
    --info-bg:    rgba(46, 144, 250, .14); --info-ink:    #7cb8ff;
    --muted-bg:   rgba(152, 162, 179, .12); --muted-ink:  #a7b2c6;
    --shadow: 0 2px 4px -2px rgba(0, 0, 0, .4), 0 12px 24px -6px rgba(0, 0, 0, .45);
    --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
}

/* ───────── Temel ───────── */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font: 500 14px/1.55 var(--font);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: 22px; font-weight: 800; }
h2 { font-size: 16px; font-weight: 750; }
h3 { font-size: 14px; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--brand-100); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; }
.i-sm { width: 15px; height: 15px; }
.i-lg { width: 22px; height: 22px; }
.i-xl { width: 28px; height: 28px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* İki satırda kesilen uzun metin (dar tablo hücresinde lokasyon adı gibi); tamamı title ile */
.clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; min-width: 0; }
.strong { font-weight: 700; }
.right { text-align: right; }
.center { text-align: center; }
.hidden, [hidden] { display: none !important; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-nowrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line); margin: 4px 0; border: 0; }
@media (max-width: 639px) {
    .hide-sm { display: none !important; }
    .topbar .btn-primary span { display: none; }
    .topbar .btn-primary { width: 40px; padding: 0; }
}
@media (max-width: 1023px) { .hide-md { display: none !important; } }
@media (min-width: 1024px) { .only-md { display: none !important; } }

/* ───────── Uygulama iskeleti ───────── */

.app { min-height: 100dvh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 60;
    width: var(--sidebar-w);
    display: flex; flex-direction: column;
    background:
        radial-gradient(120% 60% at 0% 0%, rgba(255, 106, 19, .16), transparent 55%),
        radial-gradient(90% 50% at 100% 100%, rgba(46, 144, 250, .10), transparent 60%),
        linear-gradient(180deg, var(--navy-900), var(--navy-950));
    color: #c9d3e6;
    transform: translateX(-100%);
    transition: transform .35s var(--ease);
    padding: 16px 14px calc(16px + var(--safe-b));
    overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .12) transparent;
}
.sidebar.open { transform: none; box-shadow: var(--shadow-lg); }

.brand {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 10px 18px; color: #fff; text-decoration: none !important;
}
.brand-mark {
    width: 40px; height: 40px; border-radius: 12px; flex: none;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #ff8a3d, var(--brand) 45%, var(--brand-700));
    box-shadow: 0 8px 20px -6px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, .35);
    color: #fff;
}
.brand-mark .i { width: 22px; height: 22px; }
.brand-name { font-weight: 800; font-size: 15px; letter-spacing: -.01em; line-height: 1.2; }
.brand-sub { font-size: 11.5px; color: #8b98b3; font-weight: 600; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #61708f; font-weight: 800; padding: 14px 12px 6px; }
.nav a {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 11px;
    color: #b6c1d6; font-weight: 650; font-size: 13.5px;
    text-decoration: none; transition: background .2s, color .2s;
}
.nav a .i { color: #7d8aa6; transition: color .2s; }
.nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav a:hover .i { color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(255, 106, 19, .2), rgba(255, 106, 19, .04)); color: #fff; }
.nav a.active .i { color: var(--brand); }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 4px 4px 0; background: var(--brand); box-shadow: 0 0 12px var(--brand); }
.nav .count { margin-left: auto; font-size: 11px; padding: 1px 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: #d5dceb; }

.sidebar-foot { margin-top: auto; padding-top: 16px; display: grid; gap: 8px; }
.mode-pill {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
    background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); font-size: 12px; color: #aab5ca;
}
.mode-pill b { color: #fff; }
.mode-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px rgba(152, 162, 179, .15); }
.mode-live .mode-dot { background: var(--success); box-shadow: 0 0 0 4px rgba(18, 183, 106, .2); animation: pulse 2s infinite; }
.mode-test .mode-dot { background: var(--warning); box-shadow: 0 0 0 4px rgba(247, 144, 9, .2); }
.mode-demo .mode-dot { background: var(--info); box-shadow: 0 0 0 4px rgba(46, 144, 250, .2); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(18, 183, 106, 0); } }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; color: #dfe6f3; }
.user-chip:hover { background: rgba(255, 255, 255, .05); }
.avatar {
    width: 36px; height: 36px; border-radius: 11px; flex: none;
    display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff;
    background: linear-gradient(135deg, #3b4f7d, #1a2a4f);
}
.avatar.brand { background: linear-gradient(135deg, #ff8a3d, var(--brand-700)); }

.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(6, 11, 22, .5); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.show { opacity: 1; pointer-events: auto; }

.main { min-width: 0; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }

.topbar {
    position: sticky; top: 0; z-index: 40;
    height: var(--topbar-h);
    display: flex; align-items: center; gap: 10px;
    padding: 0 16px;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(1.6) blur(14px);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, background .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-title { min-width: 0; }
.topbar-title h1 { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title .crumb { font-size: 11.5px; color: var(--text-3); font-weight: 600; }

.page { padding: 4px 16px 24px; max-width: 1480px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.page-head .lead { color: var(--text-2); font-size: 13px; margin-top: 4px; }

/* Mobil alt gezinme */
.bottom-nav {
    position: fixed; inset: auto 0 0 0; z-index: 45;
    height: calc(var(--nav-h) + var(--safe-b));
    padding: 6px 8px var(--safe-b);
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.8) blur(18px);
    -webkit-backdrop-filter: saturate(1.8) blur(18px);
    border-top: 1px solid var(--line);
}
.bottom-nav a, .bottom-nav button {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 2px; border: 0; background: none; cursor: pointer;
    color: var(--text-3); font-size: 10.5px; font-weight: 700; text-decoration: none;
    border-radius: 12px; transition: color .2s;
}
.bottom-nav .i { width: 22px; height: 22px; }
.bottom-nav .active { color: var(--brand); }
.bottom-nav .fab {
    width: 52px; height: 52px; margin: -26px auto 0; border-radius: 18px;
    display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, #ff8a3d, var(--brand) 50%, var(--brand-700));
    box-shadow: 0 10px 24px -6px var(--brand-glow), 0 0 0 5px var(--bg);
}
.bottom-nav .fab .i { width: 24px; height: 24px; }
.nav-spacer { height: calc(var(--nav-h) + var(--safe-b)); }

/* Şoför alt menüsü: üç öğe; geniş ekranda içerik sütunuyla aynı genişlikte ortalanır */
.bottom-nav.driver-nav { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 768px) {
    .bottom-nav.driver-nav { left: 50%; right: auto; width: 720px; max-width: 100%; transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0; }
}

/* Tema düğmesi: koyu temada güneş, açık temada ay */
:root[data-theme="dark"] .theme-moon, :root:not([data-theme="dark"]) .theme-sun { display: none; }

.page-foot { padding: 0 16px 20px; text-align: center; color: var(--text-3); font-size: 11.5px; font-weight: 600; }

@media (min-width: 1024px) {
    .sidebar { transform: none; }
    .main { margin-left: var(--sidebar-w); padding-bottom: 32px; }
    .topbar { padding: 0 28px; }
    .page { padding: 6px 28px 32px; gap: 22px; }
    .app .bottom-nav, .menu-toggle, .scrim { display: none !important; }
}

/* ───────── Kart ───────── */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    min-width: 0;
}
.card-head {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.card-head .sub { color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.card-head-icon {
    width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none;
    background: var(--brand-50); color: var(--brand-600);
}
.card-head-icon[class*="tone-"] { background: var(--t-bg); color: var(--t-fg); }
.card-body { padding: 18px; }
.card-foot { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.card-flush .card-body { padding: 0; }
.card.elevated { box-shadow: var(--shadow); border-color: transparent; }

.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid.split { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } }
.sticky-side { position: sticky; top: calc(var(--topbar-h) + 12px); }

/* ───────── Butonlar ───────── */

.btn {
    --b-bg: var(--surface); --b-fg: var(--text); --b-bd: var(--line-strong);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 0 16px;
    border-radius: 12px; border: 1px solid var(--b-bd);
    background: var(--b-bg); color: var(--b-fg);
    font-weight: 700; font-size: 13.5px; line-height: 1; white-space: nowrap;
    cursor: pointer; user-select: none; text-decoration: none !important;
    transition: transform .12s var(--ease), box-shadow .2s, background .2s, border-color .2s, opacity .2s;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover { box-shadow: var(--shadow-sm); }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .85; }
.btn[aria-busy="true"] .i:first-child { animation: spin 1s linear infinite; }
.btn-primary { --b-bg: linear-gradient(180deg, #ff7d2e, var(--brand-600)); --b-fg: #fff; --b-bd: transparent; box-shadow: 0 6px 16px -6px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primary:hover { box-shadow: 0 10px 22px -8px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-dark { --b-bg: var(--navy-800); --b-fg: #fff; --b-bd: transparent; }
:root[data-theme="dark"] .btn-dark { --b-bg: #22335a; }
.btn-ghost { --b-bg: transparent; --b-bd: transparent; --b-fg: var(--text-2); }
.btn-ghost:hover { --b-bg: var(--surface-3); box-shadow: none; }
.btn-danger { --b-bg: var(--danger-bg); --b-fg: var(--danger-ink); --b-bd: transparent; }
.btn-success { --b-bg: var(--success-bg); --b-fg: var(--success-ink); --b-bd: transparent; }
.btn-warning { --b-bg: var(--warning-bg); --b-fg: var(--warning-ink); --b-bd: transparent; }
.btn-info { --b-bg: var(--info-bg); --b-fg: var(--info-ink); --b-bd: transparent; }
.btn-soft { --b-bg: var(--brand-50); --b-fg: var(--brand-700); --b-bd: transparent; }
:root[data-theme="dark"] .btn-soft { --b-fg: #ffb07d; }
.btn-whatsapp { --b-bg: #117a40; --b-fg: #fff; --b-bd: transparent; } /* beyaz yazıyla ≥4.5:1 */
.btn-sm { min-height: 32px; padding: 0 11px; border-radius: 10px; font-size: 12.5px; gap: 6px; }
.btn-sm .i { width: 15px; height: 15px; }
.btn-lg { min-height: 52px; padding: 0 22px; border-radius: 15px; font-size: 15px; }
.btn-icon { padding: 0; width: 40px; }
.btn-icon.btn-sm { width: 32px; }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* ───────── Form ───────── */

.form-grid { display: grid; gap: 14px 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) {
    .form-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .form-grid > * { grid-column: span 12; }
    .form-grid > .span-2 { grid-column: span 2; }
    .form-grid > .span-3 { grid-column: span 3; }
    .form-grid > .span-4 { grid-column: span 4; }
    .form-grid > .span-5 { grid-column: span 5; }
    .form-grid > .span-6 { grid-column: span 6; }
    .form-grid > .span-8 { grid-column: span 8; }
    .form-grid > .span-9 { grid-column: span 9; }
}
.form-section { display: flex; align-items: center; gap: 10px; margin: 6px 0 -2px; color: var(--text-2); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.form-section::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 12.5px; font-weight: 700; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.req { color: var(--danger); font-weight: 800; }
.hint { font-size: 12px; color: var(--text-3); font-weight: 500; }
.field-error { font-size: 12px; color: var(--danger-ink); font-weight: 650; display: flex; gap: 6px; align-items: flex-start; }
.field.has-error .input, .field.has-error .ts-control { border-color: var(--danger) !important; box-shadow: 0 0 0 4px rgba(240, 68, 56, .12) !important; }

.input {
    width: 100%; min-height: 44px; padding: 10px 13px;
    border-radius: 12px; border: 1px solid var(--line-strong);
    background: var(--surface); color: var(--text);
    font-size: 14.5px; font-weight: 550;
    transition: border-color .2s, box-shadow .2s, background .2s;
    -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: var(--text-3); font-weight: 500; }
.input:hover { border-color: var(--line-hover); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input:disabled, .input[readonly] { background: var(--surface-2); color: var(--text-2); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
select.input {
    padding-right: 36px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a95a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.input.mono { font-family: var(--mono); letter-spacing: .02em; }
.input.upper { text-transform: uppercase; }
@media (max-width: 719px) { .input { font-size: 16px; } } /* iOS yakınlaştırmasını engeller */

.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 0; flex: 1; min-width: 0; }
.input-group > :first-child { border-radius: 12px 0 0 12px; }
.input-group > :last-child { border-radius: 0 12px 12px 0; }
.input-group > * + * { margin-left: -1px; }
.addon { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text-2); font-weight: 700; }
.input-group .btn { border-radius: 0; min-height: 44px; }

.input-icon { position: relative; }
.input-icon > .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon > .input { padding-left: 40px; }

/* Anahtar (switch) */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 650; color: var(--text-2); user-select: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .25s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { box-shadow: var(--ring); }

/* Segment (radio grubu) */
.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: 13px; background: var(--surface-3); border: 1px solid var(--line); flex-wrap: wrap; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 10px; font-weight: 700; font-size: 13px; color: var(--text-2); cursor: pointer; transition: all .2s; }
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + span { box-shadow: var(--ring); }

/* Seçim çipi (checkbox) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); font-weight: 700; font-size: 13px; color: var(--text-2); cursor: pointer; transition: all .15s; background: var(--surface); }
.chip-check input:checked + span { background: var(--brand-50); border-color: var(--brand); color: var(--brand-700); }
:root[data-theme="dark"] .chip-check input:checked + span { color: #ffb07d; }

/* Hızlı seçim çipleri (butonlar) */
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick button { border: 1px dashed var(--line-strong); background: transparent; color: var(--text-2); font-weight: 700; font-size: 12px; padding: 5px 10px; border-radius: 99px; cursor: pointer; transition: all .15s; }
.quick button:hover { border-color: var(--brand); color: var(--brand-600); border-style: solid; background: var(--brand-50); }

/* ───────── Tom Select uyumu ───────── */

.ts-wrapper { min-width: 0; }
.ts-wrapper .ts-control {
    min-height: 44px; padding: 8px 36px 8px 12px !important;
    border-radius: 12px !important; border: 1px solid var(--line-strong) !important;
    background: var(--surface) !important; color: var(--text) !important;
    box-shadow: none !important; font-size: 14.5px; font-weight: 550;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a95a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: right 12px center !important;
}
.ts-wrapper.focus .ts-control { border-color: var(--brand) !important; box-shadow: var(--ring) !important; }
.ts-wrapper.disabled .ts-control { background-color: var(--surface-2) !important; opacity: .8; }
.ts-control input { color: var(--text) !important; font-size: 14.5px !important; }
.ts-control input::placeholder { color: var(--text-3); }
.ts-wrapper.multi .ts-control > div { background: var(--brand-50) !important; color: var(--brand-700) !important; border: 0 !important; border-radius: 8px !important; padding: 3px 8px !important; font-weight: 700; font-size: 12.5px; }
:root[data-theme="dark"] .ts-wrapper.multi .ts-control > div { color: #ffb07d !important; }
.ts-wrapper.multi .ts-control > div .remove { border-left: 0 !important; color: inherit; opacity: .7; }
.ts-dropdown {
    border: 1px solid var(--line) !important; border-radius: 14px !important; margin-top: 6px !important;
    box-shadow: var(--shadow-lg) !important; background: var(--surface) !important; color: var(--text) !important;
    overflow: hidden; z-index: 1200 !important;
}
body > .ts-dropdown { z-index: 2100 !important; } /* pencere (SweetAlert, 2000) içindeki seçimler de üstte kalsın */

/* Lokasyon listesi: ad + il + kod rozeti, yapışkan grup başlıkları */
.ts-dropdown .optgroup + .optgroup { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.ts-dropdown .loc { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; }
.loc-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); transition: background .15s, color .15s; }
.loc-icon.air { background: var(--brand-50); color: var(--brand-600); }
.ts-dropdown .active .loc-icon { background: var(--brand); color: #fff; }
.loc-body { display: flex; flex-direction: column; min-width: 0; }
.loc-name { font-weight: 700; font-size: 13.5px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
.loc-prov { font-size: 11.5px; color: var(--text-3); font-weight: 650; }
.loc-code { font: 650 11.5px var(--mono); color: var(--text-3); background: var(--surface-3); padding: 3px 8px; border-radius: 99px; }
.ts-dropdown .active .loc-code { background: var(--surface); }
.loc-item { display: flex; align-items: center; gap: 8px; min-width: 0; }
.loc-item .i { color: var(--brand-600); }
.loc-item-prov { color: var(--text-3); font-weight: 600; }
.ts-dropdown .no-results { display: flex; gap: 10px; align-items: flex-start; }
.ts-dropdown .no-results .i { flex: none; margin-top: 2px; }
.ts-dropdown .ts-dropdown-content { max-height: min(340px, 50vh); padding: 6px; }
.ts-dropdown .option { padding: 9px 10px !important; border-radius: 9px; font-weight: 550; display: flex; align-items: center; gap: 8px; }
.ts-dropdown .option .i { color: var(--text-3); }
.ts-dropdown .active { background: var(--brand-50) !important; color: var(--text) !important; }
.ts-dropdown .selected { font-weight: 800; }
.ts-dropdown .optgroup-header { position: sticky; top: -6px; z-index: 1; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); padding: 10px 10px 6px !important; background: var(--surface) !important; }
.ts-dropdown .no-results { padding: 12px !important; color: var(--text-3); }
.ts-dropdown .option .sub { margin-left: auto; font-size: 11.5px; color: var(--text-3); }
.ts-dropdown .highlight { background: var(--brand-100) !important; border-radius: 3px; }

/* ───────── Rozet, plaka ───────── */

.badge {
    --t-bg: var(--muted-bg); --t-fg: var(--muted-ink);
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 9px; border-radius: 99px;
    background: var(--t-bg); color: var(--t-fg);
    font-size: 11.5px; font-weight: 750; line-height: 1.5; white-space: nowrap;
}
.badge .i { width: 13px; height: 13px; }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tone-success { --t-bg: var(--success-bg); --t-fg: var(--success-ink); }
.tone-warning { --t-bg: var(--warning-bg); --t-fg: var(--warning-ink); }
.tone-danger { --t-bg: var(--danger-bg); --t-fg: var(--danger-ink); }
.tone-info { --t-bg: var(--info-bg); --t-fg: var(--info-ink); }
.tone-muted { --t-bg: var(--muted-bg); --t-fg: var(--muted-ink); }
.tone-neutral { --t-bg: var(--surface-3); --t-fg: var(--text-2); }
.tone-brand { --t-bg: var(--brand-50); --t-fg: var(--brand-700); }
.badge.outline { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }

/* Türk plakası görünümü */
.plate {
    display: inline-flex; align-items: stretch; height: 24px;
    border-radius: 6px; overflow: hidden;
    border: 1.5px solid #1b1f2a; background: #fff; color: #0e1626;
    font: 800 12.5px/1 var(--mono); letter-spacing: .04em; white-space: nowrap;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}
.plate::before { content: "TR"; display: grid; place-items: center; padding: 0 4px; background: #1849a9; color: #fff; font-size: 8px; letter-spacing: 0; }
.plate span { display: grid; place-items: center; padding: 0 7px; }
.plate.lg { height: 32px; font-size: 16px; }
.plate.lg::before { font-size: 9.5px; padding: 0 6px; }

/* ───────── Tablo ───────── */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th {
    position: sticky; top: 0; z-index: 1;
    text-align: left; padding: 11px 14px;
    background: var(--surface-2); color: var(--text-3);
    font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
    border-bottom: 1px solid var(--line);
}
.table th.right, .table td.right { text-align: right; } /* "İşlemler" başlığı sağa yaslı düğmelerle hizalı */
.table th.center, .table td.center { text-align: center; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.is-clickable { cursor: pointer; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.table .cell-title { font-weight: 700; color: var(--text); }
.table .cell-sub { font-size: 12px; color: var(--text-3); font-weight: 550; margin-top: 2px; }

/* Mobilde tablolar karta dönüşür (td'lerde data-label) */
@media (max-width: 767px) {
    .table-cards thead { display: none; }
    .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
    .table-cards tbody { display: flex; flex-direction: column; gap: 10px; padding: 10px; }
    .table-cards tr { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-xs); }
    .table-cards tr:hover { background: var(--surface); }
    .table-cards td { border: 0; padding: 5px 0; display: flex; gap: 12px; justify-content: space-between; align-items: center; text-align: right; }
    .table-cards td::before { content: attr(data-label); font-size: 11px; font-weight: 800; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; text-align: left; flex: none; }
    .table-cards td[data-label=""]::before, .table-cards td:not([data-label])::before { display: none; }
    .table-cards td.card-title { display: block; text-align: left; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px dashed var(--line); }
    .table-cards td.card-title::before { display: none; }
    .table-cards td.actions-cell { justify-content: flex-end; padding-top: 10px; }
    .table-cards td.actions-cell::before { display: none; }
    .table-cards .actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
    .table-cards td > div, .table-cards td > span { min-width: 0; }
    .card .table-cards tbody { padding: 12px; }
}

/* ───────── Araç çubuğu ve sayfalama ───────── */

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.toolbar .input, .toolbar .ts-wrapper { min-width: 0; }
.toolbar .grow { flex: 1 1 240px; }
.toolbar .fixed { flex: 0 1 var(--fixed-w, 200px); } /* --fixed-w: 5 süzgeç tek satıra sığsın diye sayfa daraltabilir */
@media (max-width: 639px) { .toolbar .fixed { flex: 1 1 calc(50% - 5px); } }
@media (max-width: 479px) { .toolbar .fixed { flex-basis: 100%; } } /* dar telefonda seçili uzun değer kesilmesin */

.pager { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager-links { display: flex; gap: 4px; }
.pager-links a, .pager-links span { min-width: 34px; height: 34px; padding: 0 10px; display: grid; place-items: center; border-radius: 10px; font-weight: 700; font-size: 13px; color: var(--text-2); text-decoration: none; }
.pager-links a:hover { background: var(--surface-3); }
.pager-links .current { background: var(--navy-800); color: #fff; }
/* "Sayfada [25] kayıt göster" (eski paneldeki sayfa uzunluğu seçimi) */
.pager-info { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.pager-size { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.pager-size .input { width: auto; min-height: 34px; padding: 4px 30px 4px 10px; border-radius: 10px; font-size: 13px; background-position: right 8px center; }
@media (max-width: 719px) { .pager-size .input { font-size: 16px; } }
@media print { .pager-size { display: none !important; } }

[data-live-list] { position: relative; transition: opacity .2s; }
[data-live-list].is-loading { opacity: .55; pointer-events: none; }

/* ───────── İstatistik ───────── */

.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .stats.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.stat {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; gap: 10px;
    padding: 16px; border-radius: var(--radius-lg);
    background: var(--surface); border: 1px solid var(--line);
    color: inherit; text-decoration: none !important;
    transition: transform .25s var(--ease), box-shadow .25s;
}
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--t-bg, var(--brand-50)); color: var(--t-fg, var(--brand-600)); }
.stat-label { font-size: 12px; font-weight: 750; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.stat-foot { font-size: 12px; color: var(--text-2); font-weight: 600; }
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--t-bg, var(--brand-50)); opacity: .6; pointer-events: none; }

/* ───────── Hero ───────── */

.hero {
    position: relative; overflow: hidden; isolation: isolate;
    border-radius: var(--radius-xl);
    padding: 22px;
    color: #fff;
    background:
        radial-gradient(120% 120% at 100% 0%, rgba(255, 106, 19, .45), transparent 50%),
        radial-gradient(80% 90% at 0% 100%, rgba(46, 144, 250, .25), transparent 60%),
        linear-gradient(135deg, var(--navy-800), var(--navy-950));
    box-shadow: var(--shadow);
}
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
    background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 70%);
}
.hero h1, .hero h2 { color: #fff; }
.hero .lead { color: #c6d1e5; font-size: 13.5px; margin-top: 6px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #ffb98c; }
.hero-route { position: absolute; right: -10px; bottom: -10px; width: 340px; opacity: .9; z-index: -1; pointer-events: none; }
@media (min-width: 768px) { .hero { padding: 28px 32px; } }

/* ───────── Boş durum, uyarı ───────── */

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 44px 20px; color: var(--text-2); }
.empty-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); }
.empty-icon .i { width: 28px; height: 28px; }
.empty h3 { font-size: 15px; }
.empty p { font-size: 13px; color: var(--text-3); max-width: 380px; }

.callout {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 12px 14px; border-radius: 14px;
    background: var(--t-bg, var(--info-bg)); color: var(--t-fg, var(--info-ink));
    font-size: 13px; font-weight: 600;
}
.callout .i { margin-top: 1px; }
.callout b { font-weight: 800; }
.callout p + p { margin-top: 4px; }

/* ───────── Sekmeler ───────── */

.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-3); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 11px; border: 0; background: transparent; color: var(--text-2); font-weight: 750; font-size: 13px; cursor: pointer; text-decoration: none !important; transition: all .2s; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active, .tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tab .badge { padding: 0 7px; }
/* .tabs.fit: telefonda sekmeler kaydırılmadan eşit paylaşılır, uzun etiket iki satıra iner */
@media (max-width: 639px) {
    .tabs.fit .tab { flex: 1 1 0; min-width: 0; justify-content: center; text-align: center; white-space: normal; line-height: 1.2; padding: 8px 8px; gap: 6px; }
}

/* ───────── Anahtar-değer listesi ───────── */

.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 10px 14px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--text-3); font-weight: 650; }
.kv dd { margin: 0; font-weight: 650; min-width: 0; overflow-wrap: anywhere; }

/* ───────── Adımlar (Bakanlık gönderim ilerlemesi) ───────── */

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.step { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 10px 12px; border-radius: 12px; align-items: start; transition: background .3s; }
.step-dot { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); }
.step-dot .i { width: 16px; height: 16px; }
.step-title { font-weight: 750; font-size: 13.5px; color: var(--text); }
.step-msg { font-size: 12.5px; color: var(--text-2); font-weight: 550; margin-top: 2px; overflow-wrap: anywhere; }
.step.is-running .step-dot { background: var(--brand-50); color: var(--brand); }
.step.is-done .step-dot { background: var(--success-bg); color: var(--success-ink); }
.step.is-skipped .step-dot { background: var(--muted-bg); color: var(--muted-ink); }
.step.is-failed { background: var(--danger-bg); }
.step.is-failed .step-dot { background: var(--danger); color: #fff; }

/* Zaman çizelgesi (API kayıtları) */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 14px 26px; font-size: 12.5px; }
.timeline li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--success); }
.timeline li.fail::before { border-color: var(--danger); background: var(--danger); }
.timeline li[data-trip], .check-list li[data-trip] { cursor: pointer; }
.timeline .t-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 750; }
.timeline .t-msg { color: var(--text-2); margin-top: 2px; overflow-wrap: anywhere; }

/* ───────── Çekmece (sağ panel / mobilde alt sayfa) ───────── */

.drawer-scrim { position: fixed; inset: 0; z-index: 1050; background: rgba(6, 11, 22, .55); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s; }
.drawer-scrim.show { opacity: 1; }
.drawer {
    position: fixed; z-index: 1060;
    inset: auto 0 0 0; max-height: 92dvh;
    display: flex; flex-direction: column;
    background: var(--bg); color: var(--text);
    border-radius: 24px 24px 0 0;
    box-shadow: var(--shadow-lg);
    transform: translateY(100%);
    transition: transform .42s var(--ease);
}
.drawer.show { transform: none; }
.drawer-grab { width: 44px; height: 5px; border-radius: 99px; background: var(--line-strong); margin: 10px auto 2px; flex: none; }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 12px 18px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.drawer-head h2 { font-size: 17px; }
.drawer-body { overflow-y: auto; padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.drawer-foot { padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface); display: flex; gap: 8px; flex-wrap: wrap; }
.drawer-foot .btn { flex: 1 1 auto; }
@media (min-width: 768px) {
    .drawer { inset: 0 0 0 auto; width: min(620px, 100vw); max-height: none; border-radius: 24px 0 0 24px; transform: translateX(100%); }
    .drawer-grab { display: none; }
    .drawer-head { padding: 20px 22px 16px; border-radius: 24px 0 0 0; }
    .drawer-body { padding: 20px 22px 24px; }
    .drawer-foot { padding: 14px 22px; border-radius: 0 0 0 24px; }
    .drawer-foot .btn { flex: 0 1 auto; }
}

/* Rota görseli (sefer kartında nereden → nereye) */
.route { display: grid; grid-template-columns: 18px 1fr; gap: 2px 10px; align-items: center; }
.route-dot { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--brand); background: var(--surface); justify-self: center; }
.route-dot.end { border-color: var(--navy-700); background: var(--navy-700); }
:root[data-theme="dark"] .route-dot.end { border-color: #8fa3cc; background: #8fa3cc; }
.route-line { width: 2px; height: 18px; justify-self: center; background: repeating-linear-gradient(var(--line-strong) 0 4px, transparent 4px 7px); }
.route-text { font-weight: 700; font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.route-time { font-size: 12px; color: var(--text-3); font-weight: 650; }

/* Sefer kartı (mobil listeler, şoför paneli) */
.trip-card {
    display: flex; flex-direction: column; gap: 12px;
    padding: 14px 16px; border-radius: 18px;
    background: var(--surface); border: 1px solid var(--line);
    box-shadow: var(--shadow-xs); cursor: pointer; text-align: left; width: 100%;
    transition: transform .2s var(--ease), box-shadow .2s;
}
.trip-card:hover { box-shadow: var(--shadow); }
.trip-card:active { transform: scale(.99); }

/* Yolcu/personel satırları (formda) */
.person-list { display: flex; flex-direction: column; gap: 10px; }
.person-row {
    position: relative; display: grid; gap: 10px;
    grid-template-columns: 1fr 1fr;
    padding: 12px; padding-right: 48px; border-radius: 16px;
    background: var(--surface-2); border: 1px solid var(--line);
}
.person-row .seat { position: absolute; left: -9px; top: -9px; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--navy-800); color: #fff; font-size: 11px; font-weight: 800; }
.person-row .remove { position: absolute; right: 8px; top: 8px; }
.person-row .full { grid-column: 1 / -1; }
@media (min-width: 900px) {
    .person-row { grid-template-columns: 1.1fr 1.1fr 1fr .9fr .7fr; align-items: end; }
    .person-row.staff { grid-template-columns: .8fr 1fr 1fr 1fr .8fr .6fr; }
    .person-row.staff.system { grid-template-columns: 2fr 1fr; }
    .person-row .full { grid-column: auto; }
}

/* Özet paneli */
.summary { display: flex; flex-direction: column; gap: 14px; }
.summary-big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; font-weight: 600; color: var(--text-2); overflow-wrap: anywhere; }
.check-list li > * { min-width: 0; }
.check-list li .i { width: 17px; height: 17px; margin-top: 1px; color: var(--text-3); }
.check-list li.ok .i { color: var(--success); }
.check-list li.warn .i { color: var(--warning); }
.check-list li.bad .i { color: var(--danger); }

/* Mobil yapışkan eylem çubuğu */
.action-bar {
    position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 30;
    display: flex; gap: 10px; align-items: center;
    padding: 10px; border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
@media (min-width: 1024px) { .action-bar { bottom: 16px; } }
.driver-shell .action-bar { bottom: calc(var(--nav-h) + var(--safe-b) + 8px); }

/* İskelet yükleyici */
.skeleton { position: relative; overflow: hidden; background: var(--surface-3); border-radius: 10px; min-height: 14px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); animation: shimmer 1.3s infinite; }
:root[data-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ───────── Giriş ekranı ───────── */

.auth {
    position: relative; min-height: 100dvh; overflow: hidden; isolation: isolate;
    display: grid; place-items: center; padding: 84px 16px calc(28px + var(--safe-b));
    background: var(--navy-950); color: #fff;
}
/* Paralaks kaydırmasında kenar açılmasın diye görsel alanı 12px taşar */
.auth-bg { position: absolute; inset: -12px; z-index: -2; will-change: transform; }
.auth-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 55% center; transform: scale(1.1); animation: authZoom 16s cubic-bezier(.22, 1, .36, 1) forwards; }
@keyframes authZoom { to { transform: scale(1.03); } }
.auth-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6, 11, 22, .78) 0%, rgba(6, 11, 22, .5) 40%, rgba(6, 11, 22, .88) 100%); }

/* Mobil marka başlığı (masaüstünde logo fotoğrafın içinde) */
.auth-top { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; align-items: center; gap: 12px; }
.auth-logo { width: 44px; height: 44px; border-radius: 12px; background: #fff; padding: 3px; box-shadow: var(--shadow); }
.auth-top-name { font-weight: 800; font-size: 15px; letter-spacing: .02em; text-transform: uppercase; }
.auth-top-sub { font-size: 12px; color: #aab6cd; font-weight: 650; }

.auth-panel {
    width: 100%; max-width: 1120px; display: grid; grid-template-columns: minmax(0, 1fr);
    border-radius: 26px; overflow: hidden;
    box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .1);
    transform-style: preserve-3d;
}
.auth-intro {
    display: flex; flex-direction: column; gap: 14px; padding: 26px 22px 22px;
    background: linear-gradient(165deg, rgba(10, 18, 34, .82), rgba(10, 18, 34, .55));
    backdrop-filter: blur(12px) saturate(1.3); -webkit-backdrop-filter: blur(12px) saturate(1.3);
}
.auth-intro h1 { font-size: clamp(28px, 4.2vw, 46px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: #fff; }
.auth-intro p { color: #b9c4d9; font-size: 14.5px; max-width: 480px; }
.auth-route { display: none; width: min(100%, 320px); height: auto; margin: 6px 0; }
.auth-route text { fill: #c6d1e5; font: 700 11px var(--font); letter-spacing: .04em; }
.auth-route-draw { stroke-dashoffset: 0; animation: authDash 1.6s linear infinite; }
@keyframes authDash { to { stroke-dashoffset: -30; } }
.auth-car { filter: drop-shadow(0 0 6px #ffb27a); }
.auth-pin circle:first-child { animation: authPulse 2.4s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes authPulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }
.auth-feats { display: none; list-style: none; margin: auto 0 0; padding: 0; gap: 10px; }
.auth-feat { display: flex; align-items: center; gap: 12px; font-weight: 650; color: #e3e9f4; font-size: 14px; }
.auth-feat .fi { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); color: #ffb27a; }

/* Form paneli her zaman açık temada: bileşen değişkenleri yerel olarak yeniden tanımlanır */
.auth-form {
    --surface: #fff; --surface-2: #f7f8fb; --surface-3: #eef1f6; --line: #e3e8f0; --line-strong: #cfd6e2;
    --text: #0e1626; --text-2: #4a5568; --text-3: #7c879b; --brand-50: #fff4ec; --brand-100: #ffe4d1;
    --danger-bg: #fef3f2; --danger-ink: #b42318; --warning-bg: #fffaeb; --warning-ink: #b54708;
    --success-bg: #ecfdf3; --success-ink: #067647; --info-bg: #eff8ff; --info-ink: #175cd3;
    color-scheme: light;
    display: flex; flex-direction: column; gap: 16px; padding: 28px 22px calc(24px + var(--safe-b));
    background: #fbfbfd; color: var(--text);
}
.auth-form .eyebrow { color: var(--brand-600); }
.auth-form h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--text); margin-top: 6px; }
.auth-form .lead { color: var(--text-2); font-size: 13.5px; margin-top: 6px; }
.auth-form .input { min-height: 50px; }
.auth-form .input:hover { border-color: #b4bfd0; }
.auth-logo-tile { width: 72px; height: 72px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); padding: 8px; display: grid; place-items: center; }
.auth-logo-tile img { width: 100%; height: 100%; object-fit: contain; }
.auth-submit { position: relative; overflow: hidden; }
.auth-submit::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .35) 50%, transparent 80%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.auth-submit:hover::after { transform: translateX(120%); }
.auth-foot { text-align: center; color: var(--text-3); font-size: 12px; font-weight: 600; }
.captcha-row { display: flex; align-items: center; gap: 8px; }
.captcha-row img { flex: none; border-radius: 10px; border: 1px solid var(--line); background: #eef2f8; }
.captcha-row .input { min-width: 0; flex: 1; font: 700 18px var(--mono); text-align: center; letter-spacing: .1em; }
@media (max-width: 380px) { .captcha-row img { width: 136px; height: auto; } }

@media (min-width: 980px) {
    .auth { padding: 40px 24px; }
    .auth-shade { background: linear-gradient(100deg, rgba(10, 18, 34, .5), rgba(10, 18, 34, .18) 55%, rgba(10, 18, 34, .45)); }
    /* Masaüstünde fotoğraf kırpılmaz: tam genişlik, altta kalan boşluk lacivert zemine eritilir (logo, pinler ve alt yazı görünür kalır) */
    .auth-bg img {
        height: auto; object-fit: fill; transform: none; animation: none;
        mask-image: linear-gradient(#000 82%, transparent); -webkit-mask-image: linear-gradient(#000 82%, transparent);
    }
    .auth-top { display: none; }
    .auth-panel { grid-template-columns: minmax(0, 1.2fr) 460px; min-height: 620px; }
    .auth-intro { padding: 48px 44px 40px; }
    .auth-route, .auth-feats { display: grid; }
    .auth-form { padding: 48px 44px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .auth-bg img, .auth-route-draw, .auth-pin circle:first-child { animation: none; } }

/* Giriş ekranları arası geçiş bağlantısı */
.auth-switch { text-align: center; color: var(--text-2); font-size: 13px; font-weight: 600; }
.auth-switch a { color: var(--brand-700); font-weight: 800; }

/* Şoför girişi (eski paneldeki ayrı ekran): fotoğraf üzerinde tek kart; masaüstünde sağda, telefonda tam genişlik */
.auth--driver .auth-panel { max-width: 420px; }
.auth--driver .auth-form { border-radius: 26px; text-align: center; align-items: stretch; }
.auth--driver .auth-form .field { text-align: left; }
.auth--driver .auth-logo-tile { margin: 0 auto; }
.auth--driver .auth-form .eyebrow { justify-content: center; }
@media (min-width: 980px) {
    .auth--driver { place-items: center end; padding-right: max(24px, 6vw); }
    .auth--driver .auth-panel { grid-template-columns: minmax(0, 1fr); min-height: 0; width: 400px; }
    .auth--driver .auth-form { padding: 36px 32px; background: rgba(251, 251, 253, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
}

/* ───────── Şoför paneli kabuğu ───────── */

.driver-shell { max-width: 720px; margin: 0 auto; padding: 12px 14px calc(28px + var(--safe-b)); display: flex; flex-direction: column; gap: 16px; }
.driver-shell.wide { max-width: 1240px; } /* Gönderilenler: masaüstünde tablo sütunları sığsın */
.driver-top { display: flex; align-items: center; gap: 10px; padding: 4px 2px; }
.action-tiles { display: grid; gap: 12px; }
.tile {
    display: flex; align-items: center; gap: 14px;
    padding: 16px; border-radius: 20px;
    background: var(--surface); border: 1px solid var(--line);
    color: var(--text); text-decoration: none !important;
    box-shadow: var(--shadow-xs); transition: transform .2s var(--ease), box-shadow .2s;
}
.tile:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.tile:active { transform: scale(.985); }
.tile-icon { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; flex: none; color: #fff; }
.tile-icon .i { width: 24px; height: 24px; }
.tile h3 { font-size: 15.5px; font-weight: 800; }
.tile p { font-size: 12.5px; color: var(--text-3); font-weight: 600; margin-top: 2px; }
.tile > .i:last-child { margin-left: auto; color: var(--text-3); }
.grad-orange { background: linear-gradient(135deg, #ff9a4d, var(--brand-600)); box-shadow: 0 10px 20px -8px var(--brand-glow); }
.grad-teal { background: linear-gradient(135deg, #2dd4bf, #0d9488); box-shadow: 0 10px 20px -8px rgba(13, 148, 136, .45); }
.grad-blue { background: linear-gradient(135deg, #60a5fa, #2563eb); box-shadow: 0 10px 20px -8px rgba(37, 99, 235, .45); }
.grad-rose { background: linear-gradient(135deg, #fb7185, #e11d48); box-shadow: 0 10px 20px -8px rgba(225, 29, 72, .4); }
.grad-navy { background: linear-gradient(135deg, var(--navy-500), var(--navy-800)); }

/* ───────── SweetAlert2 teması ───────── */

.swal2-container { z-index: 2000 !important; padding: 12px !important; }
.swal2-container.swal2-backdrop-show:not(:has(> .swal2-toast)) { background: rgba(6, 11, 22, .55) !important; backdrop-filter: blur(4px); }
.swal2-popup {
    border-radius: 24px !important; padding: 26px 22px 20px !important;
    background: var(--surface) !important; color: var(--text) !important;
    font-family: var(--font) !important; box-shadow: var(--shadow-lg) !important;
    width: min(32em, 100%) !important;
}
.swal2-popup.swal-wide { width: min(46em, 100%) !important; }
.swal2-title { font-size: 19px !important; font-weight: 800 !important; color: var(--text) !important; padding: 0 !important; }
.swal2-html-container { font-size: 14px !important; color: var(--text-2) !important; margin: 10px 0 0 !important; text-align: left !important; line-height: 1.55 !important; }
.swal2-html-container.center, .swal2-html-container:has(> .center) { text-align: center !important; }
.swal2-actions { gap: 8px; width: 100%; margin-top: 20px !important; flex-wrap: wrap-reverse; }
.swal2-actions .btn { flex: 1 1 auto; min-width: 120px; }
.swal2-icon { margin: 4px auto 14px !important; transform: scale(.82); }
.swal2-validation-message { background: var(--danger-bg) !important; color: var(--danger-ink) !important; border-radius: 12px; font-weight: 650; font-size: 13px !important; margin: 12px 0 0 !important; }
.swal2-close { color: var(--text-3) !important; border-radius: 12px; }
.swal2-close:focus { box-shadow: var(--ring) !important; }
.swal2-toast { padding: 12px 14px !important; border-radius: 16px !important; box-shadow: var(--shadow-lg) !important; width: auto !important; max-width: min(420px, calc(100vw - 24px)); }
.swal2-toast .swal2-title { font-size: 13.5px !important; font-weight: 700 !important; margin: 0 6px !important; }
.swal2-toast .swal2-icon { transform: none; margin: 0 !important; }
.swal2-timer-progress-bar { background: var(--brand) !important; }
.swal2-loader { border-color: var(--brand) transparent var(--brand) transparent !important; }
.swal-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }

/* ───────── Ek bileşenler ───────── */

.grid > *, .trip-card { min-width: 0; }
a.trip-card { color: inherit; text-decoration: none !important; }
.plate { flex: none; }
@media (min-width: 900px) { .stats.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.segmented.scroll, .chips.scroll { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; max-width: 100%; }
.segmented.scroll::-webkit-scrollbar, .chips.scroll::-webkit-scrollbar { display: none; }
.quick button.active { border-style: solid; border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); }

button.tile { width: 100%; text-align: left; cursor: pointer; font: inherit; }
.tile .spacer { min-width: 0; }
.tile-title { display: block; font-size: 15.5px; font-weight: 800; }
.tile-sub { display: block; font-size: 12.5px; color: var(--text-3); font-weight: 600; margin-top: 2px; }

/* Şifre alanı göz düğmesi (panel formları): <span class="input-icon"><input class="input" type="password"><button data-reveal>…</button></span> */
.input-icon > [data-reveal] { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.input-icon:has(> [data-reveal]) > .input { padding-right: 48px; }

/* Doluluk çubuğu: <div class="meter tone-warning"><span style="--value:60%"></span></div> */
.meter { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; width: var(--value, 0%); border-radius: inherit; background: var(--t-fg, var(--brand)); transition: width .4s var(--ease); }

/* Kaldırılabilir çip: <span class="chip">07:15 <button type="button" aria-label="Kaldır">×</button></span> */
.chip { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 4px 0 12px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.chip button { width: 28px; height: 28px; border-radius: 50%; border: 0; display: grid; place-items: center; background: transparent; color: var(--text-3); cursor: pointer; }
.chip button:hover { background: var(--danger-bg); color: var(--danger-ink); }

/* Form adım çubuğu (mobil) */
.stepbar { position: sticky; top: var(--topbar-h); z-index: 20; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px 0; background: var(--bg); }
.stepbar::-webkit-scrollbar { display: none; }
.stepbar a, .stepbar button { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-weight: 750; font-size: 12.5px; text-decoration: none !important; cursor: pointer; }
.stepbar .done { border-color: var(--success); color: var(--success-ink); background: var(--success-bg); }
.stepbar [aria-current="step"] { border-color: var(--brand); color: var(--brand-700); background: var(--brand-50); }
:root[data-theme="dark"] .stepbar [aria-current="step"] { color: #ffb07d; }
@media (min-width: 1100px) { .stepbar { display: none; } }
/* Telefonda dört adım kaydırmadan tek satıra sığar (son adım kenarda kesilmez) */
@media (max-width: 479px) { .stepbar a, .stepbar button { flex: 1 1 auto; justify-content: center; padding: 7px 8px; gap: 4px; } }

pre.code { margin: 0; padding: 14px; border-radius: 12px; background: var(--navy-950); color: #d6e0f2; font: 500 12px/1.6 var(--mono); white-space: pre-wrap; word-break: break-all; max-height: 50vh; overflow: auto; }

/* Süzgeç olarak seçilebilen istatistik kartı: <label class="stat"><input type="radio" class="sr-only">…</label> */
label.stat { cursor: pointer; }
label.stat:has(input:checked) { border-color: var(--t-fg, var(--brand)); box-shadow: var(--shadow); }
label.stat:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

.print-only { display: none; }
@media print { .print-only { display: block !important; } }

/* Firma durum listesi (API Durumu): tablo yerine satır kartları, eylemler her genişlikte görünür */
.firm-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px 14px; align-items: start; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.firm-row:last-child { border-bottom: 0; }
.firm-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.firm-main h3 { font-size: 14px; min-width: 0; }
.firm-issue { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; font-weight: 650; color: var(--danger-ink); }
.firm-issue .i { flex: none; margin-top: 2px; }
.firm-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 380px; }
@media (min-width: 640px) { .firm-actions.wide { max-width: none; flex-wrap: nowrap; } } /* U-ETDS Firmaları: Sil düğmesi tek başına alt satıra düşmesin */
@media (max-width: 639px) {
    .firm-row { grid-template-columns: 10px minmax(0, 1fr); }
    .firm-actions { grid-column: 2; justify-content: flex-start; max-width: none; }
}
/* U-ETDS Firmaları: Doğrulanmış / Doğrulanmamış grup başlıkları */
.firm-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 11px 18px; background: var(--t-bg); color: var(--t-fg); border-bottom: 1px solid var(--line); }
.firm-group .i { flex: none; }
.firm-group h3 { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.firm-group .badge { background: var(--surface); }
.firm-group-note { flex-basis: 100%; font-size: 12.5px; font-weight: 600; color: var(--text-2); padding-left: 26px; }
@media (min-width: 900px) { .firm-group-note { flex-basis: auto; padding-left: 4px; } }
.firm-group-empty { padding: 14px 18px 14px 44px; font-size: 13px; color: var(--text-3); border-bottom: 1px solid var(--line); }
.firm-list > :last-child { border-bottom: 0; }

/* Durum noktası ve nokta ayraçlı meta satırı: sakin, rozetsiz bilgi */
.status-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--t-fg, var(--muted)); box-shadow: 0 0 0 3px var(--t-bg, var(--muted-bg)); flex: none; }
.meta-list { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; font-size: 12.5px; color: var(--text-3); font-weight: 600; }
/* Ayraç her öğenin başında; satır başına düşen ayraç taşma ile gizlenir (alt satıra "·" ile başlamaz) */
.meta-list { overflow: hidden; }
.meta-list > span { margin-left: -17px; padding-right: 17px; }
.meta-list > span::before { content: "·"; display: inline-block; width: 17px; text-align: center; color: var(--line-strong); }
.meta-list > span:last-child { padding-right: 0; }
.text-danger { color: var(--danger-ink); }
.text-success { color: var(--success-ink); }

/* Yazdırılabilir sefer özeti */
.print-sheet { max-width: 210mm; margin: 0 auto; padding: 16mm 14mm; background: #fff; color: #111; }
.print-sheet table { width: 100%; border-collapse: collapse; font-size: 12px; }
.print-sheet th, .print-sheet td { border: 1px solid #cfd6e1; padding: 6px 8px; text-align: left; }
.print-sheet th { background: #f2f4f8; }
.print-sheet td { overflow-wrap: anywhere; }
.print-body { background: #e9edf3; }
.print-actions { justify-content: center; padding: 14px; }
.print-head { align-items: flex-start; }
.print-eyebrow { letter-spacing: .1em; text-transform: uppercase; color: #666; }
.print-title { color: #111; }
.print-sub { color: #444; }
.print-warning { border: 1.5px solid #b42318; color: #b42318; padding: 8px 10px; border-radius: 8px; font-weight: 700; font-size: 12.5px; }
@media (max-width: 640px) { .print-sheet { padding: 16px; } .print-sheet th, .print-sheet td { padding: 5px 6px; } }
@media print { .print-sheet { padding: 0; } .no-print { display: none !important; } }

/* ───────── Hareket tercihi ───────── */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
html.anim [data-animate] { opacity: 0; }

@media print {
    .sidebar, .topbar, .bottom-nav, .action-bar, .btn { display: none !important; }
    .main { margin: 0 !important; }
    body { background: #fff; }
}

/* ───────── Anasayfa: eski panele aşina düzen (fotoğraflı bant, tek sıra hızlı kutular, WhatsApp kartı, koyu başlıklı tablo) ───────── */
.hero-photo { padding: 24px 26px; min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end; }
.hero-photo::before { content: ""; position: absolute; inset: 0; z-index: -2; opacity: 1; mask-image: none; background: var(--hero-img) 55% 42% / cover no-repeat; }
.hero-photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8, 14, 30, .96) 0%, rgba(8, 14, 30, .84) 45%, rgba(8, 14, 30, .3) 100%), linear-gradient(0deg, rgba(8, 14, 30, .6), transparent 55%); }
@media (max-width: 767px) { .hero-photo::before { background-position: 68% 40%; } }
.hero-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px 24px; flex-wrap: wrap; }
.hero-top h1 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.02em; }
.hero-note { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 7px 12px; border-radius: 99px; background: rgba(255, 255, 255, .12); backdrop-filter: blur(6px); font-size: 12.5px; font-weight: 600; color: #e6ecf7; max-width: 100%; }
.hero-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.hero-date { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px); font-size: 12.5px; font-weight: 750; color: #fff; white-space: nowrap; }
.btn-light { --b-bg: rgba(255, 255, 255, .94); --b-fg: var(--navy-900); --b-bd: transparent; }
.btn-light:hover { --b-bg: #fff; }
.btn-glass { --b-bg: rgba(255, 255, 255, .14); --b-fg: #fff; --b-bd: rgba(255, 255, 255, .22); }
.btn-glass:hover { --b-bg: rgba(255, 255, 255, .22); }

.qt-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; }
@media (min-width: 720px) { .qt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .qt-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; } .qt { padding: 12px 10px 12px 12px; gap: 10px; } }
.qt { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 14px 14px 16px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; box-shadow: var(--shadow-xs); transition: transform .2s var(--ease), box-shadow .2s; }
a.qt:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
a.qt:active { transform: scale(.985); }
/* Simge rengi temadan bağımsız doygun ton (koyu temada pastel --t-fg üstünde beyaz simge soluk kalır) */
.qt-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--qt-ic, var(--brand)); color: #fff; box-shadow: 0 8px 16px -8px var(--qt-ic, var(--brand)); }
.qt.tone-info { --qt-ic: var(--info); }
.qt.tone-success { --qt-ic: var(--success); }
.qt.tone-warning { --qt-ic: var(--warning); }
.qt.tone-neutral { --qt-ic: var(--muted); }
.qt.tone-brand .qt-icon { background: linear-gradient(135deg, #ff8a3d, var(--brand) 55%, var(--brand-700)); }
.qt-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.qt-label { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt-value { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.qt-value.text { font-size: 15px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt > .i:last-child { color: var(--text-3); flex: none; }
/* 6 sütunlu dizilim dar ekranda (ör. 1366) etiket ve değerleri kırpmasın: ok simgesi gizlenir, simge küçülür */
@media (min-width: 1200px) and (max-width: 1499px) {
    .qt > .i:last-child { display: none; }
    .qt-icon { width: 34px; height: 34px; }
    .qt-icon .i { width: 18px; height: 18px; }
    .qt-label { font-size: 10px; letter-spacing: .04em; }
    .qt-value.text { font-size: 14px; }
}
@media (max-width: 479px) {
    .qt { padding: 12px; gap: 10px; }
    .qt-icon { width: 36px; height: 36px; }
    .qt-icon .i { width: 18px; height: 18px; }
    .qt-value { font-size: 20px; }
    .qt-value.text { font-size: 14px; }
    .qt-label { font-size: 10px; letter-spacing: .05em; }
    .qt > .i:last-child { display: none; } /* "Bildirim yap" kırpılmasın */
}

.attention-list { list-style: none; margin: 0; padding: 0; }
.attention-list li { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.attention-list li:last-child { border-bottom: 0; }
.attention-list li:hover { background: var(--surface-2); }
.attention-list .truncate { min-width: 0; max-width: 100%; }
.attention-list .attention-msg { flex: 1 1 100%; }
.attention-list .actions { margin-left: auto; display: flex; gap: 6px; }
@media (min-width: 900px) { .attention-list .attention-msg { flex: 1 1 220px; } }
.callout .row { flex-wrap: wrap; gap: 6px 12px; }

/* WhatsApp kartı: genişliği kendi kutusuna göre ölçer (kenar çubuğunun yanında 1000–1280 px'te de rahat) */
.wa-card { position: relative; overflow: hidden; isolation: isolate; container-type: inline-size; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 22px; color: #fff; background: var(--navy-900); border-color: transparent; }
.wa-card::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--wa-img) 70% 60% / cover no-repeat; opacity: .5; filter: saturate(.8); }
.wa-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 18, 34, .96) 0%, rgba(10, 18, 34, .86) 42%, rgba(10, 18, 34, .72) 100%); }
@container (min-width: 760px) { .wa-card { grid-template-columns: minmax(230px, 1fr) minmax(0, 2.3fr); align-items: center; gap: 28px; } }
.wa-intro h2 { color: #fff; font-size: 20px; margin-top: 12px; letter-spacing: -.01em; }
.wa-intro p { color: #c6d1e5; font-size: 13px; margin-top: 6px; line-height: 1.5; }
.wa-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; }
.wa-icon .i { width: 26px; height: 26px; }
.wa-link { margin-top: 12px; font-size: 11.5px; color: #93a4c3; max-width: 100%; }
.wa-form { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.wa-fields { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.wa-fields > :first-child { grid-column: 1 / -1; }
@container (min-width: 620px) { .wa-fields { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); } .wa-fields > :first-child { grid-column: auto; } }
.wa-form .input, .wa-form .ts-control { background: rgba(255, 255, 255, .96); color: var(--navy-900); border-color: transparent; }
.wa-form .input::placeholder { color: #6b7a93; }
.wa-form textarea.input { min-height: 150px; resize: vertical; font-size: 13px; line-height: 1.5; }
.wa-form .input-icon > .i { color: #6b7a93; }
.wa-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wa-actions .btn { flex: 1 1 170px; min-width: 0; justify-content: center; }
.wa-secondary { display: flex; justify-content: flex-end; }
.wa-note { color: #ffd9a8; font-size: 12.5px; font-weight: 600; }

.card:has(> .card-head.dark) { overflow: hidden; }
.card-head.dark { background: linear-gradient(135deg, var(--navy-800), var(--navy-900)); color: #fff; border-bottom: 0; border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0; }
.card-head.dark h2 { color: #fff; }
.card-head.dark .sub { color: #aab7cf; }
.card-head.dark .card-head-icon { background: rgba(255, 255, 255, .12); color: #fff; }
@media (max-width: 479px) { .card-head.dark .sub { display: none; } }
:root[data-theme="dark"] .card-head.dark { background: linear-gradient(135deg, #1b2b4f, #121d37); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card-head.dark { background: linear-gradient(135deg, #1b2b4f, #121d37); } }

/* ───────── Veri tablosu: anasayfadaki "Son bildirimler" düzeni, tüm liste sayfalarında ortak ─────────
 * Kart: .card > header.card-head.dark (ikon, başlık, alt satırda kayıt sayısı, sağda .btn-light) → .toolbar → .table-wrap > table.table.data-table
 * Hücre: .ref-no (Bakanlık referansı / kayıt no, turuncu), .when (tarih-saat, mavi), .plate, .badge.dot (durum), .truncate + title (uzun metin)
 * İşlem düğmeleri btn-sm btn-icon + renk: btn-info detay · btn-warning düzenle/kopyala · btn-danger sil/PDF/pasif · btn-whatsapp WhatsApp
 */
.ref-no { font-family: var(--mono); font-size: .95em; font-weight: 800; color: var(--brand-700); letter-spacing: .02em; white-space: nowrap; }
:root[data-theme="dark"] .ref-no { color: #ffb07d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ref-no { color: #ffb07d; } }
.when { font-weight: 800; color: var(--info-ink); white-space: nowrap; }
.data-table tbody tr[hidden] { display: none; }
@media (min-width: 768px) {
    .data-table th, .data-table td { padding: 10px 12px; }
    .data-table.fixed { table-layout: fixed; }
    .data-table .truncate { display: block; }
    .data-table .actions { gap: 4px; }
}
.recent-more { display: none; }
@media (max-width: 767px) {
    .recent-table:not(.show-all) tbody tr:nth-child(n+9) { display: none; }
    .recent-table.show-all ~ .card-foot .recent-more, .recent-more[hidden] { display: none; }
    .recent-more { display: inline-flex; }
}
@media print {
    .hero-photo, .wa-card, .callout, .recent-more { display: none !important; }
    .card-head.dark { background: none !important; color: #000 !important; }
    .card-head.dark h2, .card-head.dark .sub { color: #000 !important; }
}
