/* ==========================================================================
   FixLogix — base design system
   Modern, serious, Poppins. All styles live here (no inline CSS).
   ========================================================================== */

:root {
    /* Brand — serious corporate blue, solid colors only (no gradients) */
    --brand: #2563eb;
    --brand-600: #2563eb;
    --brand-700: #1d4ed8;
    --brand-soft: #eff6ff;

    /* Status */
    --ok: #16a34a;
    --warn: #d97706;
    --danger: #dc2626;

    /* Light theme surfaces */
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #f7f8fa;
    --border: #e3e6eb;
    --text: #1c2330;
    --text-muted: #647084;

    --sidebar-bg: #0f172a;
    --sidebar-text: #b6c0d4;
    --sidebar-text-active: #ffffff;
    --sidebar-active: #2563eb;

    /* Geometry */
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
    --sidebar-w: 248px;
    --sidebar-w-collapsed: 72px;
    --topbar-h: 64px;

    font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

[data-theme="dark"] {
    --bg: #0d1117;
    --surface: #161b24;
    --surface-2: #1d2330;
    --border: #283040;
    --text: #e6e9f0;
    --text-muted: #97a1b3;
    --brand-soft: #15233f;
    --sidebar-bg: #0b1120;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1px 6px;
    font-size: .85em;
}

/* ----- App shell ------------------------------------------------------- */
.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
    transition: grid-template-columns .2s ease;
}
.app-shell.is-collapsed { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }

.app-main { display: flex; flex-direction: column; min-width: 0; }

.app-content { flex: 1; padding: 28px; max-width: 1400px; width: 100%; }

.app-footer {
    padding: 16px 28px;
    color: var(--text-muted);
    font-size: 12.5px;
    border-top: 1px solid var(--border);
}

/* ----- Sidebar --------------------------------------------------------- */
.sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 18px 12px;
    gap: 6px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px 18px;
}
.sidebar__logo {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    background: var(--brand-600);
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
    letter-spacing: .5px;
    flex: 0 0 auto;
}
.sidebar__name { font-weight: 600; font-size: 17px; color: #fff; white-space: nowrap; }

.nav-group {
    text-transform: uppercase;
    font-size: 10.5px;
    letter-spacing: .8px;
    color: #7c7fa6;
    padding: 14px 12px 6px;
    white-space: nowrap;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-weight: 500;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
    box-shadow: 0 6px 16px rgba(37, 99, 235, .30);
}
.nav-item__icon { width: 20px; text-align: center; font-size: 16px; flex: 0 0 auto; }

/* Collapsed state hides labels & section titles */
.is-collapsed .sidebar__name,
.is-collapsed .nav-item__label,
.is-collapsed .nav-group { display: none; }
.is-collapsed .nav-item { justify-content: center; }

/* ----- Topbar ---------------------------------------------------------- */
.topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar__search { flex: 1; max-width: 520px; }
.topbar__search input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    padding: 0 16px;
    color: var(--text);
    font: inherit;
}
.topbar__actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topbar__user { display: flex; align-items: center; gap: 10px; }
.topbar__avatar {
    display: grid; place-items: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-700);
    font-weight: 600;
    font-size: 12px;
}
.topbar__username { font-weight: 500; }

.icon-btn {
    display: grid; place-items: center;
    width: 40px; height: 40px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 18px;
    transition: background .15s ease;
}
.icon-btn:hover { background: var(--brand-soft); }

/* ----- Page bits ------------------------------------------------------- */
.page-head { margin-bottom: 22px; }
.page-title { margin: 0; font-size: 22px; font-weight: 600; }
.page-subtitle { margin: 4px 0 0; color: var(--text-muted); }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stat-card__label { color: var(--text-muted); font-size: 13px; }
.stat-card__value { font-size: 30px; font-weight: 700; line-height: 1.1; }
.stat-card__hint { color: var(--text-muted); font-size: 11.5px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}
.card__title { margin: 0 0 14px; font-size: 16px; font-weight: 600; }

.status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.status-list li { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-muted); flex: 0 0 auto; }
.status-dot--ok { background: var(--ok); }
.status-dot--down { background: var(--danger); }

.muted { color: var(--text-muted); }

