/* =====================================================================
   KozDesk Yönetim Paneli 2.2 — tek stil dosyası (docs/07-yonetim-paneli.md §5)
   Kurumsal dil: düz renk, ince çizgi, ölçülü gölge. Degrade, parlama, mor yok.
   ===================================================================== */

:root {
    --brand: #0F2A4A;
    --brand-2: #163659;
    --brand-line: rgba(255, 255, 255, .09);
    --brand-text: #B9C6D8;
    --brand-text-2: #8193AB;
    --accent: #1D5FD6;
    --accent-hover: #174DB0;
    --accent-weak: #E8F0FC;
    --bg: #F4F6F9;
    --surface: #FFFFFF;
    --surface-2: #F8FAFC;
    --line: #E1E6ED;
    --line-2: #EDF0F4;
    --text: #141A23;
    --text-2: #4B5768;
    --text-3: #667085;
    --ok: #0F7A55;
    --ok-weak: #E6F4EE;
    --warn: #A86200;
    --warn-weak: #FBF1E3;
    --danger: #C0302B;
    --danger-hover: #A3261F;
    --danger-weak: #FBEAE9;
    --info: #1D5FD6;
    --info-weak: #E8F0FC;
    --muted: #667085;
    --muted-weak: #EEF1F5;

    --radius: 8px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-pop: 0 8px 24px rgba(16, 24, 40, .14);
    --sidebar-w: 248px;
    --topbar-h: 56px;
    --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    font-variant-numeric: tabular-nums;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--text); }
p { margin: 0 0 8px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
img, svg { display: inline-block; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Yardımcılar ---------- */
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.strong { font-weight: 600; }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; display: inline-block; vertical-align: bottom; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.hidden { display: none !important; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }

/* =====================================================================
   Yerleşim: yan menü + üst çubuk + içerik
   ===================================================================== */
.app { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 40;
    width: var(--sidebar-w);
    background: var(--brand);
    color: var(--brand-text);
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 10px;
    height: var(--topbar-h); padding: 0 18px;
    border-bottom: 1px solid var(--brand-line);
    color: #fff; text-decoration: none; flex-shrink: 0;
}
.sidebar-brand:hover { text-decoration: none; }
.sidebar-brand svg { width: 30px; height: 30px; flex-shrink: 0; }
.sidebar-brand svg rect { stroke: rgba(255, 255, 255, .22); stroke-width: 1; }
.sidebar-brand .brand-name { font-size: 16px; font-weight: 600; letter-spacing: .01em; line-height: 1.15; }
.sidebar-brand .brand-sub { display: block; font-size: 11px; color: var(--brand-text-2); font-weight: 400; }

.sidebar-nav { padding: 10px 10px 16px; flex: 1; }
.nav-group { margin-top: 14px; }
.nav-group:first-child { margin-top: 2px; }
.nav-group-title {
    padding: 0 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em;
    text-transform: uppercase; color: var(--brand-text-2);
}
.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; margin-bottom: 2px; border-radius: var(--radius-sm);
    color: var(--brand-text); font-weight: 500; text-decoration: none;
}
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-link.is-active { background: var(--accent); color: #fff; }
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .9; }
.nav-link .nav-text { flex: 1; min-width: 0; }
.nav-count {
    min-width: 22px; padding: 0 7px; border-radius: 10px;
    background: rgba(255, 255, 255, .12); color: #fff;
    font-size: 11px; font-weight: 600; line-height: 20px; text-align: center;
}
.nav-link.is-active .nav-count { background: rgba(255, 255, 255, .22); }
.nav-count.is-live { background: var(--ok); }

.sidebar-foot {
    padding: 12px 18px 14px; border-top: 1px solid var(--brand-line);
    font-size: 11px; line-height: 1.5; color: var(--brand-text-2);
}

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

.topbar {
    position: sticky; top: 0; z-index: 30;
    height: var(--topbar-h);
    display: flex; align-items: center; gap: 12px;
    padding: 0 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.topbar-toggle {
    display: none; width: 36px; height: 36px; padding: 0;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text-2); cursor: pointer;
    align-items: center; justify-content: center;
}
.topbar-toggle svg { width: 18px; height: 18px; }
.topbar-title { font-size: 15px; font-weight: 600; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-crumb { color: var(--text-3); font-weight: 400; }
.topbar-crumb::after { content: "/"; margin: 0 8px; color: var(--line); }
.topbar .spacer { flex: 1; }

/* Kullanıcı menüsü (details/summary; JS gerekmez) */
.user-menu { position: relative; }
.user-menu > summary {
    list-style: none; display: flex; align-items: center; gap: 10px;
    padding: 4px 8px 4px 4px; border-radius: var(--radius); cursor: pointer;
    border: 1px solid transparent;
}
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover, .user-menu[open] > summary { background: var(--surface-2); border-color: var(--line); }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand); color: #fff; font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.user-menu .user-name { font-weight: 600; font-size: 13px; line-height: 1.2; }
.user-menu .user-role { display: block; font-size: 11px; color: var(--text-3); font-weight: 400; }
.user-menu .chev { width: 14px; height: 14px; color: var(--text-3); }
.user-menu-pop {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 50;
    min-width: 220px; padding: 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-pop);
}
.user-menu-pop .pop-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.user-menu-pop .pop-head .muted { font-size: 12px; word-break: break-all; }
.user-menu-pop a, .user-menu-pop button {
    display: flex; width: 100%; align-items: center; gap: 8px;
    padding: 8px 10px; border: 0; border-radius: var(--radius-sm);
    background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; text-decoration: none;
}
.user-menu-pop a:hover, .user-menu-pop button:hover { background: var(--surface-2); text-decoration: none; }
.user-menu-pop svg { width: 16px; height: 16px; color: var(--text-3); }
.user-menu-pop form { margin: 0; }

