/* ==========================================================================
   ERP Sistemi — arayüz stilleri
   Tasarım belirteçleri :root'ta; koyu tema [data-theme="dark"] ile aynı belirteçleri ezer.
   Modül renkleri .c-<renk> sınıfıyla --c / --c-soft değişkenlerine uygulanır.
   ========================================================================== */

:root {
    --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --bg: #f3f5f9;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #f1f4f8;
    --line: #e6e9f0;
    --line-strong: #d4d9e3;
    --text: #0f172a;
    --text-2: #475569;
    --muted: #8a94a6;

    --brand: #1f3c88;
    --brand-600: #172f6d;
    --brand-soft: #eaf0fb;
    --brand-ring: rgba(31, 60, 136, .16);
    --accent: #5f9e1a;
    --accent-soft: #eff7e4;

    --success: #0f9f6e;
    --success-soft: #e7f7f0;
    --warning: #d97706;
    --warning-soft: #fef5e6;
    --danger: #dc2626;
    --danger-soft: #fdeeee;
    --info: #2563eb;
    --info-soft: #eaf1fe;

    --r-sm: 8px;
    --r: 12px;
    --r-lg: 16px;
    --r-xl: 22px;
    --sh-sm: 0 1px 2px rgba(15, 23, 42, .04);
    --sh: 0 1px 3px rgba(15, 23, 42, .05), 0 4px 14px -6px rgba(15, 23, 42, .08);
    --sh-lg: 0 18px 50px -12px rgba(15, 23, 42, .22);
    --sidebar-w: 262px;
    --topbar-h: 76px;
    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #0b1120;
    --surface: #121a2b;
    --surface-2: #162034;
    --surface-3: #1b263c;
    --line: #232f47;
    --line-strong: #2f3d59;
    --text: #e6ebf5;
    --text-2: #a7b2c7;
    --muted: #74819a;

    --brand: #6d8ff0;
    --brand-600: #8aa6f5;
    --brand-soft: rgba(109, 143, 240, .14);
    --brand-ring: rgba(109, 143, 240, .28);
    --accent: #8ccf4d;
    --accent-soft: rgba(140, 207, 77, .13);

    --success: #34d399;
    --success-soft: rgba(52, 211, 153, .13);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, .13);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, .13);
    --info: #60a5fa;
    --info-soft: rgba(96, 165, 250, .13);

    --sh-sm: none;
    --sh: 0 1px 0 rgba(255, 255, 255, .02), 0 6px 20px -8px rgba(0, 0, 0, .5);
    --sh-lg: 0 24px 60px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
}