/* ----- Buttons --------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: filter .15s ease, background .15s ease;
}
.btn--primary {
    background: var(--brand-600);
    border-color: var(--brand-600);
    color: #fff;
}
.btn--primary:hover { filter: brightness(1.07); }

.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn--block { width: 100%; justify-content: center; }
.btn--danger { background: #fff; border-color: #f1c4c4; color: var(--danger); }
[data-theme="dark"] .btn--danger { background: var(--surface); border-color: #5a2a2a; }
.btn--danger:hover { background: #fdeaea; }
[data-theme="dark"] .btn--danger:hover { background: #2a1818; }

/* ----- Page head row --------------------------------------------------- */
.page-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ----- Forms ----------------------------------------------------------- */
.card--narrow { max-width: 640px; }
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-field { display: grid; gap: 6px; }
.form-label { font-size: 12.5px; font-weight: 500; color: var(--text-muted); }
.form-section { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--brand-700); border-top: 1px solid var(--border); padding-top: 14px; }
.form-hint { font-size: 12px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="search"], input[type="date"], input[type="datetime-local"], input[type="time"],
select, textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    padding: 9px 12px;
    font: inherit;
}
textarea { resize: vertical; }

/* Native <select> chrome (esp. Safari/macOS) clashes with our custom border/
   radius/padding, so reset appearance and draw our own chevron. Keeps selects
   identical across browsers. */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 34px;
    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='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}
select::-ms-expand { display: none; }
[data-theme="dark"] select {
    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='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand-600);
    box-shadow: 0 0 0 3px var(--brand-soft);
}
.upper { text-transform: uppercase; }
.icon { flex: none; vertical-align: middle; }

/* Turkish date picker wrapper (bootstrap-datepicker). The .dp span replaces a
   native date input; its visible field must size like the field it replaced in
   each layout context (form-field / filters / lineitem-form). */
.dp { display: inline-flex; }
.dp .dp-input { width: 100%; }
.form-field .dp { display: block; }
.filters .dp { flex: 0 1 auto; }
.filters .dp .dp-input { width: 150px; min-height: 38px; }
.lineitem-form .dp { flex: 1 1 130px; }
/* Date+time picker: dd.mm.yyyy date field beside a HH:MM time field. */
.dp--datetime { gap: 8px; align-items: center; }
.form-field .dp--datetime, .dp--datetime { display: flex; }
.dp--datetime .dp-date { flex: 1 1 auto; }
.dp--datetime .dp-time { flex: 0 0 auto; width: auto; }
.datepicker { z-index: 1200; }

.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; }
.checkbox--field { align-self: end; padding-bottom: 8px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type="search"] { max-width: 360px; }
.toolbar select { max-width: 200px; }