.content { padding: 24px; width: 100%; max-width: 1320px; }
.content-narrow { max-width: 880px; }

.nav-backdrop { display: none; }

/* =====================================================================
   Sayfa başlığı
   ===================================================================== */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-header-main { min-width: 0; }
.page-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-3); margin-bottom: 6px; }
.page-back:hover { color: var(--accent); text-decoration: none; }
.page-back svg { width: 14px; height: 14px; }
.page-title { font-size: 22px; line-height: 1.25; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-subtitle { margin-top: 4px; color: var(--text-2); }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-actions form { margin: 0; }

/* =====================================================================
   Bildirim şeridi (flash) ve satır içi uyarı (callout)
   ===================================================================== */
.flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.flash {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 11px 12px 11px 14px; border-radius: var(--radius);
    border: 1px solid; font-weight: 500;
}
.flash svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.flash-body { flex: 1; min-width: 0; }
.flash-body ul { margin: 4px 0 0; padding-left: 18px; font-weight: 400; }
.flash-ok { background: var(--ok-weak); border-color: #BFE3D3; color: var(--ok); }
.flash-error { background: var(--danger-weak); border-color: #F1C4C1; color: var(--danger); }
.flash-warn { background: var(--warn-weak); border-color: #EED5AE; color: var(--warn); }
.flash-info { background: var(--info-weak); border-color: #C7D8F5; color: var(--accent); }
.flash-close {
    border: 0; background: none; color: inherit; cursor: pointer;
    width: 24px; height: 24px; padding: 0; border-radius: 4px; opacity: .75; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.flash-close:hover { opacity: 1; background: rgba(0, 0, 0, .05); }
.flash-close svg { width: 14px; height: 14px; margin: 0; }

.callout { padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); }
.callout strong { color: var(--text); }
.callout.ok { background: var(--ok-weak); border-color: #BFE3D3; color: #0B5E41; }
.callout.warn { background: var(--warn-weak); border-color: #EED5AE; color: #7D4A00; }
.callout.danger { background: var(--danger-weak); border-color: #F1C4C1; color: #8F2420; }
.callout.info { background: var(--info-weak); border-color: #C7D8F5; color: #17469C; }

/* =====================================================================
   Kart
   ===================================================================== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-title { font-size: 15px; font-weight: 600; }
.card-subtitle { font-size: 12px; color: var(--text-3); font-weight: 400; margin-top: 2px; }
.card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-actions form { margin: 0; }
.card-body { padding: 18px; }
.card-footer { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card + .card, .card + .grid-2, .grid-2 + .card, .card + .grid-main, .grid-main + .card, .kpi-grid + .card, .kpi-grid + .grid-main, .kpi-grid + .grid-2 { margin-top: 16px; }
.card .table-wrap { border: 0; border-radius: 0; box-shadow: none; }
.card .card-header + .table-wrap { border-radius: 0; }

/* =====================================================================
   KPI
   ===================================================================== */
.kpi-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.kpi {
    display: block; padding: 16px 18px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
    color: var(--text); text-decoration: none; position: relative;
}
a.kpi:hover { border-color: #C9D3E0; text-decoration: none; }
.kpi::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 2px 2px 0; background: transparent; }
.kpi.ok::before { background: var(--ok); }
.kpi.warn::before { background: var(--warn); }
.kpi.danger::before { background: var(--danger); }
.kpi.info::before { background: var(--accent); }
.kpi-label { font-size: 12px; color: var(--text-3); font-weight: 500; }
.kpi-value { margin-top: 4px; font-size: 26px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi.ok .kpi-value { color: var(--ok); }
.kpi.warn .kpi-value { color: var(--warn); }
.kpi.danger .kpi-value { color: var(--danger); }
.kpi-hint { margin-top: 4px; font-size: 12px; color: var(--text-3); }

/* =====================================================================
   Tablo
   ===================================================================== */
.table-wrap {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.table-wrap.is-scroll { max-height: 70vh; overflow-y: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th, .table td { padding: 10px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line-2); }
.table th {
    position: sticky; top: 0; z-index: 1;
    background: var(--surface-2); color: var(--text-3);
    font-size: 12px; font-weight: 600; white-space: nowrap;
    border-bottom: 1px solid var(--line);
}
.table th:first-child, .table td:first-child { padding-left: 18px; }
.table th:last-child, .table td:last-child { padding-right: 18px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #F7F9FC; }
.table tr[data-href] { cursor: pointer; }
.table tr[data-href]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.nowrap { white-space: nowrap; }
.table .cell-strong { font-weight: 600; color: var(--text); }
.table .cell-sub { display: block; font-size: 12px; color: var(--text-3); }
.table .cell-muted { color: var(--text-3); }
.table-actions { display: flex; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.table-actions form { margin: 0; }
.table tfoot td { background: var(--surface-2); font-weight: 600; border-top: 1px solid var(--line); border-bottom: 0; }
.table-compact th, .table-compact td { padding: 7px 12px; }

/* =====================================================================
   Rozet
   ===================================================================== */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 2px 9px; border-radius: 999px;
    font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap;
    background: var(--muted-weak); color: var(--text-2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.no-dot::before { display: none; }
.badge.ok { background: var(--ok-weak); color: var(--ok); }
.badge.warn { background: var(--warn-weak); color: var(--warn); }
.badge.danger { background: var(--danger-weak); color: var(--danger); }
.badge.info { background: var(--info-weak); color: var(--accent); }
.badge.muted { background: var(--muted-weak); color: var(--muted); }
.page-title .badge { font-size: 12px; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); vertical-align: middle; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.danger { background: var(--danger); } .dot.info { background: var(--accent); }

.tag { display: inline-block; padding: 1px 7px; border-radius: 4px; background: var(--muted-weak); color: var(--text-2); font-size: 12px; }

/* =====================================================================
   Düğme
   ===================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--line); background: var(--surface); color: var(--text);
    font: inherit; font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap;
    cursor: pointer; text-decoration: none; user-select: none;
}
.btn:hover { background: var(--surface-2); border-color: #CDD5E0; text-decoration: none; }
.btn:disabled, .btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { background: var(--surface); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }
.btn-danger-outline { color: var(--danger); border-color: #EDC3C0; }
.btn-danger-outline:hover { background: var(--danger-weak); border-color: var(--danger); }
.btn-warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn-warn:hover { background: #8C5200; border-color: #8C5200; }
.btn-warn-outline { color: var(--warn); border-color: #EBD3AE; }
.btn-warn-outline:hover { background: var(--warn-weak); border-color: var(--warn); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #0B6245; }
.btn-link { border-color: transparent; background: none; color: var(--accent); padding: 0 6px; }
.btn-link:hover { background: var(--accent-weak); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { height: 42px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }

/* =====================================================================
   Form
   ===================================================================== */
.form { display: flex; flex-direction: column; gap: 16px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-section { padding-top: 4px; }
.form-section-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.req { color: var(--danger); margin-left: 2px; }
.field-hint { font-size: 12px; color: var(--text-3); }
.field-error { font-size: 12px; color: var(--danger); font-weight: 500; }
.input, .select, .textarea {
    width: 100%; min-height: 38px; padding: 8px 11px;
    border: 1px solid #CDD5E0; border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    font: inherit; font-size: 14px;
}
.textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
.select { padding-right: 32px; appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center; }
.input:hover, .select:hover, .textarea:hover { border-color: #B7C2D0; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29, 95, 214, .15); }
.input:disabled, .select:disabled, .textarea:disabled, .input[readonly] { background: var(--surface-2); color: var(--text-3); }
.input-mono { font-family: var(--mono); letter-spacing: .04em; }
.input-code { font-family: var(--mono); font-size: 20px; letter-spacing: .3em; text-align: center; }
.is-invalid, .input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.is-invalid:focus { box-shadow: 0 0 0 3px rgba(192, 48, 43, .15); }
.input-group { display: flex; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .input-addon {
    display: inline-flex; align-items: center; padding: 0 11px;
    border: 1px solid #CDD5E0; border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--surface-2); color: var(--text-3); font-size: 13px; white-space: nowrap;
}
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.check-grid { display: grid; gap: 8px 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.radio-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding-top: 4px; flex-wrap: wrap; }
.form-actions .spacer { flex: 1; }
.card-body > .form-actions:last-child { margin-top: 4px; }

/* =====================================================================
   Süzgeç çubuğu
   ===================================================================== */
.filters {
    display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
    padding: 12px 14px; margin-bottom: 14px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.filters .field { gap: 4px; }
.filters .field-label { font-size: 12px; font-weight: 500; color: var(--text-3); }
.filters .input, .filters .select { min-height: 34px; padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
.filters .field-search { flex: 1 1 240px; min-width: 200px; }
.filters .field-sm { width: 150px; }
.filters .field-md { width: 190px; }
.filters-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.filters-actions .btn { height: 34px; }
.filters-summary { margin: -6px 0 12px; font-size: 12px; color: var(--text-3); }

/* =====================================================================
   Boş durum
   ===================================================================== */
.empty { padding: 40px 24px; text-align: center; color: var(--text-2); }
.empty-icon { width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 50%; background: var(--muted-weak); color: var(--text-3); display: flex; align-items: center; justify-content: center; }
.empty-icon svg { width: 20px; height: 20px; }
.empty-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.empty-text { max-width: 460px; margin: 0 auto; color: var(--text-3); }
.empty-action { margin-top: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.table td.empty-cell { padding: 0; }
.table tbody tr:hover td.empty-cell { background: transparent; }

/* =====================================================================
   Sayfalama
   ===================================================================== */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px 0; flex-wrap: wrap; }
.card .pagination, .pagination.in-card { padding: 10px 18px; border-top: 1px solid var(--line); }
.pagination-info { font-size: 13px; color: var(--text-3); }
.pagination-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.page-link {
    min-width: 32px; height: 32px; padding: 0 8px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 500; text-decoration: none;
}
.page-link:hover { background: var(--surface-2); text-decoration: none; }
.page-link.is-current { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-link.is-disabled { color: #B5BEC9; pointer-events: none; background: var(--surface-2); }
.page-link.is-gap { border-color: transparent; background: none; pointer-events: none; }
.page-link svg { width: 14px; height: 14px; }

/* =====================================================================
   Onay penceresi (<dialog>)
   ===================================================================== */
dialog.dialog {
    width: min(480px, calc(100vw - 32px)); padding: 0;
    border: 1px solid var(--line); border-radius: 10px;
    background: var(--surface); color: var(--text);
    box-shadow: 0 20px 48px rgba(16, 24, 40, .22);
}
dialog.dialog::backdrop { background: rgba(15, 25, 40, .45); }
dialog.dialog.dialog-wide { width: min(640px, calc(100vw - 32px)); }
.dialog form { margin: 0; }
.dialog-header { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 6px; }
.dialog-icon { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--info-weak); color: var(--accent); }
.dialog-icon svg { width: 18px; height: 18px; }
.dialog-icon.danger { background: var(--danger-weak); color: var(--danger); }
.dialog-icon.warn { background: var(--warn-weak); color: var(--warn); }
.dialog-icon.ok { background: var(--ok-weak); color: var(--ok); }
.dialog-title { font-size: 16px; font-weight: 600; line-height: 1.35; padding-top: 6px; }
.dialog-body { padding: 6px 20px 16px 68px; color: var(--text-2); display: flex; flex-direction: column; gap: 12px; }
.dialog-body:empty { display: none; }
.dialog-body p { margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 10px 10px; }

/* =====================================================================
   Tanım listesi
   ===================================================================== */
.dl { margin: 0; display: grid; grid-template-columns: minmax(130px, 34%) 1fr; }
.dl dt, .dl dd { padding: 9px 0; border-bottom: 1px solid var(--line-2); margin: 0; }
.dl dt { color: var(--text-3); font-size: 13px; padding-right: 12px; }
.dl dd { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: 0; }
.card-body > .dl:first-child dt:first-of-type, .card-body > .dl:first-child dd:first-of-type { padding-top: 0; }
.card-body > .dl:last-child dt:last-of-type, .card-body > .dl:last-child dd:last-of-type { padding-bottom: 0; }
.dl-wide { grid-template-columns: minmax(180px, 30%) 1fr; }

/* =====================================================================
   Zaman çizelgesi
   ===================================================================== */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline-item { position: relative; padding: 0 0 16px 26px; }
.timeline-item::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: -2px; width: 2px; background: var(--line); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--muted); }
.timeline-dot.ok { border-color: var(--ok); }
.timeline-dot.warn { border-color: var(--warn); }
.timeline-dot.danger { border-color: var(--danger); }
.timeline-dot.info { border-color: var(--accent); }
.timeline-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.timeline-title { font-weight: 600; }
.timeline-time { font-size: 12px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.timeline-meta { margin-top: 2px; font-size: 12px; color: var(--text-3); }

/* =====================================================================
   Kopyala
   ===================================================================== */
.copy { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.copy-value { min-width: 0; overflow-wrap: anywhere; }
.copy-value.mono { font-size: 14px; }
.copy-btn {
    display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
    height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px;
    background: var(--surface); color: var(--text-2); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer;
}
.copy-btn:hover { background: var(--surface-2); color: var(--text); }
.copy-btn svg { width: 13px; height: 13px; }
.copy-btn.is-done { color: var(--ok); border-color: #BFE3D3; background: var(--ok-weak); }
.copy-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px dashed #C4CEDB; border-radius: var(--radius); background: var(--surface-2); }

/* =====================================================================
   Sekmeler, kod ızgarası, QR, ilerleme
   ===================================================================== */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 9px 14px; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.tab .nav-count { background: var(--muted-weak); color: var(--text-2); margin-left: 6px; }

.code-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.code-grid code { font-family: var(--mono); font-size: 15px; letter-spacing: .06em; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 5px; text-align: center; }
.qr-box { display: inline-flex; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.qr-box canvas, .qr-box img, .qr-box svg { display: block; width: 180px; height: 180px; }

.meter { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; min-width: 80px; }
.meter > span { display: block; height: 100%; background: var(--accent); }
.meter.ok > span { background: var(--ok); } .meter.warn > span { background: var(--warn); } .meter.danger > span { background: var(--danger); }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain > li { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.list-plain > li:last-child { border-bottom: 0; }

.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

/* =====================================================================
   Giriş ve hata sayfaları (layouts/auth)
   ===================================================================== */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--bg); }
.auth-wrap { width: 100%; max-width: 400px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 18px; text-align: center; }
.auth-brand svg { width: 48px; height: 48px; }
.auth-brand .brand-name { font-size: 20px; font-weight: 600; color: var(--text); }
.auth-brand .brand-sub { font-size: 13px; color: var(--text-3); }
.auth-box { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 26px 26px 24px; }
.auth-title { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.auth-sub { color: var(--text-2); margin-bottom: 18px; }
.auth-box .form { gap: 14px; }
.auth-box .btn-primary { width: 100%; height: 40px; font-size: 14px; }
.auth-links { margin-top: 14px; text-align: center; font-size: 13px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--text-3); line-height: 1.6; }

.error-page { text-align: center; padding: 24px 8px; }
.error-code { font-size: 44px; font-weight: 600; color: var(--brand); line-height: 1; font-variant-numeric: tabular-nums; }
.error-title { font-size: 18px; font-weight: 600; margin-top: 10px; }
.error-text { color: var(--text-2); margin: 8px auto 18px; max-width: 440px; }
.error-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* =====================================================================
   Duyarlı
   ===================================================================== */
@media (max-width: 1180px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1023px) {
    .sidebar { transform: translateX(-100%); transition: transform .18s ease; box-shadow: none; }
    body.nav-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-pop); }
    body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(15, 25, 40, .4); }
    .main { margin-left: 0; }
    .topbar { padding: 0 16px; }
    .topbar-toggle { display: inline-flex; }
    .content { padding: 18px 16px; }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: minmax(0, 1fr); }
    .user-menu .user-text { display: none; }
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .kpi { padding: 12px 14px; }
    .kpi-value { font-size: 20px; }
    .page-title { font-size: 19px; }
    .page-actions { width: 100%; }
    .filters .field, .filters .field-sm, .filters .field-md, .filters .field-search { width: 100%; flex: 1 1 100%; }
    .filters-actions { width: 100%; margin-left: 0; }
    .filters-actions .btn { flex: 1; }
    .dl { grid-template-columns: minmax(0, 1fr); }
    .dl dt { border-bottom: 0; padding-bottom: 0; }
    .dl dd { padding-top: 2px; }
    .dialog-body { padding-left: 20px; }
    .code-grid { grid-template-columns: minmax(0, 1fr); }
    .pagination { justify-content: center; }
    .topbar-crumb { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .sidebar { transition: none; }
}
@media print {
    .sidebar, .topbar, .filters, .page-actions, .pagination, .flash-close, .nav-backdrop { display: none !important; }
    .main { margin-left: 0; }
    body { background: #fff; }
    .card, .table-wrap { box-shadow: none; }
}
