/* hasarkayit.com — Main Stylesheet */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy: #0f172a;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --bg: #f1f5f9;
    --surface: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.1);
    --status-amber: #f59e0b;
    --status-orange: #f97316;
    --status-rose: #f43f5e;
    --status-violet: #8b5cf6;
    --status-indigo: #6366f1;
    --status-blue: #3b82f6;
    --status-cyan: #06b6d4;
    --status-teal: #14b8a6;
    --status-green: #22c55e;
    --status-lime: #84cc16;
    --status-slate: #94a3b8;
    --status-zinc: #71717a;
    --shell-max: 1400px;
}

@media (min-width: 1440px) {
    :root { --shell-max: min(1600px, calc(100vw - 2rem)); }
}
@media (min-width: 1680px) {
    :root { --shell-max: min(1760px, calc(100vw - 2rem)); }
}
@media (min-width: 1920px) {
    :root { --shell-max: min(1900px, calc(100vw - 2.5rem)); }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #0f172a;
    color: #e2e8f0;
    padding: .85rem 1rem;
    padding-bottom: calc(.85rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 24px rgba(0,0,0,.25);
}
.cookie-banner-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.cookie-banner-inner p {
    margin: 0;
    font-size: .8125rem;
    flex: 1;
    min-width: 220px;
    line-height: 1.45;
}
.cookie-banner-inner a { color: #93c5fd; }

.sysadmin-body .sysadmin-topbar {
    background: #020617;
    border-bottom: 2px solid #1e3a5f;
}
.sysadmin-topbar .logo-sub {
    font-weight: 600;
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #38bdf8;
    margin-left: .35rem;
}

/* Announcement marquee (above header) */
.announce-bar {
    background: linear-gradient(90deg, #0c4a6e, #0369a1 40%, #0c4a6e);
    color: #e0f2fe;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255,255,255,.12);
    height: 36px;
    line-height: 36px;
    position: relative;
    /* flex min-width:auto taşmayı engellemesin */
    min-width: 0;
}
.announce-track {
    display: inline-flex;
    align-items: center;
    gap: 3rem;
    width: max-content;
    max-width: none;
    padding-left: 100%;
    animation: announceScroll 40s linear infinite;
    will-change: transform;
    /* scrollbar asla görünmesin */
    overflow: visible;
}
.announce-bar:hover .announce-track { animation-play-state: paused; }
.announce-item {
    font-size: .8125rem;
    font-weight: 650;
    letter-spacing: .01em;
    flex: 0 0 auto;
}
.announce-sep {
    display: inline-block;
    margin-left: 3rem;
    opacity: .45;
    font-size: .5rem;
    vertical-align: middle;
}
.announce-item a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}
@keyframes announceScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .announce-track {
        animation: none;
        padding-left: .75rem;
        padding-right: .75rem;
        /* kaydırma çubuğu yok — metin tek satırda kesilir */
        overflow: hidden;
        width: 100%;
        max-width: 100%;
        display: block;
        text-overflow: ellipsis;
    }
}

/* Topbar */
.topbar {
    background: var(--navy);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.topbar-inner {
    max-width: var(--shell-max);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 64px;
    position: relative;
}
.logo {
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: .05em;
}
.logo.logo-img {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    max-width: min(320px, 58vw);
    flex-shrink: 0;
    min-width: 0;
}
.logo.logo-img img {
    height: 44px;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
    /* PNG’de kalan koyu zemin kalıntısını navy topbar’da eritir */
    mix-blend-mode: lighten;
}
.logo.logo-img .logo-sub {
    margin-left: 0;
    white-space: nowrap;
}
.brand-logo-light {
    display: block;
    width: min(320px, 100%);
    height: auto;
    margin: 0 auto .65rem;
    /* Açık zeminde beyaz plaka kalıntısını yumuşatır */
    mix-blend-mode: multiply;
}
.brand-logo-mini {
    display: block;
    width: min(200px, 78%);
    height: auto;
    margin: 0 0 .35rem;
    opacity: .98;
    mix-blend-mode: multiply;
}
.nav-links { display: flex; gap: .25rem; flex: 1; }
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    padding: .35rem .55rem;
    border-radius: 8px;
    cursor: pointer;
}
.nav-link {
    color: #94a3b8;
    text-decoration: none;
    padding: .5rem .75rem;
    border-radius: var(--radius);
    font-size: .875rem;
    transition: all .15s;
}
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.1); }
.topbar-user { display: flex; align-items: center; gap: .5rem; font-size: .8125rem; }
.user-name { color: #cbd5e1; }
.user-badge {
    padding: .125rem .5rem;
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 600;
    text-transform: uppercase;
}
.role-advisor { background: #1e40af; color: #bfdbfe; }
.role-manager { background: #7c3aed; color: #ddd6fe; }
.role-workshop { background: #0e7490; color: #a5f3fc; }
.role-admin { background: #b45309; color: #fde68a; }
.nav-logout { display: none; }
.hidden { display: none !important; }
.is-hidden { display: none !important; }

/* Hızlı arama çubuğu (üst menü altı) */
.top-search-bar {
    background: color-mix(in srgb, var(--navy) 92%, #000);
    border-top: 1px solid rgba(255, 255, 255, .08);
}
.top-search-form {
    max-width: var(--shell-max);
    margin: 0 auto;
    padding: .45rem 1rem .55rem;
    display: flex;
    gap: .5rem;
    align-items: center;
}
.top-search-field {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}
.top-search-input {
    width: 100%;
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 .9rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: .9375rem;
    outline: none;
}
.top-search-input::placeholder {
    color: #94a3b8;
}
.top-search-input:focus {
    border-color: rgba(255, 255, 255, .4);
    background: rgba(255, 255, 255, .12);
}
.top-search-btn {
    flex-shrink: 0;
    height: 38px;
    padding: 0 1rem;
    border: none;
    border-radius: 8px;
    background: var(--accent, #c45f12);
    color: #fff;
    font-weight: 600;
    font-size: .875rem;
    cursor: pointer;
}
.top-search-btn:hover {
    filter: brightness(1.08);
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
@media (max-width: 640px) {
    .top-search-form { padding: .4rem .75rem .5rem; }
    .top-search-btn { padding: 0 .85rem; }
}

/* Dashboard */
.dash-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.dash-hello { font-size: .875rem; color: var(--text-muted); margin-bottom: .25rem; }
.dash-hero h1 { font-size: 1.5rem; font-weight: 700; }
.dash-sub { font-size: .8125rem; color: var(--text-muted); margin-top: .25rem; }

.scope-toggle {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
}
.scope-link {
    padding: .5rem .9rem;
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}
.scope-link.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.stat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 1rem;
    align-items: stretch;
}
.stat-card {
    box-sizing: border-box;
    width: 7.5rem;
    flex: 0 0 7.5rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: .45rem .3rem .4rem;
    text-align: center;
    cursor: pointer;
    min-height: 0;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 3px;
    background: var(--navy);
    border-radius: 8px 8px 0 0;
}
.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.stat-card.active { box-shadow: 0 0 0 2px rgba(15, 23, 42, .12); }
.stat-num { display: block; font-size: 1.05rem; font-weight: 800; line-height: 1.15; color: var(--navy); }
.stat-label {
    display: block;
    font-size: .6rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: .15rem;
    line-height: 1.2;
    word-break: break-word;
}

/* Toplam */
.stat-card.stat-total::before { background: var(--navy); }
.stat-card.stat-total { background: #f8fafc; border-color: #cbd5e1; }
.stat-card.stat-total .stat-num { color: var(--navy); }
.stat-card.stat-total.active { border-color: var(--navy); background: #e2e8f0; }

/* Durum renkleri — kenar, şerit, sayı, zemin */
.stat-card.status-amber::before { background: var(--status-amber); }
.stat-card.status-amber { background: #fffbeb; border-color: #fcd34d; }
.stat-card.status-amber .stat-num { color: #b45309; }
.stat-card.status-amber .stat-label { color: #92400e; }
.stat-card.status-amber.active { border-color: var(--status-amber); box-shadow: 0 0 0 2px rgba(245, 158, 11, .25); }

.stat-card.status-violet::before { background: var(--status-violet); }
.stat-card.status-violet { background: #f5f3ff; border-color: #c4b5fd; }
.stat-card.status-violet .stat-num { color: #6d28d9; }
.stat-card.status-violet .stat-label { color: #5b21b6; }
.stat-card.status-violet.active { border-color: var(--status-violet); box-shadow: 0 0 0 2px rgba(139, 92, 246, .25); }

.stat-card.status-blue::before { background: var(--status-blue); }
.stat-card.status-blue { background: #eff6ff; border-color: #93c5fd; }
.stat-card.status-blue .stat-num { color: #1d4ed8; }
.stat-card.status-blue .stat-label { color: #1e40af; }
.stat-card.status-blue.active { border-color: var(--status-blue); box-shadow: 0 0 0 2px rgba(59, 130, 246, .25); }

.stat-card.status-cyan::before { background: var(--status-cyan); }
.stat-card.status-cyan { background: #ecfeff; border-color: #67e8f9; }
.stat-card.status-cyan .stat-num { color: #0e7490; }
.stat-card.status-cyan .stat-label { color: #155e75; }
.stat-card.status-cyan.active { border-color: var(--status-cyan); box-shadow: 0 0 0 2px rgba(6, 182, 212, .25); }

.stat-card.status-green::before { background: var(--status-green); }
.stat-card.status-green { background: #f0fdf4; border-color: #86efac; }
.stat-card.status-green .stat-num { color: #15803d; }
.stat-card.status-green .stat-label { color: #166534; }
.stat-card.status-green.active { border-color: var(--status-green); box-shadow: 0 0 0 2px rgba(34, 197, 94, .25); }

.stat-card.status-slate::before { background: var(--status-slate); }
.stat-card.status-slate { background: #f8fafc; border-color: #cbd5e1; }
.stat-card.status-slate .stat-num { color: #475569; }
.stat-card.status-slate .stat-label { color: #334155; }
.stat-card.status-slate.active { border-color: var(--status-slate); box-shadow: 0 0 0 2px rgba(148, 163, 184, .3); }

.stat-card.status-orange::before { background: var(--status-orange); }
.stat-card.status-orange { background: #fff7ed; border-color: #fdba74; }
.stat-card.status-orange .stat-num { color: #c2410c; }
.stat-card.status-orange .stat-label { color: #9a3412; }
.stat-card.status-orange.active { border-color: var(--status-orange); box-shadow: 0 0 0 2px rgba(249, 115, 22, .25); }

.stat-card.status-rose::before { background: var(--status-rose); }
.stat-card.status-rose { background: #fff1f2; border-color: #fda4af; }
.stat-card.status-rose .stat-num { color: #be123c; }
.stat-card.status-rose .stat-label { color: #9f1239; }
.stat-card.status-rose.active { border-color: var(--status-rose); box-shadow: 0 0 0 2px rgba(244, 63, 94, .25); }

.stat-card.status-indigo::before { background: var(--status-indigo); }
.stat-card.status-indigo { background: #eef2ff; border-color: #a5b4fc; }
.stat-card.status-indigo .stat-num { color: #4338ca; }
.stat-card.status-indigo .stat-label { color: #3730a3; }
.stat-card.status-indigo.active { border-color: var(--status-indigo); box-shadow: 0 0 0 2px rgba(99, 102, 241, .25); }

.stat-card.status-teal::before { background: var(--status-teal); }
.stat-card.status-teal { background: #f0fdfa; border-color: #5eead4; }
.stat-card.status-teal .stat-num { color: #0f766e; }
.stat-card.status-teal .stat-label { color: #115e59; }
.stat-card.status-teal.active { border-color: var(--status-teal); box-shadow: 0 0 0 2px rgba(20, 184, 166, .25); }

.stat-card.status-lime::before { background: var(--status-lime); }
.stat-card.status-lime { background: #f7fee7; border-color: #bef264; }
.stat-card.status-lime .stat-num { color: #4d7c0f; }
.stat-card.status-lime .stat-label { color: #3f6212; }
.stat-card.status-lime.active { border-color: var(--status-lime); box-shadow: 0 0 0 2px rgba(132, 204, 22, .25); }

.stat-card.status-zinc::before { background: var(--status-zinc); }
.stat-card.status-zinc { background: #fafafa; border-color: #d4d4d8; }
.stat-card.status-zinc .stat-num { color: #3f3f46; }
.stat-card.status-zinc .stat-label { color: #27272a; }
.stat-card.status-zinc.active { border-color: var(--status-zinc); box-shadow: 0 0 0 2px rgba(113, 113, 122, .3); }

/* Hafif pulse — sadece Evrak Bekliyor (eksik evrak) */
.stat-card.status-amber,
.status-group-title.status-amber,
.status-pill.status-amber,
.kanban-header.status-amber {
    -webkit-animation: evrak-pulse 2.4s ease-in-out infinite;
    animation: evrak-pulse 2.4s ease-in-out infinite;
}
@-webkit-keyframes evrak-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
    50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, .35); }
}
@keyframes evrak-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
    50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, .35); }
}
@media (prefers-reduced-motion: reduce) {
    .stat-card.status-amber,
    .status-group-title.status-amber,
    .status-pill.status-amber,
    .kanban-header.status-amber {
        -webkit-animation: none !important;
        animation: none !important;
    }
}

.customer-msg-panel {
    margin: .75rem 0;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    overflow: hidden;
}
.customer-msg-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem .85rem;
    font-weight: 700;
    font-size: .875rem;
    color: #92400e;
    user-select: none;
    -webkit-user-select: none;
}
.customer-msg-summary::-webkit-details-marker { display: none; }
.customer-msg-summary::after {
    content: '▾';
    font-size: .75rem;
    opacity: .7;
    transition: transform .15s ease;
}
.customer-msg-panel[open] .customer-msg-summary::after {
    transform: rotate(180deg);
}
.customer-msg-summary-title { display: inline-flex; align-items: center; gap: .4rem; }
.customer-msg-badge {
    font-size: .7rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: rgba(146, 64, 14, .1);
    color: #92400e;
}
.customer-msg-badge.has-msg {
    background: #166534;
    color: #fff;
}
.customer-msg-body {
    padding: 0 .85rem .85rem;
    border-top: 1px solid rgba(252, 211, 77, .6);
}
.customer-msg-panel .grant-hint {
    margin: .65rem 0 .5rem;
    font-size: .8rem;
}
.customer-msg-panel textarea {
    min-height: 72px;
    resize: vertical;
}
.customer-msg-actions { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.customer-msg-meta { margin-top: .5rem; font-size: .75rem; }
.portal-customer-message {
    margin: 1rem 0;
    padding: 1rem;
    background: #eff6ff;
    border: 1px solid #93c5fd;
    border-radius: var(--radius);
}
.portal-customer-message h3 {
    font-size: .9rem;
    margin-bottom: .5rem;
    color: #1e40af;
}
.portal-customer-message p {
    white-space: pre-wrap;
    margin: 0;
    color: var(--text);
    line-height: 1.45;
}
.portal-customer-message .msg-meta {
    display: block;
    margin-top: .5rem;
    font-size: .75rem;
    color: var(--text-muted);
}

.view-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: .75rem;
}
.view-hint { font-size: .8125rem; font-weight: 600; color: var(--text-muted); }
.view-switch { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.view-btn {
    border: none;
    background: none;
    padding: .5rem 1rem;
    font-size: .8125rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    color: var(--text-muted);
}
.view-btn.active { background: var(--navy); color: #fff; }

.status-group { margin-bottom: 1.25rem; }
.status-group-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border: 0;
    font: inherit;
    text-align: left;
    color: #fff;
    font-size: .8125rem;
    font-weight: 700;
    padding: .5rem .75rem;
    border-radius: var(--radius);
    margin-bottom: .5rem;
    cursor: default;
}
.status-group-meta {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: none;
    padding: 0;
}
.status-group-count {
    background: rgba(255,255,255,.25);
    padding: .1rem .5rem;
    border-radius: 999px;
}
.status-group-chevron {
    display: inline-block;
    background: none;
    padding: 0;
    font-size: .85rem;
    line-height: 1;
    transition: transform .15s ease;
}
button.status-group-title { cursor: pointer; }
.status-group-body { display: block; }
.status-group.is-collapsed .status-group-body { display: none; }
.status-group.is-collapsed .status-group-chevron { transform: rotate(-90deg); }
.status-group.is-collapsed .status-group-title { margin-bottom: 0; }

.file-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: .5rem;
    padding: .65rem .75rem;
    box-shadow: var(--shadow);
}
.file-row-main {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}
.file-row-body { min-width: 0; flex: 1; }
.file-row-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.file-row-vehicle { font-size: .875rem; font-weight: 600; }
.file-row-meta { font-size: .75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row-dates {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .75rem;
    margin-top: .2rem;
    font-size: .6875rem;
    color: var(--text-muted);
}
.file-row-actions {
    display: flex;
    gap: .3rem;
    flex-shrink: 0;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.file-row-actions .btn-sm {
    min-height: 30px;
    padding: .2rem .5rem;
    font-size: .75rem;
    min-width: 0;
}
.file-row-actions .btn-wa {
    min-height: 30px;
    padding: .2rem .5rem;
    font-size: .6875rem;
    min-width: 0;
}
.file-row-advance {
    font-weight: 800;
    white-space: nowrap;
}

.btn-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #25d366;
    color: #fff !important;
    font-size: .75rem;
    font-weight: 700;
    padding: .45rem .7rem;
    border-radius: 6px;
    text-decoration: none;
    min-height: 40px;
    white-space: nowrap;
}
.btn-wa:hover { background: #1da851; }
.btn-wa-lg { min-height: 48px; padding: .6rem 1rem; font-size: .875rem; }
.btn-wa-inline { min-height: 36px; margin-left: .5rem; }
.wa-missing { font-size: .75rem; color: var(--text-muted); }

/* WhatsApp uygulama seçimi */
.wa-app-sheet {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.wa-app-sheet[hidden] { display: none !important; }
.wa-app-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .45);
}
.wa-app-panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 1.1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 30px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.wa-app-panel h4 { margin: 0; font-size: 1.05rem; }
.wa-app-sub {
    margin: 0 0 .25rem;
    color: var(--text-muted);
    font-size: .8125rem;
}
.wa-app-btn {
    appearance: none;
    border: 1px solid var(--border);
    background: #ecfdf5;
    border-radius: var(--radius);
    padding: .9rem 1rem;
    font-size: .9375rem;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
    color: #065f46;
}
.wa-app-btn-biz {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
.wa-app-btn.is-preferred {
    outline: 2px solid #25d366;
    outline-offset: 1px;
}
.wa-app-btn:hover { filter: brightness(.98); }
.wa-app-remember {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8125rem;
    color: var(--text-muted);
    margin-top: .25rem;
    cursor: pointer;
}
.wa-app-clear {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--accent);
    font-size: .8125rem;
    padding: .35rem 0;
    text-align: left;
    cursor: pointer;
}
.wa-app-cancel {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: .75rem;
    font-size: .875rem;
    cursor: pointer;
}
body.wa-sheet-open { overflow: hidden; }
@media (min-width: 640px) {
    .wa-app-sheet { align-items: center; }
    .wa-app-panel { border-radius: 12px; margin: 1rem; }
}

.kanban-card .btn-wa,
.kanban-card > .btn-sm {
    width: auto;
    align-self: flex-start;
    margin: 0 .65rem .45rem;
    min-height: 30px;
    padding: .2rem .55rem;
    font-size: .6875rem;
}
.kanban-card > .btn-sm + .btn-wa,
.kanban-card > .btn-wa + .btn-sm {
    margin-top: 0;
}

.bottom-nav { display: none; }

.wa-compose {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
}
.wa-template-select {
    min-width: 180px;
    max-width: 240px;
    min-height: 44px;
}
@media (max-width: 768px) {
    .wa-compose { width: 100%; }
    .wa-template-select { flex: 1; max-width: none; }
    .wa-compose .btn-wa { flex: 1; }
}
.file-header-right { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; width: 100%; }
.file-tools-note-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin: 0 0 1rem;
    min-width: 0;
}
.file-tools-col {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-width: 0;
}
.file-action-toolbar {
    width: 100%;
    display: grid;
    gap: .45rem;
    padding: .45rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
}
.file-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: .35rem;
}
.btn.file-tool-btn {
    min-height: 36px;
    padding: .42rem .62rem;
    gap: .38rem;
    color: #334155;
    border: 1px solid #dbe3ed;
    border-radius: 8px;
    background: #fff;
    font-size: .74rem;
    line-height: 1.1;
    white-space: nowrap;
    box-shadow: none;
}
.btn.file-tool-btn:hover { color: #1d4ed8; border-color: #93c5fd; background: #eff6ff; }
.btn.file-tool-btn.is-primary { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }
.file-tool-icon {
    display: inline-grid;
    place-items: center;
    width: 1.15rem;
    height: 1.15rem;
    color: currentColor;
    font-size: .95rem;
    font-weight: 800;
    line-height: 1;
}
.file-wa-compose {
    display: inline-grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .25rem;
    align-items: center;
    width: min(100%, 18rem);
    max-width: 50%;
    padding: .15rem;
    border: 1px solid #dbe3ed;
    border-radius: 7px;
    background: #fff;
}
.file-wa-compose .wa-template-select {
    max-width: none;
    min-height: 28px;
    height: 28px;
    padding: .15rem .4rem;
    border-radius: 6px;
    font-size: .68rem;
    line-height: 1.2;
}
.btn.file-wa-btn {
    min-height: 28px;
    height: 28px;
    padding: .15rem .45rem;
    gap: .25rem;
    color: #166534;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    border-radius: 6px;
    font-size: .68rem;
    font-weight: 650;
    white-space: nowrap;
}
.btn.file-wa-btn:hover {
    color: #14532d;
    border-color: #86efac;
    background: #dcfce7;
}
.btn.file-wa-btn .file-tool-icon {
    color: #15803d;
    font-size: .75rem;
}
.file-tool-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .75rem;
    padding-inline: .25rem;
    color: var(--text-muted);
    font-size: .68rem;
}
.file-tool-statuses a { font-weight: 700; }
.file-critical-actions {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff7f7;
}
.btn.file-critical-btn {
    min-height: 34px;
    padding: .42rem .68rem;
    gap: .38rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
}
.file-critical-icon {
    display: inline-grid;
    place-items: center;
    width: 1.15rem;
    height: 1.15rem;
    font-size: 1rem;
    line-height: 1;
}
.btn.file-cancel-btn {
    color: #9a3412;
    border-color: #fdba74;
    background: #fff7ed;
}
.btn.file-cancel-btn:hover { color: #7c2d12; border-color: #f97316; background: #ffedd5; }
.btn.file-cancel-btn.is-reopen {
    color: #166534;
    border-color: #86efac;
    background: #f0fdf4;
}
.btn.file-cancel-btn.is-reopen:hover { color: #14532d; border-color: #22c55e; background: #dcfce7; }
.btn.file-delete-btn {
    color: #b91c1c;
    border-color: #fca5a5;
    background: #fff;
}
.btn.file-delete-btn:hover { color: #991b1b; border-color: #ef4444; background: #fee2e2; }

/* Main */
.main-content {
    max-width: var(--shell-max);
    margin: 0 auto;
    padding: 1.5rem 1rem;
}
/* Dosya detayı: geniş ekranda yan boşluğu azalt */
body.page-file .main-content {
    max-width: min(1920px, calc(100vw - 1.25rem));
    padding-left: clamp(0.75rem, 1.2vw, 1.5rem);
    padding-right: clamp(0.75rem, 1.2vw, 1.5rem);
}
body.page-file .topbar-inner,
body.page-file .top-search-form {
    max-width: min(1920px, calc(100vw - 1.25rem));
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .625rem 1.25rem;
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
    min-height: 48px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }
.topbar .btn-ghost { color: #cbd5e1; border-color: rgba(255,255,255,.2); }
.topbar .btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }
.btn-sm { min-height: 36px; padding: .375rem .75rem; font-size: .8125rem; }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: 1rem; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* Forms */
.form-hint { display: block; font-size: .75rem; color: var(--text-muted); margin-top: .25rem; }
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    margin-bottom: .375rem;
    color: var(--text-muted);
}
.form-input {
    width: 100%;
    padding: .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--surface);
    min-height: 48px;
}
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
input[type="date"].form-input,
input[type="time"].form-input,
input[type="datetime-local"].form-input {
    min-height: 48px;
    line-height: 1.2;
    -webkit-appearance: none;
    appearance: none;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.form-divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* Login */
.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 100%);
    padding: 1rem;
}
.login-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-logo { text-align: center; margin-bottom: 1.5rem; }
.login-logo h1 { font-size: 1.75rem; color: var(--navy); letter-spacing: .1em; }
.login-logo .brand-logo-light { margin-bottom: .5rem; }
.login-logo p { color: var(--text-muted); font-size: .875rem; margin-top: .25rem; }
.login-access {
    display: grid;
    gap: .55rem;
    margin-top: 1.35rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.login-access-title {
    margin: 0 0 .1rem;
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.login-access-card {
    display: grid;
    grid-template-columns: 2.2rem 1fr auto;
    align-items: center;
    gap: .7rem;
    padding: .7rem .8rem;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #f8fbff;
    color: var(--navy);
    text-decoration: none;
    transition: border-color .15s, background .15s, transform .15s;
}
.login-access-card:hover {
    border-color: var(--accent);
    background: #eff6ff;
    transform: translateY(-1px);
}
.login-access-card > span:nth-child(2) { min-width: 0; }
.login-access-card strong,
.login-access-card small { display: block; }
.login-access-card strong { font-size: .82rem; }
.login-access-card small {
    margin-top: .12rem;
    color: var(--text-muted);
    font-size: .68rem;
    line-height: 1.35;
}
.login-access-icon {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 9px;
    background: #dbeafe;
    font-size: 1rem;
}
.login-access-card-muted { background: #f8fafc; border-color: var(--border); }
.login-access-card-muted .login-access-icon { background: #e2e8f0; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.text-muted { color: var(--text-muted); }
.check-row { display: flex; align-items: center; gap: .5rem; margin: .75rem 0 1rem; font-size: .875rem; }
.inline-form { display: inline; }
.table-actions { display: flex; gap: .35rem; flex-wrap: wrap; }

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.admin-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: border-color .15s, transform .15s;
}
.admin-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.admin-card h2 { font-size: 1.05rem; margin-bottom: .35rem; }
.admin-card p { font-size: .8125rem; color: var(--text-muted); margin-bottom: .75rem; }
.admin-stat { font-size: .75rem; font-weight: 700; color: var(--accent); }

.admin-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 1rem;
    align-items: start;
}
.admin-layout-wide { grid-template-columns: minmax(300px, 380px) 1fr; }
.admin-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
    margin-bottom: .85rem;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: .35rem .75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-muted);
    text-decoration: none;
    font-size: .75rem;
    font-weight: 700;
}
.filter-chip.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.admin-card-list { display: grid; gap: .55rem; }
.mgmt-card {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .85rem 1rem;
    box-shadow: var(--shadow);
}
.mgmt-card.is-passive { opacity: .72; background: #f8fafc; }
.mgmt-card-title {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
    margin-bottom: .35rem;
}
.mgmt-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    font-size: .75rem;
    color: var(--text-muted);
}
.mgmt-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    flex-shrink: 0;
}
.admin-empty {
    padding: 1.25rem;
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--text-muted);
    text-align: center;
}
.row-passive { opacity: .7; }
.login-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .35rem;
    margin-bottom: 1rem;
    padding: .25rem;
    background: #f1f5f9;
    border-radius: 10px;
}
.login-mode-btn {
    text-align: center;
    text-decoration: none;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: .55rem .4rem;
    border-radius: 8px;
}
.login-mode-btn.active {
    background: #fff;
    color: var(--navy);
    box-shadow: 0 1px 3px rgba(15,23,42,.08);
}
.phone-login-row {
    display: flex;
    align-items: stretch;
    gap: 0;
}
.phone-prefix {
    display: inline-flex;
    align-items: center;
    padding: 0 .75rem;
    background: #e2e8f0;
    border: 1px solid var(--border);
    border-right: 0;
    border-radius: 8px 0 0 8px;
    font-weight: 700;
    color: var(--navy);
    font-size: .875rem;
}
.phone-login-input {
    border-radius: 0 8px 8px 0 !important;
}
@media (max-width: 900px) {
    .admin-layout-wide { grid-template-columns: 1fr; }
    .mgmt-card { flex-direction: column; align-items: stretch; }
}
.admin-form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}
.admin-form-card h2 { font-size: 1rem; margin-bottom: 1rem; }
.admin-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    overflow: visible;
    box-shadow: var(--shadow);
}
.map-cell { min-width: 240px; vertical-align: top; }
.map-select { min-width: 220px; max-width: 320px; }
.map-select[multiple] { min-height: 8rem; }

.search-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}
.search-result-row {
    display: flex;
    gap: .75rem;
    align-items: stretch;
    flex-wrap: wrap;
}
.search-result-link {
    flex: 1;
    min-width: 200px;
    text-decoration: none;
    color: inherit;
}
.search-result-actions {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    justify-content: center;
    min-width: 120px;
}

@media (max-width: 900px) {
    .admin-layout { grid-template-columns: 1fr; }
    .search-result-actions { flex-direction: row; width: 100%; }
    .search-result-actions .btn { flex: 1; }
}
.demo-chips { margin-top: 1.5rem; display: none; }
.demo-label { font-size: .75rem; color: var(--text-muted); margin-bottom: .5rem; text-align: center; }
.chip-group { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.chip {
    padding: .375rem .75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: .75rem;
    cursor: pointer;
    transition: all .15s;
}
.chip:hover { border-color: var(--accent); background: #eff6ff; color: var(--accent); }

/* Page header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: .75rem;
}
.page-header h1 { font-size: 1.5rem; font-weight: 700; }

/* Plate badge */
.plate-badge {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 2px solid #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    font-weight: 700;
    font-size: .875rem;
    letter-spacing: .05em;
}
.plate-tr {
    background: #0052b4;
    color: #fff;
    padding: .125rem .375rem;
    font-size: .625rem;
    font-weight: 800;
}
.plate-num { padding: .125rem .5rem; color: #1a1a1a; }

/* Status */
.status-pill {
    display: inline-block;
    padding: .25rem .75rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    color: #fff;
}
.status-pill.small { font-size: .6875rem; padding: .125rem .5rem; }
.status-amber { background: var(--status-amber); }
.status-orange { background: var(--status-orange); }
.status-rose { background: var(--status-rose); }
.status-violet { background: var(--status-violet); }
.status-indigo { background: var(--status-indigo); }
.status-blue { background: var(--status-blue); }
.status-cyan { background: var(--status-cyan); }
.status-teal { background: var(--status-teal); }
.status-green { background: var(--status-green); }
.status-lime { background: var(--status-lime); }
.status-slate { background: var(--status-slate); }
.status-zinc { background: var(--status-zinc); }

/* Admin status color palette */
.page-header-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: .5rem;
}
.color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    padding: .55rem .4rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: border-color .15s, box-shadow .15s;
}
.color-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.color-swatch .swatch-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.color-swatch .swatch-name {
    font-size: .6875rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.2;
}
.color-swatch.status-amber .swatch-dot { background: var(--status-amber); }
.color-swatch.status-orange .swatch-dot { background: var(--status-orange); }
.color-swatch.status-rose .swatch-dot { background: var(--status-rose); }
.color-swatch.status-violet .swatch-dot { background: var(--status-violet); }
.color-swatch.status-indigo .swatch-dot { background: var(--status-indigo); }
.color-swatch.status-blue .swatch-dot { background: var(--status-blue); }
.color-swatch.status-cyan .swatch-dot { background: var(--status-cyan); }
.color-swatch.status-teal .swatch-dot { background: var(--status-teal); }
.color-swatch.status-green .swatch-dot { background: var(--status-green); }
.color-swatch.status-lime .swatch-dot { background: var(--status-lime); }
.color-swatch.status-slate .swatch-dot { background: var(--status-slate); }
.color-swatch.status-zinc .swatch-dot { background: var(--status-zinc); }
.color-swatch:has(input:checked),
.color-swatch:has(input:focus-visible),
.color-swatch.is-selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .2);
}
.color-preview {
    margin-top: .65rem;
    font-size: .8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.row-inactive { opacity: .55; }
.sort-controls {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
}
.sort-num {
    min-width: 1.75rem;
    text-align: center;
    font-size: .8125rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.sort-btn {
    min-width: 32px;
    padding: .2rem .4rem;
    font-size: .875rem;
    line-height: 1;
}
.sort-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

/* Kanban */
.workload-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: .75rem 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.workload-label { font-size: .8125rem; font-weight: 600; color: var(--text-muted); }
.workload-chip {
    padding: .25rem .75rem;
    background: var(--bg);
    border-radius: 999px;
    font-size: .8125rem;
}

.kanban-board {
    display: flex;
    gap: .75rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}
.kanban-column {
    min-width: 260px;
    max-width: 320px;
    flex: 1;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    max-height: min(70vh, 720px);
}
.kanban-header {
    padding: .75rem 1rem;
    border-radius: var(--radius) var(--radius) 0 0;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: .8125rem;
    width: 100%;
    border: 0;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}
.kanban-header:hover { filter: brightness(1.05); }
.kanban-header-right {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    flex-shrink: 0;
}
.kanban-collapse-icon {
    display: inline-flex;
    width: 1.1rem;
    justify-content: center;
    opacity: .9;
    transition: transform .15s ease;
}
.kanban-column.is-collapsed {
    min-width: 56px;
    max-width: 64px;
    flex: 0 0 56px;
}
.kanban-column.is-collapsed .kanban-header {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    justify-content: flex-start;
    gap: .65rem;
    min-height: 12rem;
    border-radius: var(--radius);
    padding: .85rem .55rem;
}
.kanban-column.is-collapsed .kanban-title {
    flex: 1;
    transform: rotate(180deg);
}
.kanban-column.is-collapsed .kanban-header-right {
    flex-direction: column-reverse;
}
.kanban-column.is-collapsed .kanban-collapse-icon {
    transform: rotate(-90deg);
}
.kanban-column.is-collapsed .kanban-cards {
    display: none;
}
.kanban-count {
    background: rgba(255,255,255,.25);
    padding: .125rem .5rem;
    border-radius: 999px;
    font-size: .75rem;
}
.kanban-cards {
    padding: .5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 100px;
    transition: background .15s;
}
.kanban-cards.drag-over { background: #eff6ff; }
.kanban-card {
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: .5rem;
    cursor: grab;
    transition: transform .15s, box-shadow .15s;
    border: 1px solid var(--border);
}
.kanban-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.kanban-card.dragging { opacity: .5; transform: rotate(2deg); }
.card-link {
    display: block;
    padding: .75rem;
    text-decoration: none;
    color: inherit;
}
.card-file-no { font-weight: 700; font-size: .8125rem; color: var(--accent); margin: .375rem 0; }
.card-vehicle { font-size: .8125rem; font-weight: 600; }
.card-customer { font-size: .75rem; color: var(--text-muted); }
.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: .6875rem;
    color: var(--text-muted);
    margin-top: .375rem;
}
.card-advisor { font-size: .6875rem; color: var(--text-muted); margin-top: .25rem; }
.card-dates {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    margin-top: .35rem;
    font-size: .625rem;
    color: var(--text-muted);
    line-height: 1.35;
}
.result-dates { font-size: .75rem; color: var(--text-muted); }
.form-section-title {
    font-size: .9375rem;
    margin: .25rem 0 .5rem;
}
.loc-toggle {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.loc-option {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem .85rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    font-weight: 600;
    font-size: .875rem;
    user-select: none;
    -webkit-user-select: none;
}
.loc-option:has(input:checked) {
    border-color: var(--accent);
    background: #eff6ff;
}
.loc-option input { accent-color: var(--accent); }
.loc-badge {
    display: inline-block;
    font-size: .6875rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 6px;
    vertical-align: middle;
}
.loc-badge.loc-serviste { background: #dbeafe; color: #1e40af; }
.loc-badge.loc-musteride { background: #ffedd5; color: #9a3412; }
.card-loc { margin-top: .3rem; }

/* New file */
.new-file-container { max-width: 600px; margin: 0 auto; }
.step-panel { display: none; }
.step-panel.active { display: block; }
.step-indicator {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}
.step {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .875rem;
}
.step.active { background: var(--accent); color: #fff; }
.step.done { background: var(--status-green); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border); max-width: 60px; }
.step-line.done { background: var(--status-green); }

.file-created-banner {
    text-align: center;
    padding: 1.5rem;
    background: #ecfdf5;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border: 1px solid #a7f3d0;
}
.file-created-banner h2 { color: #059669; font-size: 1.25rem; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: .75rem;
    margin-bottom: 1.5rem;
}
.category-grid.compact { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .375rem;
    padding: 1rem .5rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all .15s;
    min-height: 48px;
    position: relative;
}
.category-card:hover { border-color: var(--accent); background: #eff6ff; }
.category-card.small { padding: .75rem .5rem; }
.cat-icon { font-size: 1.5rem; pointer-events: none; user-select: none; }
.cat-label { font-size: .6875rem; font-weight: 600; text-align: center; pointer-events: none; user-select: none; }
.cat-desc {
    font-size: .68rem;
    font-weight: 500;
    line-height: 1.35;
    color: #64748b;
    text-align: center;
    pointer-events: none;
    user-select: none;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: .2rem;
    max-width: 100%;
    word-break: break-word;
}
.category-card.small .cat-desc {
    font-size: .62rem;
    -webkit-line-clamp: 3;
}
.cat-desc-cell {
    max-width: 220px;
    font-size: .8125rem;
    color: var(--text-muted);
}
.cat-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    font-size: 0;
}
.category-card { overflow: hidden; }
.category-card-pick { cursor: pointer; user-select: none; }
.category-card-pick:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.upload-cat-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
    margin: 0 0 .75rem;
    font-size: .75rem;
    color: var(--text-muted);
}
.upload-cat-legend-item {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
}
.legend-swatch {
    width: .875rem;
    height: .875rem;
    border-radius: 4px;
    border: 2px solid transparent;
    display: inline-block;
}
.legend-swatch-filled {
    background: #ecfdf5;
    border-color: #16a34a;
}
.legend-swatch-empty {
    background: #f3f4f6;
    border-color: #d1d5db;
}
.category-card.cat-empty {
    border-color: #d1d5db;
    background: #f9fafb;
}
.category-card.cat-empty .cat-label { color: #6b7280; }
.category-card.cat-filled {
    border-color: #16a34a;
    background: #ecfdf5;
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, .12);
}
.category-card.cat-filled .cat-label { color: #166534; }
.category-card.cat-filled:hover {
    border-color: #15803d;
    background: #d1fae5;
}
.category-card.cat-empty:hover {
    border-color: var(--accent);
    background: #eff6ff;
}
.cat-count {
    position: absolute;
    top: .3rem;
    right: .3rem;
    z-index: 3;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 .3rem;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-size: .625rem;
    font-weight: 700;
    line-height: 1.2rem;
    text-align: center;
    pointer-events: none;
    box-shadow: 0 1px 2px rgba(0,0,0,.12);
}

.doc-card-cat {
    border-left: 4px solid #16a34a;
}

.upload-hint {
    margin: .5rem 0 0;
    font-size: .8125rem;
}

.upload-quick-actions {
    display: flex;
    gap: .5rem;
    margin: 0 0 1rem;
    flex-wrap: wrap;
}
.upload-picker-btn {
    flex: 1;
    min-width: 110px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0;
    overflow: hidden;
}
.upload-picker-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 16px;
}

/* Kaynak seçimi (kamera / galeri / PDF) */
.upload-source-sheet {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.upload-source-sheet[hidden] { display: none !important; }
.upload-source-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .45);
}
.upload-source-panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 1.1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 30px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    animation: uploadSheetUp .22s ease-out;
}
@keyframes uploadSheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.upload-source-panel h4 {
    font-size: 1.05rem;
    margin: 0;
}
.upload-source-sub {
    margin: 0 0 .35rem;
    color: var(--text-muted);
    font-size: .8125rem;
}
.upload-source-btn {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: var(--radius);
    padding: .85rem 1rem;
    font-size: .9375rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    color: var(--text);
}
.upload-source-btn:hover { border-color: var(--accent); background: #eff6ff; }
.upload-source-btn-doc {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}
.upload-source-cancel {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: .75rem;
    font-size: .875rem;
    cursor: pointer;
}
.upload-source-file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
body.upload-sheet-open { overflow: hidden; }
@media (min-width: 640px) {
    .upload-source-sheet { align-items: center; }
    .upload-source-panel {
        border-radius: 12px;
        margin: 1rem;
        animation: none;
    }
}

/* Toplu kamera çekim — tam ekran, sayfa kaymaz, kapat her zaman üstte */
html.batch-cam-open,
body.batch-cam-open {
    overflow: hidden !important;
    overscroll-behavior: none;
    height: 100%;
}
body.batch-cam-open {
    position: fixed;
    inset: 0;
    width: 100%;
    touch-action: none;
}
.batch-cam-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    z-index: 12000;
    background: #0b1220;
    color: #fff;
    overscroll-behavior: none;
}
.batch-cam-sheet[hidden] { display: none !important; }
/* Sayfa bildirimi kamera kontrollerinin üstüne binmesin */
body.batch-cam-open .toast-container,
body.batch-cam-open .cookie-banner,
body.batch-cam-open .app-update-banner,
body.batch-cam-open .notif-push-banner,
body.batch-cam-open .net-banner,
body.batch-cam-open .notif-panel,
body.batch-cam-open .notif-backdrop {
    visibility: hidden !important;
    pointer-events: none !important;
}
.batch-cam-stage {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.batch-cam-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}
.batch-cam-flash {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: .85;
    pointer-events: none;
    z-index: 2;
}
.batch-cam-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding-top: calc(.65rem + env(safe-area-inset-top, 0px));
    padding-right: calc(.75rem + env(safe-area-inset-right, 0px));
    padding-bottom: .5rem;
    padding-left: calc(.75rem + env(safe-area-inset-left, 0px));
    background: linear-gradient(to bottom, rgba(0,0,0,.72), transparent);
}
.batch-cam-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
    font-size: .8125rem;
}
.batch-cam-title strong { font-size: .95rem; }
.batch-cam-close,
.batch-cam-clear {
    appearance: none;
    border: 0;
    background: rgba(255,255,255,.14);
    color: #fff;
    border-radius: 999px;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0 .7rem;
    font-size: .875rem;
    cursor: pointer;
    position: relative;
    z-index: 41;
    flex: 0 0 auto;
}
.batch-cam-clear:disabled { opacity: .4; cursor: default; }
.batch-cam-fallback {
    position: relative;
    z-index: 3;
    margin: auto 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, .88);
    text-align: center;
}
.batch-cam-fallback p {
    margin: 0 0 .75rem;
    font-size: .875rem;
    color: #cbd5e1;
}
.batch-cam-thumbs {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
    z-index: 3;
    display: flex;
    gap: .45rem;
    padding: 0 .75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.batch-cam-thumb {
    position: relative;
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,.85);
    background: #111;
}
.batch-cam-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.batch-cam-thumb.is-pending { border-color: rgba(255,255,255,.85); }
.batch-cam-thumb.is-uploading {
    border-color: #fbbf24;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, .35);
}
.batch-cam-thumb.is-uploading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.28);
}
.batch-cam-thumb.is-done { border-color: #34d399; }
.batch-cam-thumb.is-done::after {
    content: '✓';
    position: absolute;
    right: 2px;
    bottom: 1px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.8);
}
.batch-cam-thumb.is-error {
    border-color: #f87171;
    cursor: pointer;
}
.batch-cam-thumb.is-error::after {
    content: '!';
    position: absolute;
    right: 4px;
    bottom: 1px;
    font-size: 13px;
    font-weight: 700;
    color: #fecaca;
}
.batch-cam-thumb-del {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.7);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.batch-cam-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem calc(.9rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, rgba(0,0,0,.8), transparent);
}
.batch-cam-actions-spacer { min-height: 1px; }
.batch-cam-shutter {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: #ef4444;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(255,255,255,.2);
    justify-self: center;
}
.batch-cam-shutter:disabled { opacity: .5; cursor: default; }
.batch-cam-upload {
    min-width: 7.5rem;
    min-height: 2.75rem;
    justify-self: end;
}
.batch-cam-upload:disabled { opacity: .45; }

.upload-preview:empty { display: none; }
.preview-card .preview-status {
    display: block;
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: .25rem;
}
.preview-card.success .preview-status { color: #059669; }
.preview-card.error .preview-status { color: #dc2626; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: all .15s;
    min-height: 48px;
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--accent); background: #eff6ff; }
.dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 16px;
}
.dropzone { position: relative; }
.dropzone p { pointer-events: none; margin: 0; }

.upload-preview { margin-bottom: 1.5rem; }
.preview-card {
    padding: .75rem;
    border-radius: var(--radius);
    margin-bottom: .5rem;
    border: 1px solid var(--border);
}
.preview-card.uploading { background: #eff6ff; }
.preview-card.success { background: #ecfdf5; border-color: #a7f3d0; }
.preview-card.error { background: #fef2f2; border-color: #fecaca; }
.preview-images { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.preview-images img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; }
.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-top: .5rem;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--accent, #2563eb);
    border-radius: 4px;
    width: 0;
    min-width: 0;
    transition: width .15s linear;
}
.upload-total {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #eff6ff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .75rem;
    margin-bottom: .75rem;
}
.upload-total.is-done { background: #ecfdf5; }
.upload-total.is-error { background: #fef2f2; }
.upload-total-label { font-weight: 700; }
@keyframes pulse { 50% { width: 90%; } }

.kvkk-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    max-height: 280px;
    overflow: auto;
    font-size: .9rem;
}
.kvkk-box p { margin-bottom: .75rem; }
.ins-template-section { margin: 1.25rem 0; }
.ins-template-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: .75rem;
}
.ins-template-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .85rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.ins-template-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .5rem;
}
.ins-admin-template-row {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: .85rem;
    background: #fafbfc;
}
.ins-admin-template-row.has-tpl { border-color: #86efac; background: #f0fdf4; }
.ins-admin-template-row.no-tpl { border-color: #fcd34d; background: #fffbeb; }
.ins-admin-template-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .35rem;
}
.ins-admin-template-head h3 { margin: 0; font-size: 1rem; }
.ins-admin-upload-form { margin-top: .65rem; }
.ins-templates-panel {
    margin-top: 1.5rem;
    max-width: 920px;
}
.ins-tpl-meta { font-size: .8125rem; color: var(--text-muted); margin: .25rem 0; }
.tpl-badge {
    font-size: .6875rem;
    font-weight: 700;
    padding: .2rem .55rem;
    border-radius: 999px;
}
.tpl-badge-ok { background: #bbf7d0; color: #166534; }
.tpl-badge-miss { background: #fde68a; color: #92400e; }
.tpl-count {
    font-weight: 700;
    font-size: .8125rem;
    padding: .15rem .5rem;
    border-radius: 6px;
}
.tpl-count-ok { background: #bbf7d0; color: #166534; }
.tpl-count-partial { background: #fde68a; color: #92400e; }
.tpl-count-empty { background: #e2e8f0; color: #475569; }
.ins-admin-add-form {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    background: #fff;
    margin-bottom: .5rem;
}
.ins-admin-add-form h3 { margin: 0 0 .65rem; font-size: 1rem; }
.suggest-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .75rem;
}
.suggest-chip {
    padding: .3rem .65rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: .75rem;
    cursor: pointer;
}
.suggest-chip:hover { border-color: var(--accent); color: var(--accent); }
.doc-file-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 96px;
    background: #e2e8f0;
    color: #334155;
    font-weight: 700;
    letter-spacing: .04em;
}
.doc-file-badge-pdf { background: #fee2e2; color: #b91c1c; }
.doc-file-badge-word { background: #dbeafe; color: #1d4ed8; }
.doc-file-badge-excel { background: #dcfce7; color: #15803d; }
.doc-file-badge-video { background: #ede9fe; color: #6d28d9; }
.doc-file-badge-link { background: #e0f2fe; color: #0369a9; }
.doc-thumb-video {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    background: #0f172a;
}
.upload-external-link {
    margin: .5rem 0 .75rem;
    padding: .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #f8fafc;
    text-align: left;
}
.upload-external-link label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: .35rem;
}
.upload-external-link .form-input {
    width: 100%;
    margin-bottom: .5rem;
}

.suggestions {
    position: relative;
    z-index: 10;
}
.suggestion-item {
    padding: .625rem .75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    cursor: pointer;
    font-size: .875rem;
}
.suggestion-item:first-child { border-top: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.suggestion-item:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.suggestion-item:hover { background: #eff6ff; }

/* File detail */
.file-detail { max-width: 1080px; margin: 0 auto; }
.grant-panel {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
}
.grant-panel-head {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    align-items: baseline;
    margin-bottom: .35rem;
}
.grant-active { color: #047857; font-size: .875rem; }
.grant-idle { color: var(--text-muted); font-size: .875rem; }
.grant-hint { margin: 0 0 .75rem; font-size: .8125rem; color: var(--text-muted); }
.grant-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.grant-toggle-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .875rem;
    font-weight: 600;
}
.grant-toggle-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.grant-toggle-ui {
    width: 48px; height: 26px; background: #cbd5e1; border-radius: 999px;
    position: relative; transition: background .2s; flex-shrink: 0;
}
.grant-toggle-ui::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
    background: #fff; border-radius: 50%; transition: transform .2s;
}
.grant-toggle-row input:checked + .grant-toggle-ui { background: #22c55e; }
.grant-toggle-row input:checked + .grant-toggle-ui::after { transform: translateX(22px); }
.work-order-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: .2rem .5rem;
    font-size: .75rem;
    font-weight: 700;
    vertical-align: middle;
}
.grant-banner {
    padding: .85rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: .875rem;
}
.grant-banner-ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.grant-banner-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* Customer portal */
.portal-body {
    min-height: 100vh;
    background:
        radial-gradient(1200px 500px at 10% -10%, #1e3a5f 0%, transparent 55%),
        linear-gradient(160deg, #0f172a 0%, #1e293b 40%, #0f172a 100%);
}
.portal-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}
.portal-wrap-wide {
    max-width: min(1120px, 100%);
    width: 100%;
}
.portal-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.5rem 1.25rem;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.portal-card-wide { max-width: none; width: 100%; }
.portal-file-shell { padding: 1.35rem 1.35rem 1.75rem; }
.portal-file-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.portal-file-main { min-width: 0; }
.portal-file-chat-col { min-width: 0; }
.portal-notice-standalone { margin-bottom: 1.1rem; }
.portal-communication .file-chat-list {
    max-height: min(28rem, 52vh);
}
@media (min-width: 960px) {
    .portal-file-layout {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
        gap: 1.35rem;
        align-items: start;
    }
    .portal-file-chat-col {
        position: sticky;
        top: 1rem;
    }
    .portal-communication {
        display: flex;
        flex-direction: column;
        max-height: calc(100vh - 2rem);
        max-height: calc(100dvh - 2rem);
    }
    .portal-communication .file-chat-list {
        flex: 1 1 auto;
        max-height: none;
        min-height: 16rem;
    }
}
@media (max-width: 959px) {
    .portal-file-chat-col { order: -1; }
    .portal-wrap-wide { padding-top: 1.1rem; }
}
.portal-brand h1, .portal-brand-mini {
    color: var(--navy);
    letter-spacing: .04em;
}
.portal-brand h1 { font-size: 1.25rem; margin-bottom: .25rem; }
.portal-brand .brand-logo-light { margin-bottom: .55rem; }
.portal-brand p, .portal-sub, .portal-footnote {
    color: var(--text-muted);
    font-size: .875rem;
}
.portal-brand-mini { font-weight: 700; font-size: .75rem; margin-bottom: .5rem; opacity: .95; }
.portal-file-title { font-size: 1.25rem; margin: .5rem 0 .25rem; }
.portal-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}
.portal-status-block {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.25rem;
}
.portal-status-block p { margin-top: .65rem; font-size: .875rem; color: var(--text-muted); }
.portal-docs-title { font-size: 1rem; margin: 1.25rem 0 .75rem; }
.portal-footnote { margin-top: 1rem; text-align: center; }
.portal-staff-link, .portal-login-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: .8125rem;
}
.portal-staff-link { color: var(--text-muted); }
.portal-login-link a { color: var(--accent); }
.portal-file-list { display: flex; flex-direction: column; gap: .5rem; }
.portal-file-list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .65rem;
}
@media (min-width: 720px) {
    .portal-file-list-grid { grid-template-columns: 1fr 1fr; }
}
.portal-file-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .35rem .75rem;
    padding: .85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    background: #fff;
}
.portal-file-row:hover { border-color: var(--accent); }
.portal-file-meta {
    grid-column: 1 / -1;
    font-size: .8125rem;
    color: var(--text-muted);
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: .75rem;
    padding: 1.25rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.file-header-left { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.file-header-left h1 { font-size: 1.25rem; }
.status-select { max-width: 200px; }

/* Dosya durum adım çubuğu */
.status-stepper-wrap {
    width: 100%;
    padding: .45rem;
    border: 1px solid #dbe3ed;
    border-radius: 11px;
    background: #f8fafc;
}
.status-progress-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .35rem .75rem;
    padding: .05rem .15rem .4rem;
}
.status-progress-head strong { color: #334155; font-size: .78rem; }
.status-progress-head span { color: var(--text-muted); font-size: .65rem; }
.status-progress-count {
    margin-left: auto;
    padding: .15rem .45rem;
    border-radius: 999px;
    color: #075985;
    background: #e0f2fe;
    font-size: .68rem;
    font-weight: 800;
}
.status-mobile-focus { display: none; }
.status-all-steps {
    border: 0;
    background: transparent;
}
.status-all-steps > summary {
    display: none;
    list-style: none;
    cursor: pointer;
}
.status-all-steps > summary::-webkit-details-marker { display: none; }
.status-stepper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: .3rem;
    align-items: stretch;
    width: 100%;
}
.status-step {
    position: relative;
    min-width: 0;
    min-height: 50px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
    border-radius: 8px;
    padding: .35rem .42rem;
    text-align: left;
    cursor: default;
    color: var(--text-muted, #64748b);
    font-size: .67rem;
    font-weight: 600;
    line-height: 1.15;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.status-step .step-num {
    position: absolute;
    top: .32rem;
    right: .38rem;
    font-size: .56rem;
    opacity: .65;
}
.status-step .step-label {
    display: block;
    padding-right: 1.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.status-step .step-state {
    display: block;
    margin-top: .25rem;
    font-size: .56rem;
    font-weight: 700;
    opacity: .75;
}
.status-step.is-done {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}
.status-step.is-current {
    background: #0369a1;
    border-color: #0369a1;
    color: #fff;
    box-shadow: 0 2px 6px rgba(3, 105, 161, 0.25);
}
.status-step.is-next,
.status-step.is-prev {
    cursor: pointer;
    color: #075985;
    border-color: #38bdf8;
    background: #f0f9ff;
}
.status-step.is-next:hover,
.status-step.is-prev:hover {
    background: #e0f2fe;
    border-color: #0284c7;
    transform: translateY(-1px);
}
.status-step.is-locked {
    opacity: .48;
    cursor: not-allowed;
}
.status-step-meta {
    font-size: .65rem;
    color: var(--text-muted, #64748b);
    margin: .35rem .15rem 0;
    width: 100%;
}
.status-admin-jump {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .45rem;
    margin-top: .4rem;
    color: var(--text-muted);
    font-size: .62rem;
    font-weight: 700;
}
.status-admin-jump .status-select {
    width: auto;
    min-height: 34px;
    padding: .3rem 1.8rem .3rem .55rem;
    border-radius: 7px;
    font-size: .7rem;
}
@media (max-width: 700px) {
    .status-progress-head {
        align-items: center;
        flex-direction: row;
        gap: .4rem;
    }
    .status-progress-hint-desktop { display: none; }
    .status-mobile-focus {
        display: grid;
        gap: .55rem;
        margin-bottom: .55rem;
    }
    .status-mobile-current {
        display: grid;
        gap: .2rem;
        padding: .8rem .85rem;
        border: 1px solid #0369a1;
        border-radius: 12px;
        color: #fff;
        background: linear-gradient(135deg, #0369a1, #0c4a6e);
        box-shadow: 0 4px 14px rgba(3, 105, 161, .22);
    }
    .status-mobile-badge {
        font-size: .65rem;
        font-weight: 800;
        letter-spacing: .04em;
        text-transform: uppercase;
        opacity: .85;
    }
    .status-mobile-current strong {
        font-size: 1.05rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }
    .status-mobile-current small {
        color: rgba(255,255,255,.82);
        font-size: .72rem;
    }
    .status-mobile-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .45rem;
    }
    .btn.status-mobile-btn {
        min-height: 54px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: .15rem;
        padding: .55rem .7rem;
        border: 1px solid #7dd3fc;
        border-radius: 10px;
        color: #075985;
        background: #f0f9ff;
        box-shadow: none;
        text-align: left;
        white-space: normal;
    }
    .btn.status-mobile-btn:disabled {
        opacity: .45;
        border-color: #cbd5e1;
        color: #64748b;
        background: #f8fafc;
    }
    .status-mobile-dir {
        font-size: .68rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .03em;
    }
    .status-mobile-target {
        font-size: .82rem;
        font-weight: 700;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }
    .btn.status-mobile-next {
        border-color: #38bdf8;
        color: #0c4a6e;
        background: #e0f2fe;
    }
    .status-all-steps {
        margin-top: .15rem;
        border: 1px solid #dbe3ed;
        border-radius: 10px;
        background: #fff;
        overflow: hidden;
    }
    .status-all-steps > summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 44px;
        padding: .65rem .8rem;
        color: #334155;
        font-size: .78rem;
        font-weight: 700;
    }
    .status-all-steps > summary::after {
        content: '▾';
        color: var(--accent);
        font-size: .75rem;
    }
    .status-all-steps[open] > summary::after { content: '▴'; }
    .status-all-steps .status-stepper {
        display: grid;
        grid-template-columns: 1fr;
        gap: .35rem;
        padding: 0 .65rem .7rem;
        overflow: visible;
    }
    .status-step {
        min-height: 48px;
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: .45rem;
        padding: .55rem .65rem;
        text-align: left;
    }
    .status-step .step-num {
        position: static;
        min-width: 2.4rem;
        opacity: .8;
        font-weight: 800;
    }
    .status-step .step-label {
        padding-right: 0;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        font-size: .82rem;
        line-height: 1.25;
    }
    .status-step .step-state {
        margin-top: 0;
        justify-self: end;
        font-size: .65rem;
    }
    .status-step-meta { display: none; }
    .status-admin-jump { align-items: stretch; flex-direction: column; }
    .status-admin-jump .status-select { width: 100%; max-width: none; }
}

.internal-note-panel {
    margin: 0;
    padding: .85rem 1rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #475569;
    border-radius: var(--radius);
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.file-tools-note-panel .internal-note-panel textarea {
    flex: 1;
    min-height: 5.5rem;
}
@media (min-width: 900px) {
    .file-tools-note-panel.has-both {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(240px, .85fr);
        align-items: stretch;
        gap: .85rem 1rem;
    }
    .file-tools-note-panel.has-both .file-tools-col {
        height: 100%;
    }
    .file-tools-note-panel.has-both .file-action-toolbar {
        flex: 1;
    }
    .file-tools-note-panel.has-both .file-tool-grid {
        grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
    }
    .file-tools-note-panel.has-both .file-wa-compose {
        max-width: none;
        width: 100%;
    }
    .file-tools-note-panel.has-both .file-critical-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
    }
    .file-tools-note-panel.has-both .btn.file-critical-btn {
        flex: 1 1 auto;
    }
}
.internal-note-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .5rem;
}
.internal-note-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .35rem .65rem;
}
.internal-note-title strong {
    font-size: .9rem;
    color: #334155;
}
.internal-note-lock {
    font-size: .7rem;
    font-weight: 650;
    color: #64748b;
    letter-spacing: .01em;
}
.internal-note-badge {
    font-size: .7rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #64748b;
    white-space: nowrap;
}
.internal-note-badge.has-note {
    background: #334155;
    color: #fff;
}
.internal-note-panel textarea {
    width: 100%;
    resize: vertical;
    min-height: 2.75rem;
    background: #fff;
}
.internal-note-actions {
    display: flex;
    gap: .5rem;
    margin-top: .5rem;
    flex-wrap: wrap;
}
.internal-note-readonly {
    margin: 0;
    font-size: .875rem;
    color: #334155;
    white-space: pre-wrap;
    line-height: 1.45;
}

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
}
.tab {
    padding: .75rem 1.25rem;
    background: none;
    border: none;
    font-size: .875rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    min-height: 48px;
}
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-content { display: none; }
.tab-content.active { display: block; }

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .75rem;
}
.doc-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}
.doc-thumb img { width: 100%; height: 120px; object-fit: cover; display: block; }
.doc-info { padding: .5rem; }
.doc-cat { font-size: .6875rem; font-weight: 600; color: var(--accent); }
.doc-name { font-size: .75rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-meta { font-size: .625rem; color: var(--text-muted); display: block; }
.doc-open-link {
    display: inline-block;
    margin-top: .35rem;
    font-size: .6875rem;
    font-weight: 650;
    color: var(--accent);
    text-decoration: none;
}
.doc-open-link:hover { text-decoration: underline; }
.doc-delete {
    position: absolute;
    top: .375rem;
    right: .375rem;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Timeline */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline-item { position: relative; padding-bottom: 1.25rem; }
.timeline-dot {
    position: absolute;
    left: -1.5rem;
    top: .375rem;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg);
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(-1.5rem + 4px);
    top: 1rem;
    bottom: 0;
    width: 2px;
    background: var(--border);
}
.timeline-item:last-child::before { display: none; }
.timeline-content p { font-size: .875rem; }
.timeline-meta { font-size: .75rem; color: var(--text-muted); }
.timeline.compact .timeline-item { padding-bottom: .75rem; }

/* Info grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
.info-section {
    background: var(--surface);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.info-section h3 { font-size: .875rem; color: var(--text-muted); margin-bottom: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.info-section dl { display: grid; grid-template-columns: auto 1fr; gap: .375rem .75rem; font-size: .875rem; }
.info-section dt { color: var(--text-muted); font-weight: 600; }
.info-section dd { font-weight: 500; }
.info-edit-form .form-group { margin-bottom: .75rem; }
.info-edit-form .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}
.info-correct-banner {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    margin-bottom: 1rem;
    padding: .75rem 1rem;
    border: 1px solid color-mix(in srgb, var(--primary, #2563eb) 35%, var(--border));
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary, #2563eb) 8%, transparent);
    font-size: .875rem;
}
.info-correct-banner strong { font-size: .9rem; }
.info-section-identity.identity-highlight {
    outline: 2px solid var(--primary, #2563eb);
    outline-offset: 4px;
    border-radius: 8px;
    transition: outline-color .3s;
}
.file-header-meta { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.file-header-meta h1 { margin: 0; }
.file-customer-line {
    margin: 0;
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.3;
}
.file-customer-line strong { color: var(--text, #111); font-weight: 600; }
.file-customer-phone { font-weight: 500; }
.info-readonly {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .375rem .75rem;
    font-size: .875rem;
    margin-bottom: .75rem;
}
.info-readonly dt { color: var(--text-muted); font-weight: 600; }
.info-edit-actions {
    margin-top: 1rem;
    padding-top: .5rem;
    border-top: 1px solid var(--border);
}

/* Search */
.search-form {
    display: flex;
    gap: .75rem;
    margin-bottom: 1.5rem;
}
.search-input { flex: 1; }
.search-count { font-size: .875rem; color: var(--text-muted); margin-bottom: 1rem; }
.search-results { display: flex; flex-direction: column; gap: .5rem; }
.search-result-card {
    display: block;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s;
}
.search-result-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.result-top { display: flex; align-items: center; gap: .75rem; margin-bottom: .375rem; flex-wrap: wrap; }
.result-file-no { font-weight: 700; color: var(--accent); }
.result-body { display: flex; flex-direction: column; gap: .125rem; font-size: .8125rem; color: var(--text-muted); }

/* Reports */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}
.report-card {
    background: var(--surface);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.report-card.full-width { grid-column: 1 / -1; }
.report-card h2 { font-size: 1rem; margin-bottom: 1rem; }
.report-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.report-table th, .report-table td { padding: .5rem; text-align: left; border-bottom: 1px solid var(--border); }
.report-table th { font-weight: 600; color: var(--text-muted); font-size: .75rem; text-transform: uppercase; }

.bar-chart { display: flex; flex-direction: column; gap: .625rem; }
.bar-row { display: flex; align-items: center; gap: .75rem; }
.bar-label { width: 120px; font-size: .75rem; font-weight: 600; flex-shrink: 0; }
.bar-track { flex: 1; height: 20px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; min-width: 2px; transition: width .3s; }
.bar-count { width: 30px; text-align: right; font-size: .8125rem; font-weight: 700; }

.empty-state { text-align: center; color: var(--text-muted); padding: 2rem; font-size: .875rem; }

/* Toast */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.toast {
    padding: .75rem 1rem .75rem 1.1rem;
    border-radius: var(--radius);
    color: #fff;
    font-size: .875rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    animation: slideIn .3s ease;
    max-width: 380px;
    background: #334155; /* bilinmeyen tipler de görünsün */
    display: flex;
    align-items: flex-start;
    gap: .55rem;
}
.toast-body { flex: 1; min-width: 0; line-height: 1.4; }
.toast-close {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    margin: -.2rem -.35rem 0 0;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,.18);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.toast-close:hover { background: rgba(255,255,255,.3); }
.toast-sticky { box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.toast-success { background: #059669; }
.toast-error { background: #dc2626; }
.toast-info { background: #0369a1; }
.toast-wa {
    background: #128c7e;
}
.toast-wa-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem;
}
.toast-wa .btn-wa { background: #fff; color: #128c7e !important; min-height: 40px; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Responsive */
@media (max-width: 900px) {
    .stat-grid { gap: .3rem; }
    .stat-card { width: 6.75rem; flex-basis: 6.75rem; }
}

body.scroll-locked {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
}
@media (max-width: 768px) {
    .topbar {
        padding-left: 0;
        padding-right: 0;
    }
    .topbar-inner {
        padding-left: max(.65rem, env(safe-area-inset-left, 0px));
        padding-right: max(.45rem, env(safe-area-inset-right, 0px));
        gap: .35rem;
    }
    .nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1200;
        display: block;
        border: 0;
        padding: 0;
        background: rgba(15, 23, 42, .52);
    }
    .nav-backdrop[hidden] { display: none !important; }
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: min(18.5rem, calc(100vw - 2.75rem));
        max-width: calc(100vw - env(safe-area-inset-left, 0px) - .5rem);
        margin: 0;
        background: var(--navy);
        flex-direction: column;
        align-items: stretch;
        gap: .15rem;
        padding: calc(.85rem + env(safe-area-inset-top, 0px)) max(.85rem, env(safe-area-inset-right, 0px)) calc(.85rem + env(safe-area-inset-bottom, 0px)) .85rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 1300;
        box-shadow: -16px 0 40px rgba(0, 0, 0, .35);
    }
    .nav-links.open { display: flex; }
    .nav-links .nav-link { min-height: 44px; display: flex; align-items: center; }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: .15rem;
        order: 3;
        flex: 0 0 44px;
        position: relative;
        z-index: 1310;
    }
    .logo { order: 1; flex-shrink: 0; }
    .logo.logo-img { max-width: min(240px, 52vw); }
    .logo.logo-img img { height: 38px; }
    .nav-links { order: 4; }
    .topbar-user {
        order: 2;
        margin-left: auto;
        flex-shrink: 0;
        gap: .35rem;
    }
    .topbar-user .user-name, .topbar-user .user-badge, .logout-desk { display: none; }
    .notif-item {
        padding: .85rem 1rem;
    }
    .notif-item-title { font-size: .875rem; }
    .notif-item-body { font-size: .8125rem; }
    .nav-logout { display: block; }
    .form-row { grid-template-columns: 1fr; }
    .file-header, .file-header-right { flex-direction: column; align-items: stretch; }
    .file-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .btn.file-tool-btn { justify-content: flex-start; padding-inline: .55rem; }
    .file-wa-compose {
        grid-template-columns: minmax(0, 1fr) auto;
        max-width: none;
        width: 100%;
    }
    .file-wa-compose .file-wa-icon { display: none; }
    .file-critical-actions { display: flex; width: 100%; }
    .file-critical-btn { flex: 1 1 0; justify-content: center; padding-inline: .5rem; }
    .status-select { max-width: none; width: 100%; }
    .reports-grid { grid-template-columns: 1fr; }
    .bar-label { width: 80px; font-size: .6875rem; }
    .main-content { padding: 1rem .75rem 5.5rem; }
    .dash-hero h1 { font-size: 1.25rem; }
    .file-row { flex-wrap: wrap; }
    .file-row-actions {
        width: 100%;
        max-width: none;
        margin-left: 0;
    }
    .file-row-actions .btn,
    .file-row-actions .btn-wa {
        flex: 0 0 auto;
        min-height: 44px;
        min-width: 44px;
        padding: .55rem .75rem;
    }
    .file-row-actions .file-row-advance {
        flex: 1 1 100%;
        order: -1;
        justify-content: center;
    }
    .cookie-banner {
        bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
        padding-bottom: .85rem;
    }
    .stat-label { font-size: .68rem; }
    .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tab { flex-shrink: 0; }
    .search-form { flex-direction: column; }
    .toast-container { left: .75rem; right: .75rem; bottom: 5rem; }
    .toast { max-width: none; }

    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 200;
        background: var(--navy);
        padding: .4rem .5rem calc(.4rem + env(safe-area-inset-bottom));
        justify-content: space-around;
        box-shadow: 0 -4px 16px rgba(0,0,0,.2);
    }
    .bottom-nav a {
        color: #94a3b8;
        text-decoration: none;
        font-size: .7rem;
        font-weight: 700;
        min-height: 48px;
        min-width: 64px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
    }
    .bottom-nav a.active { color: #fff; background: rgba(255,255,255,.1); }
}

@media (max-width: 420px) {
    .stat-card { width: calc(33.333% - .22rem); flex: 0 0 calc(33.333% - .22rem); }
    .stat-num { font-size: .95rem; }
    .stat-label { font-size: .68rem; }
    .plate-num { font-size: .75rem; }
}

/* Groups / Prim / Tour */
.perm-matrix { margin: 1rem 0; display: grid; gap: .75rem; }
.perm-section {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .65rem .75rem;
    background: #f8fafc;
}
.perm-section h3 { margin: 0 0 .4rem; font-size: .8rem; color: var(--navy); }
.perm-key { display: none; }
.header-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.section-title { font-size: 1rem; margin: 0 0 .75rem; }
.prim-stats .stat-card { cursor: default; }
/* Professional tour presentation */
.tour-stage {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 0;
    min-height: calc(100vh - 7.5rem);
    margin: -.25rem 0 1rem;
    border: 1px solid #1e293b;
    border-radius: 16px;
    overflow: hidden;
    background: #0b1220;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
}
.tour-rail {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #e2e8f0;
    padding: 1.25rem 1rem 1rem;
    border-right: 1px solid rgba(148, 163, 184, .15);
}
.tour-brand-mark {
    display: block;
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: .08em;
}
.tour-brand-mark img {
    display: block;
    height: 36px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    mix-blend-mode: lighten;
}
.tour-brand-sub {
    display: block;
    margin-top: .2rem;
    font-size: .7rem;
    color: #94a3b8;
    font-weight: 600;
}
.tour-toc {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
    display: grid;
    gap: .35rem;
}
.tour-toc-item {
    width: 100%;
    display: flex;
    gap: .55rem;
    align-items: flex-start;
    text-align: left;
    border: 0;
    border-radius: 10px;
    padding: .55rem .5rem;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.tour-toc-item:hover { background: rgba(255,255,255,.04); }
.tour-toc-item.active { background: rgba(255,255,255,.08); }
.tour-toc-num {
    font-size: .7rem;
    font-weight: 800;
    color: #64748b;
    min-width: 1.4rem;
    padding-top: .15rem;
}
.tour-toc-item.active .tour-toc-num { color: #38bdf8; }
.tour-toc-eye {
    display: block;
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
    font-weight: 700;
}
.tour-toc-title {
    display: block;
    font-size: .78rem;
    font-weight: 650;
    line-height: 1.3;
    color: #f1f5f9;
}
.tour-main {
    position: relative;
    background:
        radial-gradient(1200px 400px at 10% -10%, rgba(56, 189, 248, .12), transparent 55%),
        linear-gradient(160deg, #f8fafc 0%, #eef2ff 48%, #f8fafc 100%);
    padding: 1.5rem 1.75rem 1.1rem;
    display: flex;
    flex-direction: column;
    min-height: 520px;
}
.tour-progress {
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 3px;
    background: rgba(15, 23, 42, .08);
}
.tour-progress > i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #0f172a, #0284c7);
    transition: width .25s ease;
}
.tour-slide { display: none; flex: 1; animation: tourIn .28s ease; }
.tour-slide.is-active { display: block; }
@keyframes tourIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
.tour-slide-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: .65rem;
}
.tour-eyebrow {
    margin: 0;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #0369a1;
}
.tour-kicker {
    margin: 0;
    font-size: .75rem;
    font-weight: 700;
    color: #64748b;
}
.tour-headline {
    margin: 0 0 1rem;
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1.2;
    color: #0f172a;
    font-weight: 800;
    max-width: 18ch;
}
.tour-copy {
    max-width: 54ch;
    font-size: 1rem;
    line-height: 1.65;
    color: #334155;
}
.tour-points {
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: .55rem;
    max-width: 52ch;
}
.tour-points li {
    position: relative;
    padding: .7rem .85rem .7rem 2rem;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 600;
    color: #1e293b;
}
.tour-points li::before {
    content: '';
    position: absolute;
    left: .75rem;
    top: 1rem;
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: #0284c7;
}
.tour-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 23, 42, .08);
}
.tour-dots { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: center; }
.tour-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 0;
    background: #cbd5e1;
    padding: 0;
    cursor: pointer;
}
.tour-dot.active { background: #0f172a; transform: scale(1.15); }

@media (max-width: 900px) {
    .tour-stage { grid-template-columns: 1fr; min-height: auto; }
    .tour-rail { display: none; }
    .tour-main { padding: 1.15rem 1rem 1rem; min-height: 420px; }
    .tour-headline { max-width: none; }
}

.prim-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 1rem;
}
.prim-tab {
    display: inline-flex;
    align-items: center;
    padding: .45rem .85rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-muted);
    text-decoration: none;
    font-size: .8125rem;
    font-weight: 700;
}
.prim-tab.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.prim-panel { max-width: 640px; }
.muted { color: var(--text-muted); font-size: .75rem; }
.prim-targets-block { margin-top: 1.25rem; }
.prim-target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .6rem;
}
.prim-target-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .75rem;
}
.prim-target-top {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .5rem;
    font-size: .875rem;
}
.prim-target-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}
.prim-target-bar > span {
    display: block;
    height: 100%;
    background: var(--navy);
    border-radius: 99px;
}
.prim-target-meta {
    margin-top: .45rem;
    font-size: .75rem;
    color: var(--text-muted);
}
.tier-rows { display: grid; gap: .35rem; margin-bottom: .5rem; }

/* Çevrimdışı / zayıf bağlantı şeridi */
.net-banner {
    position: sticky;
    top: 0;
    z-index: 1200;
    background: #9a3412;
    color: #fff7ed;
    font-size: .8125rem;
    font-weight: 600;
    text-align: center;
    padding: .45rem .75rem;
    letter-spacing: .01em;
}
.net-banner.is-visible { display: block; }

.mobile-collapse-panel {
    border: 0;
    margin: 0;
}
.mobile-collapse-panel > summary {
    display: none;
}
.deletion-request-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.deletion-request-row:last-child { border-bottom: 0; }
.deletion-request-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}
.file-chat {
    margin: 1rem 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
}
.file-chat-head {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}
.file-chat-head h3 { margin: 0; font-size: 1rem; }
.file-chat-head p { margin: .2rem 0 0; color: var(--text-muted); font-size: .76rem; }
.customer-communication > summary.file-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    cursor: pointer;
    list-style: none;
}
.customer-communication > summary.file-chat-head::-webkit-details-marker { display: none; }
.customer-communication > summary.file-chat-head::after {
    content: 'Aç';
    flex: 0 0 auto;
    color: #1d4ed8;
    font-size: .78rem;
    font-weight: 700;
}
.customer-communication[open] > summary.file-chat-head::after { content: 'Kapat'; }
.customer-communication:not([open]) > summary.file-chat-head { border-bottom: 0; }
.customer-communication .file-chat-head {
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
}
.customer-msg-panel.customer-msg-inline {
    margin: 0;
    border: 0;
    border-bottom: 1px solid #fde68a;
    border-radius: 0;
    background: #fffbeb;
}
.customer-msg-inline .customer-msg-summary { padding: .72rem 1rem; }
.customer-msg-inline .customer-msg-body { padding: 0 1rem .8rem; }
.customer-msg-inline .customer-msg-actions { align-items: center; }
.customer-msg-inline .customer-msg-meta { margin: 0 0 0 auto; }
.file-chat-subhead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    padding: .6rem 1rem;
    border-bottom: 1px solid var(--border);
    color: #334155;
    background: #fff;
}
.file-chat-subhead strong { font-size: .82rem; }
.file-chat-subhead span { color: var(--text-muted); font-size: .68rem; }
.file-chat-notice {
    padding: .8rem 1rem;
    border-bottom: 1px solid #fde68a;
    color: #78350f;
    background: #fffbeb;
}
.file-chat-notice strong { display: flex; align-items: center; gap: .35rem; font-size: .82rem; }
.file-chat-notice p { margin: .4rem 0 .2rem; white-space: pre-wrap; font-size: .85rem; }
.file-chat-notice .msg-meta { color: #a16207; font-size: .65rem; }
.file-chat-sla {
    margin: 0;
    border-width: 0 0 1px;
    border-radius: 0;
    font-weight: 700;
}
.file-chat-list {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    min-height: 10rem;
    max-height: min(28rem, 52vh);
    padding: .85rem .75rem;
    overflow-y: auto;
    background:
        radial-gradient(circle at 12% 18%, rgba(14,165,233,.08), transparent 42%),
        radial-gradient(circle at 88% 78%, rgba(34,197,94,.07), transparent 40%),
        #eef2f7;
}
.file-chat-message {
    width: fit-content;
    max-width: min(82%, 36rem);
    padding: .55rem .75rem .4rem;
    border-radius: 14px 14px 14px 4px;
    background: #fff;
    border: 1px solid rgba(15,23,42,.06);
    box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.file-chat-message.is-own {
    align-self: flex-end;
    border-color: transparent;
    border-radius: 14px 14px 4px 14px;
    background: #dcf8c6;
}
.file-chat-message.is-other {
    background: #fff;
}
.file-chat-message p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.4; }
.file-chat-message .file-chat-meta,
.file-chat-message > span {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .35rem;
    margin-top: .28rem;
    color: var(--text-muted);
    font-size: .62rem;
}
.file-chat-who { margin-right: auto; }
.file-chat-ticks {
    letter-spacing: -.08em;
    color: #94a3b8;
    font-size: .7rem;
}
.file-chat-ticks.is-read { color: #38bdf8; }
.file-chat-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    margin-left: .35rem;
    padding: 0 .3rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    vertical-align: middle;
    animation: message-heartbeat 1.45s ease-in-out infinite;
}
.file-chat.has-unread-chat .file-chat-subhead strong {
    color: #b91c1c;
}
.file-chat.chat-pulse {
    box-shadow: 0 0 0 0 rgba(34,197,94,.45);
    animation: chat-incoming-pulse .9s ease-out;
}
@keyframes chat-incoming-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); }
    70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.file-chat-empty {
    margin: auto;
    color: var(--text-muted);
    font-size: .8rem;
    text-align: center;
}
.file-chat-verify-form {
    padding: 1rem;
    background: #fff7ed;
    border-bottom: 1px solid #fed7aa;
}
.file-chat-verify-form p {
    margin: 0 0 .65rem;
    color: #9a3412;
    font-size: .8rem;
}
.file-chat-verify-form > div {
    display: grid;
    grid-template-columns: minmax(8rem, 1fr) auto;
    gap: .55rem;
}
.file-chat-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .55rem;
    padding: .75rem;
    border-top: 1px solid var(--border);
}
.file-chat-input { min-height: 2.7rem; max-height: 7rem; resize: vertical; }
.message-inbox {
    display: grid;
    gap: .65rem;
}
.message-inbox-row {
    display: grid;
    grid-template-columns: .65rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .8rem;
    padding: .9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
}
.message-inbox-row:hover { border-color: var(--accent); }
.message-inbox-row.is-unread { border-color: #fca5a5; background: #fffafa; }
.message-inbox-dot {
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: #cbd5e1;
}
.message-inbox-row.is-unread .message-inbox-dot { background: #ef4444; }
.message-inbox-row.is-overdue { border-color: #ef4444; background: #fff7f7; }
.message-inbox-overdue { color: #b91c1c; }
.message-inbox-main { min-width: 0; }
.message-inbox-main strong,
.message-inbox-main small,
.message-inbox-main > span { display: block; }
.message-inbox-main small { margin-top: .12rem; color: var(--text-muted); }
.message-inbox-main > span {
    margin-top: .35rem;
    overflow: hidden;
    color: #475569;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.message-inbox-meta {
    display: grid;
    justify-items: end;
    gap: .35rem;
    color: var(--text-muted);
    font-size: .7rem;
}
.message-inbox-meta b {
    padding: .2rem .45rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
}
@media (max-width: 820px) {
    .mobile-collapse-panel {
        margin: .75rem 0;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--surface);
        overflow: hidden;
    }
    .mobile-collapse-panel > summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
        padding: .85rem 1rem;
        cursor: pointer;
        font-weight: 700;
        list-style: none;
        color: var(--text);
    }
    .mobile-collapse-panel > summary::-webkit-details-marker { display: none; }
    .mobile-collapse-panel > summary::after {
        content: 'Aç';
        color: var(--accent);
        font-size: .78rem;
        font-weight: 700;
    }
    .mobile-collapse-panel[open] > summary::after { content: 'Kapat'; }
    .mobile-collapse-panel > .grant-panel,
    .mobile-collapse-panel > .upload-section,
    .mobile-collapse-panel > .doc-grid,
    .mobile-collapse-panel > .empty-state {
        margin: 0;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
    }
    .mobile-collapse-panel > .doc-grid {
        padding: .75rem;
    }
    .deletion-request-row {
        align-items: stretch;
        flex-direction: column;
    }
    .deletion-request-actions .btn { flex: 1 1 auto; }
    .customer-msg-inline .customer-msg-meta { width: 100%; margin-left: 0; }
    .file-chat-subhead { align-items: flex-start; flex-direction: column; gap: .12rem; }
    .file-chat-form { grid-template-columns: 1fr; }
    .file-chat-verify-form > div { grid-template-columns: 1fr; }
    .file-chat-message { max-width: 92%; }
    .message-inbox-row { grid-template-columns: .5rem minmax(0, 1fr); }
    .message-inbox-meta {
        grid-column: 2;
        grid-auto-flow: column;
        justify-content: space-between;
        justify-items: start;
    }
}

.app-update-banner {
    position: sticky;
    top: 0;
    z-index: 1300;
    background: linear-gradient(90deg, #0f4c81 0%, #1d4ed8 55%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .18);
}
.app-update-banner[hidden] { display: none !important; }
.app-update-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    padding: .7rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
}
.app-update-text {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: min(100%, 16rem);
}
.app-update-text strong {
    font-size: .95rem;
    letter-spacing: .01em;
}
.app-update-text span {
    font-size: .82rem;
    opacity: .92;
}
.app-update-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.app-update-actions button {
    appearance: none;
    border: 0;
    border-radius: 8px;
    padding: .45rem .85rem;
    font: inherit;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255,255,255,.16);
    color: #fff;
}
.app-update-actions button:hover { background: rgba(255,255,255,.24); }
.app-update-actions button.primary {
    background: #fff;
    color: #1e3a8a;
}
.app-update-changelog {
    border-top: 1px solid rgba(255,255,255,.22);
    padding: .65rem 1rem .85rem;
    max-width: 1100px;
    margin: 0 auto;
    font-size: .86rem;
}
.app-update-changelog[hidden] { display: none !important; }
.app-update-changelog h5 {
    margin: 0 0 .35rem;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    opacity: .85;
}
.app-update-changelog ul {
    margin: 0 0 .65rem;
    padding-left: 1.1rem;
}
.app-update-changelog li { margin: .15rem 0; }
@media (max-width: 640px) {
    .app-update-inner { padding: .75rem .85rem; }
    .app-update-actions { width: 100%; }
    .app-update-actions button { flex: 1 1 auto; }
}

/* Müşteri mesajı ve bildirim zili */
.android-app-dl {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    color: #a7f3d0;
    text-decoration: none;
    flex-shrink: 0;
}
.android-app-dl:hover {
    background: rgba(16, 185, 129, .18);
    color: #ecfdf5;
    border-color: rgba(52, 211, 153, .45);
}
.android-app-dl-icon { display: block; }
.message-indicator {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 1.08rem;
}
.message-indicator:hover { background: rgba(255,255,255,.08); }
.message-indicator-dot {
    position: absolute;
    top: .18rem;
    right: .18rem;
    width: .58rem;
    height: .58rem;
    border: 2px solid var(--navy);
    border-radius: 50%;
    background: #ef4444;
}
.message-indicator.has-unread {
    animation: message-heartbeat 1.45s ease-in-out infinite;
}
.message-indicator.msg-pulse-once {
    animation: message-heartbeat .9s ease-in-out 2;
}
.message-indicator-dot.is-count {
    top: -.1rem;
    right: -.15rem;
    width: auto;
    min-width: .95rem;
    height: .95rem;
    padding: 0 .22rem;
    border-width: 1.5px;
    font-size: .58rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.message-indicator.has-overdue {
    border-color: rgba(239,68,68,.55);
}
@keyframes message-heartbeat {
    0%, 45%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239,68,68,0); }
    12% { transform: scale(1.1); box-shadow: 0 0 0 4px rgba(239,68,68,.2); }
    24% { transform: scale(1.03); box-shadow: 0 0 0 7px rgba(239,68,68,0); }
    32% { transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
    .message-indicator.has-unread,
    .message-indicator.msg-pulse-once,
    .file-chat-unread-badge { animation: none; }
}
.portal-push-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 0 0 1rem;
    padding: .85rem 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    color: #e2e8f0;
}
.portal-push-copy { flex: 1 1 12rem; }
.portal-push-copy strong { display: block; font-size: .92rem; color: #fff; }
.portal-push-copy p { margin: .25rem 0 0; font-size: .78rem; color: #cbd5e1; line-height: 1.35; }
.portal-push-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.portal-push-actions .btn-ghost { color: #e2e8f0; border-color: rgba(255,255,255,.25); }
.portal-notify-optin {
    margin: 1rem 0 1.15rem;
    padding: .9rem 1rem;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    background: #f8fafc;
}
.portal-notify-optin strong { display: block; color: var(--navy, #0f172a); margin-bottom: .35rem; }
.portal-notify-optin > p { margin: 0 0 .65rem; font-size: .8125rem; color: var(--text-muted, #64748b); line-height: 1.4; }
.portal-notify-check { font-size: .9rem; font-weight: 600; }
.portal-notify-hint { margin: .55rem 0 0; font-size: .75rem; color: #b45309; line-height: 1.35; }
.portal-push-status,
.portal-push-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin: 0 0 1rem;
    padding: .75rem .9rem;
    border-radius: 12px;
    border: 1px solid var(--border, #e2e8f0);
    font-size: .8125rem;
    background: #fff;
    flex-wrap: wrap;
}
.portal-push-card-main { flex: 1 1 220px; min-width: 0; }
.portal-push-card-head {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .25rem;
    flex-wrap: wrap;
}
.portal-push-state {
    display: inline-block;
    padding: .12rem .45rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .02em;
    background: #e2e8f0;
    color: #334155;
}
.portal-push-title { font-weight: 700; color: #0f172a; }
.portal-push-detail { margin: 0; color: #475569; line-height: 1.35; }
.portal-push-wa-note {
    margin: .4rem 0 0;
    font-size: .72rem;
    color: #64748b;
    line-height: 1.35;
}
.portal-push-status.is-on,
.portal-push-card.is-on { border-color: #86efac; background: #f0fdf4; }
.portal-push-card.is-on .portal-push-state { background: #166534; color: #fff; }
.portal-push-status.is-off,
.portal-push-card.is-off { border-color: #e2e8f0; color: #475569; }
.portal-push-card.is-setup { border-color: #fcd34d; background: #fffbeb; }
.portal-push-card.is-setup .portal-push-state { background: #b45309; color: #fff; }
.portal-push-status-actions { display: inline-flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.pwa-install-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.pwa-install-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
}
.pwa-install-panel {
    position: relative;
    width: min(420px, 100%);
    margin: 0;
    padding: 1.25rem 1.15rem calc(1.25rem + var(--safe-bottom, 0px));
    border-radius: 16px 16px 0 0;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 -12px 40px rgba(15, 23, 42, .25);
}
@media (min-width: 640px) {
    .pwa-install-modal { align-items: center; }
    .pwa-install-panel {
        border-radius: 14px;
        margin: 1rem;
        padding-bottom: 1.25rem;
    }
}
.pwa-install-panel h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.pwa-install-panel > p { margin: 0 0 1rem; font-size: .875rem; color: #475569; line-height: 1.45; }
.pwa-install-steps {
    margin: 0 0 1.1rem;
    padding-left: 1.15rem;
    font-size: .875rem;
    color: #334155;
    line-height: 1.5;
}
.pwa-install-steps li { margin-bottom: .45rem; }
.pwa-install-actions { display: flex; flex-direction: column; gap: .5rem; }
body.pwa-install-open { overflow: hidden; }
.notif-wrap { position: relative; display: inline-flex; align-items: center; }
.notif-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    background: transparent;
    color: #e2e8f0;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
}
.notif-bell:hover { background: rgba(255,255,255,.08); color: #fff; }
.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 .25rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Panel her zaman viewport'a fixed — JS ile konumlanır (kayma yok) */
.notif-panel {
    position: fixed;
    left: 50%;
    top: 64px;
    right: auto;
    bottom: auto;
    width: min(360px, calc(100vw - 1.25rem));
    max-height: min(70vh, calc(100dvh - 5.5rem));
    margin: 0;
    transform: translateX(-50%);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: #fff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(15, 23, 42, .28);
    z-index: 1400;
    box-sizing: border-box;
}
.notif-panel[hidden] { display: none !important; }
.notif-panel.is-anchored {
    left: auto;
    right: auto;
    transform: none;
}
.notif-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .35);
    z-index: 1350;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
}
.notif-backdrop[hidden] { display: none !important; }
.notif-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    padding: .75rem .9rem;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: .875rem;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.notif-panel-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.notif-panel-actions .btn {
    font-size: .75rem;
    padding: .3rem .55rem;
}
#notifMarkAllBtn[hidden] { display: none !important; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-item {
    display: block;
    padding: .75rem .9rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
}
.notif-item:hover { background: #f8fafc; }
.notif-item.is-unread { background: #eff6ff; }
.notif-item-title { font-size: .8125rem; font-weight: 600; margin: 0 0 .2rem; word-break: break-word; }
.notif-item-body { font-size: .75rem; color: #64748b; margin: 0; word-break: break-word; }
.notif-item-time { font-size: .65rem; color: #94a3b8; margin-top: .25rem; }
.notif-empty { padding: 1.25rem .85rem; text-align: center; color: #94a3b8; font-size: .8125rem; }
body.notif-open { overflow: hidden; }
.notif-push-banner {
    position: sticky;
    bottom: 0;
    z-index: 1100;
    margin: .75rem;
    padding: .85rem 1rem;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 28px rgba(15,23,42,.25);
}
.notif-push-banner p { margin: 0; font-size: .8125rem; flex: 1 1 180px; }
.notif-push-copy { flex: 1 1 200px; }
.notif-push-copy strong { display: block; font-size: .875rem; margin-bottom: .25rem; }
.notif-push-copy p { margin: 0; font-size: .8125rem; color: #cbd5e1; }
.notif-push-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
@media (max-width: 640px) {
    .notif-push-banner {
        margin: .5rem;
        padding: .75rem;
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
    }
    .notif-push-actions { width: 100%; }
    .notif-push-actions .btn { flex: 1; min-height: 2.5rem; }
}

/* Mobil / tablet uyumluluk katmanı */
:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --mobile-nav-height: 3.75rem;
}
html { min-height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
}
img, video, canvas, svg { max-width: 100%; }
.topbar {
    min-height: calc(56px + var(--safe-top));
    padding-top: var(--safe-top);
    padding-left: max(1rem, var(--safe-left));
    padding-right: max(1rem, var(--safe-right));
}
.main-content {
    padding-left: max(1rem, var(--safe-left));
    padding-right: max(1rem, var(--safe-right));
}
.portal-wrap {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    padding-left: max(1rem, var(--safe-left));
    padding-right: max(1rem, var(--safe-right));
}
.portal-top > div { min-width: 0; }
.portal-top h1,
.portal-top p { overflow-wrap: anywhere; }
.login-page,
.portal-page {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
}
.wa-app-panel,
.upload-source-panel {
    max-height: calc(100vh - var(--safe-top) - var(--safe-bottom) - 1rem);
    max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 1rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: max(1rem, var(--safe-bottom));
}
.office-print-modal,
.print-modal,
[role="dialog"] {
    max-height: calc(100vh - var(--safe-top) - var(--safe-bottom) - 1rem);
    max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 1rem);
}
.file-tool-grid > *,
.file-header-left > *,
.file-header-right > * { min-width: 0; }
.info-edit-form .form-row-2 { min-width: 0; }
.doc-name {
    white-space: normal;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.doc-cat, .doc-meta, .doc-open-link { font-size: max(.75rem, 12px); }
.doc-open-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.25rem;
    padding: .25rem 0;
}

@media (pointer: coarse) {
    .btn-sm,
    .kanban-card > .btn,
    .file-row .btn,
    .sort-btn,
    .notif-bell,
    .message-indicator,
    .android-app-dl,
    .file-tool-btn,
    .file-critical-btn { min-height: 44px; }
    .sort-btn,
    .notif-bell,
    .message-indicator,
    .android-app-dl { min-width: 44px; }
    .doc-open-link { min-height: 44px; }
}

@media (max-width: 900px) {
    input,
    select,
    textarea,
    .form-input,
    .quick-search-input,
    .wa-template-select,
    .status-select { font-size: 16px !important; }
}

@media (max-width: 640px) {
    body { padding-bottom: calc(var(--mobile-nav-height) + var(--safe-bottom)); }
    .main-content {
        padding-left: max(.75rem, var(--safe-left));
        padding-right: max(.75rem, var(--safe-right));
    }
    .portal-wrap {
        padding-left: max(.75rem, var(--safe-left));
        padding-right: max(.75rem, var(--safe-right));
    }
    .portal-top {
        align-items: stretch;
        flex-direction: column;
    }
    .portal-top > .btn { align-self: flex-start; }
    .info-edit-form .form-row-2 { grid-template-columns: 1fr; }
    .file-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .btn.file-tool-btn {
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .notif-panel {
        top: calc(var(--safe-top) + .5rem);
        max-height: calc(100dvh - var(--safe-top) - var(--mobile-nav-height) - var(--safe-bottom) - 1rem);
    }
    .notif-push-banner {
        bottom: calc(var(--mobile-nav-height) + var(--safe-bottom));
        left: max(0px, var(--safe-left));
        right: max(0px, var(--safe-right));
    }
    .cookie-banner {
        bottom: calc(var(--mobile-nav-height) + var(--safe-bottom));
        padding-left: max(.85rem, var(--safe-left));
        padding-right: max(.85rem, var(--safe-right));
    }
}

@media (max-width: 350px) {
    .file-tool-grid { grid-template-columns: 1fr; }
    .file-critical-actions { flex-direction: column; }
    .btn.file-critical-btn { width: 100%; }
}

@media (orientation: landscape) and (max-height: 520px) {
    .wa-app-sheet,
    .upload-source-sheet { align-items: center; }
    .wa-app-panel,
    .upload-source-panel {
        max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - .5rem);
        border-radius: 12px;
        margin: .25rem;
    }
}

.mobile-more-menu { display: none; }
.mobile-more-menu[hidden] { display: none !important; }
.kanban-touch-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .35rem;
    padding: .4rem .55rem .55rem;
}
.kanban-touch-status {
    min-height: 40px;
    padding: .4rem .45rem;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: .68rem;
    font-weight: 700;
    cursor: pointer;
}
.kanban-touch-actions > :only-child { grid-column: 1 / -1; }

.admin-table-wrap,
.table-wrap,
.responsive-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}
.data-table,
.admin-table,
.report-table,
.table-wrap > table,
.admin-table-wrap > table {
    width: 100%;
    border-collapse: collapse;
}

@media (max-width: 640px) {
    .bottom-nav {
        min-height: calc(var(--mobile-nav-height) + var(--safe-bottom));
        padding: .35rem max(.35rem, var(--safe-right)) calc(.35rem + var(--safe-bottom)) max(.35rem, var(--safe-left));
        justify-content: stretch;
    }
    .bottom-nav a,
    .bottom-nav-more {
        flex: 1 1 0;
        min-width: 0;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 8px;
        color: #94a3b8;
        background: transparent;
        font: inherit;
        font-size: .68rem;
        font-weight: 700;
        cursor: pointer;
        text-decoration: none;
    }
    .bottom-nav a.active,
    .bottom-nav-more.active,
    .bottom-nav-more[aria-expanded="true"] {
        color: #fff;
        background: rgba(255,255,255,.1);
    }
    .mobile-more-menu {
        position: fixed;
        inset: 0;
        z-index: 1600;
        display: block;
    }
    .mobile-more-backdrop {
        position: absolute;
        inset: 0;
        border: 0;
        padding: 0;
        background: rgba(15,23,42,.52);
    }
    .mobile-more-panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        max-height: min(72dvh, calc(100dvh - var(--safe-top) - 1rem));
        padding-bottom: calc(.4rem + var(--safe-bottom));
        padding-left: var(--safe-left);
        padding-right: var(--safe-right);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 16px 16px 0 0;
        background: #fff;
        box-shadow: 0 -18px 48px rgba(15,23,42,.25);
        transform: none;
    }
    .mobile-more-head {
        position: sticky;
        top: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: .85rem 1rem;
        border-bottom: 1px solid var(--border);
        background: #fff;
    }
    .mobile-more-close {
        width: 44px;
        height: 44px;
        border: 0;
        border-radius: 9px;
        color: #475569;
        background: #f1f5f9;
        font-size: 1.5rem;
    }
    .mobile-more-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: .5rem;
        padding: .8rem;
    }
    .mobile-more-links a {
        min-height: 52px;
        display: flex;
        align-items: center;
        padding: .7rem .8rem;
        border: 1px solid var(--border);
        border-radius: 10px;
        color: #334155;
        background: #f8fafc;
        font-weight: 700;
        text-decoration: none;
    }
    .mobile-more-links a.active {
        color: #1d4ed8;
        border-color: #93c5fd;
        background: #eff6ff;
    }
    body.mobile-more-open { overflow: hidden; }
    .admin-table-wrap,
    .table-wrap,
    .responsive-table-wrap {
        position: relative;
        padding: .65rem;
        scrollbar-width: thin;
    }
    .admin-table-wrap > table,
    .table-wrap > table,
    .responsive-table-wrap > table,
    .data-table,
    .admin-table { min-width: 640px; }
    .admin-table-wrap::after,
    .table-wrap::after,
    .responsive-table-wrap::after {
        content: 'Tabloyu sağa kaydırabilirsiniz';
        position: sticky;
        left: 0;
        display: block;
        width: max-content;
        margin-top: .4rem;
        color: var(--text-muted);
        font-size: .65rem;
    }
    .report-table th,
    .report-table td { overflow-wrap: anywhere; }
    .doc-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }
}

@media (pointer: coarse) {
    .kanban-card { cursor: default; }
    .kanban-touch-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .35rem;
        padding: .4rem .55rem .55rem;
    }
    .kanban-touch-status {
        min-height: 44px;
        padding: .4rem .45rem;
        border: 1px solid #93c5fd;
        border-radius: 8px;
        color: #1d4ed8;
        background: #eff6ff;
        font-size: .68rem;
        font-weight: 700;
    }
    .kanban-touch-actions > :only-child { grid-column: 1 / -1; }
}

/* Smart tracking — SLA, work queue, docs checklist */
.stuck-badge {
    display: inline-flex;
    align-items: center;
    padding: .12rem .45rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .02em;
    color: #9f1239;
    background: #ffe4e6;
    border: 1px solid #fecdd3;
    white-space: nowrap;
}
.stuck-count { color: #be123c; }
.file-row.is-stuck,
.kanban-card.is-stuck {
    box-shadow: inset 3px 0 0 #e11d48;
    background: #fff7f8;
}
.kanban-card.is-stuck .card-file-no { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }

.work-queue {
    margin: 0 0 .75rem;
    padding: .55rem .7rem .6rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
.work-queue-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .55rem;
    margin-bottom: .4rem;
}
.work-queue-summary {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: .4rem;
}
.wq-sum {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .12rem .5rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: .72rem;
    font-weight: 700;
    color: #334155;
    line-height: 1.3;
}
.wq-sum strong { font-weight: 800; }
.wq-sum.work-queue-stuck { border-color: #fecdd3; color: #9f1239; background: #fff1f2; }
.wq-sum.work-queue-missing_docs { border-color: #fde68a; color: #9a3412; background: #fffbeb; }
.wq-sum.work-queue-message { border-color: #bfdbfe; color: #1e40af; background: #eff6ff; }
.wq-sum.work-queue-ready_notify { border-color: #bbf7d0; color: #166534; background: #f0fdf4; }
.compact-more {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #1d4ed8;
    font: inherit;
    font-size: .75rem;
    font-weight: 700;
    padding: .1rem .15rem;
    cursor: pointer;
    white-space: nowrap;
}
.work-queue:not(.is-expanded) .work-queue-box.is-extra,
.recent-rail:not(.is-expanded) .recent-chip.is-extra { display: none; }
.work-queue-head h2 {
    margin: 0;
    font-size: 1rem;
    color: var(--navy);
}
.work-queue-lead {
    margin: .2rem 0 0;
    font-size: .75rem;
    color: var(--text-muted);
}
.work-queue-count {
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}
.work-queue-groups {
    display: grid;
    gap: .7rem;
}
.work-queue-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.work-queue-box {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: .35rem;
    width: auto;
    min-height: 0;
    padding: .22rem .5rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    text-decoration: none;
    color: inherit;
    box-shadow: none;
}
.work-queue-box:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}
.work-queue-box strong {
    font-size: .86rem;
    font-weight: 800;
    letter-spacing: .01em;
    color: var(--navy);
    line-height: 1.2;
}
.work-queue-box b {
    align-self: flex-start;
    font-size: .68rem;
    font-weight: 750;
    padding: .18rem .45rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
}
.work-queue-message .work-queue-box { border-color: #bfdbfe; }
.work-queue-stuck .work-queue-box { border-color: #fecdd3; }
.work-queue-ready_notify .work-queue-box { border-color: #bbf7d0; }
.work-queue-missing_docs .work-queue-box { border-color: #fde68a; }
.work-queue-message .work-queue-box b { background: #dbeafe; color: #1e40af; }
.work-queue-stuck .work-queue-box b { background: #ffe4e6; color: #9f1239; }
.work-queue-ready_notify .work-queue-box b { background: #dcfce7; color: #166534; }
.work-queue-missing_docs .work-queue-box b { background: #ffedd5; color: #9a3412; }
.work-queue-group-head {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .35rem;
}
.work-queue-group-label {
    font-size: .78rem;
    font-weight: 700;
    color: #334155;
}
.work-queue-group-count {
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 .35rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-size: .68rem;
    font-weight: 800;
    background: #e2e8f0;
    color: #334155;
}
.work-queue-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}
.work-queue-chip {
    display: inline-flex;
    flex-direction: column;
    gap: .05rem;
    max-width: 11.5rem;
    padding: .35rem .55rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    text-decoration: none;
    color: inherit;
    line-height: 1.2;
}
.work-queue-chip:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}
.work-queue-chip strong {
    font-size: .8rem;
    font-weight: 750;
    color: var(--navy);
    white-space: nowrap;
}
.work-queue-chip span {
    font-size: .65rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.work-queue-stuck .work-queue-group-label { color: #be123c; }
.work-queue-stuck .work-queue-group-count { background: #ffe4e6; color: #9f1239; }
.work-queue-stuck .work-queue-chip { border-color: #fecdd3; }
.work-queue-missing_docs .work-queue-group-label { color: #b45309; }
.work-queue-missing_docs .work-queue-group-count { background: #ffedd5; color: #9a3412; }
.work-queue-missing_docs .work-queue-chip { border-color: #fde68a; }
.work-queue-message .work-queue-group-label { color: #1d4ed8; }
.work-queue-message .work-queue-group-count { background: #dbeafe; color: #1e40af; }
.work-queue-message .work-queue-chip { border-color: #bfdbfe; }
.work-queue-ready_notify .work-queue-group-label { color: #15803d; }
.work-queue-ready_notify .work-queue-group-count { background: #dcfce7; color: #166534; }
.work-queue-ready_notify .work-queue-chip { border-color: #bbf7d0; }

@keyframes workAlertPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, .5); }
    50% { box-shadow: 0 0 0 8px rgba(225, 29, 72, 0); }
}
@keyframes workAlertPulseAmber {
    0%, 100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, .5); }
    50% { box-shadow: 0 0 0 8px rgba(217, 119, 6, 0); }
}
@media (max-width: 768px) {
    .work-queue.has-alert {
        border-color: #fb7185;
        animation: workAlertPulse 1.35s ease-in-out infinite;
    }
    .work-queue.has-alert .work-queue-head h2 {
        color: #9f1239;
    }
    .work-queue.has-alert .work-queue-count {
        background: #e11d48;
        color: #fff;
        border-radius: 999px;
        padding: .15rem .55rem;
    }
    .work-queue-stuck .work-queue-group-head,
    .work-queue-missing_docs .work-queue-group-head {
        display: inline-flex;
        width: fit-content;
        border-radius: 999px;
        padding: .12rem .5rem .12rem .15rem;
    }
    .work-queue-stuck .work-queue-group-head {
        background: #ffe4e6;
        animation: workAlertPulse 1.35s ease-in-out infinite;
    }
    .work-queue-missing_docs .work-queue-group-head {
        background: #ffedd5;
        animation: workAlertPulseAmber 1.35s ease-in-out infinite;
    }
}
@media (prefers-reduced-motion: reduce) {
    .work-queue.has-alert,
    .work-queue-stuck .work-queue-group-head,
    .work-queue-missing_docs .work-queue-group-head {
        animation: none;
    }
}

.status-busy-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(15, 23, 42, .38);
    display: grid;
    place-items: center;
    padding: 1rem;
}
.status-busy-overlay[hidden] { display: none !important; }
.status-busy-card {
    min-width: min(18rem, 92vw);
    display: grid;
    justify-items: center;
    gap: .45rem;
    padding: 1.1rem 1.25rem;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .22);
    text-align: center;
}
.status-busy-card strong { color: var(--navy, #0f172a); font-size: 1rem; }
.status-busy-msg { font-size: .8rem; color: #64748b; }
.status-busy-parts {
    position: relative;
    width: 3.5rem;
    height: 3.5rem;
}
.status-busy-part {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    animation: statusPartCycle 5.6s linear infinite;
}
.status-busy-part svg {
    width: 3.5rem;
    height: 3.5rem;
    color: #1d4ed8;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.status-busy-part svg .fill {
    fill: currentColor;
    stroke: none;
}
.status-busy-part em { display: none !important; }
.status-busy-part:nth-child(1) { animation-delay: 0s; }
.status-busy-part:nth-child(2) { animation-delay: .7s; }
.status-busy-part:nth-child(3) { animation-delay: 1.4s; }
.status-busy-part:nth-child(4) { animation-delay: 2.1s; }
.status-busy-part:nth-child(5) { animation-delay: 2.8s; }
.status-busy-part:nth-child(6) { animation-delay: 3.5s; }
.status-busy-part:nth-child(7) { animation-delay: 4.2s; }
.status-busy-part:nth-child(8) { animation-delay: 4.9s; }
@keyframes statusPartCycle {
    0% { opacity: 0; }
    1.5%, 12.5% { opacity: 1; }
    14%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .status-busy-part { animation: none; opacity: 0; }
    .status-busy-part:first-child { opacity: 1; }
}
.status-mobile-btn.is-saving,
.status-step.is-saving,
.kanban-touch-status.is-saving {
    opacity: .7;
    pointer-events: none;
}
.kanban-card.is-saving {
    opacity: .65;
    outline: 2px dashed #2563eb;
}
body.status-busy { cursor: wait; }

.workshop-home {
    margin: 0 0 1.1rem;
    padding: .9rem 1rem;
    border: 1px solid #fdba74;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff7ed, #fff);
}
.workshop-home-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .65rem;
}
.workshop-home-head h2 {
    margin: 0;
    font-size: 1rem;
    color: #9a3412;
}
.workshop-home-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.workshop-home-chip {
    display: inline-flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 7.5rem;
    padding: .55rem .75rem;
    border-radius: 10px;
    border: 1px solid #fdba74;
    background: #fff;
    text-decoration: none;
    color: inherit;
}
.workshop-home-chip:hover {
    border-color: #ea580c;
    background: #fff7ed;
}
.workshop-home-chip strong {
    font-size: .9rem;
    font-weight: 750;
    color: #9a3412;
}
.workshop-home-chip span {
    font-size: .7rem;
    color: #c2410c;
}
.stage-visibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .25rem .75rem;
}

.docs-checklist {
    margin: 0 0 1rem;
    padding: .85rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}
.docs-checklist-warn {
    border-color: #fcd34d;
    background: #fffbeb;
}
.docs-checklist-ok {
    border-color: #86efac;
    background: #f0fdf4;
}
.docs-checklist-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .55rem;
}
.docs-checklist-head h3 { margin: 0; font-size: .95rem; color: var(--navy); }
.docs-checklist-head span { font-size: .78rem; font-weight: 700; color: var(--text-muted); }
.docs-checklist-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .35rem;
}
.docs-checklist-list li {
    display: grid;
    grid-template-columns: 1.25rem 1fr auto;
    gap: .5rem;
    align-items: center;
    font-size: .875rem;
}
.docs-check-mark {
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: .7rem;
    font-weight: 800;
}
.docs-checklist-list .is-done .docs-check-mark { background: #16a34a; color: #fff; }
.docs-checklist-list .is-missing .docs-check-mark { background: #e11d48; color: #fff; }
.docs-checklist-list em { font-style: normal; font-size: .72rem; color: var(--text-muted); }
.docs-checklist-actions { margin: .7rem 0 0; }

/* —— Wave 2: arama / özet / filtre / atölye / haftalık —— */
.top-search-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 80;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
    max-height: 320px;
    overflow: auto;
    padding: .35rem;
}
.top-search-suggest-item {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .55rem .7rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}
.top-search-suggest-item:hover,
.top-search-suggest-item:focus {
    background: #f1f5f9;
    outline: none;
}
.top-search-suggest-item strong {
    font-size: .9rem;
    color: var(--navy, #0f172a);
}
.top-search-suggest-item .suggest-meta {
    font-size: .75rem;
    color: var(--text-muted, #64748b);
}

.recent-rail {
    margin: 0 0 .7rem;
    padding: .5rem .7rem .55rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.recent-rail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .35rem;
}
.recent-rail-head h2 {
    margin: 0;
    font-size: .95rem;
    color: var(--navy, #0f172a);
}
.recent-rail-list {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.recent-chip {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: .35rem;
    padding: .22rem .55rem;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.advisor-report {
    margin: 0 0 .75rem;
    padding: .55rem .7rem .65rem;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    background: #fff;
}
.advisor-report h2 {
    margin: 0 0 .4rem;
    font-size: .95rem;
    color: var(--navy, #0f172a);
}
.advisor-report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .45rem;
}
.advisor-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: .45rem .6rem .5rem;
    background: #f8fafc;
}
.advisor-card-name {
    font-size: .82rem;
    font-weight: 750;
    color: var(--navy, #0f172a);
    margin-bottom: .28rem;
}
.advisor-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: .28rem;
}
.advisor-metric {
    font-size: .7rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: .1rem .45rem;
    color: #334155;
}
.advisor-metric strong { font-weight: 800; }
.advisor-metric.is-alert { border-color: #fecdd3; color: #9f1239; background: #fff1f2; }
.advisor-status-line {
    margin: .32rem 0 0;
    font-size: .68rem;
    line-height: 1.35;
    color: #64748b;
}
.recent-chip:hover { border-color: #94a3b8; background: #f8fafc; }
.recent-chip strong { font-size: .82rem; color: var(--navy, #0f172a); }
.recent-chip span { font-size: .68rem; color: var(--text-muted, #64748b); }
.recent-empty { font-size: .8rem; }

.smart-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0 0 1rem;
}
.smart-filter-chip {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: .35rem .75rem;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
}
.smart-filter-chip:hover { border-color: #94a3b8; }
.smart-filter-chip.active {
    background: var(--navy, #0f172a);
    border-color: var(--navy, #0f172a);
    color: #fff;
}
.file-row.is-hidden,
.kanban-card.is-hidden { display: none !important; }

/* PC: özet + süreç yan yana; mobilde alt alta (mevcut) */
.file-ops-panel {
    width: 100%;
    flex: 1 1 100%;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin: 0 0 .85rem;
    min-width: 0;
}
.file-ops-panel .file-smart-summary,
.file-ops-panel .status-stepper-wrap {
    margin: 0;
}
.file-smart-summary {
    padding: .85rem 1rem;
    background: linear-gradient(180deg, #f8fafc, #fff);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    min-width: 0;
}
.file-smart-summary-head {
    margin-bottom: .55rem;
}
.file-smart-summary-head strong {
    font-size: .9rem;
    color: var(--navy, #0f172a);
}
.file-smart-summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .45rem;
}
.file-smart-summary-list li {
    display: grid;
    gap: .1rem;
    padding: .45rem .55rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #eef2f7;
    min-width: 0;
}
.file-smart-summary-list li span {
    font-size: .72rem;
    color: var(--text-muted, #64748b);
}
.file-smart-summary-list li strong {
    font-size: .86rem;
    font-weight: 650;
    color: #0f172a;
    overflow-wrap: anywhere;
}
.file-smart-summary-list .tone-warn {
    border-color: #fecaca;
    background: #fff7f7;
}
.file-smart-summary-list .tone-ok {
    border-color: #bbf7d0;
}
.file-smart-summary-list .tone-muted strong {
    color: #64748b;
    font-weight: 500;
}
.one-touch-notify { margin-top: .7rem; }
.one-touch-meta {
    margin: .4rem 0 0;
    font-size: .75rem;
    color: var(--text-muted, #64748b);
}
@media (min-width: 900px) {
    .file-ops-panel.has-both {
        display: grid;
        grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
        align-items: stretch;
        gap: .85rem 1rem;
    }
    .file-ops-panel.has-both .file-smart-summary {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    .file-ops-panel.has-both .one-touch-notify {
        margin-top: auto;
        padding-top: .7rem;
    }
    .file-ops-panel.has-both .status-stepper-wrap {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
    .file-ops-panel.has-both .status-stepper {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        flex: 1;
    }
    /* Sadece özet varken kutular yan yana */
    .file-ops-panel:not(.has-both) .file-smart-summary-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (min-width: 900px) and (max-width: 1100px) {
    .file-ops-panel.has-both {
        grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
    }
    .file-ops-panel.has-both .status-stepper {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .file-ops-panel:not(.has-both) .file-smart-summary-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.workshop-shortcut {
    margin: 0 0 .85rem;
    padding: .9rem 1rem;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 12px;
}
.workshop-shortcut-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .65rem;
}
.workshop-shortcut-head strong { color: #9a3412; font-size: .95rem; }
.workshop-shortcut-head span { font-size: .78rem; color: #c2410c; }
.workshop-shortcut-upload {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-bottom: .55rem;
}
.workshop-file-view {
    margin: 1rem 0 1.5rem;
    display: grid;
    gap: 1.1rem;
}
.workshop-photo-block {
    padding: .9rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}
.workshop-photo-block h2 {
    margin: 0 0 .25rem;
    font-size: 1rem;
    color: var(--navy, #0f172a);
}
.workshop-photo-sub {
    margin: 0 0 .75rem;
    font-size: .78rem;
    color: var(--text-muted, #64748b);
}
.workshop-back { margin: .25rem 0 0; }
body.page-file-workshop .file-header-right {
    width: 100%;
}

.weekly-ops-summary {
    margin: 0 0 1.25rem;
    padding: 1rem 1.1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}
.weekly-ops-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .85rem;
}
.weekly-ops-head h2 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--navy, #0f172a);
}
.weekly-ops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .65rem;
}
.weekly-ops-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: .75rem .8rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.weekly-ops-stat.is-warn {
    border-color: #fecaca;
    background: #fff1f2;
}
.weekly-ops-num {
    font-size: 1.25rem;
    font-weight: 750;
    color: var(--navy, #0f172a);
    line-height: 1.2;
    word-break: break-word;
}
.weekly-ops-label {
    font-size: .72rem;
    color: var(--text-muted, #64748b);
    font-weight: 600;
}
.weekly-ops-hint {
    margin: .75rem 0 0;
    font-size: .82rem;
}
.weekly-ops-hint a { font-weight: 650; }
