:root {
  --navy: #17233f;
  --navy-2: #223155;
  --blue: #3162d4;
  --blue-soft: #edf3ff;
  --bg: #f3f6fb;
  --panel: #ffffff;
  --text: #20283a;
  --muted: #758097;
  --line: #e4e9f2;
  --green: #15856f;
  --green-soft: #e8f7f2;
  --orange: #c56b13;
  --orange-soft: #fff1df;
  --red: #c33e4b;
  --red-soft: #ffedf0;
  --shadow: 0 12px 34px rgba(26, 42, 77, .08);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); font-size: 12px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 205px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 205px; background: var(--navy); color: #fff; padding: 16px 12px; display: flex; flex-direction: column; z-index: 3; }
.brand { display: flex; align-items: center; gap: 9px; padding: 0 8px 17px; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; background: linear-gradient(145deg,#6ea0ff,#3767dc); border-radius: 8px; font-weight: 800; font-size: 17px; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 14px; }
.brand span { color: #e8eefc; font-size: 14px; margin-top: 3px; font-weight: 800; letter-spacing: .02em; }
nav { margin-top: 15px; display: grid; gap: 3px; }
.nav-item { border: 0; background: transparent; color: #b9c3da; border-radius: 6px; padding: 8px 9px; display: flex; align-items: center; gap: 8px; text-align: left; font-size:11px; }
.nav-item span { width: 20px; font-size: 17px; text-align: center; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: var(--blue); box-shadow: 0 8px 20px rgba(22,70,180,.35); }
.nav-group { display:grid; gap:2px; }
.nav-group > .nav-item { width:100%; }
.nav-chevron { margin-left:auto; color:#91a1c5; font-size:13px; font-style:normal; transition:transform .16s ease; }
.nav-group.open .nav-chevron { transform:rotate(180deg); }
.invoice-submenu { display:grid; gap:2px; padding:2px 0 4px 28px; }
.invoice-submenu button { width:100%; padding:6px 8px; border:0; border-left:2px solid rgba(255,255,255,.13); background:transparent; color:#9faccc; font-size:10.5px; text-align:left; }
.invoice-submenu button:hover { color:#fff; background:rgba(255,255,255,.055); }
.invoice-submenu button.active { color:#fff; border-left-color:#78a0ff; background:rgba(78,121,223,.22); }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; background: #fff; color: var(--blue); display: grid; place-items: center; font-size: 11px; }
.sidebar-note { margin-top: auto; padding: 14px 12px; border-radius: 10px; background: rgba(255,255,255,.06); display: flex; gap: 10px; align-items: flex-start; }
.sidebar-note strong,.sidebar-note small { display:block; }
.sidebar-note strong { font-size: 12px; }
.sidebar-note small { color:#9ba8c7; margin-top:4px; line-height:1.35; }
.pulse { width: 8px; height: 8px; margin-top: 3px; border-radius: 50%; background: #4bd4a8; box-shadow: 0 0 0 4px rgba(75,212,168,.15); }
.main { grid-column: 2; min-width: 0; padding: 0 19px 26px; }
.topbar { min-height: 70px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.topbar h1 { margin: 0; font-size: 18px; letter-spacing: -.2px; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size:12px; }
.user-switch { display:flex; align-items:center; gap:8px; padding: 6px 8px 6px 10px; background:#fff; border:1px solid var(--line); border-radius:7px; }
.user-switch label { color:var(--muted); font-size:11px; }
.user-switch strong { display:block; color:var(--text); font-size:12px; }
.user-switch .ghost { padding:5px 8px; }
.view { display:none; }
.view.active { display:block; animation: fade .18s ease-out; }
#view-hr.view.active { display:flex; min-height:calc(100vh - 92px); }
#hrFrame { flex:1; width:100%; min-height:70vh; border:0; background:#fff; border-radius:8px; }
@keyframes fade { from { opacity:.5; transform:translateY(3px); } }
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(168px,1fr)); gap:9px; margin-bottom:10px; }
.kpi { background:var(--panel); border:1px solid var(--line); border-radius:7px; padding:10px 12px; box-shadow: 0 4px 12px rgba(26,42,77,.04); }
.kpi span,.kpi small { display:block; color:var(--muted); }
.kpi strong { display:block; margin:4px 0 2px; font-size:17px; }
.kpi.accent strong { color:var(--green); }
.kpi.warn strong { color:var(--orange); }
.kpi[role="button"] { cursor:pointer; }
.kpi[role="button"]:hover, .kpi[role="button"].active { outline:1px solid #b7caf5; background:var(--blue-soft); }
.panel { background:var(--panel); border:1px solid var(--line); border-radius:7px; box-shadow:0 4px 12px rgba(26,42,77,.035); margin-bottom:10px; overflow:hidden; }
.panel-head { min-height:49px; padding:10px 12px; display:flex; justify-content:space-between; align-items:center; gap:11px; border-bottom:1px solid var(--line); }
.panel-head h2 { margin:0; font-size:13px; }
.panel-head p { margin:3px 0 0; color:var(--muted); font-size:11px; }
.table-wrap { overflow:auto; }
.table-wrap.tall { max-height:62vh; }
table { width:100%; border-collapse:collapse; }
th { position:sticky; top:0; z-index:1; background:#f8faff; color:#69758e; font-size:9px; text-transform:uppercase; letter-spacing:.25px; text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); white-space:nowrap; }
td { padding:7px 8px; border-bottom:1px solid #edf0f5; vertical-align:middle; }
tbody tr:hover { background:#fafcff; }
tbody tr:last-child td { border-bottom:0; }
.money { font-variant-numeric:tabular-nums; white-space:nowrap; font-weight:600; }
.muted { color:var(--muted); }
.small { font-size:12px; }
.empty { padding:38px 16px; text-align:center; color:var(--muted); }
.empty-icon { width:54px; height:54px; margin:0 auto 14px; border-radius:50%; display:grid; place-items:center; background:var(--blue-soft); color:var(--blue); font-size:24px; }
.empty h3 { margin:0 0 6px; color:var(--text); font-size:15px; }
.empty p { margin:0 0 18px; }
.compact-empty { padding:24px 16px; }
.hidden { display:none !important; }
.primary,.secondary,.ghost,.danger-outline,.table-btn { border-radius:5px; padding:6px 9px; border:1px solid transparent; font-weight:600; font-size:11px; }
.primary { color:#fff; background:var(--blue); }
.primary:hover { background:#264faf; }
.secondary { color:var(--blue); background:var(--blue-soft); border-color:#d8e4ff; }
.ghost { color:var(--muted); background:#fff; border-color:var(--line); }
.danger-outline { color:var(--red); background:#fff; border-color:#f1c7cd; }
.table-btn { padding:6px 10px; color:var(--blue); background:#fff; border-color:#dce5f5; font-size:12px; white-space:nowrap; }
.icon-btn { width:31px; height:31px; border-radius:8px; border:1px solid var(--line); background:#fff; color:var(--muted); font-size:20px; line-height:1; }
.action-row { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; margin-bottom:16px; }
.actions { display:flex; gap:9px; }
.project-list-actions { display:flex; justify-content:flex-end; padding:9px 11px; border-top:1px solid var(--line); background:#fbfcfe; }
.field { display:flex; flex-direction:column; gap:4px; }
.field label { font-size:10px; font-weight:600; color:#56627a; }
.field input,.field select,.field textarea { min-height:30px; width:100%; border:1px solid #dce2ed; border-radius:5px; padding:5px 7px; background:#fff; color:var(--text); outline:none; font-size:11px; }
.field textarea { resize:vertical; }
.field input:focus,.field select:focus,.field textarea:focus { border-color:#7ea2f3; box-shadow:0 0 0 3px rgba(49,98,212,.09); }
.date-parts { display:grid; grid-template-columns:42px 8px 42px 8px 62px; gap:3px; align-items:center; }
.date-parts input { min-width:0; padding-left:4px; padding-right:4px; text-align:center; font-variant-numeric:tabular-nums; }
.date-parts input[type="hidden"] { display:none; }
.date-parts span { color:var(--muted); text-align:center; }
.field.compact { min-width:310px; }
.field.search { min-width:260px; }
.form-panel { margin-bottom:16px; }
.form-grid { padding:11px 12px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: 1 / -1; }
.sc-extra-row { margin: 8px 12px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; }
#scProgressTotals article { min-width: 120px; }
tr.variance-over td { background: #fdecec; }
tr.variance-down td { background: #f7f1e3; }
.variance-down { color: #9a6b12; }
.section-title { margin: 4px 0 0; font-size: 13px; }
.span-all { grid-column:1/-1; }
.approval-chain { display:grid; gap:8px; padding:0 12px 12px; }
.approval-step { display:flex; gap:8px; align-items:center; }
.approval-step label { min-width:78px; color:var(--muted); font-size:11px; }
.approval-step select { flex:1; }
.approval-track { display:grid; gap:6px; margin:0 0 16px; }
.approval-track-item { display:flex; justify-content:space-between; gap:10px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:#f8faff; }
.approval-track-item b { display:block; }
.approval-track-item.current { border-color:#315aa8; background:#eef3ff; }
.approval-track-item.done { border-color:#cde6d6; background:#f3faf5; }
.form-actions { display:flex; justify-content:flex-end; gap:6px; padding:10px 12px; border-top:1px solid var(--line); }
.form-grid .form-actions { padding:4px 0 0; border:0; }
.budget-head { align-items:flex-end; }
.inline-tools { display:flex; align-items:flex-end; gap:7px; }
.summary-strip { min-height:0; display:flex; gap:10px; flex-wrap:wrap; padding:0 21px; }
.summary-strip:not(:empty) { padding-top:12px; padding-bottom:12px; border-bottom:1px solid var(--line); }
.summary-pill { border-radius:8px; background:#f5f7fb; padding:8px 11px; color:var(--muted); }
.summary-pill b { color:var(--text); margin-left:6px; }
.budget-table .heading-row { cursor:pointer; }
.budget-table .heading-row td { background:#f2f5fb; font-weight:700; padding-top:10px; padding-bottom:10px; }
.budget-table .heading-row:hover td { background:#eaf0fb; }
.heading-chevron { display:inline-block; width:17px; color:var(--blue); }
.heading-count { margin-left:5px; font-size:10px; font-weight:500; }
.budget-table .detail-row td { padding-top:3px; padding-bottom:3px; line-height:1.15; }
.budget-table .detail-row td:nth-child(2) { padding-left:27px; }
.budget-sub { display:flex; justify-content:space-between; gap:8px; margin-top:3px; font-size:10px; font-weight:500; color:var(--muted); }
.budget-sub b { color:var(--text); font-weight:600; white-space:nowrap; }
.heading-row .budget-sub { font-weight:500; }
.budget-input { min-height:24px; max-width:150px; text-align:right; border:1px solid #dce2ed; border-radius:4px; padding:3px 6px; font-size:10.5px; }
.budget-input:disabled { border-color:transparent; background:transparent; color:var(--text); }
.budget-name-input { min-height:24px; width:100%; border:1px solid #dce2ed; border-radius:4px; padding:3px 6px; font-size:10.5px; }
.budget-name-input:disabled { border-color:transparent; background:transparent; color:var(--text); }
.budget-add-panel { padding:12px; border-top:1px solid var(--line); background:#fbfcfe; }
.budget-add-panel h3 { margin:0 0 10px; font-size:12px; }
.budget-add-grid { grid-template-columns:repeat(4,minmax(0,1fr)); padding:0; }
.template-tools { padding:0 12px 10px; }
.variance-over { color:var(--red); }
.variance-ok { color:var(--green); }
.status { display:inline-flex; align-items:center; border-radius:999px; padding:4px 7px; font-size:10px; font-weight:700; white-space:nowrap; }
.status-DRAFT { color:#657087; background:#eef1f6; }
.status-PENDING { color:#285bb7; background:#eaf1ff; }
.status-NEEDS_CORRECTION { color:var(--red); background:var(--red-soft); }
.status-CORRECTION_PENDING { color:var(--orange); background:var(--orange-soft); }
.status-APPROVED { color:var(--green); background:var(--green-soft); }
.status-REJECTED { color:var(--red); background:var(--red-soft); }
.approval-correction td { background:#fff8ef; }
.print-frame { position: absolute; left: -12000px; top: 0; width: 210mm; height: 297mm; border: 0; }
#scMetrajDialog.sc-metraj-dialog-host {
  width: min(92vw, calc(82vh * 16 / 10));
  max-width: 92vw;
  height: min(82vh, calc(92vw * 10 / 16));
  max-height: 86vh;
  padding: 0;
  overflow: hidden;
}
#scMetrajDialog.sc-metraj-dialog-host:open {
  display: flex;
  flex-direction: column;
}
#scMetrajDialog.sc-metraj-wide {
  width: min(96vw, calc(90vh * 16 / 10));
  height: min(90vh, calc(96vw * 10 / 16));
  max-height: 92vh;
}
.sc-sheet-meta { display: grid; grid-template-columns: 1fr 180px; gap: 8px; margin-bottom: 8px; }
.sc-sheet-meta label { display: flex; flex-direction: column; gap: 3px; font-size: 10px; color: var(--muted); font-weight: 700; }
.sc-sheet-meta input { min-height: 26px; border: 1px solid #c5cdd8; border-radius: 4px; padding: 4px 7px; font-size: 11px; }
.sc-sheet-wrap { flex: 1; min-height: 0; overflow: auto; border: 1px solid #7e94ab; }
.sc-sheet { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11px; background: #fff; }
.sc-sheet col.nr { width: 36px; }
.sc-sheet col.desc { width: auto; }
.sc-sheet col.num { width: 78px; }
.sc-sheet col.res { width: 90px; }
.sc-sheet col.del { width: 32px; }
.sc-sheet th, .sc-sheet td { border: 1px solid #9eb0c2; padding: 0; }
.sc-sheet thead th { position: sticky; top: 0; background: #d6e3f0; font-size: 9.5px; letter-spacing: .03em; text-transform: uppercase; padding: 5px 4px; z-index: 1; }
.sc-sheet td.nr { text-align: center; background: #eef3f8; color: #567; font-variant-numeric: tabular-nums; font-size: 10.5px; }
.sc-sheet td.n, .sc-sheet tfoot td.n { text-align: right; padding: 4px 6px; font-variant-numeric: tabular-nums; }
.sc-sheet td.add { color: #163; background: #f7fff7; }
.sc-sheet td.sub { color: #a20; background: #fff7f7; }
.sc-sheet tfoot td { background: #fff3b0; font-weight: 700; padding: 5px 8px; font-size: 11px; }
.sc-sheet input { width: 100%; border: 0; border-radius: 0; min-height: 26px; min-width: 0; padding: 4px 6px; background: transparent; font: inherit; }
.sc-sheet input:focus { outline: 2px solid #1d6fd8; outline-offset: -2px; background: #fffbe8; }
.sc-sheet .sc-md-num { text-align: right; }
.sc-sheet .sc-md-del { width: 100%; min-height: 26px; border: 0; background: transparent; color: #667; cursor: pointer; font-size: 13px; }
.sc-sheet .sc-md-del:hover { color: #a20; background: #fde8e8; }
#scMetrajDialog .form-actions { margin-top: 8px; flex: 0 0 auto; }
#scDeductionDialog.sc-deduction-dialog-host {
  width: min(96vw, 1180px);
  height: min(88vh, 840px);
  max-height: 90vh;
  padding: 0;
}
#scDeductionDialog.sc-deduction-dialog-host:open { display: flex; flex-direction: column; }
#scDeductionDialog .sc-deduction-dialog {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sc-deduction-groups { flex: 1 1 auto; min-height: 280px; overflow: auto; display: grid; gap: 14px; align-content: start; }
.sc-ded-group h3 { margin: 0 0 6px; font-size: 12px; background: #fff3b0; padding: 6px 8px; }
.sc-ded-table { font-size: 11px; }
.sc-ded-table input, .sc-ded-table select { width: 100%; border: 0; min-height: 26px; padding: 4px 6px; font: inherit; background: transparent; }
.sc-ded-table .sc-md-num { text-align: right; }
.sc-ded-row.sc-ded-head .sc-ded-title { font-weight: 600; }
.sc-ded-row.sc-ded-head td.n { font-weight: 700; }
.sc-ded-row.sc-ded-detail td:nth-child(2) { padding-left: 18px; }
.sc-ded-row.sc-ded-detail .sc-ded-title { font-weight: 400; }
.sc-ded-actions { white-space: nowrap; width: 1%; }
.sc-ded-add-detail { font-size: 10px; padding: 2px 6px; min-height: 24px; margin-right: 2px; }
#scDeductionDialog .sc-metraj-head,
#scDeductionDialog .form-actions { flex: 0 0 auto; }
#scDeductionDialog .sc-metraj-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
#scDeductionDialog .sc-metraj-head h2 { margin: 0 0 2px; font-size: 13px; }
#scDeductionDialog .sc-metraj-head p { margin: 0; font-size: 10px; line-height: 1.35; color: var(--muted); }
.hk-print-grid label { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fbfcfe; }
.entry-table th,.entry-table td { padding:5px 6px; }
.entry-table select,.entry-table input { min-width:82px; min-height:27px; width:100%; border:1px solid #dce2ed; border-radius:4px; padding:4px 5px; font-size:10.5px; }
.entry-table .line-project { min-width:145px; }
.entry-table .line-cost-code { min-width:145px; }
.entry-table .line-desc { min-width:150px; }
.entry-table .line-income-category { min-width:145px; }
.entry-table.hide-income-col .invoice-income-col { display:none; }
.heading-row.group-row td:first-child { padding-left:22px; }
.entry-table .line-number { min-width:72px; text-align:right; }
.entry-table .line-unit { min-width:58px; }
.entry-table .line-vat-rate { min-width:55px; max-width:62px; text-align:right; }
.entry-table .line-deduct-cell { min-width:36px; width:42px; text-align:center; vertical-align:middle; }
.entry-table .line-deduct-cell label { display:flex; justify-content:center; margin:0; }
.entry-table .line-deduct-cell input[type=checkbox] { width:16px; min-width:16px; min-height:16px; margin:0; }
.invoice-line-deduct-dialog { width:min(420px,92vw); }
.invoice-line-deduct-dialog .field { margin:0 0 12px; }
.invoice-line-deduct-dialog select { width:100%; }
.invoice-line-deduct-hint { min-height:2.4em; margin:0 0 14px; font-size:11px; color:var(--muted); line-height:1.4; }
.pending-sc-table tr { cursor: pointer; }
.pending-sc-table tr.selected td { background: #e8f0ff; }
.remove-line { width:28px; height:28px; border:0; border-radius:7px; color:var(--red); background:var(--red-soft); }
.cost-picker { position:relative; min-width:0; }
.cost-picker > input:not([type="hidden"]) { width:100%; }
.cost-options { display:none; position:absolute; z-index:12; left:0; top:calc(100% + 2px); min-width:330px; max-width:480px; max-height:220px; overflow:auto; padding:3px; border:1px solid #ccd6e7; border-radius:5px; background:#fff; box-shadow:0 10px 28px rgba(24,38,68,.16); }
.cost-options.open { display:block; }
.cost-options button { display:grid; grid-template-columns:112px 1fr; gap:7px; width:100%; padding:5px 6px; border:0; border-radius:3px; background:#fff; color:var(--text); text-align:left; font-size:10.5px; }
.cost-options button:hover { background:var(--blue-soft); }
.cost-options button.keyboard-active { background:var(--blue-soft); outline:1px solid #b7caf5; }
.cost-options button b { color:var(--blue); font-variant-numeric:tabular-nums; }
.cost-no-result { padding:8px; color:var(--muted); font-size:10.5px; }
.supplier-options { min-width:100%; max-width:none; }
.supplier-options button { display:block; }
.supplier-options button span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.supplier-options button small { display:block; color:var(--muted); font-size:10px; }
.correction-box { margin:16px 21px 0; padding:14px; border:1px solid #f0d2a9; background:var(--orange-soft); border-radius:10px; }
.filter-row { padding:18px 21px; display:grid; grid-template-columns:1fr 2fr auto; gap:13px; align-items:end; border-bottom:1px solid var(--line); }
.settings-grid { display:grid; grid-template-columns:1.3fr 1fr; gap:18px; }
.settings-grid .panel { margin:0; }
.path-box { margin:18px 21px 12px; padding:13px; border:1px dashed #bbc8dd; background:#f7f9fc; border-radius:8px; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; word-break:break-all; }
.settings-grid .primary { margin-left:21px; }
.check-row { display:flex; gap:10px; align-items:flex-start; margin:0 21px 8px; font-weight:600; }
.check-row input { margin-top:3px; }
.hint { color:var(--muted); font-size:12px; margin:10px 21px 20px; }
.facts { padding:10px 21px 20px; margin:0; }
.facts div { display:flex; justify-content:space-between; padding:11px 0; border-bottom:1px solid var(--line); }
.facts dt { color:var(--muted); }
.facts dd { margin:0; font-weight:700; }
.roadmap { padding:22px; display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.roadmap div { display:flex; gap:10px; align-items:center; padding:13px; border:1px solid var(--line); border-radius:10px; }
.roadmap b { flex:0 0 29px; width:29px; height:29px; display:grid; place-items:center; border-radius:50%; background:#edf0f6; color:var(--muted); }
.roadmap .done { border-color:#b9e7d9; background:#f4fcf9; }
.roadmap .done b { background:var(--green); color:#fff; }
.roadmap strong,.roadmap small { display:block; }
.roadmap small { color:var(--muted); margin-top:3px; line-height:1.3; }
.toast { position:fixed; right:26px; top:22px; z-index:30; max-width:390px; padding:12px 15px; color:#fff; background:var(--navy); border-radius:9px; box-shadow:0 12px 30px rgba(0,0,0,.18); opacity:0; transform:translateY(-10px); pointer-events:none; transition:.2s; }
.toast.show { opacity:1; transform:none; }
.toast.error { background:var(--red); }
dialog { width:min(880px,92vw); max-height:88vh; padding:0; border:0; border-radius:8px; box-shadow:0 20px 70px rgba(15,29,61,.25); }
dialog::backdrop { background:rgba(17,28,51,.48); backdrop-filter:blur(2px); }
.dialog-head { padding:11px 13px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; }
.dialog-head h2 { margin:0; font-size:14px; }
.dialog-head p { margin:5px 0 0; color:var(--muted); }
#dialogBody { padding:11px 13px; max-height:67vh; overflow:auto; }
.dialog-actions { padding:9px 13px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:6px; }
.detail-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:18px; }
.detail-card { background:#f7f9fc; border:1px solid var(--line); border-radius:8px; padding:10px; }
.detail-card span,.detail-card strong { display:block; }
.detail-card span { color:var(--muted); font-size:11px; margin-bottom:5px; }
.timeline { margin-top:18px; display:grid; gap:8px; }
.timeline-item { border-left:3px solid #ccd7eb; padding:7px 10px; background:#f8faff; }
.timeline-item b,.timeline-item small { display:block; }
.timeline-item small { color:var(--muted); margin-top:3px; }
.kpi.danger strong { color:var(--red); }
.section-title { margin:0; font-size:15px; }
.section-subtitle { margin:4px 0 0; color:var(--muted); font-size:11px; }
.clickable-table tbody tr { cursor:pointer; }
.clickable-table tbody tr:hover { background:var(--blue-soft); }
.detail-toolbar { min-height:58px; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:13px; margin-bottom:12px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.detail-toolbar h2 { margin:0; font-size:14px; }
.detail-toolbar p { margin:3px 0 0; color:var(--muted); font-size:11px; }
.mini-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(175px,1fr)); gap:10px; margin-bottom:12px; }
.mini-metrics > div { padding:10px 12px; border:1px solid var(--line); border-radius:7px; background:#fff; }
.mini-metrics span,.mini-metrics b { display:block; }
.mini-metrics span { color:var(--muted); font-size:10px; margin-bottom:5px; }
.mini-metrics b { font-size:14px; }
.financial-metric > b { margin-bottom:6px; }
.revenue-metric > b { color:var(--green); }
.financial-metric small { display:flex; justify-content:space-between; gap:8px; padding-top:3px; color:var(--muted); font-size:9.5px; }
.financial-metric small i { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-style:normal; }
.financial-metric small strong { color:var(--text); white-space:nowrap; font-size:9.5px; }
.financial-metric.over { border-color:#f1c7cd; background:var(--red-soft); }
.financial-metric.over small.over strong { color:var(--red); }
.info-banner { border:1px solid #f0d2a9; background:var(--orange-soft); color:#8e551c; border-radius:8px; padding:10px 12px; margin:0 0 10px; font-size:12px; }
.sc-inv-no { width:12rem; max-width:100%; }
.info-banner.over { border-color:#f1c7cd; background:var(--red-soft); color:var(--red); font-weight:600; }
.warn-banner { border:1px solid #f1c7cd; background:var(--red-soft); color:var(--red); border-radius:8px; padding:10px 12px; margin:0 0 10px; font-size:12px; font-weight:600; }
.budget-sub.over b { color:var(--red); }
.summary-pill.over { background:var(--red-soft); color:var(--red); }
.summary-pill.over b { color:var(--red); }
tr.budget-over td { background:#fdecec; }
.module-tabs { display:flex; gap:3px; padding:3px; margin-bottom:9px; width:max-content; background:#e7ebf3; border-radius:6px; }
.module-tabs button { border:0; background:transparent; color:#68738a; border-radius:4px; padding:5px 11px; font-size:11px; font-weight:650; }
.module-tabs button.active { color:var(--text); background:#fff; box-shadow:0 2px 8px rgba(28,42,69,.08); }
.invoice-filter { display:grid; grid-template-columns:minmax(180px,1.4fr) minmax(90px,.45fr) minmax(110px,.5fr) minmax(125px,.65fr) minmax(135px,.7fr) minmax(168px,.75fr) auto; gap:7px; align-items:end; padding:9px 11px; border-bottom:1px solid var(--line); background:#fbfcfe; }
#invoiceShowAllBtn.active { border-color:var(--blue); color:var(--blue); background:var(--blue-soft); }
.invoice-filter .grow { min-width:0; }
.invoice-date-range { display:flex; flex-direction:column; gap:7px; min-width:0; }
.invoice-date-range .date-parts { width:100%; max-width:100%; grid-template-columns:minmax(32px,1fr) 8px minmax(32px,1fr) 8px minmax(48px,1.35fr); }
.filter-actions { display:flex; gap:6px; padding-bottom:1px; }
.sortable-table th[data-sort] { cursor:pointer; user-select:none; }
.sortable-table th[data-sort]:hover,.sortable-table th.sorted { color:var(--blue); background:#f0f5ff; }
.sortable-table th span { margin-left:3px; font-size:11px; }
.invoice-table td { padding:3px 7px; line-height:1.1; white-space:nowrap; }
.invoice-table .status { padding:2px 6px; font-size:9.5px; }
.invoice-table .table-btn { padding:3px 7px; font-size:10.5px; }
.chart-legend { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:10px; white-space:nowrap; }
.chart-legend span { width:9px; height:9px; border-radius:2px; margin-left:7px; }
.chart-legend .contract-dot { background:#cdd6e7; }
.chart-legend .progress-dot { background:var(--blue); }
.bar-chart { padding:11px 13px; display:grid; gap:9px; }
.chart-project { padding:9px 10px; border:1px solid var(--line); border-radius:6px; background:#fff; }
.chart-project[data-chart-project] { cursor:pointer; transition:border-color .15s,background .15s; }
.chart-project[data-chart-project]:hover { border-color:#a9bfea; background:#f8faff; }
.chart-project-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px; }
.chart-project-head div { min-width:0; }
.chart-project-head b,.chart-project-head span { display:block; }
.chart-project-head b { font-size:11px; }
.chart-project-head span { margin-top:2px; overflow:hidden; color:var(--muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.chart-project-head > strong { color:var(--blue); font-size:13px; white-space:nowrap; }
.chart-project-head > strong.over, .chart-bar-row > b.over { color:var(--red); }
.chart-bar-row { display:grid; grid-template-columns:60px minmax(120px,1fr) 115px; gap:8px; align-items:center; min-height:20px; }
.chart-bar-row > span { color:var(--muted); font-size:9.5px; }
.chart-bar-row > b { text-align:right; font-size:9.5px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.chart-track { height:8px; overflow:hidden; border-radius:4px; background:#eef1f6; }
.chart-track i { display:block; height:100%; min-width:0; border-radius:4px; }
.contract-bar { background:#cdd6e7; }
.progress-bar { background:linear-gradient(90deg,#4a79df,var(--blue)); }
.progress-bar.cost { background:linear-gradient(90deg,#7aa3e8,#315aa8); }
.progress-bar.over { background:linear-gradient(90deg,#e35d6a,var(--red)); }
.sc-protocol-row td { background:#f7f9fd; }
.sc-protocol-row td:first-child { padding-left:22px; }
.sc-progress-section td { background:#eef2f8; font-weight:700; font-size:12px; }
.sc-rate-bar { position:relative; width:118px; height:22px; border-radius:6px; overflow:hidden; background:#d7dee9; }
.sc-rate-bar i { display:block; height:100%; background:#37a37b; }
.sc-rate-bar.over i { background:#d9556f; }
.sc-rate-bar span { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#16324a; text-shadow:0 0 4px #fff,0 0 4px #fff; font-variant-numeric:tabular-nums; }
.cost-picker.unmatched .sc-cost-code { border-color:#d4a017; background:#fff8e8; }
.sc-kesif-toolbar { display:flex; gap:8px; flex-wrap:wrap; margin:8px 0; }
.sc-rounding { display:grid; grid-template-columns:minmax(220px,1.4fr) auto auto; gap:12px 16px; align-items:center; margin:12px 0 4px; padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:#f7f9fc; }
.sc-rounding p { margin:4px 0 0; font-size:12px; color:var(--muted); }
.sc-rounding-fields { display:flex; gap:8px; align-items:center; }
.sc-rounding-fields input { width:7.5rem; text-align:right; }
.sc-rounding-sum { font-size:13px; text-align:right; }
@media (max-width: 900px){
  .sc-rounding { grid-template-columns:1fr; }
  .sc-rounding-sum { text-align:left; }
}
.sc-lump-g td { background:#d5deee; font-weight:700; }
.sc-lump-h td { background:#e8eef8; font-weight:700; }
.sc-lump-h .sc-lump-desc { margin-left:12px; }
.sc-lump-s td { background:#f4f7fb; }
.sc-lump-s .sc-lump-desc { margin-left:24px; }
.sc-lump-i td:first-child { padding-left:48px; }
.sc-lump-tools { display:flex; gap:6px; align-items:center; }
.project-chart-grid { display:grid; grid-template-columns:repeat(2,minmax(280px,1fr)); gap:10px; }
.sc-ret-card { min-height:0; }
.sc-ret-card ul { list-style:none; margin:0; padding:0; }
.sc-ret-card li { display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--line); font-size:13px; }
.sc-ret-card li:last-child { border-bottom:0; }
.sc-ret-card .money { font-weight:700; white-space:nowrap; }
.sc-ret-table tfoot td { font-weight:700; background:#f5f7fb; }
.vchart { display:grid; gap:12px; }
.vchart-plot { position:relative; display:grid; grid-template-columns:1fr 1fr; gap:28px; align-items:end; min-height:250px; padding:8px 12px 0; border:1px solid #e8edf5; border-radius:8px; background:linear-gradient(180deg,#fbfcfe,#fff); }
.vchart-plot::before { content:""; position:absolute; inset:8px 12px 54px; background:repeating-linear-gradient(180deg,transparent,transparent calc(25% - 1px),#edf1f7 calc(25% - 1px),#edf1f7 25%); border-radius:6px; pointer-events:none; }
.vchart-col { position:relative; z-index:1; display:grid; gap:8px; justify-items:center; }
.vchart-bar-stack { display:flex; flex-direction:column; justify-content:flex-end; width:100%; max-width:110px; height:190px; gap:2px; }
.vchart-bar { width:100%; border-radius:6px 6px 2px 2px; box-shadow:0 8px 16px rgba(36,52,88,.12); position:relative; min-height:4px; transition:height .25s ease; }
.vchart-bar.baseline { background:linear-gradient(180deg,#dbe3f1,#b8c5da); }
.vchart-bar.compare { background:linear-gradient(180deg,#5f8ce8,var(--blue)); }
.vchart-bar.over { background:linear-gradient(180deg,#e35d6a,var(--red)); }
.vchart-pct { position:absolute; top:6px; left:0; right:0; text-align:center; color:#fff; font-size:10px; font-weight:700; text-shadow:0 1px 2px rgba(0,0,0,.25); }
.vchart-bar.baseline .vchart-pct { color:#4a5d78; text-shadow:none; }
.vchart-ref-line { position:absolute; left:12px; right:12px; bottom:54px; height:0; border-top:2px dashed #8ea3c7; z-index:2; pointer-events:none; }
.vchart-ref-line span { position:absolute; right:0; top:-16px; color:#6d7f9c; font-size:9px; font-weight:700; }
.vchart-meta { text-align:center; }
.vchart-meta b { display:block; font-size:12px; }
.vchart-meta span { display:block; margin-top:2px; color:var(--muted); font-size:10px; }
.vchart-summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:#f8faff; }
.vchart-summary strong { color:var(--blue); font-size:18px; }
.vchart-summary.over { border-color:#f1c7cd; background:var(--red-soft); }
.vchart-summary.over strong { color:var(--red); }
.vchart-summary small { display:block; margin-top:2px; color:var(--orange); font-size:9.5px; }
.vchart-summary.over small { color:var(--red); }
.pie-card { min-height:320px; padding:10px 12px; border:1px solid var(--line); border-radius:7px; background:#fff; }
.pie-card h3 { margin:0; color:var(--text); font-size:12px; }
.pie-card > p { min-height:24px; margin:2px 0 7px; color:var(--muted); font-size:9.5px; }
.pie-layout { display:grid; grid-template-columns:160px minmax(0,1fr); gap:12px; align-items:center; }
.pie-visual { position:relative; width:154px; height:154px; border-radius:50%; box-shadow:inset 0 0 0 1px rgba(44,62,92,.08); }
.pie-center { position:absolute; inset:35px; display:flex; flex-direction:column; justify-content:center; align-items:center; border-radius:50%; background:#fff; box-shadow:0 0 0 1px rgba(44,62,92,.07); text-align:center; }
.pie-center b { font-size:11px; }
.pie-center span { max-width:70px; margin-top:2px; overflow:hidden; color:var(--muted); font-size:8.5px; text-overflow:ellipsis; white-space:nowrap; }
.pie-details { display:grid; gap:5px; max-height:190px; overflow:auto; }
.pie-legend-row { display:grid; grid-template-columns:9px minmax(0,1fr) auto; gap:6px; align-items:center; font-size:9px; }
.pie-legend-row i { width:8px; height:8px; border-radius:2px; }
.pie-legend-row span { overflow:hidden; color:var(--muted); text-overflow:ellipsis; white-space:nowrap; }
.pie-legend-row b { font-size:9px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.chart-plan-legend { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px 14px; max-width:340px; color:var(--muted); font-size:10.5px; }
.chart-plan-legend span { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.chart-plan-legend .dot { width:10px; height:10px; border-radius:2px; flex:0 0 auto; }
.chart-plan-legend .dot.plan { background:#dbe3f1; border:1px solid #b8c5da; }
.chart-plan-legend .dot.sc { background:#ef8f3c; }
.chart-plan-legend .dot.sp { background:#37a37b; }
.chart-plan-legend .dot.ac { background:#315aa8; }
.chart-plan-table .heading-row { cursor:pointer; }
.chart-plan-table .heading-row:hover td { background:#f5f8fd; }
.chart-plan-table .detail-row td { background:#fbfcfe; }
.chart-plan-table .detail-row td:nth-child(2) { color:var(--muted); padding-left:18px; }
.plan-bar { min-width:110px; }
.plan-bar.empty { color:var(--muted); font-size:10px; }
.plan-bar-track { position:relative; height:14px; overflow:hidden; border-radius:7px; background:#dbe3f1; }
.plan-bar-fill { position:absolute; top:0; left:0; bottom:0; border-radius:7px; }
.plan-bar-fill.sc { background:#ef8f3c; z-index:1; }
.plan-bar-fill.ac { background:#315aa8; z-index:2; }
.plan-bar-fill.sp { background:#37a37b; z-index:3; }
.plan-bar-fill.over { background:var(--red); box-shadow:none; }
.chart-plan-table .money.over, .chart-plan-table .muted.small.over { color:var(--red); font-weight:700; }
.chart-plan-table tfoot td { font-weight:700; background:#eef3fb; border-top:2px solid #c5d3ea; }
.chart-plan-table tfoot { position:sticky; bottom:0; }
.report-dialog { border:none; padding:0; border-radius:12px; box-shadow:0 18px 48px rgba(24,36,64,.18); }
.report-dialog::backdrop { background:rgba(18,28,48,.35); }
.report-dialog-card { width:min(420px,92vw); padding:18px 20px; }
.report-dialog-card h2 { margin:0 0 8px; font-size:16px; }
.report-dialog-card p { margin:0 0 14px; color:var(--muted); font-size:11px; line-height:1.45; }
.report-dialog-card .form-actions { justify-content:flex-end; }
#scMetrajDialog .sc-metraj-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: 100%;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}
#scMetrajDialog .sc-metraj-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
#scMetrajDialog .sc-metraj-head h2 { margin: 0 0 2px; font-size: 13px; }
#scMetrajDialog .sc-metraj-head p { margin: 0; font-size: 10px; line-height: 1.35; color: var(--muted); }
.report-actions { display:flex; flex-wrap:wrap; gap:6px; }
.guarantee-filters { display:grid; grid-template-columns:minmax(180px,1fr) minmax(140px,180px) minmax(200px,1.4fr); gap:8px; margin-bottom:10px; }
.guarantee-dialog-card { width:min(720px,92vw); }
.user-menu-dialog-card { width:min(720px,94vw); }
.menu-perm-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:8px; margin-top:6px; }
.menu-perm-grid label { display:flex; align-items:flex-start; gap:8px; min-width:0; padding:8px 10px; border:1px solid var(--line); border-radius:6px; background:#fafcff; cursor:pointer; }
.menu-perm-grid label:hover { border-color:#c8d4ea; }
.field .menu-perm-grid input[type="checkbox"],
.menu-perm-grid input[type="checkbox"] {
  width:16px; min-width:16px; height:16px; min-height:16px; margin:2px 0 0; padding:0;
  flex:0 0 16px; border:1px solid #c5d0e2; box-shadow:none; accent-color:var(--blue);
}
.menu-perm-grid span { min-width:0; flex:1; }
.menu-perm-grid span b { display:block; font-size:11px; line-height:1.3; white-space:normal; }
.menu-perm-grid span small { display:block; color:var(--muted); font-size:10px; line-height:1.35; margin-top:2px; white-space:normal; }
.menu-perm-summary { color:var(--muted); font-size:10.5px; line-height:1.35; }
.date-field-row { display:flex; gap:8px; align-items:center; min-width:0; }
.date-field-row .date-parts { flex:1; min-width:0; }
.date-field-row > input[type="hidden"] { display:none; flex:none; width:0; padding:0; border:0; min-height:0; }
.date-field-row > button { flex:none; white-space:nowrap; }
.date-field-row.is-indefinite .date-parts { display:none; }
.date-field-row button.active { background:var(--blue-soft); border-color:var(--blue); color:var(--blue); }
.field-hint { margin:0; font-size:11px; color:var(--muted); line-height:1.35; }
.status-guarantee-ACTIVE { background:rgba(56,189,120,.16); color:#1f8a57; }
.status-guarantee-RELEASED { background:rgba(120,160,255,.16); color:#3f63c8; }
.status-guarantee-EXPIRED { background:rgba(245,158,11,.16); color:#b45309; }
.check-card { min-height:42px; display:flex; align-items:center; gap:8px; padding:7px 9px; border:1px solid var(--line); border-radius:6px; background:#fbfcfe; cursor:pointer; }
.check-card input { width:14px; height:14px; margin:0; }
.check-card span,.check-card b,.check-card small { display:block; }
.check-card b { font-size:10.5px; }
.check-card small { margin-top:2px; color:var(--muted); font-size:9px; }
.project-filters { display:flex; flex-wrap:wrap; gap:5px; padding:7px 11px; border-bottom:1px solid var(--line); background:#fbfcfe; }
.project-filters:empty { display:none; }
.project-filters button { padding:5px 8px; border:1px solid var(--line); border-radius:5px; color:var(--muted); background:#fff; font-size:10px; }
.project-filters button.active { border-color:#aec4f7; color:var(--blue); background:var(--blue-soft); }
.project-filters b { margin-left:5px; }
.task-list { display:grid; gap:1px; }
.task-list button { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:8px 11px; border:0; border-bottom:1px solid var(--line); background:#fff; text-align:left; }
.task-list button:hover { background:var(--orange-soft); }
.task-list span,.task-list b,.task-list small { display:block; }
.task-list small { margin-top:3px; color:var(--muted); }
.task-list strong { color:var(--orange); }
.period-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:7px; padding:10px 11px; }
.period-grid button { display:flex; justify-content:space-between; align-items:center; gap:8px; min-height:42px; padding:8px 10px; border:1px solid var(--line); border-radius:6px; color:var(--text); background:#fff; text-align:left; }
.period-grid button:hover { border-color:#b7caf5; background:var(--blue-soft); }
.period-grid button b { font-size:12px; }
.period-grid button span { min-width:22px; padding:2px 6px; border-radius:10px; color:var(--blue); background:var(--blue-soft); font-size:10px; text-align:center; }
#userPermissionRows select { min-height:26px; border:1px solid var(--line); border-radius:4px; padding:3px 5px; font-size:10.5px; }
#userPermissionRows .user-password { min-width:110px; min-height:26px; border:1px solid var(--line); border-radius:4px; padding:3px 5px; font-size:10.5px; }
.login-screen { position:fixed; inset:0; z-index:40; display:grid; place-items:center; background:#17233f; }
.login-screen.hidden { display:none !important; }
.project-pick-card { max-width: 520px; width: min(92vw, 520px); }
.project-pick-list { display:grid; gap:8px; margin-top:16px; max-height: min(60vh, 420px); overflow:auto; text-align:left; }
.project-pick-list button { display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; border:1px solid var(--line); background:#fff; border-radius:8px; padding:10px 12px; text-align:left; }
.project-pick-list button:hover { border-color: var(--blue); }
.project-pick-list b { display:block; }
.project-pick-list small { color: var(--muted); }
.login-card { width:min(380px,calc(100% - 32px)); padding:28px 24px; border-radius:12px; background:#fff; }
.login-card.signup-card { width:min(440px,calc(100% - 32px)); }
.kvkk-box { max-height:132px; overflow:auto; padding:8px 10px; border:1px solid var(--line); border-radius:6px; background:#fbfcfe; font-size:11px; line-height:1.45; color:var(--muted); }
.kvkk-box p { margin:0 0 8px; }
.kvkk-box p:last-child { margin-bottom:0; }
.kvkk-box a { color:var(--blue); }
.login-card .brand-mark { margin-bottom:12px; }
.login-card h1 { margin:0 0 6px; font-size:20px; }
.login-card > p { margin:0 0 16px; color:var(--muted); }
.login-card .field { margin-bottom:10px; }
.login-card .primary { width:100%; margin-top:8px; min-height:34px; }
.login-hint { margin:14px 0 0; color:var(--muted); font-size:11px; line-height:1.4; }
.login-hint code { font-size:11px; }
.invoice-tabs { display:none; }

@media (max-width:1100px) {
  .kpi-grid { grid-template-columns:repeat(2,1fr); }
  .form-grid { grid-template-columns:repeat(2,1fr); }
  .roadmap { grid-template-columns:repeat(2,1fr); }
  .invoice-filter { grid-template-columns:repeat(2,1fr); }
  .invoice-header-grid { grid-template-columns:repeat(3,1fr); }
  .filter-actions { grid-column:1/-1; }
  .pie-layout { grid-template-columns:140px minmax(0,1fr); }
  .pie-visual { width:134px; height:134px; }
  .pie-center { inset:31px; }
}
@media (max-width:760px) {
  .app-shell { grid-template-columns:1fr; }
  .sidebar { position:static; width:auto; padding:15px; }
  nav { grid-template-columns:repeat(2,1fr); }
  .sidebar-note { display:none; }
  .main { grid-column:1; padding:0 14px 28px; }
  .topbar { align-items:flex-start; padding:20px 0; flex-direction:column; }
  .kpi-grid,.settings-grid,.form-grid { grid-template-columns:1fr; }
  .span-2 { grid-column:span 1; }
  .action-row { align-items:stretch; flex-direction:column; }
  .field.compact,.field.search { min-width:0; }
  .filter-row { grid-template-columns:1fr; }
  .roadmap { grid-template-columns:1fr; }
  .mini-metrics,.invoice-filter { grid-template-columns:1fr; }
  .invoice-header-grid { grid-template-columns:1fr; }
  .detail-toolbar { grid-template-columns:1fr; }
  .budget-head,.inline-tools { align-items:stretch; flex-direction:column; }
  .chart-legend { flex-wrap:wrap; white-space:normal; }
  .chart-bar-row { grid-template-columns:50px 1fr; }
  .chart-bar-row > b { grid-column:2; text-align:left; }
  .project-chart-grid { grid-template-columns:1fr; }
  .chart-plan-legend { max-width:none; justify-content:flex-start; }
}

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  html, body { background: #fff !important; color: #000 !important; font-size: 11px; }
  .sidebar,
  .no-print,
  #toast,
  #loginScreen,
  .login-screen { display: none !important; }
  .app-shell { display: block !important; min-height: auto; grid-template-columns: 1fr !important; }
  .main { grid-column: 1 !important; width: 100% !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
  .topbar { min-height: auto; padding: 0 0 8px; margin-bottom: 8px; border-bottom: 1px solid #d8dee8; }
  .user-switch { border: 0; padding: 0; background: transparent; }
  .user-switch label { display: none; }
  .view { display: none !important; }
  .view.active { display: block !important; animation: none; }
  .panel,
  .kpi,
  .pie-card,
  .financial-metric,
  .detail-card,
  .timeline-item,
  .chart-project,
  .summary-pill,
  .info-banner, .warn-banner { box-shadow: none !important; break-inside: avoid; }
  .table-wrap,
  .table-wrap.tall,
  #dialogBody,
  .pie-details,
  .cost-options { max-height: none !important; overflow: visible !important; }
  th { position: static; background: #f8faff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .status,
  .kpi,
  .progress-bar,
  .vchart-bar,
  .pie-slice,
  .status-guarantee-ACTIVE,
  .status-guarantee-RELEASED,
  .status-guarantee-EXPIRED { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a[href]::after { content: ""; }
  body:has(dialog[open]) .main { display: none !important; }
  body:has(dialog[open]) dialog[open] {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  body:has(dialog[open]) dialog[open] .icon-btn,
  body:has(dialog[open]) dialog[open] .dialog-actions,
  body:has(dialog[open]) dialog[open] .form-actions { display: none !important; }
  body:has(dialog[open]) dialog[open] #dialogBody { max-height: none !important; overflow: visible !important; }
}

.admin-body { margin:0; }
.admin-shell { max-width:1100px; margin:0 auto; padding:22px 18px 40px; }
.admin-top { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:18px; }
.admin-top h1 { margin:0; font-size:22px; }
.admin-top p { margin:4px 0 0; color:var(--muted); }
.admin-top-actions { display:flex; gap:8px; }
.admin-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:10px; margin-bottom:16px; }
.admin-kpis article { background:#fff; border:1px solid var(--line); border-radius:10px; padding:12px 14px; }
.admin-kpis span { display:block; color:var(--muted); font-size:11px; }
.admin-kpis strong { font-size:20px; }
.admin-actions { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.admin-detail { padding:0 4px 12px; }
.admin-log { margin:8px 0 0; padding-left:18px; color:var(--muted); font-size:11px; }
#adminSearch { min-width:200px; min-height:32px; border:1px solid var(--line); border-radius:6px; padding:6px 10px; }