/* ---------- Modül renkleri ---------- */
.c-blue   { --c: #2563eb; --c-soft: #eaf1fe; }
.c-indigo { --c: #4f46e5; --c-soft: #eeedfd; }
.c-violet { --c: #7c3aed; --c-soft: #f3edfe; }
.c-orange { --c: #ea580c; --c-soft: #fff1e8; }
.c-amber  { --c: #d97706; --c-soft: #fef5e6; }
.c-green  { --c: #16a34a; --c-soft: #e8f7ee; }
.c-teal   { --c: #0d9488; --c-soft: #e6f6f4; }
.c-cyan   { --c: #0891b2; --c-soft: #e5f6fa; }
.c-sky    { --c: #0284c7; --c-soft: #e6f3fb; }
.c-pink   { --c: #db2777; --c-soft: #fdebf3; }
.c-rose   { --c: #e11d48; --c-soft: #fdebef; }
.c-red    { --c: #dc2626; --c-soft: #fdeeee; }
.c-slate  { --c: #475569; --c-soft: #eef1f5; }
[data-theme="dark"] .c-blue   { --c: #60a5fa; --c-soft: rgba(96,165,250,.14); }
[data-theme="dark"] .c-indigo { --c: #818cf8; --c-soft: rgba(129,140,248,.14); }
[data-theme="dark"] .c-violet { --c: #a78bfa; --c-soft: rgba(167,139,250,.14); }
[data-theme="dark"] .c-orange { --c: #fb923c; --c-soft: rgba(251,146,60,.14); }
[data-theme="dark"] .c-amber  { --c: #fbbf24; --c-soft: rgba(251,191,36,.14); }
[data-theme="dark"] .c-green  { --c: #4ade80; --c-soft: rgba(74,222,128,.13); }
[data-theme="dark"] .c-teal   { --c: #2dd4bf; --c-soft: rgba(45,212,191,.13); }
[data-theme="dark"] .c-cyan   { --c: #22d3ee; --c-soft: rgba(34,211,238,.13); }
[data-theme="dark"] .c-sky    { --c: #38bdf8; --c-soft: rgba(56,189,248,.13); }
[data-theme="dark"] .c-pink   { --c: #f472b6; --c-soft: rgba(244,114,182,.14); }
[data-theme="dark"] .c-rose   { --c: #fb7185; --c-soft: rgba(251,113,133,.14); }
[data-theme="dark"] .c-red    { --c: #f87171; --c-soft: rgba(248,113,113,.14); }
[data-theme="dark"] .c-slate  { --c: #94a3b8; --c-soft: rgba(148,163,184,.14); }

/* ---------- Temel ---------- */
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: .925rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .font-display { font-family: var(--font-display); letter-spacing: -.015em; color: var(--text); }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
.text-muted, .muted { color: var(--muted) !important; }
.text-2 { color: var(--text-2) !important; }
::selection { background: var(--brand-ring); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Kabuk ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 1030;
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--line);
    display: flex; flex-direction: column;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.sb-brand {
    display: flex; align-items: center; gap: .75rem;
    height: var(--topbar-h); padding: 0 1.25rem;
    border-bottom: 1px solid var(--line);
    color: var(--text);
}
.sb-brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; }
.sb-brand b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; line-height: 1.15; }
.sb-brand small { display: block; color: var(--muted); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.sb-nav { flex: 1; overflow-y: auto; padding: .9rem .8rem 1rem; }
.sb-group { margin-bottom: .6rem; }
.sb-group-title {
    font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
    color: var(--muted); padding: .55rem .7rem .35rem;
}
.sb-link {
    display: flex; align-items: center; gap: .75rem;
    padding: .5rem .6rem; margin-bottom: 2px;
    border-radius: var(--r);
    color: var(--text-2); font-weight: 600; font-size: .9rem;
    transition: background .15s, color .15s;
}
.sb-link .ico {
    width: 34px; height: 34px; flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 10px;
    background: var(--c-soft); color: var(--c);
    font-size: 1rem;
    transition: transform .15s;
}
.sb-link:hover { background: var(--surface-3); color: var(--text); }
.sb-link:hover .ico { transform: scale(1.06); }
.sb-link.active { background: var(--brand-soft); color: var(--brand); }
.sb-link.active .ico { background: var(--brand); color: #fff; box-shadow: 0 6px 14px -6px var(--brand); }
.sb-link .soon {
    margin-left: auto; font-size: .62rem; font-weight: 700; letter-spacing: .03em;
    padding: .12rem .45rem; border-radius: 20px;
    background: var(--surface-3); color: var(--muted); border: 1px solid var(--line);
}
.sb-foot { padding: .9rem 1.25rem; border-top: 1px solid var(--line); font-size: .74rem; color: var(--muted); display: flex; justify-content: space-between; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }

.topbar {
    position: sticky; top: 0; z-index: 1020;
    height: var(--topbar-h);
    display: flex; align-items: center; gap: 1rem;
    padding: 0 1.75rem;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}
.tb-title { min-width: 0; }
.tb-title h1 { font-size: 1.22rem; font-weight: 800; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title p { margin: 0; color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.icon-btn {
    width: 40px; height: 40px; flex-shrink: 0;
    display: inline-grid; place-items: center;
    border-radius: 12px; border: 1px solid var(--line);
    background: var(--surface); color: var(--text-2);
    font-size: 1.05rem; position: relative; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--surface); }
.burger { display: none; }

.rates {
    display: flex; align-items: center; gap: .1rem;
    padding: .3rem .4rem; border-radius: 40px;
    background: var(--surface); border: 1px solid var(--line);
    font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums;
}
.rates span { display: inline-flex; align-items: center; gap: .4rem; padding: 0 .55rem; }
.rates span + span { border-left: 1px solid var(--line); }
.rates i { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-size: .78rem; }
.rates .usd i { background: var(--success-soft); color: var(--success); }
.rates .eur i { background: var(--info-soft); color: var(--info); }

.user-btn {
    display: flex; align-items: center; gap: .6rem;
    padding: .3rem .7rem .3rem .3rem;
    border: 1px solid var(--line); border-radius: 40px;
    background: var(--surface); color: var(--text); cursor: pointer;
}
.user-btn:hover { background: var(--surface-3); }
.user-btn b { display: block; font-size: .85rem; line-height: 1.1; text-align: left; }
.user-btn small { display: block; font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; text-align: left; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 60%, var(--accent)));
    color: #fff; font-weight: 700; font-size: .8rem; font-family: var(--font-display);
}
.avatar.lg { width: 56px; height: 56px; font-size: 1.15rem; }

.page { padding: 1.75rem; flex: 1; }
.page-narrow { max-width: 980px; }

.sb-backdrop { display: none; }

/* ---------- Açılır menüler ---------- */
.dropdown-menu {
    --bs-dropdown-bg: var(--surface);
    --bs-dropdown-color: var(--text);
    --bs-dropdown-border-color: var(--line);
    --bs-dropdown-link-color: var(--text-2);
    --bs-dropdown-link-hover-bg: var(--surface-3);
    --bs-dropdown-link-hover-color: var(--text);
    --bs-dropdown-link-active-bg: var(--brand-soft);
    --bs-dropdown-link-active-color: var(--brand);
    --bs-dropdown-divider-bg: var(--line);
    border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: .4rem;
    font-size: .88rem;
}
.dropdown-item { border-radius: 9px; padding: .5rem .7rem; display: flex; align-items: center; gap: .6rem; }
.dropdown-item i { color: var(--muted); }
.dropdown-header { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.notif-menu { width: 340px; max-width: calc(100vw - 24px); }
.notif-item { display: flex; gap: .7rem; padding: .6rem .7rem; border-radius: 10px; color: var(--text); }
.notif-item:hover { background: var(--surface-3); color: var(--text); }
.notif-item .ni { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--c-soft); color: var(--c); }
.notif-item b { display: block; font-size: .84rem; font-weight: 600; line-height: 1.25; }
.notif-item small { color: var(--muted); font-size: .74rem; }

/* ---------- Kartlar ---------- */
.card-x {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh);
}
.card-x > .card-h {
    display: flex; align-items: center; gap: .75rem;
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid var(--line);
}
.card-h h2, .card-h h3 { font-size: 1.02rem; font-weight: 800; margin: 0; }
.card-h .h-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--c-soft, var(--brand-soft)); color: var(--c, var(--brand)); }
.card-h .ms-auto { margin-left: auto; }
.card-x > .card-b { padding: 1.35rem; }
.card-x > .card-f { padding: .9rem 1.35rem; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* İstatistik kartı */
.stat {
    position: relative; overflow: hidden;
    padding: 1.25rem 1.35rem 1.15rem;
    display: flex; flex-direction: column; gap: .35rem;
    min-height: 168px;
    transition: transform .18s, box-shadow .18s;
}
a.stat { color: inherit; }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); color: inherit; }
.stat::after {
    content: ""; position: absolute; top: -46px; right: -46px;
    width: 140px; height: 140px; border-radius: 50%;
    background: var(--c-soft); opacity: .75;
}
.stat .s-ico {
    position: absolute; top: 1.1rem; right: 1.1rem; z-index: 1;
    width: 46px; height: 46px; border-radius: 14px;
    display: grid; place-items: center; font-size: 1.2rem;
    background: var(--surface); color: var(--c);
    box-shadow: 0 6px 16px -8px var(--c);
}
.stat .s-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); position: relative; z-index: 1; padding-right: 54px; }
.stat .s-value { font-family: var(--font-display); font-size: 2rem; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .s-value small { font-family: var(--font-body); font-size: .9rem; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: .25rem; }
.stat .s-chips { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: auto; }
.stat .s-chips .ms-auto { font-size: .74rem; color: var(--muted); }
.meter { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin-top: .55rem; }
.meter > span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); transition: width .6s cubic-bezier(.2, .8, .2, 1); }

/* Rozet / çip */
.chip {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .55rem; border-radius: 7px;
    font-size: .74rem; font-weight: 700; line-height: 1.4; white-space: nowrap;
    background: var(--c-soft, var(--surface-3)); color: var(--c, var(--text-2));
}
.chip.outline { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); font-weight: 600; }
.chip-success { --c: var(--success); --c-soft: var(--success-soft); }
.chip-warning { --c: var(--warning); --c-soft: var(--warning-soft); }
.chip-danger { --c: var(--danger); --c-soft: var(--danger-soft); }
.chip-info { --c: var(--info); --c-soft: var(--info-soft); }
.chip-muted { --c: var(--text-2); --c-soft: var(--surface-3); }
.chip-brand { --c: var(--brand); --c-soft: var(--brand-soft); }

/* Hızlı işlemler */
.quick { display: flex; gap: .6rem; flex-wrap: wrap; }
.quick a {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .5rem 1rem .5rem .5rem;
    border-radius: 40px; background: var(--surface); border: 1px solid var(--line);
    color: var(--text); font-weight: 600; font-size: .86rem;
    box-shadow: var(--sh-sm);
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.quick a:hover { transform: translateY(-1px); box-shadow: var(--sh); border-color: var(--line-strong); color: var(--text); }
.quick a i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--c-soft); color: var(--c); }

/* Liste satırları */
.list-row { display: flex; align-items: center; gap: .85rem; padding: .8rem 1.35rem; border-bottom: 1px solid var(--line); color: var(--text); }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--surface-2); color: var(--text); }
.list-row .lr-date {
    width: 46px; flex-shrink: 0; text-align: center; border-radius: 10px;
    background: var(--surface-3); padding: .3rem 0; line-height: 1.1;
}
.list-row .lr-date b { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.list-row .lr-date small { font-size: .64rem; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: .04em; }
.list-row .lr-date.overdue { background: var(--danger-soft); color: var(--danger); }
.list-row .lr-main { min-width: 0; flex: 1; }
.list-row .lr-main b { display: block; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .lr-main small { color: var(--muted); font-size: .78rem; }

.timeline { list-style: none; margin: 0; padding: .4rem 1.35rem 1rem; }
.timeline li { position: relative; padding: .6rem 0 .6rem 1.6rem; font-size: .86rem; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline li:first-child::before { top: 1rem; }
.timeline li:last-child::before { bottom: calc(100% - 1rem); }
.timeline li::after { content: ""; position: absolute; left: 0; top: .9rem; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--c, var(--brand)); }
.timeline small { display: block; color: var(--muted); font-size: .74rem; }

/* ---------- Butonlar ---------- */
.btn { border-radius: 11px; font-weight: 600; font-size: .88rem; padding: .55rem 1rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.btn-sm { padding: .35rem .7rem; font-size: .8rem; border-radius: 9px; }
.btn-brand { background: var(--brand); color: #fff; border: 1px solid var(--brand); box-shadow: 0 8px 18px -10px var(--brand); }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
[data-theme="dark"] .btn-brand { color: #0b1120; }
.btn-soft { background: var(--surface); color: var(--text-2); border: 1px solid var(--line); }
.btn-soft:hover { background: var(--surface-3); color: var(--text); border-color: var(--line-strong); }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); border: 1px solid transparent; }
.btn-danger-soft:hover { background: var(--danger); color: #fff; }
.btn-success-soft { background: var(--success-soft); color: var(--success); border: 1px solid transparent; }
.btn-success-soft:hover { background: var(--success); color: #fff; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 10px; }
.btn-round { border-radius: 40px; }

/* ---------- Formlar ---------- */
.form-label { font-weight: 600; font-size: .82rem; color: var(--text-2); margin-bottom: .35rem; }
.form-control, .form-select {
    background-color: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--text);
    font-size: .9rem;
    padding: .6rem .85rem;
}
.form-control::placeholder { color: var(--muted); }
.form-control:focus, .form-select:focus {
    background-color: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-ring);
    color: var(--text);
}
.form-select { background-position: right .8rem center; padding-right: 2.4rem; }
[data-theme="dark"] .form-select { --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23a7b2c7' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.form-check-input { border-color: var(--line-strong); background-color: var(--surface); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 4px var(--brand-ring); border-color: var(--brand); }
.form-switch .form-check-input { width: 2.3em; height: 1.25em; }
.form-text { color: var(--muted); font-size: .78rem; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon > .form-control { padding-left: 2.5rem; }
.input-icon > .eye { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); padding: .3rem .45rem; border-radius: 8px; }
.input-icon > .eye:hover { color: var(--text); background: var(--surface-3); }
.form-section { font-size: .95rem; font-weight: 800; display: flex; align-items: center; gap: .5rem; margin: 0 0 .9rem; }
.form-section i { color: var(--brand); }
.search-pill { position: relative; }
.search-pill i { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-pill input { padding-left: 2.5rem; border-radius: 40px; min-width: 240px; }

/* ---------- Tablolar ---------- */
.table-x { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; font-size: .88rem; }
.table-x th {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700;
    color: var(--muted); background: var(--surface-2);
    padding: .75rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table-x td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text); }
.table-x tr:last-child td { border-bottom: 0; }
.table-x tbody tr { transition: background .12s; }
.table-x tbody tr:hover { background: var(--surface-2); }
.table-x .t-main { font-weight: 600; }
.table-x .t-sub { display: block; font-size: .76rem; color: var(--muted); }
.table-x .t-actions { text-align: right; white-space: nowrap; }
.table-x .t-actions form { display: inline-block; margin: 0; }
.table-wrap { overflow-x: auto; }

/* Sayfalama */
.pager { display: flex; gap: .3rem; align-items: center; justify-content: flex-end; }
.pager a, .pager span { min-width: 34px; height: 34px; padding: 0 .6rem; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: .82rem; }
.pager a:hover { background: var(--surface-3); color: var(--text); }
.pager .on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Araç çubuğu */
.toolbar { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.25rem; }
.toolbar .grow { flex: 1; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.mini-stat { display: flex; align-items: center; gap: .85rem; padding: 1rem 1.1rem; }
.mini-stat i { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--c-soft); color: var(--c); font-size: 1.1rem; }
.mini-stat b { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.mini-stat small { color: var(--muted); font-size: .76rem; font-weight: 600; }

/* Sekmeler */
.tabs-x { display: flex; gap: .3rem; padding: .3rem; background: var(--surface-3); border-radius: 13px; width: max-content; max-width: 100%; overflow-x: auto; margin-bottom: 1.25rem; }
.tabs-x a { padding: .5rem .95rem; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: .86rem; display: inline-flex; gap: .45rem; align-items: center; white-space: nowrap; }
.tabs-x a:hover { color: var(--text); }
.tabs-x a.on { background: var(--surface); color: var(--text); box-shadow: var(--sh); }

/* Boş durum */
.empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    padding: 3.5rem 1.5rem; color: var(--muted);
}
.empty .e-ico { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; background: var(--surface-3); color: var(--muted); border: 1px solid var(--line); margin-bottom: 1rem; }
.empty h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: .3rem; }
.empty p { margin: 0; max-width: 360px; font-size: .88rem; }

/* Uyarılar */
.alert { border-radius: var(--r); border: 1px solid transparent; font-size: .88rem; display: flex; gap: .6rem; align-items: flex-start; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }

/* Toast */
.toast-stack { position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 2100; display: flex; flex-direction: column; align-items: center; gap: .5rem; width: max-content; max-width: calc(100vw - 2rem); }
.toast-x {
    display: flex; align-items: center; gap: .65rem;
    min-width: 260px; max-width: 380px; padding: .8rem 1rem;
    background: var(--text); color: var(--surface);
    border-radius: 12px; box-shadow: var(--sh-lg); font-size: .87rem; font-weight: 500;
    animation: toastIn .3s cubic-bezier(.2, .8, .2, 1);
}
.toast-x.success i { color: #34d399; }
.toast-x.danger i { color: #f87171; }
.toast-x.warning i { color: #fbbf24; }
.toast-x.info i { color: #60a5fa; }
.toast-x.out { opacity: 0; transform: translateY(-8px); transition: .25s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.98); } }

/* Modal */
.modal-content { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-lg); }
.modal-header, .modal-footer { border-color: var(--line); }
.modal-backdrop.show { opacity: .45; }
/* Onay penceresi çekmecenin (1070) üstünde açılmalı */
.modal { --bs-modal-zindex: 1090; }
.modal-backdrop { --bs-backdrop-zindex: 1085; }
[data-theme="dark"] .btn-close { filter: invert(1) grayscale(1); }

/* ---------- Giriş ekranı ---------- */
.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 60%),
        radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
        var(--bg);
}
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; }
.auth-card { width: 100%; max-width: 440px; padding: 2.4rem 2.2rem 2rem; border-radius: 26px; }
.auth-logo { width: 84px; height: 84px; margin: 0 auto 1rem; display: block; object-fit: contain; }
.auth-card h1 { text-align: center; font-size: 1.75rem; font-weight: 800; color: var(--brand); margin: 0; }
.auth-card .sub { text-align: center; color: var(--muted); margin: .25rem 0 1.75rem; }
.auth-card .form-control { padding-top: .8rem; padding-bottom: .8rem; }
.auth-card .btn-brand { width: 100%; padding: .85rem; font-size: 1rem; border-radius: 13px; }
.auth-foot { text-align: center; margin-top: 1.5rem; font-size: .76rem; color: var(--muted); }

/* Kurulum */
.install-wrap { max-width: 720px; margin: 0 auto; padding: 2.5rem 1rem 4rem; }
.install-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.install-head h1 { font-size: 1.5rem; font-weight: 800; margin: 0; }
.install-head p { margin: 0; color: var(--muted); }
.install-steps { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; gap: .5rem; }
.install-steps li { flex: 1; display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .86rem; color: var(--muted); padding: .65rem .8rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.install-steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: .78rem; }
.install-steps li.on { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.install-steps li.on span { background: var(--brand); color: #fff; }
.install-card { padding: 1.75rem; }
.req-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.req-list li { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-radius: 10px; background: var(--surface-2); font-size: .88rem; }
.req-list li small { margin-left: auto; color: var(--muted); }
.req-list li em { color: var(--muted); font-style: normal; font-size: .8rem; }
.req-list .ok i { color: var(--success); }
.req-list .bad { background: var(--danger-soft); }
.req-list .bad i { color: var(--danger); }
.req-list .warn i { color: var(--warning); }
.done-icon { width: 76px; height: 76px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 2.3rem; background: var(--success-soft); color: var(--success); }

/* ---------- Yetki matrisi ---------- */
.perm-table th, .perm-table td { text-align: center; }
.perm-table th:first-child, .perm-table td:first-child { text-align: left; }
.perm-table .grp td { background: var(--surface-2); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); padding: .55rem 1rem; }
.perm-table .mod { display: flex; align-items: center; gap: .65rem; font-weight: 600; }
.perm-table .mod .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--c-soft); color: var(--c); font-size: .9rem; }
.perm-table .form-check-input { width: 1.2em; height: 1.2em; cursor: pointer; margin: 0; }
.perm-table .na { color: var(--line-strong); }
.perm-table th button { border: 0; background: none; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; padding: 0; }
.perm-table th button:hover { color: var(--brand); }

/* ---------- Yer tutucu modül ---------- */
.soon-hero { text-align: center; padding: 4rem 1.5rem; }
.soon-hero .big-ico { width: 88px; height: 88px; margin: 0 auto 1.25rem; border-radius: 26px; display: grid; place-items: center; font-size: 2.2rem; background: var(--c-soft); color: var(--c); }
.soon-hero h2 { font-weight: 800; }
.soon-hero p { color: var(--muted); max-width: 520px; margin: .5rem auto 0; }

/* ---------- Mini takvim (dashboard) ---------- */
.mcal-head { display: flex; align-items: center; gap: .5rem; }
.mcal-nav { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem; border-radius: 40px; border: 1px solid var(--line); background: var(--surface-2); }
.mcal-nav button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: var(--text-2); }
.mcal-nav button:hover { background: var(--surface); color: var(--text); }
.mcal-nav span { min-width: 110px; text-align: center; font-weight: 700; font-size: .88rem; }
.mcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mcal .dow { font-size: .68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: .3rem 0 .5rem; }
.mcal a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 44px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: .86rem; font-variant-numeric: tabular-nums; }
.mcal a:hover { background: var(--surface-3); color: var(--text); }
.mcal a.out { color: var(--line-strong); }
.mcal a > span:first-child { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.mcal a.today > span:first-child { background: var(--brand); color: #fff; }
.dots { display: flex; gap: 3px; height: 5px; margin-top: 1px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; }
.dots .p { background: var(--warning); }
.dots .d { background: var(--success); }
.dots .c { background: var(--danger); }
.dots .o { background: var(--danger); }

/* ==========================================================================
   Takvim modülü
   ========================================================================== */
.cal-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.cal-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: calc(var(--topbar-h) + 1.25rem); }
.cal-month { padding: 1.15rem; }
.cal-month-head { display: flex; align-items: center; gap: .4rem; margin-bottom: .85rem; }
.cal-month-head h2 { font-size: 1.2rem; font-weight: 800; margin: 0 auto 0 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-grid .dow { font-size: .68rem; font-weight: 700; color: var(--muted); text-align: center; padding-bottom: .45rem; }
.cal-day {
    position: relative; border: 0; background: none;
    height: 48px; border-radius: 10px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--text-2); font-weight: 600; font-size: .86rem; font-variant-numeric: tabular-nums;
    transition: background .12s;
}
.cal-day:hover { background: var(--surface-3); }
.cal-day .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; transition: transform .15s; }
.cal-day.out { color: var(--line-strong); }
.cal-day.today .n { background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.cal-day.sel .n { background: var(--brand); color: #fff; transform: scale(1.06); box-shadow: 0 6px 14px -6px var(--brand); }
.cal-day .ov { position: absolute; top: 3px; right: 7px; width: 15px; height: 15px; border-radius: 50%; background: var(--danger); color: #fff; font-size: .6rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.cal-day.drop { background: var(--brand-soft); outline: 2px dashed var(--brand); outline-offset: -2px; }

.cal-filters { display: flex; flex-direction: column; gap: .45rem; }
.cal-filter {
    display: flex; align-items: center; gap: .7rem; width: 100%;
    padding: .7rem .9rem; border-radius: var(--r);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm);
    color: var(--text); font-weight: 600; font-size: .88rem; text-align: left;
    transition: transform .15s, border-color .15s, background .15s;
}
.cal-filter:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.cal-filter i { color: var(--muted); font-size: 1.05rem; }
.cal-filter .cnt { margin-left: auto; min-width: 30px; text-align: center; padding: .1rem .55rem; border-radius: 20px; background: var(--surface-3); border: 1px solid var(--line); font-size: .78rem; font-weight: 700; }
.cal-filter.danger i, .cal-filter.danger .cnt { color: var(--danger); }
.cal-filter.danger .cnt { background: var(--danger-soft); border-color: transparent; }
.cal-filter.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.cal-filter.on i { color: var(--surface); }
.cal-filter.on .cnt { background: color-mix(in srgb, var(--surface) 20%, transparent); border-color: transparent; color: var(--surface); }

.cal-main { min-height: calc(100vh - var(--topbar-h) - 3.5rem); display: flex; flex-direction: column; }
.cal-main-head { display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.4rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cal-main-head .kicker { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: .1rem; }
.cal-main-head h2 { font-size: 1.35rem; font-weight: 800; margin: 0; }
.cal-main-head .acts { margin-left: auto; display: flex; gap: .6rem; align-items: center; }
.cal-search { position: relative; width: 300px; max-width: 100%; }
.cal-search i.bi-search { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.cal-search input { border-radius: 40px; padding-left: 2.5rem; padding-right: 2.3rem; }
.cal-search .clr { position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); display: none; padding: .2rem .35rem; }
.cal-search.has .clr { display: block; }
.fab { width: 44px; height: 44px; border-radius: 50%; padding: 0; font-size: 1.2rem; }

.notes { flex: 1; padding: 1.4rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.1rem; align-content: start; }
.note {
    position: relative; display: flex; flex-direction: column;
    padding: 1.1rem 1.15rem 1rem 1.35rem; min-height: 210px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--sh-sm); cursor: pointer;
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.note:hover { transform: translateY(-2px); box-shadow: var(--sh); border-color: var(--line-strong); }
.note::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--warning); }
.note.done::before { background: var(--success); }
.note.cancelled::before { background: var(--danger); }
.note.overdue::before { background: var(--danger); }
.note.done { background: color-mix(in srgb, var(--success-soft) 55%, var(--surface)); }
.note.cancelled { background: color-mix(in srgb, var(--danger-soft) 50%, var(--surface)); }
.note.done .n-title, .note.cancelled .n-title { text-decoration: line-through; color: var(--muted); }
.note.dragging { opacity: .5; }
.note .n-top { display: flex; align-items: center; gap: .5rem; margin-bottom: .45rem; }
.note .n-proj { font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--c, var(--brand)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note .n-pin { margin-left: auto; color: var(--brand); }
.note .n-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.3; margin: 0 0 .4rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note:hover .n-title { color: var(--brand); }
.note .n-desc { font-size: .84rem; color: var(--text-2); margin: 0 0 .75rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.note .n-meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
.note .n-foot { margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--line); display: flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--muted); }
.note .n-foot .acts { margin-left: auto; display: flex; gap: .3rem; }
.note .qa { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); display: grid; place-items: center; font-size: .9rem; }
.note .qa:hover { background: var(--surface-3); color: var(--text); }
.note .qa.ok:hover { background: var(--success); color: #fff; border-color: var(--success); }
.note .qa.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.note.flash { animation: flashCard 2.4s cubic-bezier(.2, .8, .2, 1); }
@keyframes flashCard { 0% { box-shadow: 0 0 0 0 var(--brand-ring); } 15% { box-shadow: 0 0 0 8px var(--brand-ring); border-color: var(--brand); } 100% { box-shadow: var(--sh-sm); } }
.notes .empty { grid-column: 1 / -1; }
.skeleton { border-radius: var(--r-lg); min-height: 210px; background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%); background-size: 300% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -100% 0; } }

/* Çekmece */
.drawer-bg { position: fixed; inset: 0; z-index: 1060; background: rgba(15, 23, 42, .38); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-bg.on { opacity: 1; pointer-events: auto; }
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1070;
    width: 620px; max-width: 100vw;
    background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--sh-lg);
    display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform .32s cubic-bezier(.16, 1, .3, 1);
}
.drawer.on { transform: none; }
.drawer-h { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.4rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.drawer-h .x { margin-left: auto; }
.drawer-b { flex: 1; overflow-y: auto; padding: 1.4rem; }
.drawer-f { display: flex; align-items: center; gap: .5rem; padding: 1rem 1.4rem; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.dv-proj { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.dv-title { font-size: 1.45rem; font-weight: 800; line-height: 1.25; margin: .3rem 0 1rem; }
.dv-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.dv-content { font-size: .93rem; line-height: 1.6; color: var(--text); }
.dv-content p { margin-bottom: .45rem; }
.dv-content ul, .dv-content ol { padding-left: 1.3rem; margin-bottom: .5rem; }
.dv-content .ql-indent-1 { padding-left: 1.5em; }
.dv-content .ql-indent-2 { padding-left: 3em; }
.dv-section { margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px dashed var(--line); }
.dv-section h4 { font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: .7rem; font-family: var(--font-body); }
.files { display: flex; flex-wrap: wrap; gap: .6rem; }
.file {
    position: relative; display: flex; align-items: center; gap: .55rem;
    padding: .5rem .75rem .5rem .55rem; max-width: 100%;
    border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2);
    color: var(--text); font-size: .82rem; cursor: pointer;
}
.file:hover { border-color: var(--brand); color: var(--text); }
.file .fi { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--surface); font-size: 1.05rem; }
.file b { display: block; font-weight: 600; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file small { color: var(--muted); font-size: .72rem; }
.file .del { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface); background: var(--danger); color: #fff; font-size: .7rem; display: none; place-items: center; padding: 0; }
.file:hover .del { display: grid; }
.ql-toolbar.ql-snow { border: 1px solid var(--line) !important; border-radius: 11px 11px 0 0; background: var(--surface-2); }
.ql-container.ql-snow { height: auto; border: 1px solid var(--line) !important; border-top: 0 !important; border-radius: 0 0 11px 11px; background: var(--surface); font-family: var(--font-body); font-size: .92rem; min-height: 180px; color: var(--text); }
.ql-editor { min-height: 180px; }
.ql-editor.ql-blank::before { color: var(--muted); font-style: normal; }
[data-theme="dark"] .ql-snow .ql-stroke { stroke: var(--text-2); }
[data-theme="dark"] .ql-snow .ql-fill { fill: var(--text-2); }
[data-theme="dark"] .ql-snow .ql-picker { color: var(--text-2); }
.dropzone { border: 2px dashed var(--line-strong); border-radius: 12px; padding: 1rem; text-align: center; color: var(--muted); font-size: .85rem; cursor: pointer; transition: .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.queue { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }

/* Önizleme */
.preview-bg { position: fixed; inset: 0; z-index: 2000; background: rgba(2, 6, 23, .82); display: none; align-items: center; justify-content: center; padding: 2rem; }
.preview-bg.on { display: flex; }
.preview-box { width: 100%; max-width: 980px; height: 86vh; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.preview-box .ph { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.preview-box .ph b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-box .pb { flex: 1; display: grid; place-items: center; background: var(--surface-3); overflow: hidden; }
.preview-box .pb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.preview-box .pb iframe { width: 100%; height: 100%; border: 0; background: #fff; }

/* ---------- Duyarlı ---------- */
@media (max-width: 1199.98px) {
    .cal-layout { grid-template-columns: 1fr; }
    .cal-side { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--sh-lg); }
    body.sb-open .sidebar { transform: none; }
    body.sb-open .sb-backdrop { display: block; position: fixed; inset: 0; z-index: 1025; background: rgba(15, 23, 42, .4); }
    .main { margin-left: 0; }
    .burger { display: inline-grid; }
    .topbar { padding: 0 1rem; gap: .6rem; }
    .page { padding: 1.1rem; }
    .rates { display: none; }
    .user-btn .u-txt { display: none; }
    .user-btn { padding: .3rem; }
}
@media (max-width: 767.98px) {
    :root { --topbar-h: 64px; }
    .tb-title p { display: none; }
    .tb-title h1 { font-size: 1.05rem; }
    .cal-side { grid-template-columns: 1fr; }
    .cal-main-head { padding: 1rem; }
    .cal-main-head .acts { width: 100%; margin: 0; }
    .cal-search { flex: 1; width: auto; }
    .notes { padding: 1rem; grid-template-columns: 1fr; }
    .drawer-b, .drawer-h, .drawer-f { padding-left: 1rem; padding-right: 1rem; }
    .search-pill input { min-width: 0; width: 100%; }
    .search-pill { flex: 1; }
    .toolbar > * { flex: 1 1 auto; }
    .stat { min-height: 0; }
    .auth-card { padding: 2rem 1.4rem 1.6rem; }
    .install-steps li { font-size: .78rem; padding: .5rem; }
    .table-x td, .table-x th { padding: .7rem .75rem; }
    .hide-sm { display: none !important; }
    .preview-bg { padding: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   v1.1 — Talepler / Ödemeler bileşenleri
   ========================================================================== */
.tab-count { min-width: 22px; padding: .05rem .45rem; border-radius: 20px; background: color-mix(in srgb, var(--text-2) 12%, transparent); font-size: .72rem; font-weight: 700; text-align: center; }
.tabs-x a.on .tab-count { background: var(--brand-soft); color: var(--brand); }
.tab-count.danger { background: var(--danger-soft); color: var(--danger); }
.text-brand { color: var(--brand) !important; }

.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.dl-grid dt { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.dl-grid dd { margin: 0; font-weight: 600; }
.dl-grid dd small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }

.stepper { list-style: none; display: flex; margin: 0; padding: 0; counter-reset: s; }
.stepper li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; font-size: .82rem; color: var(--muted); }
.stepper li::before { content: ""; position: absolute; top: 19px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.now::before { background: var(--success); }
.stepper .dot { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: 1rem; }
.stepper li.done { color: var(--text-2); }
.stepper li.done .dot { background: var(--success); color: #fff; box-shadow: none; }
.stepper li.now { color: var(--text); font-weight: 700; }
.stepper li.now .dot { background: var(--brand); color: #fff; box-shadow: 0 0 0 5px var(--brand-ring); }
.stepper-x { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--danger-soft); color: var(--danger); font-size: 1.2rem; }

.seg { display: inline-flex; padding: .25rem; gap: .25rem; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--line); width: 100%; }
.seg label { flex: 1; text-align: center; padding: .45rem .7rem; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: .86rem; color: var(--text-2); white-space: nowrap; }
.seg .btn-check:checked + label { background: var(--surface); color: var(--text); box-shadow: var(--sh); }
.seg .btn-check:checked + label.urgent { background: var(--danger); color: #fff; }
.seg .btn-check:focus-visible + label { outline: 2px solid var(--brand); }

.upload-inline { display: flex; gap: .5rem; }
.upload-inline label.btn { border-style: dashed; }
.upload-inline .form-control { min-width: 0; }
.file-wrap { position: relative; }
.file-wrap form { position: absolute; top: -7px; right: -7px; }
.file-wrap .del { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface); background: var(--danger); color: #fff; font-size: .75rem; display: none; place-items: center; padding: 0; }
.file-wrap:hover .del, .file-wrap:focus-within .del { display: grid; }
@media (hover: none) { .file-wrap .del { display: grid; } }

.items-table td { padding: .45rem .5rem; }
.items-table .form-control { padding: .45rem .6rem; }

.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.amount { padding: 1.1rem 1.25rem; border-top: 4px solid var(--c); }
.amount span { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.amount b { display: block; font-family: var(--font-display); font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; margin-top: .2rem; }
.amount small { color: var(--muted); font-size: .78rem; }

.bulk-bar { position: sticky; top: var(--topbar-h); z-index: 5; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .7rem 1.1rem; background: var(--brand-soft); color: var(--brand); border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.table-x tr.row-sel { background: color-mix(in srgb, var(--brand-soft) 70%, transparent); }
.table-x tr.row-paid td { color: var(--text-2); }
.date-range .form-control { width: 150px; }
.due-preview { padding: .6rem .9rem; border-radius: 10px; background: var(--warning-soft); color: var(--warning); font-size: .86rem; }
.due-preview:empty { display: none; }
a.mini-stat { color: inherit; transition: transform .15s, box-shadow .15s; }
a.mini-stat:hover { transform: translateY(-1px); box-shadow: var(--sh-lg); color: inherit; }

@media (max-width: 1399.98px) { .hide-lg { display: none !important; } }
@media (max-width: 1199.98px) { .hide-md { display: none !important; } }
@media (max-width: 767.98px) {
    .amount-grid { grid-template-columns: 1fr; }
    .stepper li { font-size: .7rem; }
    .stepper .dot { width: 34px; height: 34px; }
    .stepper li::before { top: 16px; }
    .date-range { width: 100%; }
    .date-range .form-control { flex: 1; width: auto; }
    .seg { flex-wrap: wrap; }
}
.fin-tile { display: block; padding: .85rem 1rem; border-radius: 12px; background: var(--c-soft); color: var(--c); }
.fin-tile b { display: block; font-family: var(--font-display); font-size: 1.12rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.fin-tile span { font-size: .76rem; font-weight: 600; opacity: .9; }
.fin-tile:hover { color: var(--c); filter: brightness(.97); }
.proj-bar { display: block; padding: .45rem 0; color: var(--text); font-size: .86rem; }
.proj-bar:hover { color: var(--brand); }
.proj-bar .meter { margin-top: .3rem; }
.notif-scroll { max-height: 420px; overflow-y: auto; }

/* ---------- Ayarlar ---------- */
.settings-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.5rem; align-items: start; max-width: 1180px; }
.settings-nav { position: sticky; top: calc(var(--topbar-h) + 1.25rem); display: flex; flex-direction: column; gap: .4rem; }
.settings-nav > a { display: flex; align-items: center; gap: .8rem; padding: .8rem .9rem; border-radius: var(--r-lg); border: 1px solid transparent; color: var(--text); }
.settings-nav > a:hover { background: var(--surface); border-color: var(--line); color: var(--text); }
.settings-nav > a.on { background: var(--surface); border-color: var(--line); box-shadow: var(--sh); }
.settings-nav .ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--c-soft); color: var(--c); font-size: 1.05rem; }
.settings-nav b { display: block; font-size: .9rem; }
.settings-nav small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.3; }
.settings-nav .chev { margin-left: auto; color: var(--muted); opacity: 0; transition: opacity .15s; }
.settings-nav > a.on .chev, .settings-nav > a:hover .chev { opacity: 1; }
.settings-meta { margin-top: .6rem; padding: .9rem 1rem; border-radius: var(--r-lg); background: var(--surface-3); font-size: .8rem; display: grid; gap: .35rem; }
.settings-meta div { display: flex; justify-content: space-between; } .settings-meta span { color: var(--muted); }
.card-h small { display: block; font-size: .78rem; }
.logo-edit { display: flex; gap: 1.5rem; align-items: flex-start; }
.logo-preview { width: 132px; height: 132px; flex-shrink: 0; border-radius: 22px; display: grid; place-items: center; padding: 14px;
    background: repeating-conic-gradient(var(--surface-3) 0% 25%, var(--surface) 0% 50%) 50% / 18px 18px; border: 1px solid var(--line); }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-preview { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--surface-2); }
.brand-preview img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; }
.brand-preview b { display: block; font-family: var(--font-display); font-weight: 800; line-height: 1.15; }
.brand-preview small { display: block; color: var(--muted); font-size: .74rem; }
.brand-preview em { margin-left: auto; font-style: normal; font-size: .72rem; color: var(--muted); }
.btn-check:checked + .btn-danger-soft { background: var(--danger); color: #fff; }
.list-area { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86rem; line-height: 1.7; }
.setting-row { display: flex; align-items: center; gap: 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.setting-row:first-child { padding-top: 0; } .setting-row:last-child { border-bottom: 0; padding-bottom: 0; }
.setting-row > div:first-child { flex: 1; } .setting-row b { display: block; font-size: .9rem; } .setting-row small { color: var(--muted); font-size: .8rem; }
.setting-input { width: 190px; flex-shrink: 0; }
.input-group-text { background: var(--surface-3); border-color: var(--line); color: var(--text-2); font-size: .85rem; border-radius: 11px; }
.save-bar { position: sticky; bottom: 1rem; display: flex; align-items: center; gap: 1rem; margin-top: 1rem; padding: .8rem 1rem .8rem 1.25rem;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-lg); }
@media (max-width: 991.98px) {
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { position: static; flex-direction: row; overflow-x: auto; }
    .settings-nav > a { flex: 0 0 auto; } .settings-nav small, .settings-nav .chev, .settings-meta { display: none; }
}
@media (max-width: 575.98px) {
    .logo-edit { flex-direction: column; align-items: stretch; } .logo-preview { margin: 0 auto; }
    .setting-row { flex-direction: column; align-items: stretch; gap: .6rem; } .setting-input { width: 100%; }
    .brand-preview em { display: none; }
}

/* ---------- Öneri kutusu (Türkçe uyumlu datalist yerine) ---------- */
.suggest-menu { position: fixed; z-index: 2050; max-height: 280px; overflow-y: auto; padding: .35rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-lg); }
.suggest-menu .sg-item { padding: .5rem .7rem; border-radius: 8px; cursor: pointer; font-size: .88rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-menu .sg-item b { color: var(--brand); font-weight: 700; }
.suggest-menu .sg-item:hover, .suggest-menu .sg-item.on { background: var(--brand-soft); }
.suggest-menu .sg-empty { padding: .5rem .7rem; font-size: .8rem; color: var(--muted); }

/* ---------- Döviz kurları ---------- */
.rate-card { display: flex; flex-direction: column; gap: .5rem; padding: 1.1rem 1.2rem; color: var(--text); border-top: 4px solid transparent; transition: transform .15s, box-shadow .15s; }
.rate-card:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); color: var(--text); }
.rate-card.on { border-top-color: var(--c); }
.rc-head { display: flex; align-items: center; gap: .65rem; }
.rc-head b { display: block; font-family: var(--font-display); font-weight: 800; }
.rc-head small { display: block; color: var(--muted); font-size: .74rem; }
.rc-head .rchg { margin-left: auto; }
.rc-sym { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--c-soft); color: var(--c); font-weight: 800; font-size: .95rem; }
.rc-val { font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; }
.rc-val small { font-size: .95rem; color: var(--muted); }
.rc-sub { display: flex; justify-content: space-between; gap: .5rem; font-size: .76rem; color: var(--muted); }
.rchg { display: inline-flex; align-items: center; gap: .15rem; font-size: .78rem; font-weight: 700; padding: .12rem .45rem; border-radius: 6px; white-space: nowrap; }
.rchg.up { color: var(--danger); background: var(--danger-soft); }
.rchg.down { color: var(--success); background: var(--success-soft); }
.rchg.flat { color: var(--muted); background: var(--surface-3); }
.rate-chart { position: relative; color: var(--c); padding-left: 64px; }
.rate-chart svg { display: block; width: 100%; height: 220px; overflow: visible; }
.rate-chart .rc-cursor { stroke: var(--line-strong); stroke-dasharray: 3 3; opacity: 0; }
.rate-chart.hover .rc-cursor { opacity: 1; }
.rc-scale { position: absolute; left: 0; top: 0; bottom: 22px; width: 58px; display: flex; flex-direction: column; justify-content: space-between; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.rc-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: .35rem; }
.rc-dot { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 calc(64px - 5.5px); border-radius: 50%; background: var(--c); border: 2px solid var(--surface); box-shadow: 0 0 0 4px var(--c-soft); pointer-events: none; }
.rc-tip { position: absolute; top: -8px; transform: translate(calc(-50% + 64px), -100%); background: var(--text); color: var(--surface); padding: .35rem .6rem; border-radius: 8px; font-size: .78rem; white-space: nowrap; text-align: center; pointer-events: none; opacity: 0; transition: opacity .12s; }
.rc-tip b { display: block; } .rc-tip span { opacity: .75; font-size: .7rem; }
.rate-chart.hover .rc-tip { opacity: 1; }
.conv-sel { max-width: 110px; }
.conv-out { display: flex; align-items: center; justify-content: flex-end; background: var(--surface-3); }
/* Üst çubuk kurları */
.rates a, .rates > span { display: inline-flex; align-items: center; gap: .4rem; padding: 0 .55rem; color: var(--text); }
.rates a + a, .rates span + span { border-left: 1px solid var(--line); }
.rates i { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-size: .72rem; background: var(--success-soft); color: var(--success); }
.rates a:nth-child(2) i { background: var(--info-soft); color: var(--info); }
.rates a:nth-child(3) i { background: color-mix(in srgb, #7c3aed 14%, transparent); color: #7c3aed; }
.rates em { font-style: normal; font-size: .68rem; }
.rates em.up { color: var(--danger); } .rates em.down { color: var(--success); }
.btn-check:checked + .btn-soft { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.user-btn b, .user-btn small { white-space: nowrap; }
@media (max-width: 1399.98px) { .rates > :nth-child(n+3) { display: none !important; } }

/* ---------- Sayı kutuları: ok düğmeleri yok, × ile temizle ---------- */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.clear-wrap { position: relative; display: block; flex: 1 1 auto; min-width: 0; }
.input-group > .clear-wrap { width: 1%; }
.input-group > .clear-wrap:not(:last-child) > .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .clear-wrap:not(:first-child) > .form-control { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.clear-wrap > .form-control { padding-right: 2.3rem; }
.clear-x { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%;
    display: grid; place-items: center; background: var(--surface-3); color: var(--muted); font-size: .72rem; cursor: pointer; }
.clear-x:hover { background: var(--danger-soft); color: var(--danger); }
.clear-wrap > input:placeholder-shown + .clear-x, .clear-wrap > input:disabled + .clear-x { display: none; }

/* ==========================================================================
   v1.4 — Araç filosu
   ========================================================================== */
.plate-badge { display: inline-block; padding: .1rem .6rem; border: 2px solid var(--text); border-radius: 7px; font-family: var(--font-display); letter-spacing: .04em; background: var(--surface); }
.plate-input { letter-spacing: .05em; }
.fleet-stats { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.fleet-stats .fs { display: flex; align-items: center; gap: .85rem; padding: 1rem 1.1rem; color: var(--text); transition: transform .15s, box-shadow .15s; }
.fleet-stats a.fs:hover { transform: translateY(-1px); box-shadow: var(--sh-lg); color: var(--text); }
.fleet-stats .fs > i { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 1.2rem; background: var(--c-soft); color: var(--c); }
.fleet-stats .fs b { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.fleet-stats .fs small { color: var(--muted); font-size: .76rem; font-weight: 600; }
.fleet-stats .fs-cats { flex-wrap: wrap; gap: .35rem; align-content: center; }
.fs-cats a { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 8px; background: var(--surface-3); color: var(--text-2); font-size: .78rem; font-weight: 600; }
.fs-cats a b { font-family: var(--font-body); font-size: .74rem; color: var(--muted); }
.fs-cats a:hover, .fs-cats a.on { background: var(--brand-soft); color: var(--brand); }
.alert-pulse > i { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 35%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
.seg-auto { width: auto; }
.seg a { padding: .4rem .7rem; border-radius: 9px; color: var(--text-2); }
.seg a.on { background: var(--surface); color: var(--text); box-shadow: var(--sh); }

.fleet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.vcard { position: relative; display: flex; flex-direction: column; gap: .75rem; padding: 1rem 1.1rem 1rem 1.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; }
.vcard::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--success); }
.vcard.w-soon::before { background: var(--warning); }
.vcard.w-exp::before { background: var(--danger); }
.vcard.passive { opacity: .62; } .vcard.passive::before { background: var(--line-strong); }
.vcard:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); border-color: var(--line-strong); color: var(--text); }
.vc-head { display: flex; align-items: center; gap: .7rem; }
.vc-ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 1.15rem; }
.vc-title { min-width: 0; flex: 1; }
.vc-title b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.08rem; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-title small { display: block; color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-info { margin: 0; display: grid; gap: .3rem; font-size: .83rem; }
.vc-info div { display: flex; justify-content: space-between; gap: .75rem; }
.vc-info dt { font-weight: 500; color: var(--muted); white-space: nowrap; }
.vc-info dd { margin: 0; font-weight: 700; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-docs { display: flex; flex-wrap: wrap; gap: .3rem; }
.vc-foot { display: flex; align-items: center; gap: .35rem; margin-top: auto; padding-top: .65rem; border-top: 1px dashed var(--line); min-height: 34px; }
.docpill { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .5rem; border-radius: 7px; font-size: .72rem; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.docpill i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.docpill b { font-weight: 700; font-variant-numeric: tabular-nums; }
.docpill.ok i { background: var(--success); }
.docpill.soon { background: var(--warning-soft); color: var(--warning); } .docpill.soon i { background: var(--warning); }
.docpill.exp { background: var(--danger-soft); color: var(--danger); } .docpill.exp i { background: var(--danger); }
.docpill.none { opacity: .7; }
[class^="tag-"] { display: inline-block; padding: .1rem .45rem; border-radius: 6px; font-size: .68rem; font-weight: 800; letter-spacing: .03em; border: 1.5px solid; }
.tag-hgs { color: var(--info); } .tag-utts { color: var(--warning); } .tag-arvento { color: #7c3aed; }

.doc-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.doc-tile { padding: .85rem .9rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; gap: .15rem; border-top: 4px solid var(--line-strong); }
.doc-tile.st-ok { border-top-color: var(--success); }
.doc-tile.st-soon { border-top-color: var(--warning); background: color-mix(in srgb, var(--warning-soft) 60%, var(--surface)); }
.doc-tile.st-expired { border-top-color: var(--danger); background: color-mix(in srgb, var(--danger-soft) 60%, var(--surface)); }
.dt-head { display: flex; align-items: center; gap: .4rem; font-size: .82rem; } .dt-head i { color: var(--muted); }
.dt-date { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; margin-top: .2rem; }
.dt-state { font-size: .76rem; color: var(--muted); }
.st-soon .dt-state { color: var(--warning); font-weight: 700; } .st-expired .dt-state { color: var(--danger); font-weight: 700; }
.dt-acts { display: flex; gap: .3rem; margin-top: .5rem; }
.table-x tr.row-old td { color: var(--muted); }
.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-bottom: 1rem; }
.mini-kpis div { padding: .7rem .85rem; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.mini-kpis span { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mini-kpis b { font-size: .95rem; }
.dl-list { margin: 0; display: grid; gap: .55rem; }
.dl-list div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--line); padding-bottom: .5rem; }
.dl-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.dl-list dt { color: var(--muted); font-weight: 500; font-size: .84rem; } .dl-list dd { margin: 0; font-weight: 600; text-align: right; font-size: .88rem; }
.note-box { padding: .7rem .85rem; border-radius: var(--r); background: var(--warning-soft); color: var(--text); font-size: .86rem; }
.appt { display: flex; gap: .8rem; padding: .85rem 1.35rem; border-bottom: 1px solid var(--line); }
.appt:last-child { border-bottom: 0; }
.appt.past { opacity: .6; }
.appt-date { width: 46px; flex-shrink: 0; text-align: center; border-radius: 10px; background: var(--info-soft); color: var(--info); padding: .3rem 0; line-height: 1.1; align-self: flex-start; }
.appt-date b { display: block; font-family: var(--font-display); font-size: 1.1rem; } .appt-date small { font-size: .64rem; text-transform: uppercase; font-weight: 700; }
.missing-list { max-height: 520px; overflow-y: auto; }
@media (max-width: 1399.98px) { .fleet-stats { grid-template-columns: repeat(4, 1fr); } .fleet-stats .fs-cats { grid-column: 1 / -1; } }
@media (max-width: 767.98px) { .fleet-stats { grid-template-columns: repeat(2, 1fr); } .mini-kpis { grid-template-columns: repeat(2, 1fr); } .fleet-grid { grid-template-columns: 1fr; } }
@media (max-width: 767.98px) { .fleet-stats .fs-cats { display: none; } }

/* ==========================================================================
   v1.5 — Kişiselleştirme (menü düzeni, dashboard düzenleme, kısayollar)
   ========================================================================== */
.menu-editor { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.menu-list { list-style: none; margin: 0; padding: .6rem; min-height: 80px; display: flex; flex-direction: column; gap: .35rem; }
.menu-item { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); cursor: grab; font-size: .88rem; user-select: none; }
.menu-item:active { cursor: grabbing; }
.menu-item .grip { color: var(--muted); }
.menu-item .ico { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: var(--c-soft); color: var(--c); }
.menu-item.off { opacity: .5; background: var(--surface-2); }
.menu-item.off b { text-decoration: line-through; }
.sort-ghost { opacity: .35; outline: 2px dashed var(--brand); }
@media (max-width: 991.98px) { .menu-editor { grid-template-columns: 1fr; } }

/* Dashboard ızgarası: 12 sütun, sabit satır yüksekliği; kart --w sütun, --h satır kaplar */
.dash-top { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1.25rem; }
.dash-top .quick { flex: 1; margin: 0; }
.dash-edit-btn { flex-shrink: 0; margin-top: .25rem; }
.quick .sc { position: relative; }
.quick .sc .ext { font-size: .7rem; color: var(--muted); }
.sc-x, .sc-add { display: none; }
.dash-edit .sc-x { display: grid; position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 2px solid var(--surface); background: var(--danger); color: #fff; place-items: center; font-size: .75rem; }
.dash-edit .sc { cursor: grab; outline: 1px dashed var(--line-strong); outline-offset: 2px; }
.dash-edit .sc-add { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 40px; border: 1.5px dashed var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: .86rem; }
.dash-editbar { position: sticky; top: calc(var(--topbar-h) + .5rem); z-index: 15; margin-bottom: 1.25rem; padding: .75rem 1rem; border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border: 1.5px solid color-mix(in srgb, var(--brand) 40%, transparent); box-shadow: var(--sh-lg); }
.eb-title { font-weight: 800; color: var(--brand); }
.hidden-tray { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed var(--line); }
.tray-chip { border: 1px dashed var(--line-strong); background: var(--surface-2); color: var(--text-2); border-radius: 20px; padding: .25rem .7rem; font-size: .78rem; font-weight: 600; }
.tray-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.dash-grid { --row: 168px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: var(--row); grid-auto-flow: row dense; gap: 1.25rem; }
.dw { position: relative; grid-column: span var(--w); grid-row: span var(--h); min-width: 0; }
.dw > .card-x { height: 100%; min-height: 0; }
.dw > .stat { min-height: 0; overflow: hidden; }
.dw-panel > .card-x { display: flex; flex-direction: column; overflow: hidden; }
.dw-panel > .card-x > .card-h { flex-shrink: 0; }
.dw-panel > .card-x > :not(.card-h) { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.dw-panel > .card-x > .list-row, .dw-panel > .card-x > .empty { flex: 0 0 auto; }
.dw-panel > .card-x:has(> .list-row) { overflow-y: auto; }
.dw-ctl { display: none; }
.dash-edit .dw { outline: 2px dashed color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 3px; border-radius: var(--r-lg); }
.dash-edit .dw-ctl { display: flex; align-items: center; gap: .15rem; position: absolute; z-index: 5; top: .5rem; left: 50%; transform: translateX(-50%); padding: .25rem; border-radius: 12px; background: var(--text); color: var(--surface); box-shadow: var(--sh-lg); white-space: nowrap; }
.dw-ctl button, .dw-grip { width: 30px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: inherit; display: grid; place-items: center; font-size: .9rem; }
.dw-ctl button:hover { background: color-mix(in srgb, var(--surface) 18%, transparent); }
.dw-grip { cursor: grab; } .dw-grip:active { cursor: grabbing; }
.dw-size { font-size: .7rem; font-weight: 700; padding: 0 .4rem; opacity: .8; }
.dw-flash { animation: flashCard 1.2s; }
.sc-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; }
.sc-pick { display: flex; align-items: center; gap: .55rem; padding: .6rem .75rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); text-align: left; font-size: .86rem; font-weight: 600; color: var(--text); }
.sc-pick i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--c-soft); color: var(--c); flex-shrink: 0; }
.sc-pick span { flex: 1; } .sc-pick small { color: var(--brand); font-size: .72rem; }
.sc-pick:hover:not(:disabled) { border-color: var(--brand); }
.sc-pick.on { opacity: .5; } .sc-pick.on small { color: var(--muted); }
.sc-icons, .sc-colors { display: flex; flex-wrap: wrap; gap: .35rem; }
.sc-icons button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 1.05rem; }
.sc-icons button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.sc-colors button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface); background: var(--c); box-shadow: 0 0 0 1px var(--line); }
.sc-colors button.on { box-shadow: 0 0 0 2px var(--text); }
@media (max-width: 1199.98px) {
    .dw { grid-column: span 12; }
    .dw[data-w="3"], .dw[data-w="4"] { grid-column: span 6; }
}
@media (max-width: 767.98px) {
    .dash-grid { grid-auto-rows: auto; }
    .dw, .dw[data-w="3"], .dw[data-w="4"] { grid-column: span 12; grid-row: auto; }
    .dw-panel > .card-x { max-height: 520px; }
    .dash-top { flex-direction: column-reverse; align-items: stretch; }
    .dash-edit-btn { align-self: flex-end; }
}
/* Düzenleme denetimleri kartın üst kenarında, başlığı kapatmasın */
.dash-edit .dw-ctl { top: -15px; padding: .15rem; gap: 0; border-radius: 10px; }
.dash-edit .dw-ctl button, .dash-edit .dw-grip { width: 26px; height: 24px; font-size: .8rem; }
.dash-edit .dw[data-w="3"] .dw-size, .dash-edit .dw[data-w="4"] .dw-size { display: none; }
.dash-edit .dash-grid { row-gap: 1.9rem; padding-top: .6rem; }
.dash-edit .dash-edit-btn { display: none; }

/* Araç tablosu: Excel ile aynı 14 sütun */
.table-fleet { font-size: .82rem; }
.table-fleet th, .table-fleet td { padding: .55rem .7rem; white-space: nowrap; }
.table-fleet .tf-clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.table-fleet .tf-plate { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
.table-fleet thead .tf-plate, .table-fleet th:first-child { position: sticky; left: 0; z-index: 2; box-shadow: 1px 0 0 var(--line); }
.table-fleet tbody tr:hover .tf-plate { background: var(--surface-2); }
/* Geniş tablo kendi alanında kayar: yatay kaydırma çubuğu ekranda görünür, başlık satırı yukarıda sabit kalır */
.table-scroll { max-height: calc(100vh - var(--topbar-h) - 9rem); min-height: 320px; overflow: auto; }
.table-scroll thead th { position: sticky; top: 0; z-index: 3; }
.table-scroll thead th:first-child { z-index: 4; }
.vc-title .vc-brand { opacity: .85; }
.vc-tags { display: flex; flex-wrap: wrap; gap: .3rem; min-width: 0; }
[class^="tag-"].off { opacity: .45; border-style: dashed; }

/* Döviz çevirici: kur türü açıklaması */
.conv-hint { display: flex; gap: .55rem; align-items: flex-start; margin-top: .75rem; padding: .6rem .75rem; border-radius: 10px; font-size: .8rem; line-height: 1.45; background: var(--success-soft); color: var(--text-2); }
.conv-hint > i { color: var(--success); font-size: 1rem; line-height: 1.2; }
.conv-hint.warn { background: var(--warning-soft); }
.conv-hint.warn > i { color: var(--warning); }

/* Sayfa başlığı (üst çubuk yerine sayfa içinde) */
.tb-spacer { flex: 1; }
.page-head { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin: -.25rem 0 1.4rem; }
.ph-title { min-width: 0; flex: 1; }
.ph-title h1 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 0; line-height: 1.2; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ph-title p { margin: .3rem 0 0; color: var(--muted); font-size: .88rem; }
.ph-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
@media (max-width: 767.98px) { .ph-title h1 { font-size: 1.3rem; } .page-head { margin-bottom: 1rem; } }
.dup-warn { margin-top: .4rem; padding: .45rem .6rem; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: .8rem; font-weight: 600; }
.dup-warn a { color: inherit; text-decoration: underline; }
.th-sort { color: inherit; display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; }
.th-sort i { opacity: .35; font-size: .85em; }
.th-sort:hover { color: var(--text); } .th-sort:hover i { opacity: .8; }
.th-sort.on { color: var(--brand); } .th-sort.on i { opacity: 1; }
/* Listeye dönünce son açılan kayıt */
@keyframes rowFlash { 0%, 45% { background: var(--brand-soft); } 100% { background: transparent; } }
@keyframes rowFlashBar { 0%, 45% { box-shadow: inset 3px 0 0 var(--brand); } 100% { box-shadow: inset 3px 0 0 transparent; } }
tr.row-flash > td { animation: rowFlash 2.4s ease-out; }
tr.row-flash > td:first-child { animation: rowFlash 2.4s ease-out, rowFlashBar 2.4s ease-out; }
.vcard.row-flash { animation: rowFlash 2.4s ease-out; }
/* Dashboard: Döviz Çevirici kartı */
.dw-conv { display: flex; flex-direction: column; }
.dw-conv .card-b { flex: 1; min-height: 0; overflow: auto; padding-top: .85rem; }
.dw-conv .conv-hint { font-size: .74rem; margin-top: .6rem; }
.dw-conv .form-control-lg, .dw-conv .form-select-lg { font-size: 1rem; padding-top: .45rem; padding-bottom: .45rem; }

/* Kaydırma taşmasın: menü, bildirim listesi, çekmece, pencere ve öneri kutusu sonuna gelince arka sayfa kaymaz */
/* Yalnızca dikey kayan iç alanlar (tablo yatay kayar, ona uygulanmaz — yoksa tablonun üstünde sayfa kaymıyordu) */
.sb-nav, .notif-scroll, .dropdown-menu, .drawer-b, .modal-body, .suggest-menu { overscroll-behavior: contain; }
/* Bildirim: "ve N tane daha" satırı */
.notif-item.notif-more { background: var(--surface-2); }
.notif-item.notif-more b { font-weight: 700; color: var(--brand); }
.notif-item.notif-more .ni { opacity: .8; }
/* Takvim: gün işaretleri açıklaması (dashboard küçük takvimiyle aynı renkler) */
.cal-legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: center; margin-top: .9rem; font-size: .78rem; color: var(--muted); }
.cal-legend > span { display: inline-flex; align-items: center; gap: .35rem; }
/* Dosya önizleme: resim kutuya tam sığsın (yüzde yükseklik ızgara hücresinde çözülmüyordu → resim kırpılıyordu) */
.preview-box .pb { position: relative; min-height: 0; }
.preview-box .pb img { position: absolute; inset: 0; margin: auto; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; padding: .75rem; }
.preview-box .pb iframe { position: absolute; inset: 0; }

/* Özet kartlarda büyük tutarlar taşmasın: rakam bölünmez, kartın kendi genişliğine göre (container query) küçülür */
.mini-stat, .fleet-stats .fs { container-type: inline-size; }
.mini-stat > div, .fleet-stats .fs > span { min-width: 0; }
.mini-stat b { white-space: nowrap; font-size: clamp(.82rem, 8.6cqi, 1.35rem); }
.stat .s-value { font-size: clamp(1.35rem, 1rem + 1.2vw, 2rem); overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
    .mini-stats { grid-template-columns: 1fr 1fr; gap: .6rem; }
    .mini-stat { flex-direction: column; align-items: flex-start; padding: .8rem .85rem; gap: .5rem; }
    .mini-stat i { width: 32px; height: 32px; font-size: .9rem; border-radius: 9px; }
    .mini-stat > div { width: 100%; }
    .mini-stat b { font-size: clamp(.82rem, 11.5cqi, 1.15rem); letter-spacing: -.02em; }
    .mini-stat small { font-size: .7rem; }
    .stat .s-value { font-size: clamp(1.25rem, 6.5vw, 1.6rem); }
}
/* Fatura iptali */
.btn-warning-soft { background: var(--warning-soft); color: var(--warning); border: 1px solid transparent; }
.btn-warning-soft:hover { background: var(--warning); color: #fff; }
.table-x tr.row-cancelled td { color: var(--muted); }
.table-x tr.row-cancelled .t-main { text-decoration: line-through; }
.cancel-box { display: flex; gap: .75rem; align-items: flex-start; }
.cancel-box > i { font-size: 1.2rem; color: var(--muted); }

/* Takvim: muayene randevusu ve kargo bilgi kutuları */
.plate-mini { display: inline-block; padding: 0 .4rem; border: 1.5px solid currentColor; border-radius: 5px; font-family: var(--font-display); font-size: .9em; letter-spacing: .03em; line-height: 1.35; }
.info-box { border: 1px solid var(--line); border-left: 4px solid var(--c); background: var(--c-soft); border-radius: 12px; padding: .8rem 1rem; margin: 0 0 1rem; }
.info-box h4 { font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--c); margin: 0 0 .55rem; display: flex; align-items: center; gap: .4rem; }
.info-box dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .55rem 1rem; }
.info-box dt { font-size: .72rem; font-weight: 600; color: var(--muted); }
.info-box dd { margin: 0; font-weight: 700; font-size: .92rem; word-break: break-word; }
.info-box dd a { color: inherit; text-decoration: underline; text-decoration-color: var(--c); }

/* Dosya Kütüphanesi */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.lib-item { display: flex; flex-direction: column; overflow: hidden; position: relative; }
.lib-thumb { aspect-ratio: 4 / 3; background: var(--surface-3); display: grid; place-items: center; overflow: hidden; position: relative; color: var(--muted); }
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.lib-thumb:hover img { transform: scale(1.04); }
.lib-thumb > i { font-size: 2.6rem; }
.lib-ext { position: absolute; bottom: .5rem; right: .6rem; font-size: .66rem; font-weight: 800; letter-spacing: .06em; color: var(--muted); }
.lib-body { padding: .7rem .8rem .75rem; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.lib-name { font-weight: 700; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-rec { display: flex; align-items: center; gap: .35rem; font-size: .74rem; font-weight: 600; color: var(--c); background: var(--c-soft); border-radius: 7px; padding: .2rem .45rem; min-width: 0; text-decoration: none; }
.lib-rec span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-meta { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); }
.lib-acts { position: absolute; top: .5rem; right: .5rem; display: flex; gap: .3rem; opacity: 0; transition: opacity .15s; }
.lib-acts .btn { background: var(--surface); box-shadow: var(--sh); }
.lib-item:hover .lib-acts, .lib-item:focus-within .lib-acts { opacity: 1; }
@media (hover: none) { .lib-acts { opacity: 1; } }
@media (max-width: 575.98px) { .lib-grid { grid-template-columns: 1fr 1fr; gap: .6rem; } }

/* ---------- Finans Raporu (grafik renkleri doğrulandı: açık/koyu yüzeyde renk körlüğü ve kontrast) ---------- */
.viz { --viz-1: #2a78d6; --viz-2: #eb6834; --viz-crit: #d03b3b; }
[data-theme="dark"] .viz { --viz-1: #3987e5; --viz-2: #d95926; --viz-crit: #d03b3b; }
.rep-filters .rep-custom { display: inline-flex; align-items: center; gap: .4rem; }
.rep-filters .rep-custom[hidden] { display: none; }
.rep-period { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin: -.25rem 0 1rem; color: var(--text-2); font-size: .88rem; }
.rep-section-title { font-weight: 800; font-size: .95rem; margin: .25rem 0 .75rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; }
.rep-section-title small { font-weight: 500; color: var(--muted); font-size: .76rem; }
.rep-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.rep-kpi { padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .2rem; border-top: 3px solid var(--c); container-type: inline-size; min-width: 0; }
.rep-kpi > span:first-child { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2); }
.rep-kpi b { font-family: var(--font-display); font-weight: 800; white-space: nowrap; font-size: clamp(1rem, 9cqi, 1.55rem); line-height: 1.2; }
.rep-kpi small { color: var(--muted); font-size: .76rem; }
.rep-kpi .meter { margin-top: .35rem; }
.viz-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .78rem; color: var(--text-2); }
.viz-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.viz-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.viz-svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-grid { stroke: var(--line); stroke-width: 1; }
.viz-grid.base { stroke: var(--muted); stroke-opacity: .55; }
.viz-tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-s1 { fill: var(--viz-1); } .viz-s2 { fill: var(--viz-2); }
.viz-hit { fill: transparent; }
.viz-col { cursor: default; outline: none; }
.viz-col path { transition: opacity .12s; }
.viz-hover .viz-col:not(.viz-on) path { opacity: .35; }
.viz-col.viz-on .viz-hit, .viz-col:focus-visible .viz-hit { fill: var(--surface-3); }
.viz-tip { position: fixed; z-index: 2100; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--sh-lg); border-radius: 10px; padding: .5rem .7rem; font-size: .8rem; display: flex; flex-direction: column; gap: .15rem; min-width: 160px; }
.viz-tip b { font-weight: 700; margin-bottom: .1rem; }
.viz-tip span { display: flex; align-items: center; gap: .4rem; font-variant-numeric: tabular-nums; color: var(--text-2); }
.viz-tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.viz-table { margin-top: .75rem; font-size: .85rem; }
.viz-table summary { cursor: pointer; color: var(--muted); font-size: .8rem; }
.aging { display: flex; flex-direction: column; gap: .5rem; }
.ag-row { display: grid; grid-template-columns: minmax(150px, 38%) 1fr 92px; align-items: center; gap: .75rem; font-size: .84rem; padding: .15rem .25rem; border-radius: 8px; outline: none; }
.ag-row.viz-on, .ag-row:focus-visible { background: var(--surface-2); }
.ag-lbl { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-row.late .ag-lbl i { color: var(--viz-crit); }
.ag-track { height: 14px; display: block; }
.ag-bar { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--viz-1); min-width: 0; }
.ag-row.late .ag-bar { background: var(--viz-crit); }
.ag-val { text-align: right; font-weight: 700; white-space: nowrap; }
.ag-val small { display: block; font-weight: 500; color: var(--muted); font-size: .7rem; }
.rep-overdue { display: flex; align-items: center; gap: .5rem; padding: .55rem .75rem; margin-bottom: .75rem; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: .84rem; text-decoration: none; }
.rep-overdue b { font-weight: 800; }
.rep-table td { vertical-align: top; }
.rep-name { font-weight: 700; color: var(--text); text-decoration: none; }
.rep-name:hover { color: var(--brand); text-decoration: underline; }
.rep-meter { display: block; height: 4px; border-radius: 2px; background: var(--surface-3); margin: .3rem 0 .2rem; max-width: 220px; }
.rep-meter span { display: block; height: 100%; border-radius: 2px; background: var(--viz-1, #2a78d6); }
@media (max-width: 1199.98px) { .rep-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .rep-kpis { gap: .6rem; } .ag-row { grid-template-columns: 1fr 70px; } .ag-track { grid-column: 1 / -1; grid-row: 2; } }
@media print {
    .sidebar, .topbar, .toolbar, .ph-actions, .viz-table summary, .sb-backdrop, .viz-tip { display: none !important; }
    .main { margin-left: 0 !important; } .page { padding: 0 !important; }
    .card-x { box-shadow: none !important; break-inside: avoid; border: 1px solid #ddd; }
    body { background: #fff !important; }
}
.rep-table { font-size: .83rem; }
.rep-table td.tnum, .rep-table th { white-space: nowrap; }
.rep-table td, .rep-table th { padding-left: .7rem; padding-right: .7rem; }
/* Dar ekranda grafik küçülüp okunmaz olmasın: yana kaydırılır */
.viz-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
@media (max-width: 767.98px) { .viz-scroll .viz-svg { min-width: 640px; } .viz-scroll .viz-svg.viz-sm { min-width: 460px; } }

/* Personel kartı */
.person-card { text-align: center; padding-bottom: .5rem; }
.person-card h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; margin: .7rem 0 .1rem; }
.pc-photo { width: 96px; height: 96px; margin: .25rem auto 0; position: relative; }
.pc-photo img, .pc-photo > span { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--c-soft); color: var(--c); font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line); }
.pc-photo-btn { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh); cursor: pointer; color: var(--text-2); margin: 0; }
.pc-photo-btn:hover { color: var(--brand); }
.pc-photo-del { position: absolute; left: -2px; bottom: -2px; width: 32px; height: 32px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh); color: var(--danger, #d03b3b); cursor: pointer; }
.pc-photo-del:hover { background: var(--danger-soft, #fdecec); }
.pc-photo form { margin: 0; }
.lr-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--c-soft, var(--surface-3)); color: var(--c, var(--text-2)); font-size: 1.1rem; flex-shrink: 0; }
.list-row .lr-main { flex: 1; min-width: 0; }

/* ---- Yakıt ---- */
.form-control.text-uppercase::placeholder { text-transform: none; }
.fuel-sticky { position: sticky; top: calc(var(--topbar-h) + 1rem); }
@media (max-width: 1199.98px) { .fuel-sticky { position: static; } }
.fuel-sep { display: flex; align-items: center; gap: .75rem; font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.fuel-sep::before, .fuel-sep::after { content: ''; flex: 1; border-top: 1px dashed var(--line-strong); }
.fuel-verdict { --v: var(--muted); --v-soft: var(--surface-3); display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.35rem; background: var(--v-soft); border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.fuel-verdict.v-success { --v: var(--success); --v-soft: var(--success-soft); }
.fuel-verdict.v-danger { --v: var(--danger); --v-soft: var(--danger-soft); }
.fuel-verdict.v-info { --v: var(--info); --v-soft: var(--info-soft); }
.fuel-verdict.v-brand { --v: var(--brand); --v-soft: var(--brand-soft); }
.fuel-verdict > i { font-size: 1.7rem; color: var(--v); flex-shrink: 0; }
.fuel-verdict > div { flex: 1; min-width: 0; }
.fuel-verdict small { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.fuel-verdict b { display: block; font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; color: var(--v); line-height: 1.2; }
.fuel-verdict span { display: block; font-size: .82rem; color: var(--text-2); margin-top: .15rem; }
.fuel-verdict em { font-style: normal; text-align: right; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.fuel-verdict em.neg { color: var(--danger); }
.fuel-verdict em small { text-transform: none; letter-spacing: 0; font-weight: 600; font-family: inherit; }
.fuel-calc { margin: 0; }
.fuel-calc > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .42rem 0; border-bottom: 1px dashed var(--line); }
.fuel-calc dt { font-weight: 500; color: var(--text-2); font-size: .86rem; }
.fuel-calc dt small { display: block; color: var(--muted); font-size: .74rem; font-weight: 400; }
.fuel-calc dd { margin: 0; font-weight: 600; text-align: right; }
.fuel-calc > div.sum { border-bottom: 0; padding-top: .55rem; }
.fuel-calc > div.sum dt { font-weight: 700; color: var(--text); }
.fuel-calc > div.sum dd { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
.fuel-calc > div.sum + div.sum { padding-top: .1rem; }
@media (max-width: 575.98px) { .fuel-verdict { flex-wrap: wrap; } .fuel-verdict em { width: 100%; text-align: left; padding-left: 2.6rem; } }
.hr-nav { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.hr-nav a { white-space: nowrap; font-weight: 600; font-size: .86rem; }

/* ---- İzin / Puantaj ---- */
.month-nav { display: flex; align-items: center; gap: .35rem; }
.month-nav input { width: 170px; }
.ts-card .card-h { flex-wrap: wrap; }
.ts-wrap { overflow-x: auto; }
.ts { border-collapse: separate; border-spacing: 0; font-size: .8rem; min-width: 100%; }
.ts th, .ts td { padding: 0; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.ts thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; font-weight: 700; color: var(--muted); padding: .4rem 0; }
.ts .ts-name { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding: .35rem .75rem .35rem 1rem; min-width: 170px; max-width: 220px; border-right: 1px solid var(--line); font-weight: 600; }
.ts thead .ts-name { z-index: 3; }
.ts .ts-name a { color: var(--text); display: block; overflow: hidden; text-overflow: ellipsis; }
.ts .ts-name small { display: block; color: var(--muted); font-weight: 400; font-size: .72rem; }
.ts-d { min-width: 32px; cursor: default; }
.ts-d b { display: block; color: var(--text); font-size: .8rem; }
.ts-d small { font-size: .65rem; font-weight: 600; }
.ts[data-edit="1"] .ts-d { cursor: pointer; }
.ts .k-weekend, .ts .k-holiday { background: var(--surface-3); }
.ts thead .k-holiday b { color: var(--danger); }
.ts .is-today b { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.ts td { padding: 2px; }
.ts-s { min-width: 44px; padding: 0 .4rem !important; font-weight: 700; font-variant-numeric: tabular-nums; border-left: 1px solid var(--line); }
.ts thead .ts-s { font-size: .7rem; }
.ts-c { --tc: var(--success); --tb: var(--success-soft); position: relative; display: inline-grid; place-items: center; width: 28px; height: 26px; border-radius: 6px; border: 1px solid transparent; background: var(--tb); color: var(--tc); font-weight: 800; font-size: .74rem; line-height: 1; padding: 0; }
button.ts-c { cursor: pointer; }
button.ts-c:disabled { cursor: default; opacity: 1; }
.ts-c.auto { background: transparent; border-color: color-mix(in srgb, var(--tc) 25%, transparent); font-weight: 600; opacity: .75; }
.ts-c:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.ts-c i { position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; border-radius: 50%; background: var(--warning); }
.ts-c.c-half { --tc: #0d7f72; --tb: #ddf3ef; }
.ts-c.c-off { --tc: var(--muted); --tb: var(--surface-3); }
.ts-c.c-leave { --tc: var(--info); --tb: var(--info-soft); }
.ts-c.c-sick { --tc: var(--danger); --tb: var(--danger-soft); }
.ts-c.c-unpaid { --tc: #7c3aed; --tb: #f1ebfe; }
.ts-c.c-absent { --tc: #fff; --tb: var(--danger); }
.ts-c.c-none { background: transparent; color: var(--line-strong); }
[data-theme="dark"] .ts-c.c-half { --tc: #5eead4; --tb: rgba(94,234,212,.12); }
[data-theme="dark"] .ts-c.c-unpaid { --tc: #c4b5fd; --tb: rgba(196,181,253,.13); }
.ts-legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .76rem; color: var(--text-2); align-items: center; }
.ts-legend > span { display: inline-flex; align-items: center; gap: .35rem; }
.ts-pop { position: fixed; z-index: 2060; width: 236px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-lg); padding: .7rem; }
.ts-pop-h { font-size: .78rem; font-weight: 700; margin-bottom: .5rem; }
.ts-pop-codes { display: grid; grid-template-columns: repeat(5, 1fr); gap: .3rem; }
.ts-pop-codes .ts-c { width: 100%; height: 32px; }
.ts-pop-codes .ts-c.on { outline: 2px solid var(--brand); outline-offset: 1px; }
.ts-pop-ot { display: flex; align-items: center; gap: .4rem; margin-top: .6rem; font-size: .78rem; color: var(--text-2); }
.ts-pop-ot input { width: 70px; text-align: right; }

/* ---- Cari ekstre ---- */
.dl-grid.dl-1 { grid-template-columns: 1fr; gap: .7rem; }
.dl-grid.dl-1 dd { word-break: break-word; }
.ledger-table tr.ledger-open td { background: var(--surface-3); }
.ledger-table tfoot td { border-top: 2px solid var(--line-strong); padding-top: .7rem; padding-bottom: .7rem; }

/* ---- Teklifler ---- */
.cmp-table th, .cmp-table td { vertical-align: top; }
.cmp-table .cmp-item { min-width: 200px; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.cmp-table .cmp-q { min-width: 150px; border-left: 1px solid var(--line); }
.cmp-table thead .cmp-q { text-transform: none; letter-spacing: 0; }
.cmp-sup { display: flex; align-items: center; gap: .4rem; justify-content: flex-end; }
.cmp-sup b { color: var(--text); font-size: .85rem; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-table thead small { display: block; text-align: right; font-weight: 500; color: var(--muted); }
.cmp-rank { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font-size: .7rem; font-weight: 800; flex-shrink: 0; }
.cmp-q.is-cheap .cmp-rank { background: var(--success); color: #fff; }
.cmp-acts { display: flex; gap: .3rem; justify-content: flex-end; margin-top: .4rem; }
.cmp-table td.is-best { background: var(--success-soft); }
.cmp-table td.is-best b { color: var(--success); }
.cmp-table .is-win { box-shadow: inset 2px 0 0 var(--warning), inset -2px 0 0 var(--warning); }
.cmp-table thead .is-win { box-shadow: inset 2px 0 0 var(--warning), inset -2px 0 0 var(--warning), inset 0 2px 0 var(--warning); }
.cmp-table tfoot td { background: var(--surface-2); font-size: .82rem; }
.cmp-table tfoot td.cmp-item { font-weight: 600; color: var(--text-2); background: var(--surface-2); }
.cmp-table tr.cmp-total td { font-size: .95rem; border-top: 2px solid var(--line-strong); }
.cmp-table tr.cmp-total td.is-best { background: var(--success-soft); }
.offer-win > i { color: var(--warning); }
.quote-prices td { vertical-align: middle; }
.quote-total { padding: .7rem 1rem; border-radius: 10px; background: var(--surface-3); font-size: .9rem; }

/* ---- Depo / Stok ---- */
.wh-chips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.wh-chip { display: inline-flex; align-items: center; gap: .1rem; }
.wh-edit { border: 0; background: transparent; color: var(--muted); padding: 0 .25rem; font-size: .8rem; }
.wh-edit:hover { color: var(--brand); }
.line-have { display: block; font-size: .72rem; color: var(--muted); margin-top: .15rem; min-height: 1em; }
.ledger-table td.tnum, .cmp-table td.tnum { white-space: nowrap; }
.stock-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.stock-act { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; color: var(--text); transition: transform .12s, box-shadow .12s; }
.stock-act:hover { transform: translateY(-1px); box-shadow: var(--sh-lg); color: var(--text); }
.stock-act > i { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--c-soft); color: var(--c); font-size: 1.15rem; flex-shrink: 0; }
.stock-act b { display: block; font-size: .95rem; }
.stock-act small { color: var(--muted); font-size: .76rem; }
@media (max-width: 767.98px) { .stock-actions { grid-template-columns: repeat(2, 1fr); } .stock-act small { display: none; } }
.ledger-table tr.ledger-inv td { border-top: 2px solid var(--line-strong); }
.ledger-table tr.ledger-sub td { background: var(--surface-2); padding-top: .45rem; padding-bottom: .45rem; font-size: .86rem; }
.ledger-table tr.ledger-sub td:nth-child(2) { padding-left: 1.6rem; }
.ledger-arrow { color: var(--muted); margin-right: .35rem; }

/* ---- Yakıt Alımı kartı ---- */
.fuel-buy { cursor: pointer; }
.fuel-buy .fb-body { display: flex; flex-direction: column; gap: .3rem; height: 100%; position: relative; z-index: 1; }
.fuel-buy .s-value { line-height: 1; }
/* Simge iç kutuya (fb-body) göre konumlanır: kartın iç boşluğu kadar geri çekilir, diğer kartlarla aynı yerde durur */
.fuel-buy .fb-body > .s-ico { top: calc(1.1rem - 1.25rem); right: calc(1.1rem - 1.35rem); }
.fb-money { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; color: var(--text-2); }
.fb-money b { font-family: var(--font-display); font-size: 1.05rem; }
.fb-foot { display: flex; align-items: center; gap: .5rem; margin-top: auto; }
/* Karşılaştırma tek satır: kart yüksekliği sabit (dashboard satırı), alt satıra kayarsa kartın dışına taşar */
.fb-cmp { flex: 1; min-width: 0; font-size: .74rem; color: var(--muted); display: flex; flex-wrap: nowrap; align-items: center; gap: .4rem; overflow: hidden; }
.fb-cmp .chip { flex-shrink: 0; }
.fb-cmp small { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fuel-buy .s-value { font-size: 1.8rem; }
.fuel-buy.stat { gap: .25rem; padding-bottom: 1rem; }
.fb-month { width: auto; max-width: 150px; flex-shrink: 0; font-weight: 600; padding-top: .2rem; padding-bottom: .2rem; }
.fb-err { position: absolute; top: 1.15rem; right: 4.6rem; z-index: 2; font-size: .7rem; font-weight: 700; color: var(--danger); }

/* ---- Hesap makinesi ---- */
.calc-dialog { max-width: 440px; }
.calc-head { background: #1e293b; color: #fff; border-bottom: 0; }
.calc .seg label { font-size: .84rem; }
.calc-in { position: relative; }
.calc-in input { padding-right: 3.6rem !important; }
.calc-in .clear-x { right: 2rem; }
.calc-in .calc-u { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.calc-mini { padding: .1rem; }
.calc-mini label { padding: .1rem .55rem !important; font-size: .78rem !important; }
.calc-chips { display: flex; gap: .3rem; margin-top: .35rem; }
.calc-chips .chip { border: 0; cursor: pointer; }
.calc-out { margin: 0; padding: .9rem 1.1rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.calc-out > div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; font-size: .9rem; }
.calc-out dt { font-weight: 500; color: var(--text-2); }
.calc-out dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.calc-out .calc-total { border-top: 1px solid var(--line); margin-top: .35rem; padding-top: .7rem; }
.calc-out .calc-total dt { font-weight: 800; color: var(--text); font-size: 1rem; }
.calc-out .calc-total dd { font-family: var(--font-display); font-size: 1.45rem; color: var(--success); }
.calc-out [data-copy] { cursor: copy; }
.calc-h { font-size: .74rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem; }
.calc .calc-out { margin-top: .5rem; }

/* ---- Kargo etiketi ---- */
.fragile-box { display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-weight: 700; cursor: pointer; margin: 0; }
.fragile-box small { font-weight: 500; opacity: .8; }

/* ---- E-posta / Sistem Kontrolü ---- */
.copy-line { display: flex; gap: .5rem; align-items: center; background: var(--surface-3); border: 1px solid var(--line); border-radius: 10px; padding: .45rem .5rem .45rem .8rem; }
.copy-line code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: .8rem; color: var(--text); }
.settings-main { min-width: 0; }
.health-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.health-sum .hs { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; padding: .9rem 1.1rem; min-width: 0; }
.health-sum .hs i { font-size: 1.3rem; color: var(--c); }
.health-sum .hs b { font-family: var(--font-display); font-size: 1.5rem; }
.health-sum .hs span { color: var(--muted); font-size: .82rem; font-weight: 600; }
.hc-row { display: flex; gap: .65rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); }
.hc-row:last-child { border-bottom: 0; }
.hc-row i { font-size: 1rem; margin-top: .1rem; }
.hc-row b { display: block; font-size: .88rem; }
.hc-row small { display: block; color: var(--text-2); font-size: .78rem; word-break: break-word; }
.scan-meter { height: 8px; }
.scan-row { display: flex; gap: .5rem; font-size: .84rem; padding: .3rem 0; }
.scan-row.fail i { color: var(--danger); } .scan-row.ok i { color: var(--success); }
.scan-row a { word-break: break-all; }
.err-log { max-height: 280px; overflow: auto; font-size: .72rem; background: var(--surface-3); border-radius: 10px; padding: .75rem; white-space: pre-wrap; word-break: break-word; }

/* Dokunmatik ekranlar: iOS Safari 16px'ten küçük yazılı alana dokununca sayfayı yakınlaştırır; alanlar 16px.
   (Kullanıcının iki parmakla yakınlaştırması kapatılmaz.) */
@media (pointer: coarse) {
    input.form-control, textarea.form-control, select.form-select, .form-control-sm, .form-select-sm,
    input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea, select { font-size: 16px !important; }
    .ts-pop-ot input { font-size: 16px !important; }
}

/* Oturum süresi uyarısı ve kaydedilmeyen form bilgisi (v1.15.0) */
.idle-ico { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto .75rem; font-size: 1.5rem; background: var(--warning-soft); color: var(--warning); }
.idle-ico.gone { background: var(--danger-soft); color: var(--danger); }
.idle-count { font: 800 1.9rem/1 'Plus Jakarta Sans', sans-serif; color: var(--text); letter-spacing: .02em; }
.draft-bar { align-items: center; flex-wrap: wrap; }
.draft-bar > span:first-of-type { flex: 1 1 260px; }
.sess-list { list-style: none; margin: 0; padding: 0; }
.sess-list li { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.sess-list li:first-child { border-top: 0; padding-top: 0; }
.sess-list .s-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 1.1rem; flex: none; }
.sess-list li.current .s-ico { background: var(--success-soft); color: var(--success); }
.sess-list .s-main { min-width: 0; flex: 1; }
.sess-list .s-main small { display: block; color: var(--muted); }

/* Kurulum: paketteki verilerle / boş kurulum seçimi (v1.16.0) */
.install-mode { display: grid; gap: .5rem; margin-bottom: 1.25rem; }
.install-mode label { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; background: var(--surface); }
.install-mode label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft, var(--surface-2)); }
.install-mode label.disabled { opacity: .55; cursor: not-allowed; }
.install-mode input { margin-top: .25rem; }
.install-mode small { display: block; color: var(--muted); }
.install-form:has(input[name=mode][value=data]:checked) .only-empty { display: none; }

/* Proje maliyetleri (v1.17.0) */
.pc-bar { display: block; height: 4px; border-radius: 4px; background: var(--surface-3); margin-top: .4rem; overflow: hidden; max-width: 260px; }
.pc-bar > span { display: block; height: 100%; border-radius: 4px; background: #2a78d6; }
[data-theme="dark"] .pc-bar > span { background: #3987e5; }
.pc-cat { margin-bottom: .85rem; font-size: .88rem; }
.pc-cat .meter { height: 6px; }
.pc-parties { list-style: none; counter-reset: pp; padding: 0; margin: 0; font-size: .86rem; }
.pc-parties li { counter-increment: pp; display: flex; align-items: center; gap: .5rem; padding: .35rem 0; border-top: 1px solid var(--line); }
.pc-parties li:first-child { border-top: 0; }
.pc-parties li::before { content: counter(pp); color: var(--muted); font-size: .75rem; width: 1.1rem; flex: none; }
.pc-parties li span { flex: 1; min-width: 0; }

/* Genel arama (v1.17.0) */
.tb-search { display: flex; align-items: center; gap: .55rem; height: 40px; min-width: 0; width: min(360px, 40vw); padding: 0 .55rem 0 .85rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .86rem; cursor: pointer; transition: border-color .15s, background .15s; }
.tb-search:hover { border-color: var(--line-strong); background: var(--surface-2); }
.tb-search > span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-search kbd, .search-foot kbd { font: 600 .7rem/1 var(--font-body, inherit); color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: .2rem .35rem; box-shadow: none; }
@media (max-width: 767.98px) {
    .tb-search { width: 40px; padding: 0; justify-content: center; flex-shrink: 0; }
    .tb-search > span, .tb-search kbd { display: none; }
}
.search-dialog { margin-top: 8vh; }
.search-dialog .modal-content { overflow: hidden; }
.search-head { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.search-head > i { color: var(--muted); font-size: 1.1rem; }
.search-head .form-control { border: 0; box-shadow: none; padding-left: 0; font-size: 1.05rem; background: transparent; }
.search-head .form-control::-webkit-search-cancel-button { display: none; }
.search-body { max-height: min(60vh, 520px); overflow-y: auto; overscroll-behavior: contain; padding: .35rem 0 .5rem; }
.search-hint { padding: 1.4rem 1.2rem; color: var(--muted); font-size: .88rem; text-align: center; }
.search-group { padding: .35rem .5rem 0; }
.search-group > h3 { display: flex; align-items: center; gap: .45rem; margin: .35rem .6rem .25rem; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.search-group > h3 i { color: var(--c); }
.search-group > h3 a { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; }
.search-item { display: flex; align-items: center; gap: .7rem; padding: .5rem .65rem; border-radius: 10px; color: var(--text); text-decoration: none; }
.search-item .s-i { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--c-soft); color: var(--c); flex: none; }
.search-item .s-t { min-width: 0; flex: 1; }
.search-item b { display: block; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item small { display: block; color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item mark { padding: 0; background: color-mix(in srgb, var(--warning) 28%, transparent); color: inherit; border-radius: 3px; }
.search-item.on, .search-item:hover { background: var(--surface-3); color: var(--text); }
.search-item .s-go { color: var(--muted); opacity: 0; }
.search-item.on .s-go { opacity: 1; }
.search-foot { display: flex; gap: 1rem; padding: .55rem 1rem; border-top: 1px solid var(--line); font-size: .76rem; color: var(--muted); background: var(--surface-2); }
@media (pointer: coarse) { .search-foot { display: none; } }

/* E-posta türleri grupları (v1.18.0) */
.mail-group { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: .9rem 0 .2rem; }
.mail-group:first-child { padding-top: 0; }
.tb-search.icon { width: 40px; padding: 0; justify-content: center; flex-shrink: 0; }
.tb-search.icon > span, .tb-search.icon kbd { display: none; }
.tb-prefs .seg { width: auto; }
.tb-prefs .setting-row { gap: 1rem; }

/* Uygulama olarak yükle (PWA) yönergeleri */
.pwa-steps section { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .6rem; }
.pwa-steps section.on { border-color: var(--brand); background: var(--brand-soft, var(--surface-3)); }
.pwa-steps h3 { font-size: .9rem; font-weight: 700; margin: 0 0 .4rem; display: flex; gap: .4rem; align-items: center; }
.pwa-steps ol { margin: 0; padding-left: 1.2rem; font-size: .86rem; }
.pwa-steps li + li { margin-top: .15rem; }
.pwa-steps small { display: block; margin-top: .35rem; color: var(--muted); font-size: .76rem; }

/* Kart dışına taşma olmasın: uzun etiket/kargo/takip no gibi içerik kart içinde alt satıra kayar */
.chip { max-width: 100%; }
.notes > *, .fleet-grid > *, .lib-grid > *, .doc-board > *, .dl-grid > *, .info-box dl > * { min-width: 0; }
.note, .vcard, .doc-tile, .info-box, .lib-grid > * { overflow-wrap: anywhere; }
.note .n-meta .chip, .dv-meta .chip, .vc-docs .chip, .s-chips .chip { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.note .n-meta .chip > i, .dv-meta .chip > i { flex-shrink: 0; }
.note .n-foot { flex-wrap: wrap; }
.info-box dd { min-width: 0; overflow-wrap: anywhere; }

/* Hassas ekran: şifre yeniden doğrulama */
.reauth-wrap { display: grid; place-items: center; padding: 2rem 0; }
.reauth-card { width: 100%; max-width: 440px; padding: 2rem; text-align: center; }
.reauth-card .e-ico { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 18px; display: grid; place-items: center; font-size: 1.8rem; background: var(--brand-soft); color: var(--brand); }
.reauth-card h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: .4rem; }
.reauth-card form { text-align: left; }
.reauth-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .65rem 1rem; border-radius: 12px; background: var(--success-soft); color: var(--text); font-size: .85rem; }
.reauth-bar > i { color: var(--success); font-size: 1.1rem; }
.reauth-bar.warn { background: var(--warning-soft); }
.reauth-bar.warn > i { color: var(--warning); }

/* İşlem geçmişi: ilk kayıtlar görünür, eskiler açılır alanda ve kendi içinde kayar */
.timeline.tl-cut { padding-bottom: .2rem; }
.timeline.tl-cut li:last-child::before { bottom: 0; }
.tl-more { padding: 0 1.35rem .9rem; }
.tl-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; color: var(--brand); padding: .3rem .6rem; border-radius: 8px; }
.tl-more > summary::-webkit-details-marker { display: none; }
.tl-more > summary:hover { background: var(--brand-soft); }
.tl-more > summary i { transition: transform .15s; }
.tl-more[open] > summary i { transform: rotate(180deg); }
.tl-more[open] > summary span { font-size: 0; }
.tl-more[open] > summary span::after { content: "Eski kayıtları gizle"; font-size: .8rem; }
.tl-more .tl-scroll { padding: 0 0 0 0; max-height: 340px; overflow-y: auto; }

/* Muayene randevuları: eskiler açılır alanda (işlem geçmişi gibi) */
.appt-more { padding: .5rem 1.35rem .9rem; }
.appt-more .tl-scroll { margin: .4rem -1.35rem 0; border-top: 1px solid var(--line); }
.appt-more .appt:last-child { border-bottom: 0; }

/* Dosya Kütüphanesi'nden seç (yükleme alanları) */
.lib-pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .45rem; }
.lib-picked { display: flex; flex-wrap: wrap; gap: .3rem; min-width: 0; }
.lib-picked .chip { white-space: normal; overflow-wrap: anywhere; }
.libpick-bg { position: fixed; inset: 0; z-index: 2060; background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); display: none; align-items: center; justify-content: center; padding: 1.25rem; }
.libpick-bg.on { display: flex; }
.libpick { width: 100%; max-width: 920px; max-height: 88vh; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-lg); overflow: hidden; }
.libpick .lp-h { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.libpick .lp-h b i { color: var(--brand); }
.libpick .lp-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: .8rem 1.1rem; border-bottom: 1px solid var(--line); }
.libpick .lp-bar .search-pill { flex: 1; min-width: 200px; }
.libpick .lp-types { display: flex; gap: .25rem; flex-wrap: wrap; }
.libpick .lp-types button { border: 1px solid var(--line); background: var(--surface); color: var(--text-2); border-radius: 20px; padding: .3rem .75rem; font-size: .8rem; font-weight: 600; }
.libpick .lp-types button.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.libpick .lp-types button:disabled { opacity: .4; }
.libpick .lp-grid { flex: 1; overflow-y: auto; padding: 1rem 1.1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem; align-content: start; }
.libpick .lp-tile { position: relative; min-width: 0; display: flex; flex-direction: column; gap: .2rem; padding: .45rem; text-align: left; background: var(--surface-2); border: 2px solid transparent; border-radius: 12px; color: var(--text); }
.libpick .lp-tile:hover { border-color: var(--line-strong); }
.libpick .lp-tile.on { border-color: var(--brand); background: var(--brand-soft); }
.libpick .lp-th { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; background: var(--surface); display: grid; place-items: center; overflow: hidden; font-size: 2rem; }
.libpick .lp-th img { width: 100%; height: 100%; object-fit: cover; }
.libpick .lp-ck { position: absolute; top: .3rem; right: .3rem; font-size: 1.2rem; color: var(--brand); background: var(--surface); border-radius: 50%; line-height: 1; display: none; }
.libpick .lp-tile.on .lp-ck { display: block; }
.libpick .lp-tile b { font-size: .76rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.libpick .lp-tile small { font-size: .68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.libpick .lp-more { grid-column: 1 / -1; justify-self: center; }
.libpick .lp-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 2.5rem 0; }
.libpick .lp-f { display: flex; align-items: center; gap: .5rem; padding: .8rem 1.1rem; border-top: 1px solid var(--line); background: var(--surface-2); }
@media (max-width: 575.98px) { .libpick-bg { padding: 0; } .libpick { max-height: 100vh; height: 100%; border-radius: 0; } .libpick .lp-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); } }
.pc-photo-btn + .lib-pick-btn { position: absolute; right: 32px; bottom: -2px; width: 32px; height: 32px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh); }

/* Anında arama: sonuçlar gelirken liste hafifçe soluklaşır (arama kutusu etkilenmez) */
main.page.is-loading .toolbar ~ * { opacity: .55; transition: opacity .15s; pointer-events: none; }

/* Zaman çizelgesi satırında tarih / sil düğmeleri (araç zimmet geçmişi) */
.timeline li:has(.tl-acts) { padding-right: 5rem; }
.timeline .tl-acts { position: absolute; right: 0; top: .55rem; display: flex; gap: .3rem; opacity: .55; transition: opacity .15s; }
.timeline li:hover .tl-acts, .timeline .tl-acts:focus-within { opacity: 1; }

/* Araç maliyetleri: rapor tablosunun toplam satırı altta sabit; araç sayfası özet tablosu */
.vc-table tfoot th { position: sticky; bottom: 0; z-index: 2; background: var(--surface-2); color: var(--text); font-size: .82rem; text-transform: none; letter-spacing: 0; border-top: 2px solid var(--line-strong); border-bottom: 0; }
.cost-table th { font-size: .66rem; }
.cost-table td, .cost-table th { padding: .6rem .8rem; }

/* Ödemeler toplu çubuğu: ödeme tarihi + yöntem */
.bulk-pay { display: inline-flex; align-items: center; gap: .35rem; }
.bulk-pay label { white-space: nowrap; font-weight: 600; }
.bulk-pay .form-control { width: 9.5rem; }
.bulk-pay .form-select { width: auto; }

/* Fatura formu: proje / araç dağıtımı */
.alloc { border: 1px solid var(--line); border-radius: 12px; padding: .75rem; background: var(--surface-2); }
.alloc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; margin-bottom: .55rem; }
.alloc-rows { display: flex; flex-direction: column; gap: .5rem; }
.alloc-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 11rem 2.2rem; gap: .5rem; align-items: start; }
.alloc.no-veh .alloc-row { grid-template-columns: minmax(0, 1fr) 11rem 2.2rem; }
.alloc-row .form-control { width: 100%; min-width: 0; }
.alloc-row .alloc-info { grid-column: 1 / -1; margin: -.25rem 0 0; }
.alloc-row .alloc-info:empty { display: none; }
.alloc-amt { position: relative; }
.alloc-amt .form-control { padding-right: 3.4rem; }
.alloc-pct { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); font-size: .74rem; font-weight: 700; color: var(--muted); pointer-events: none; }
.alloc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .6rem; }
.alloc-tools { display: inline-flex; gap: .4rem; }
.alloc-sum { font-size: .82rem; }
.alloc-sum.ok { color: var(--success); }
.alloc-sum.bad { color: var(--danger); }
/* Tek satır: tutar, yüzde, sil ve araçlar gizli (faturanın tamamı) */
.alloc.single .alloc-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.alloc.single.no-veh .alloc-row { grid-template-columns: minmax(0, 1fr); }
.alloc.single .alloc-amt, .alloc.single .alloc-del, .alloc.single .alloc-tools { display: none; }
@media (max-width: 767.98px) {
    .alloc-row, .alloc.no-veh .alloc-row, .alloc.single .alloc-row { grid-template-columns: minmax(0, 1fr) 2.2rem; }
    .alloc-row > .input-icon, .alloc-amt { grid-column: 1; }
    .alloc-row .alloc-del { grid-column: 2; grid-row: 1; }
}
.alloc-table td, .alloc-table th { padding: .55rem .8rem; }

/* Ödeme performansı */
.perf-stack { display: flex; height: 18px; border-radius: 9px; overflow: hidden; gap: 2px; background: var(--surface-3); margin-bottom: 1rem; }
.perf-stack > a { display: block; min-width: 4px; background: var(--c); }
.perf-stack > a:hover { filter: brightness(1.12); }
.perf-buckets { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; }
.perf-b { display: grid; grid-template-columns: auto 1fr; column-gap: .45rem; align-items: center; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; min-width: 0; }
.perf-b:hover { border-color: var(--c); color: inherit; }
.perf-b.on { border-color: var(--c); background: var(--c-soft); box-shadow: inset 0 0 0 1px var(--c); }
.perf-b.is-empty { opacity: .55; }
.perf-b .pb-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.perf-b .pb-l { font-size: .78rem; font-weight: 700; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perf-b b { grid-column: 1 / -1; font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; margin-top: .2rem; }
.perf-b small { grid-column: 1 / -1; color: var(--muted); font-size: .74rem; }

/* İki adımlı doğrulama */
.tfa-steps { padding-left: 1.2rem; display: grid; gap: 1rem; }
.tfa-qr { width: 200px; height: 200px; margin: .75rem 0; background: #fff; border-radius: 12px; border: 1px solid var(--line); padding: 4px; }
.tfa-qr svg { width: 100%; height: 100%; display: block; }
.tfa-secret { font-size: 1rem; letter-spacing: .06em; word-break: break-all; }
.tfa-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; }
.tfa-codes code { display: block; text-align: center; padding: .55rem; border: 1px dashed var(--line-strong); border-radius: 10px; font-size: 1rem; color: var(--text); background: var(--surface-2, transparent); }

/* "Tümünü göster": <input class="more-tg" id hidden> + ~ .table-wrap .more-rows + ~ label.more-btn (JS'siz) */
.more-rows { display: none; }
.more-tg:checked ~ .table-wrap .more-rows { display: table-row-group; }
.more-btn { display: block; text-align: center; padding: .65rem; font-size: .82rem; font-weight: 600; color: var(--brand, #1f3c88); cursor: pointer; border-top: 1px solid var(--line); user-select: none; }
.more-btn:hover { background: var(--surface-2, rgba(0,0,0,.02)); }
.more-btn .m-off, .more-tg:checked ~ .more-btn .m-on { display: none; }
.more-tg:checked ~ .more-btn .m-off { display: inline; }

/* Sürüm notları */
.rn-box > summary { cursor: pointer; font-size: .8rem; font-weight: 600; color: var(--text-2); list-style: none; display: inline-flex; gap: .35rem; align-items: center; padding: .2rem .55rem; border-radius: 8px; background: var(--surface-3); }
.rn-box > summary::-webkit-details-marker { display: none; }
.rn-box[open] > summary { margin-bottom: .5rem; }
.rn-list { max-height: 420px; overflow: auto; padding-right: .25rem; }
.rn-ver + .rn-ver { margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--line); }
.rn-h { font-size: .84rem; margin-bottom: .25rem; }
.rn-b { font-size: .82rem; line-height: 1.55; color: var(--text); white-space: normal; }
.rn-b ul { margin: 0; padding-left: 1.1rem; }
.rn-b ul.sub { padding-left: 1.1rem; color: var(--text-2); }
.rn-b li + li { margin-top: .2rem; }
.rn-b p { margin: 0 0 .3rem; }
.rn-b code { font-size: .78rem; }
.hist-table tr.hist-notes td { padding-top: 0; border-top: 0; white-space: normal; }

/* Rol yetki matrisi: başlık üstte, modül adı solda sabit (dar ekranda yana kaydırınca da görünür) */
.perm-table td:first-child, .perm-table th:first-child { position: sticky; left: 0; z-index: 2; background: var(--surface); }
.perm-table thead th:first-child { z-index: 5; background: var(--surface-2); }
.perm-table tr.grp td { position: sticky; left: 0; z-index: 2; }
.perm-table td:first-child { box-shadow: 1px 0 0 var(--line); }

/* Güncellemeler: alan yetiyorsa güncelleme ve geçmiş yan yana (içerik genişliğine göre; dar ekranda alt alta) */
.upd-grid { display: grid; gap: 1.25rem; align-items: start; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.upd-grid > .upd-full { grid-column: 1 / -1; }
.upd-grid > .d-none { display: none; }

/* Fatura dağıtımı: araç satırında masraf türü (bakım kaydı) */
.alloc.has-kind .alloc-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, 1fr) 10rem 2.2rem; }
.alloc.has-kind.single .alloc-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, 1fr); }
.alloc-kind .form-select { width: 100%; min-width: 0; }
.alloc-kind .form-select:disabled { opacity: .55; }
.alloc-row.kind-on .alloc-kind .form-select { border-color: var(--brand); background-color: var(--brand-soft); font-weight: 600; }
@media (max-width: 767.98px) { .alloc.has-kind .alloc-row, .alloc.has-kind.single .alloc-row { grid-template-columns: minmax(0, 1fr) 2.2rem; } .alloc-kind { grid-column: 1; } }

/* Araç sayfası: ödeme rozetleri, ödenmemiş çipi, tek satırlık Diğer Faturalar */
.pay-chip { display: table; margin: .25rem 0 0 auto; font-size: .68rem; }
td.hide-sm .pay-chip { margin: .25rem 0 0; }
.unpaid-chip { text-decoration: none; white-space: nowrap; }
.inv-compact .card-h { border-bottom: 0; }

/* Araç: Faturalar ve Fişler kartı — dar ekranda başlık sarar (eski Toplam Maliyet kartı v1.23.5'te kaldırıldı) */
#invoices > .card-h { flex-wrap: wrap; row-gap: .6rem; }
#invoices > .card-h > div:not(.cost-acts) { flex: 1 1 14rem; min-width: 0; }
.old-srv > summary { cursor: pointer; border-top: 1px solid var(--line); }
.old-srv[open] > summary { border-bottom: 1px solid var(--line); }
.cost-acts { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cost-narrow { display: none; }
@media (max-width: 575.98px) {
    .cost-wide { display: none; }
    .cost-narrow { display: block; }
    #invoices > .card-h > .cost-acts { flex-basis: 100%; margin-left: 0 !important; }
    .cost-acts .unpaid-chip { white-space: normal; }
}

/* Ödeme tarihi kontrolü */
.dc-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6rem; }
.dc-modes label { display: flex; gap: .55rem; align-items: flex-start; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.dc-modes label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.dc-modes small { display: block; color: var(--muted); font-size: .76rem; }
.dc-modes .form-check-input { margin-top: .2rem; flex-shrink: 0; }

/* Çift kayıt kontrolü */
.dup-table .t-actions form { display: inline-block; }
.dup-table .t-actions form + form { margin-left: .25rem; }

/* Onay Bekleyenler (değişiklik onayı) */
.cr-list { display: grid; gap: 1rem; }
.cr-card .card-h { flex-wrap: wrap; row-gap: .4rem; }
.cr-card .cr-head { flex: 1 1 220px; min-width: 0; }
.cr-card .cr-head h2 { margin: 0; }
.cr-card .cr-chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.cr-rec { overflow-wrap: anywhere; }
.cr-diff td:first-child { color: var(--text-2); white-space: nowrap; }
.cr-diff .cr-old { color: var(--muted); text-decoration: line-through; overflow-wrap: anywhere; }
.cr-diff .cr-new { font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.cr-dl { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: .2rem .9rem; margin: 0; font-size: .85rem; }
.cr-dl dt { font-weight: 600; color: var(--text-2); }
.cr-dl dd { margin: 0; overflow-wrap: anywhere; }
.cr-del { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; background: var(--surface-2); }
.cr-more summary { cursor: pointer; color: var(--text-2); }
.cr-acts { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-start; }
.cr-reject summary { list-style: none; }
.cr-reject summary::-webkit-details-marker { display: none; }
.cr-reject[open] { flex: 1 1 100%; order: 5; }
.cr-reject .rj-open, .cr-reject[open] .rj-closed { display: none; }
.cr-reject[open] .rj-open { display: inline; }
.cr-reject-box { margin-top: .6rem; padding: .8rem .9rem; border: 1px solid color-mix(in srgb, var(--danger, #dc2626) 45%, transparent); border-radius: 12px;
    background: color-mix(in srgb, var(--danger, #dc2626) 6%, var(--surface)); display: grid; gap: .25rem; }
/* Rol matrisi: izin kutusu + altında "onaya gider" / özel yetkinin adı */
.perm-cell { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.perm-sub { font-size: .68rem; line-height: 1.15; color: var(--muted); white-space: nowrap; }
.rv-tag { display: none; align-items: center; gap: .25rem; font-size: .68rem; font-weight: 600; color: var(--text-2); white-space: nowrap; cursor: pointer;
    padding: .1rem .4rem; border-radius: 999px; border: 1px dashed var(--line-strong); }
.perm-cell:has(> input[data-p]:checked) .rv-tag { display: inline-flex; }
.rv-tag:has(input:checked) { color: var(--warning); border: 1px solid var(--warning); background: var(--warning-soft); }
.rv-tag input { width: .85em; height: .85em; margin: 0; accent-color: var(--warning); cursor: pointer; }
.perm-legend { display: grid; grid-template-columns: max-content 1fr; gap: .35rem .8rem; margin: 0; font-size: .82rem; }
.perm-legend dt { font-weight: 700; white-space: nowrap; }
.perm-legend dd { margin: 0; color: var(--text-2); }
.rv-dot { display: inline-block; width: .7em; height: .7em; border-radius: 3px; border: 1px solid var(--warning); background: var(--warning-soft); vertical-align: -.05em; }
.cr-hist summary { cursor: pointer; color: var(--text-2); }
.cr-steps { margin: .35rem 0 0; padding-left: 1.3rem; display: grid; gap: .2rem; }
.cr-steps li { overflow-wrap: anywhere; }
.cr-pick td:first-child, .cr-pick th:first-child { width: 1%; text-align: center; }
.cr-pick tr:has(input[type=checkbox]:not(:checked)) .cr-new { text-decoration: line-through; color: var(--muted); font-weight: 400; }
.cr-pick tr:has(input[type=checkbox]:not(:checked)) .cr-old { text-decoration: none; color: var(--text); }

/* Geniş rapor tablosu sayfaya sığıyorsa iç kaydırma yok (Araç Maliyetleri) */
.table-scroll.fit-page { max-height: none !important; overflow: visible; min-height: 0; }
.table-scroll.fit-page thead th { top: var(--topbar-h); }
@media print {
    .table-scroll { max-height: none !important; min-height: 0 !important; overflow: visible !important; }
    .table-scroll thead th, .vc-table tfoot th { position: static !important; }
    .hr-nav, .rep-filters, .vc-table .bar, .vc-table .vc-bar { display: none !important; }
    .vc-table .hide-md, .rep-table .hide-md { display: table-cell !important; }
    .vc-table { font-size: 8.5pt; }
    .vc-table td, .vc-table th { padding: .3rem .45rem !important; }
    .vc-table tr { break-inside: avoid; }
    .vc-table thead { display: table-header-group; }
    .vc-table tfoot { display: table-row-group; } /* toplam yalnız sonda, her sayfada tekrar etmesin */
    .card-x.viz:has(.vc-table) { break-inside: auto; } /* uzun tablo bütün halinde sonraki sayfaya itilmesin */
}

/* Trafik cezaları */
.fine-form .fine-paid, .fine-form .fine-charge { display: none; }
.fine-form:has(input[name=status][value=paid]:checked) .fine-paid { display: block; }
.fine-form:has(input[name=charge_driver]:checked) .fine-charge { display: block; }
.fine-dl { font-size: .74rem; line-height: 1.25; }
.fine-dl.late { color: var(--danger); font-weight: 600; }
.fine-dl.soon { color: var(--warning); font-weight: 600; }
.scan-row.skip i { color: var(--muted); }

/* Dosya Gönder: bağlantı kartı, dosya listesi, herkese açık indirme sayfası */
.card-b:has(> .share-qr) { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }
.share-link { flex: 1 1 20rem; min-width: 0; }
.share-qr { width: 132px; flex: 0 0 132px; background: #fff; border-radius: 10px; padding: 4px; border: 1px solid var(--line); }
.share-qr svg { display: block; width: 100%; height: auto; }
.share-files { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.share-files li { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); min-width: 0; }
.share-files li > .bi { font-size: 1.35rem; flex: 0 0 auto; }
.share-files .sf-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.share-files .sf-name small { display: block; font-weight: 400; color: var(--muted); font-size: .76rem; }
.share-card { max-width: 560px; }
.auth-card h1.share-title { font-size: 1.35rem; overflow-wrap: anywhere; }
.share-files .sf-acts { display: flex; gap: .4rem; flex: 0 0 auto; }
@media (max-width: 420px) { .share-files li { flex-wrap: wrap; } .share-files .sf-acts { width: 100%; justify-content: flex-end; } }

/* Sürükle-bırak: dosya sürüklenirken bırakılacak bölge */
.drop-on { position: relative; outline: 2px dashed var(--brand); outline-offset: -2px; border-radius: var(--r); }
.drop-on::after { content: "Dosyaları buraya bırakın"; position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 9%, transparent); color: var(--brand); font-weight: 700; font-size: .95rem; border-radius: inherit; pointer-events: none; z-index: 5; }
input[type=file].drop-done { border-color: var(--success, #198754); }
.share-files .sf-acts form { display: inline; margin: 0; }
.share-add .form-control { min-width: 220px; }

/* Yükleme ilerlemesi penceresi */
.up-ov { position: fixed; inset: 0; z-index: 2100; display: grid; place-items: center; background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); padding: 1rem; }
.up-box { width: min(420px, 100%); background: var(--surface); color: var(--text); border-radius: 18px; padding: 1.4rem 1.5rem; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.up-h { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; }
.up-h .spinner-border { color: var(--brand); }
.up-sub { color: var(--muted); font-size: .85rem; margin: .25rem 0 .9rem; }
.up-bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.up-bar span { display: block; height: 100%; width: 0; background: var(--brand); border-radius: inherit; transition: width .2s; }
.up-txt { font-variant-numeric: tabular-nums; font-size: .85rem; margin-top: .45rem; font-weight: 600; }
.up-note { color: var(--muted); font-size: .78rem; margin-top: .8rem; }
.bulk-co { min-width: 260px; }

/* Araç sayfası: toplam maliyet şeridi (Araç Maliyetleri raporuyla aynı rakam) */
.cost-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; padding: .9rem 1.1rem; }
.cost-strip .cs-main { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.cost-strip .cs-main small { display: block; color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.cost-strip .cs-main b { font-size: 1.35rem; font-family: var(--font-display); }
.cost-strip .cs-year { display: block; color: var(--muted); font-size: .8rem; }
.cost-strip .cs-parts { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-left: auto; min-width: 0; }
.cost-strip .cs-parts .chip { white-space: nowrap; }
@media (max-width: 575.98px) { .cost-strip .cs-parts { margin-left: 0; } }

/* Araç sayfası: fiş görüntüleme penceresi */
.rv-desc { white-space: pre-line; padding: .7rem .85rem; border-radius: var(--r); background: var(--surface-2, rgba(0,0,0,.03)); font-size: .9rem; }
.rv-file { display: flex; align-items: center; gap: .5rem; padding: .45rem 0; border-top: 1px solid var(--line); }
.rv-file .rv-fn { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; font-weight: 600; }

/* Önceki sayfaya dön düğmesi */
.trail-back { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trail-bar { margin-bottom: .75rem; }