/* ----- Tables ---------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); font-weight: 600; }
.table tbody tr:hover { background: var(--surface-2); }
.table__actions { text-align: right; white-space: nowrap; }
.table__empty { text-align: center; color: var(--text-muted); padding: 28px; }
.row-link { cursor: pointer; }
.inline-form { display: inline; }

/* ----- Badges ---------------------------------------------------------- */
.badge {
    display: inline-flex; align-items: center;
    padding: 2px 9px; border-radius: 999px;
    font-size: 11.5px; font-weight: 500;
    background: var(--surface-2); color: var(--text-muted);
    border: 1px solid var(--border);
}
.badge--ok { background: #e8f6ee; color: #15803d; border-color: #c6ebd3; }
.badge--muted { background: var(--surface-2); color: var(--text-muted); }
.badge--danger { background: #fdeaea; color: var(--danger); border-color: #f3cccc; }
[data-theme="dark"] .badge--ok { background: #122a1c; color: #59c98a; border-color: #1d4030; }
[data-theme="dark"] .badge--danger { background: #2a1717; color: #e98a8a; border-color: #432424; }

/* ----- Key/value grid -------------------------------------------------- */
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kv-grid > div { display: grid; gap: 2px; }
.kv-label { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px; }
.kv-value { font-weight: 500; }

/* ----- Tabs ------------------------------------------------------------ */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tab {
    background: none; border: none; cursor: pointer;
    padding: 10px 16px; font: inherit; font-weight: 500;
    color: var(--text-muted); border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--brand-700); border-bottom-color: var(--brand-600); }

/* ----- Alerts ---------------------------------------------------------- */
.alert {
    padding: 11px 14px; border-radius: var(--radius-sm);
    margin-bottom: 16px; font-size: 13.5px; border: 1px solid transparent;
}
.alert--success { background: #e8f6ee; color: #15803d; border-color: #c6ebd3; }
.alert--error { background: #fdeaea; color: #b91c1c; border-color: #f3cccc; }
.alert--info { background: var(--brand-soft); color: var(--brand-700); border-color: #cfe0fb; }
[data-theme="dark"] .alert--success { background: #122a1c; color: #59c98a; border-color: #1d4030; }
[data-theme="dark"] .alert--error { background: #2a1717; color: #e98a8a; border-color: #432424; }
[data-theme="dark"] .alert--info { background: var(--brand-soft); color: #8db4f5; border-color: #1d3a63; }

/* ----- Modal ----------------------------------------------------------- */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); }
.modal__dialog {
    position: relative; z-index: 1;
    background: var(--surface); border-radius: var(--radius);
    width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.modal__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal__header h2 { margin: 0; font-size: 16px; }
.modal__body { padding: 20px; }

/* ----- Topbar extras --------------------------------------------------- */
.topbar__role { display: block; font-size: 11px; color: var(--text-muted); font-weight: 400; }
.topbar__logout { display: inline; }

/* ----- Auth page ------------------------------------------------------- */
.auth-body { background: var(--bg); }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    width: 100%; max-width: 380px; padding: 32px;
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-brand__logo {
    display: grid; place-items: center; width: 36px; height: 36px;
    background: var(--brand-600); color: #fff; border-radius: 10px; font-weight: 700;
}
.auth-brand__name { font-weight: 600; font-size: 16px; }
.auth-title { margin: 0; font-size: 22px; }
.auth-subtitle { margin: 4px 0 20px; color: var(--text-muted); font-size: 13.5px; }
.auth-form { display: grid; gap: 16px; }

/* ----- Documents / photos --------------------------------------------- */
.upload-form { display: block; }
.doc-group { margin-top: 16px; }
.doc-group__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.doc-group__title { margin: 0; font-size: 14px; font-weight: 600; }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.thumb { position: relative; margin: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 110px; object-fit: cover; display: block; }
.thumb__file { display: grid; place-items: center; height: 110px; font-weight: 700; color: var(--text-muted); letter-spacing: 1px; }
.thumb__cap { font-size: 10.5px; color: var(--text-muted); padding: 4px 6px; }
.thumb__del { position: absolute; top: 4px; right: 4px; }
.thumb__del .btn { padding: 0 8px; height: 26px; }

/* Evrak: dropzone + AJAX kategori atama akışı */
.dropzone {
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 96px; padding: 18px; cursor: pointer;
    border: 2px dashed var(--border); border-radius: var(--radius-sm);
    background: var(--surface-2); transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--brand-600); background: var(--brand-soft); }
.dropzone input[type="file"] { display: none; }
.dropzone__text { display: grid; gap: 3px; font-size: 13px; color: var(--text-muted); }
.upload-status { margin-top: 10px; font-size: 13px; }
.upload-status.is-ok { color: #15803d; }
.upload-status.is-err { color: var(--danger); }

.doc-uncat { margin-top: 16px; border-color: var(--brand-600); }
.doc-uncat__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.doc-uncat__bar select { width: auto; min-width: 180px; min-height: 38px; }

.thumb__check {
    position: absolute; top: 4px; left: 4px; z-index: 1;
    display: inline-flex; padding: 1px 3px; border-radius: 4px; background: rgba(255,255,255,.85);
}
.thumb__check input { width: 16px; height: 16px; margin: 0; cursor: pointer; }
[data-theme="dark"] .thumb__check { background: rgba(0,0,0,.55); }
.thumb .js-doc-cat {
    width: 100%; min-height: 30px; padding: 4px 22px 4px 6px; font-size: 11.5px;
    border: none; border-top: 1px solid var(--border); border-radius: 0;
    background-color: var(--surface); background-position: right 6px center;
}

/* ----- Line-item forms (parts / labor) -------------------------------- */
.lineitem-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.lineitem-form input, .lineitem-form select { width: auto; flex: 1 1 130px; min-height: 38px; }
.lineitem-form .w-sm { flex: 0 0 80px; }
.table .num, .table__actions.num { text-align: right; }
.table--summary td { padding: 10px 12px; }
.table--summary .num { text-align: right; font-variant-numeric: tabular-nums; }
.table--summary .row-strong td { font-weight: 600; border-top: 2px solid var(--border); }
.table--summary .row-total td { font-weight: 700; font-size: 15px; color: var(--brand-700); }

@media (max-width: 720px) {
    .upload-form { grid-template-columns: 1fr; }
}

/* ----- Filters / list extras (Faz 8) ---------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.filters input, .filters select { width: auto; flex: 0 1 auto; min-height: 38px; }
.filters input[type="search"] { flex: 1 1 220px; }
.page-head__actions { display: flex; gap: 10px; }

.state-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; }
.state-dot--open { background: var(--ok); }
.state-dot--closed { background: var(--text-muted); }
.note-badge { font-size: 11px; color: var(--text-muted); margin-left: 4px; }

.pagination { display: flex; align-items: center; gap: 14px; justify-content: center; padding-top: 16px; }

.note-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.note-item { position: relative; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 40px 10px 12px; }
.note-item__meta { font-size: 11.5px; color: var(--text-muted); margin-bottom: 2px; }
.note-item .inline-form { position: absolute; top: 8px; right: 8px; }
.row-due td { color: var(--danger) !important; }

/* ----- Charts / reports (Faz 9) --------------------------------------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.donut-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.donut-row__chart { flex: 0 0 180px; color: var(--text); }
.chart-donut { width: 180px; height: 180px; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; display: grid; gap: 6px; min-width: 200px; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend__dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.legend__label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend__val { font-weight: 600; }

.bars { display: flex; align-items: flex-end; gap: 12px; height: 200px; padding-top: 10px; }
.bars__col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.bars__bar { width: 70%; max-width: 46px; background: var(--brand-600); border-radius: 6px 6px 0 0; transition: height .3s ease; }
.bars__val { font-size: 12px; font-weight: 600; }
.bars__label { font-size: 11px; color: var(--text-muted); }

.hbars { display: grid; gap: 10px; }
.hbars__row { display: grid; grid-template-columns: 180px 1fr 44px; align-items: center; gap: 10px; font-size: 13px; }
.hbars__track { background: var(--surface-2); border-radius: 999px; height: 12px; overflow: hidden; }
.hbars__fill { display: block; height: 100%; background: var(--brand-600); border-radius: 999px; }
.hbars__val { text-align: right; font-weight: 600; }
@media (max-width: 600px) { .hbars__row { grid-template-columns: 110px 1fr 36px; } }

/* ----- Print (Faz 10) -------------------------------------------------- */
.print-body { background: #fff; color: #111; padding: 20px; }
.print-toolbar { display: flex; gap: 10px; margin-bottom: 16px; }
.print-sheet { max-width: 800px; margin: 0 auto; background: #fff; }
.print-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #111; padding-bottom: 12px; margin-bottom: 16px; }
.print-brand { font-size: 22px; font-weight: 700; }
.print-sub { color: #555; }
.print-rapor { text-align: right; }
.print-rapor__no { font-size: 18px; font-weight: 700; }
.print-kv { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.print-kv th, .print-kv td { border: 1px solid #ccc; padding: 6px 9px; font-size: 12.5px; text-align: left; }
.print-kv th { background: #f3f4f6; width: 110px; font-weight: 600; }
.print-h3 { font-size: 14px; border-bottom: 1px solid #ccc; padding-bottom: 4px; margin: 18px 0 10px; }
.print-checklist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 12px; font-size: 12px; }
.print-table { width: 100%; border-collapse: collapse; }
.print-table th, .print-table td { border: 1px solid #ccc; padding: 5px 8px; font-size: 12px; }
.print-table .num { text-align: right; }
.print-totals { margin-top: 14px; display: grid; gap: 4px; max-width: 320px; margin-left: auto; }
.print-totals > div { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.print-totals__grand { border-top: 2px solid #111; font-size: 15px; font-weight: 700; }
.print-foot { display: flex; justify-content: space-between; margin-top: 40px; font-size: 13px; }

@media print {
    .no-print { display: none !important; }
    .print-body { padding: 0; }
}

/* ----- Public portal (Faz 11) ----------------------------------------- */
.portal-body { background: var(--bg); }
.portal-top { display: flex; align-items: center; justify-content: space-between; background: var(--sidebar-bg); color: #fff; padding: 14px 24px; }
.portal-top__brand { font-weight: 700; font-size: 18px; }
.portal-top__tag { font-size: 12.5px; color: #b6c0d4; }
.portal-main { max-width: 1000px; margin: 24px auto; padding: 0 20px; display: grid; gap: 16px; }
.share-link { color: var(--brand-700); font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; }

/* ----- Değer kaybı (Faz 14) ------------------------------------------- */
.result-card { border-left: 4px solid var(--brand-600); }
.result-amount { font-size: 34px; font-weight: 700; color: var(--brand-700); }
.vl-row { margin-bottom: 8px; }

/* ----- Error page ------------------------------------------------------ */
.error-page { text-align: center; padding: 80px 20px; }
.error-page__code { font-size: 64px; margin: 0; color: var(--brand-600); }
.error-page__msg { color: var(--text-muted); margin: 8px 0 24px; }

/* ----- Backdrop (mobile off-canvas) ------------------------------------ */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
    z-index: 19;
}

/* ----- Responsive ------------------------------------------------------ */
@media (max-width: 880px) {
    /* Sidebar becomes an off-canvas drawer; hamburger opens it. */
    .app-shell,
    .app-shell.is-collapsed { grid-template-columns: 1fr; }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: var(--sidebar-w);
        z-index: 20;
        transform: translateX(-100%);
        transition: transform .22s ease;
    }
    .app-shell.is-mobile-open .sidebar { transform: translateX(0); }
    .app-shell.is-mobile-open .sidebar-backdrop { opacity: 1; visibility: visible; }

    /* Drawer always shows full labels regardless of collapse state */
    .sidebar__name, .nav-item__label, .nav-group { display: block; }
    .nav-item { justify-content: flex-start; }

    .app-content { padding: 18px; }
}
