:root {
  --navy: #212d54;
  --navy-deep: #161d37;
  --navy-soft: #3e4d6f;
  --cyan: #73a6f2;
  --ink: #21293b;
  --muted: #677389;
  --border: #dadfe7;
  --mist: #f2f4f8;
  --card: #fff;
  --success: #287451;
  --danger: #c4473f;
  --warning: #986a14;
  --shadow: 0 12px 28px rgba(41, 56, 87, .055);
  font-family: "DM Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--mist); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--mist); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 244px; flex: 0 0 244px; min-height: 100vh; display: flex; flex-direction: column; color: #d9e1ef; background: var(--navy); }
.brand { display: flex; gap: 12px; align-items: center; padding: 22px 20px; border-bottom: 1px solid rgba(255,255,255,.11); }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--navy-deep); background: var(--cyan); font-weight: 800; }
.brand strong { display: block; max-width: 158px; color: #fff; font-size: 13px; line-height: 1.25; }
.brand small { display: block; margin-top: 4px; color: rgba(217,225,239,.66); font-size: 10px; }
.nav { padding: 20px 12px; }
.nav-label { display: block; padding: 0 12px 8px; color: rgba(217,225,239,.56); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.nav a { position: relative; display: flex; gap: 11px; align-items: center; min-height: 40px; margin: 2px 0; padding: 0 12px; border-radius: 7px; color: #c9d2e4; font-size: 12px; font-weight: 600; transition: .16s ease; }
.nav a:hover, .nav a.active { color: #fff; background: var(--navy-soft); }
.nav a.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 0 4px 4px 0; background: var(--cyan); }
.nav a > span { width: 17px; color: var(--cyan); text-align: center; font-size: 15px; }
.sidebar-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.11); color: #fff; font-size: 11px; }
.sidebar-footer a { color: #aebbd0; font-size: 10px; }
.main-shell { min-width: 0; flex: 1; }
.topbar { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px clamp(20px, 4vw, 52px); border-bottom: 1px solid var(--border); background: rgba(255,255,255,.8); }
.topbar h1 { margin: 2px 0 0; font-size: 21px; letter-spacing: -.04em; }
.eyebrow { color: #6799aa; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.topbar-user { display: flex; flex-direction: column; align-items: flex-end; color: var(--ink); font-size: 12px; font-weight: 700; }
.topbar-user small { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
.mobile-menu { display: none; border: 0; color: var(--navy); background: transparent; font-size: 20px; }
.page { width: min(1120px, 100%); margin: 0 auto; padding: 30px clamp(20px, 4vw, 52px) 44px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h2 { margin: 5px 0 4px; font-size: 29px; letter-spacing: -.055em; }
.page-heading p { margin: 0; color: var(--muted); line-height: 1.5; }
.notice { margin-bottom: 18px; padding: 12px 14px; border: 1px solid; border-radius: 9px; font-size: 12px; font-weight: 700; }
.notice.success { color: var(--success); border-color: #b9ddda; background: #edf9f5; }
.notice.error { color: var(--danger); border-color: #e8c5c0; background: #fff3f0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { border: 1px solid var(--border); border-radius: 12px; background: var(--card); box-shadow: var(--shadow); }
.card.pad { padding: 18px; }
.card h3, .card h4 { margin: 0; color: #30405e; letter-spacing: -.02em; }
.card h3 { font-size: 15px; }
.card h4 { font-size: 12px; }
.metric { position: relative; overflow: hidden; padding: 17px; }
.metric::after { content: ""; position: absolute; right: -22px; bottom: -30px; width: 86px; height: 86px; border: 11px solid rgba(116,195,223,.16); border-radius: 50%; }
.metric label { display: block; color: #8996a9; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.metric strong { display: block; margin-top: 8px; font-family: "Space Mono", monospace; color: var(--navy-soft); font-size: 22px; letter-spacing: -.05em; }
.metric small { display: block; margin-top: 3px; color: #94a0b2; font-size: 11px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; gap: 7px; padding: 9px 15px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; font-weight: 800; transition: .16s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: linear-gradient(135deg, #354a76, #293c65); box-shadow: 0 7px 15px rgba(47,65,104,.16); }
.button.secondary { color: #2d3952; border-color: var(--border); background: #f7f9fb; }
.button.danger { color: #fff; background: var(--danger); }
.button.small { min-height: 30px; padding: 5px 9px; font-size: 10px; }
.button.link { min-height: 0; padding: 0; color: var(--navy-soft); background: transparent; }
.inline-form { display: inline; }
.form-card { padding: 18px; }
.form-card h3 { margin-bottom: 14px; }
.form-grid { display: grid; gap: 13px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.wide { grid-column: span 2; }
.field.full { grid-column: 1 / -1; }
.field label { color: #5d626b; font-size: 11px; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #d6e0e8; border-radius: 8px; outline: 0; color: var(--ink); background: #fbfdfe; box-shadow: inset 0 1px 1px rgba(31,51,80,.025); }
.field textarea { min-height: 78px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #7faebe; box-shadow: 0 0 0 4px rgba(122,196,229,.15); }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 15px; padding-top: 15px; border-top: 1px solid #edf0f4; }
.table-card { overflow: hidden; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; border-bottom: 1px solid #e8ecf2; }
.table-toolbar h3 { margin: 0; }
.search { min-height: 36px; width: min(280px, 100%); padding: 7px 10px; border: 1px solid var(--border); border-radius: 7px; background: #fbfcfd; outline: 0; font-size: 11px; }
.data-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 11px 14px; color: #8996a9; background: #f7fafc; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 12px 14px; border-top: 1px solid #edf0f4; color: #536682; vertical-align: middle; }
tbody tr:hover { background: #f6f8fb; }
td strong { color: #3b4a66; }
.numeric { font-family: "Space Mono", monospace; text-align: right; }
.actions { display: flex; justify-content: flex-end; gap: 5px; }
.tag { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; background: #eef4f7; color: #52698f; font-size: 10px; font-weight: 800; white-space: nowrap; }
.tag.success { background: #e3f3eb; color: #347d72; }
.tag.warning { background: #fff1d0; color: var(--warning); }
.tag.danger { background: #fff0ed; color: var(--danger); }
.empty { padding: 38px 18px; color: #8996a9; text-align: center; }
.empty strong { display: block; margin-bottom: 6px; color: #536682; }
.document-line { display: grid; gap: 10px; grid-template-columns: 2fr .8fr 1fr 34px; align-items: end; padding: 10px 0; border-bottom: 1px solid #edf0f4; }
.document-line:last-child { border-bottom: 0; }
.document-line .remove { min-height: 40px; border: 0; border-radius: 7px; color: var(--danger); background: #fff0ed; }
.summary-box { padding: 15px; border-radius: 10px; background: #f7fafc; }
.summary-row { display: flex; justify-content: space-between; gap: 15px; padding: 5px 0; color: var(--muted); font-size: 12px; }
.summary-row.total { margin-top: 7px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--navy); font-size: 15px; font-weight: 800; }
.summary-row strong { font-family: "Space Mono", monospace; color: var(--ink); }
.footer { padding: 0 52px 20px; color: #a4afbf; font-size: 10px; }
.print-logo { max-width: 130px; max-height: 62px; object-fit: contain; margin-bottom: 8px; }
.subline { display: block; margin-top: 3px; color: #98a4b5; font-size: 10px; }
.muted { color: var(--muted); }
.text-right { text-align: right; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.print-note { margin-top: 22px; color: #677389; font-size: 11px; }
.install-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 85% 0, rgba(115,166,242,.22), transparent 28rem), var(--mist); }
.install-card { width: min(760px, 100%); padding: 28px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 20px 55px rgba(41,56,87,.1); }
.install-card h1 { margin: 0 0 7px; letter-spacing: -.05em; }
.install-card > p { margin: 0 0 24px; color: var(--muted); line-height: 1.55; }
.checklist { display: grid; gap: 8px; padding: 0; list-style: none; }
.checklist li { display: flex; justify-content: space-between; gap: 15px; padding: 11px 13px; border-radius: 8px; background: #f7fafc; font-size: 12px; }
.checklist .ok { color: var(--success); font-weight: 800; }
.checklist .bad { color: var(--danger); font-weight: 800; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 82% 5%, rgba(115,166,242,.25), transparent 26rem), var(--mist); }
.login-card { width: min(420px, 100%); padding: 30px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 20px 55px rgba(41,56,87,.1); }
.login-card h1 { margin: 0; letter-spacing: -.05em; }
.login-card p { color: var(--muted); line-height: 1.5; }
@media (max-width: 920px) { .sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; transform: translateX(-100%); transition: transform .2s ease; } body.nav-open .sidebar { transform: translateX(0); } .mobile-menu { display: block; } .topbar { justify-content: flex-start; } .topbar-user { display: none; } .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer { padding-inline: 20px; } }
@media (max-width: 640px) { .page-heading { align-items: flex-start; flex-direction: column; } .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; } .field.wide, .field.full { grid-column: auto; } .table-toolbar { align-items: stretch; flex-direction: column; } .search { width: 100%; } .document-line { grid-template-columns: 1fr 1fr; } .document-line .line-item { grid-column: 1 / -1; } }
@media print { .sidebar, .topbar, .footer, .page-heading, .no-print, .button, form { display: none !important; } .app-shell, .main-shell, .page { display: block; width: 100%; padding: 0; background: #fff; } .card { border: 0; box-shadow: none; } }