:root {
  --navy: #0b2c55;
  --navy-2: #123f74;
  --blue: #1264e8;
  --green: #008e62;
  --ink: #132238;
  --muted: #607189;
  --line: #d9e2ed;
  --surface: #ffffff;
  --bg: #f3f6fa;
  --danger: #aa2531;
  --shadow: 0 14px 35px rgba(19, 48, 84, .10);
}
* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
.logo { width: 150px; max-height: 62px; object-fit: contain; background: #fff; border-radius: 12px; padding: 9px 13px; }
.logo.large { width: 210px; max-height: 90px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 800; color: var(--green); margin: 0 0 8px; }
.muted { color: var(--muted); }
.legal { color: #6c7a8e; font-size: .78rem; text-align: center; line-height: 1.5; }
.legal.compact { margin: 24px 0 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 0; border-radius: 9px; padding: 0 18px; font-weight: 750; text-decoration: none; cursor: pointer; font-size: .9rem; }
.button.primary { background: var(--blue); color: #fff; box-shadow: 0 7px 18px rgba(18,100,232,.22); }
.button.secondary { background: var(--navy); color: #fff; }
.button.ghost { background: #edf2f8; color: var(--navy); }
.button.compact { min-height: 34px; padding: 0 12px; font-size: .78rem; background: #eaf2ff; color: #0a50bd; }
.button.full { width: 100%; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); }
.panel h2 { margin-top: 0; }
.alert { padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .9rem; }
.alert.error { background: #fff0f1; color: var(--danger); border: 1px solid #f3c4c9; }
.alert.success { background: #eaf8f2; color: #08704f; border: 1px solid #b9e8d6; }
label { display: grid; gap: 7px; font-size: .78rem; font-weight: 750; color: #34455c; }
input, select { width: 100%; min-height: 44px; border: 1px solid #c9d5e3; border-radius: 8px; padding: 9px 12px; background: #fff; color: var(--ink); font: inherit; }
input:focus, select:focus { outline: 3px solid rgba(18,100,232,.13); border-color: var(--blue); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid.one-col { grid-template-columns: 1fr; align-self: start; }
.span-2 { grid-column: 1 / -1; }
.actions { display: flex; justify-content: flex-end; }
.divider { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 12px; color: var(--navy); font-weight: 800; }
.install-page { padding: 42px 20px; background: linear-gradient(145deg, #eef4fb, #f8fafc); }
.install-shell { width: min(940px, 100%); margin: auto; }
.brand-card { background: var(--navy); color: #fff; padding: 25px 30px; display: flex; align-items: center; gap: 24px; border-radius: 18px 18px 0 0; }
.brand-card h1 { margin: 0 0 5px; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.brand-card p:last-child { margin: 0; color: #d8e7f7; }
.install-shell > .panel { border-radius: 0 0 18px 18px; }
.success-panel { text-align: center; padding: 60px 30px; }
.login-page { background: linear-gradient(120deg, var(--navy) 0 53%, #eef3f8 53%); display: grid; place-items: center; padding: 30px; }
.login-shell { width: min(1020px, 100%); display: grid; grid-template-columns: 1.15fr .85fr; background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,22,50,.25); }
.login-brand { background: var(--navy); color: #fff; padding: 62px; min-height: 590px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.login-brand h1 { font-size: clamp(2.1rem, 4vw, 3.5rem); line-height: 1.05; margin: 18px 0; }
.login-brand > p:not(.eyebrow) { color: #cbddef; max-width: 500px; font-size: 1.05rem; }
.security-note { margin-top: 42px; border: 1px solid rgba(255,255,255,.24); padding: 13px 16px; border-radius: 10px; color: #dbe9f7; font-size: .85rem; }
.security-note span { color: #f5bd33; margin-right: 7px; }
.login-card { padding: 60px 48px; display: flex; flex-direction: column; justify-content: center; }
.login-card h2 { font-size: 2rem; margin: 0; }
.login-card form { display: grid; gap: 18px; margin-top: 26px; }
.topbar { background: var(--navy); color: #fff; min-height: 88px; box-shadow: 0 4px 15px rgba(8,32,62,.18); }
.topbar-inner { width: min(1440px, 100%); margin: auto; padding: 13px 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand-inline { display: flex; align-items: center; gap: 20px; }
.brand-inline strong { display: block; font-size: 1.2rem; }
.brand-inline span { color: #bcd2e8; font-size: .82rem; }
.user-chip { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; align-items: center; text-align: right; }
.user-chip span { font-weight: 800; }
.user-chip small { color: #bed0e2; grid-column: 1; }
.user-chip a { grid-column: 2; grid-row: 1 / 3; background: rgba(255,255,255,.12); padding: 9px 12px; border-radius: 8px; text-decoration: none; font-size: .8rem; }
.app-shell { width: min(1440px, 100%); margin: auto; display: grid; grid-template-columns: 225px 1fr; min-height: calc(100vh - 128px); }
.sidebar { border-right: 1px solid var(--line); background: #fff; padding: 28px 18px; display: flex; flex-direction: column; justify-content: space-between; }
.sidebar nav { display: grid; gap: 7px; }
.sidebar nav a { padding: 12px 14px; border-radius: 9px; text-decoration: none; color: #405169; font-size: .88rem; font-weight: 700; }
.sidebar nav a.active { background: #e8f1ff; color: #0752c3; }
.side-note { padding: 15px; background: #f3f7fb; border-radius: 10px; font-size: .75rem; color: var(--muted); }
.side-note p { margin-bottom: 0; }
.workspace { min-width: 0; padding: 34px; }
.page-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 24px; }
.page-heading h1 { margin: 0 0 7px; font-size: 2rem; color: var(--navy); }
.page-heading p:last-child { color: var(--muted); margin: 0; }
.metric { min-width: 145px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; text-align: right; }
.metric span { display: block; font-weight: 850; color: var(--blue); font-size: 1.65rem; }
.metric small { color: var(--muted); }
.filter-bar { display: grid; grid-template-columns: 180px 180px auto auto; align-items: end; gap: 12px; margin-bottom: 18px; background: #fff; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.filter-bar.wide { grid-template-columns: 170px minmax(280px, 1fr) auto auto; }
.grow { min-width: 0; }
.table-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: auto; box-shadow: 0 9px 24px rgba(21,52,88,.05); }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
th { background: #edf3fa; color: var(--navy); text-align: left; padding: 13px 14px; white-space: nowrap; border-bottom: 1px solid var(--line); }
td { padding: 13px 14px; border-bottom: 1px solid #e8eef5; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--muted); margin-top: 4px; }
.money { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #e9f2ff; color: #0752c3; font-size: .68rem; font-weight: 850; letter-spacing: .04em; }
.empty { text-align: center; padding: 48px; color: var(--muted); }
.split { display: grid; grid-template-columns: 330px 1fr; gap: 22px; align-items: start; }
footer { background: #eaf0f6; color: #65768b; text-align: center; padding: 13px 20px; font-size: .7rem; }
@media (max-width: 900px) {
  .login-page { background: var(--navy); padding: 15px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: auto; padding: 35px; }
  .login-brand h1 { font-size: 2.35rem; }
  .login-card { padding: 38px 30px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; }
  .sidebar nav { display: flex; overflow-x: auto; }
  .sidebar nav a { white-space: nowrap; }
  .side-note { display: none; }
  .workspace { padding: 22px 15px; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .topbar-inner { padding: 10px 14px; }
  .brand-inline .logo { width: 92px; }
  .brand-inline strong { font-size: .9rem; }
  .user-chip span, .user-chip small { display: none; }
  .form-grid, .filter-bar, .filter-bar.wide { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .page-heading { align-items: start; flex-direction: column; }
  .metric { width: 100%; text-align: left; }
  .brand-card { align-items: flex-start; flex-direction: column; }
}

