:root {
  --navy: #0b1f3a;
  --navy-2: #163a63;
  --navy-3: #244f7d;
  --blue-soft: #eaf1f8;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #0b1f3a;
  --muted: #64748b;
  --border: #dce5ef;
  --success: #15803d;
  --success-soft: #eaf8ef;
  --warning: #c66a07;
  --warning-soft: #fff4e5;
  --danger: #c62828;
  --danger-soft: #fff0f0;
  --shadow: 10px 10px 26px rgba(11,31,58,.10), -8px -8px 22px rgba(255,255,255,.96);
  --shadow-small: 5px 5px 14px rgba(11,31,58,.10), -5px -5px 14px rgba(255,255,255,.95);
  --inset: inset 3px 3px 8px rgba(11,31,58,.09), inset -3px -3px 8px #fff;
  --radius: 22px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 19px; height: 19px; stroke-width: 2; }
h1,h2,h3,p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.55rem,2vw,2rem); letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 1.25rem; letter-spacing: -.025em; }
h3 { margin-bottom: 4px; font-size: 1rem; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px 20px; background: var(--navy); color: white; display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 1.1rem; font-weight: 500; }
.brand b { font-weight: 800; }
.brand-mark { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 14px; background: white; color: var(--navy); font-size: .85rem; font-weight: 800; box-shadow: 6px 6px 16px rgba(0,0,0,.22), -4px -4px 13px rgba(255,255,255,.08); }
.nav-list { display: flex; flex-direction: column; gap: 7px; margin-top: 42px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; color: #bfcce0; border-radius: 14px; font-weight: 600; transition: .2s ease; }
.nav-link:hover { color: white; background: rgba(255,255,255,.07); }
.nav-link.active { color: var(--navy); background: white; box-shadow: 6px 6px 15px rgba(0,0,0,.22), -3px -3px 10px rgba(255,255,255,.08); }
.sidebar-user { margin-top: auto; padding: 14px 10px; display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-user strong,.sidebar-user span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-user strong { font-size: .84rem; }.sidebar-user span { font-size: .72rem; color: #9fb1ca; }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--navy); background: white; font-weight: 800; }
.main-content { min-width: 0; }
.topbar { min-height: 104px; padding: 25px clamp(22px,4vw,52px); display: flex; align-items: center; gap: 18px; border-bottom: 1px solid rgba(220,229,239,.7); background: rgba(244,247,251,.9); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .85rem; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px var(--success-soft); }
.eyebrow { display: block; margin-bottom: 4px; color: var(--navy-3); font-size: .69rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.eyebrow.light { color: #a9bdd6; }
.page-content { padding: 32px clamp(20px,4vw,52px) 60px; }
.page-content > * + * { margin-top: 25px; }
.mobile-menu { display: none !important; }

.neo-card,.panel,.form-card,.detail-hero { background: var(--surface); border: 1px solid rgba(220,229,239,.85); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel,.form-card { padding: clamp(20px,2.5vw,30px); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.kpi-grid { display: grid; grid-template-columns: repeat(6,minmax(150px,1fr)); gap: 18px; }
.kpi-card { min-height: 120px; padding: 20px; display: flex; align-items: center; gap: 15px; background: white; border: 1px solid rgba(220,229,239,.85); border-radius: 20px; box-shadow: var(--shadow-small); }
.kpi-card > div:last-child { min-width: 0; }
.kpi-card span,.kpi-card small,.list-row span,.client-card span,.kit-card p,td small { display: block; color: var(--muted); font-size: .76rem; }
.kpi-card strong { display: block; margin-top: 2px; font-size: 1.75rem; line-height: 1.1; letter-spacing: -.04em; }
.kpi-icon,.icon-orb { flex: 0 0 auto; display: grid; place-items: center; color: white; background: var(--navy); border-radius: 15px; box-shadow: 5px 5px 13px rgba(11,31,58,.22); }
.kpi-icon { width: 46px; height: 46px; }.icon-orb { width: 44px; height: 44px; }
.icon-orb.large { width: 64px; height: 64px; border-radius: 20px; }.icon-orb.large svg { width: 28px; height: 28px; }
.kpi-icon.success { background: var(--success); }.kpi-icon.warning { background: var(--warning); }.kpi-icon.danger { background: var(--danger); }.kpi-icon.info { background: var(--navy-3); }
.content-grid { display: grid; gap: 24px; align-items: start; }.content-grid.two-thirds { grid-template-columns: minmax(0,2fr) minmax(300px,1fr); }.content-grid.half { grid-template-columns: repeat(2,minmax(0,1fr)); }.content-grid.one-third { grid-template-columns: minmax(250px,1fr) minmax(0,2fr); }

.table-wrap { overflow-x: auto; border-radius: 16px; box-shadow: var(--inset); background: var(--bg); padding: 5px; }
table { width: 100%; border-collapse: collapse; background: transparent; }
th,td { padding: 15px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-size: .69rem; text-transform: uppercase; letter-spacing: .08em; }
td { font-size: .86rem; background: rgba(255,255,255,.62); }tbody tr:last-child td { border-bottom: 0; }
td strong,td small { display: block; }.table-wrap .icon-button { width: 34px; height: 34px; }
.badge { display: inline-flex; align-items: center; width: fit-content; padding: 5px 10px; border-radius: 999px; color: var(--navy-2); background: var(--blue-soft); font-size: .7rem; font-weight: 800; }
.badge.success { color: var(--success); background: var(--success-soft); }.badge.warning { color: var(--warning); background: var(--warning-soft); }.badge.danger { color: var(--danger); background: var(--danger-soft); }.badge.info { color: var(--navy-2); background: var(--blue-soft); }
.alert { margin: 20px clamp(20px,4vw,52px) 0; padding: 13px 17px; border-radius: 14px; font-weight: 600; }.alert.success { color: var(--success); background: var(--success-soft); }.alert.danger { color: var(--danger); background: var(--danger-soft); }

.button,.icon-button { border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; transition: transform .15s,box-shadow .15s,background .15s; }
.button { min-height: 43px; padding: 0 17px; border-radius: 13px; }
.button.primary { color: white; background: var(--navy); box-shadow: 5px 5px 13px rgba(11,31,58,.23); }.button.primary:hover { background: var(--navy-2); transform: translateY(-1px); }.button.primary:active { transform: translateY(1px); box-shadow: inset 3px 3px 8px rgba(0,0,0,.25); }
.button.secondary { color: var(--navy); background: white; border: 1px solid var(--border); box-shadow: var(--shadow-small); }.button.secondary:hover { color: white; background: var(--navy); }
.button.ghost { color: var(--muted); background: transparent; }.button.wide { width: 100%; }
.button.danger { color: #fff; background: var(--danger); box-shadow: 5px 5px 13px rgba(196,58,58,.2); }
.button.danger:hover { filter: brightness(.92); transform: translateY(-1px); }
.entity-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px; }
.inline-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; }
.inline-actions form { margin:0; }
.danger-zone { border-color:rgba(196,58,58,.24); }
.danger-zone p { color:var(--muted); }
.empty-state { padding:28px; color:var(--muted); text-align:center; }
.icon-button { width: 42px; height: 42px; color: var(--navy); background: white; border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow-small); }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--navy-2); font-weight: 800; font-size: .82rem; }.text-link svg { width: 15px; }
.button-row,.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.alert-list,.list-stack,.action-stack { display: flex; flex-direction: column; gap: 10px; }
.alert-row,.list-row { min-height: 64px; padding: 13px 15px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-radius: 15px; background: var(--bg); box-shadow: var(--inset); }
.alert-counts { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }.list-row.selected { color: white; background: var(--navy); box-shadow: none; }.list-row.selected span { color: #c7d5e8; }
.client-card-grid,.kit-grid { display: grid; grid-template-columns: repeat(3,minmax(220px,1fr)); gap: 18px; }
.client-card,.kit-card { position: relative; padding: 20px; border-radius: 18px; background: var(--bg); box-shadow: var(--inset); }
.client-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.metric-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin: 16px 0; }.metric-row > div { padding: 10px 6px; text-align: center; border-radius: 12px; background: white; box-shadow: 3px 3px 8px rgba(11,31,58,.07); }.metric-row strong,.metric-row span { display: block; }.metric-row strong { font-size: 1.15rem; }.metric-row span { font-size: .65rem; }
.kit-card-top { display: flex; justify-content: space-between; align-items: start; }.kit-card h3 { margin-top: 16px; }.kit-progress { height: 8px; margin: 16px 0 4px; border-radius: 99px; background: #dfe7f0; box-shadow: var(--inset); overflow: hidden; }.kit-progress span { display: block; height: 100%; border-radius: inherit; background: var(--navy-2); }.metric-row.compact { margin: 10px 0 18px; }
.card-context { display: block; padding: 0 8px 7px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.detail-hero { padding: 24px 28px; display: flex; align-items: center; gap: 18px; }.detail-hero > div:nth-child(2) { flex: 1; }.detail-hero p { margin: 6px 0 0; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }.form-stack { display: flex; flex-direction: column; gap: 16px; }.full { grid-column: 1/-1; }
label { color: var(--text); font-size: .78rem; font-weight: 700; }
input,select,textarea { width: 100%; margin-top: 7px; padding: 12px 14px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 13px; outline: none; box-shadow: var(--inset); }
input:focus,select:focus,textarea:focus { border-color: var(--navy-3); box-shadow: 0 0 0 3px rgba(36,79,125,.13),var(--inset); }
.search-box { position: relative; min-width: 240px; }.search-box svg { position: absolute; left: 13px; top: 18px; color: var(--muted); }.search-box input { padding-left: 40px; margin: 0; background: white; }
.password-field { position: relative; }.password-field button { position: absolute; right: 7px; top: 13px; width: 38px; height: 38px; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.note-box,.demo-box { padding: 15px 17px; color: var(--navy); background: var(--blue-soft); border-radius: 15px; }.note-box p { margin: 5px 0 0; color: var(--muted); }.demo-box { margin-top: 22px; }.demo-box strong,.demo-box span,.demo-box small { display: block; }.demo-box span { margin: 4px 0; }.demo-box small { color: var(--muted); }
.assignment-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }.assignment-card { position: relative; padding: 18px; display: grid; grid-template-columns: 45px 1fr; column-gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 16px; background: var(--bg); box-shadow: var(--inset); cursor: pointer; }.assignment-card input { position: absolute; opacity: 0; }.assignment-card strong,.assignment-card small { grid-column: 2; }.checkmark { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; display: grid; place-items: center; color: white; background: #b6c1cf; border-radius: 8px; }.assignment-card input:checked ~ .checkmark { background: var(--navy); }.assignment-card input:checked ~ .icon-orb { background: var(--navy-3); }
.timeline { padding-left: 9px; }.timeline-item { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 11px; padding-bottom: 20px; }.timeline-item::before { content:""; position:absolute; left:6px; top:14px; bottom:-2px; width:2px; background:var(--border); }.timeline-item:last-child::before { display:none; }.timeline-dot { width:14px; height:14px; margin-top:4px; border:3px solid var(--navy); border-radius:50%; background:white; z-index:1; }.timeline-item strong,.timeline-item span { display:block; }.timeline-item span { color:var(--muted);font-size:.75rem; }.timeline-item p { margin:4px 0 0; }
.empty-state { padding: 35px; text-align: center; color: var(--muted); }

.login-page { display: grid; place-items: center; padding: 28px; background: var(--bg); }
.login-shell { width: min(1050px,100%); min-height: 650px; display: grid; grid-template-columns: 1.15fr .85fr; border-radius: 30px; overflow: hidden; box-shadow: 18px 18px 45px rgba(11,31,58,.17),-12px -12px 36px white; }
.login-visual { padding: 48px; color: white; background: var(--navy); display: flex; flex-direction: column; justify-content: space-between; }.login-visual h1 { margin: 14px 0 20px; font-size: clamp(2.2rem,4vw,4rem); line-height: 1.02; letter-spacing: -.06em; }.login-visual p { max-width: 420px; color: #b8c8dc; font-size: 1rem; }.login-stats { display: flex; gap: 55px; }.login-stats strong,.login-stats span { display: block; }.login-stats strong { font-size: 1.5rem; }.login-stats span { color: #a9bdd6; font-size: .75rem; }.login-panel { padding: 56px 45px; border-radius: 0; display: flex; flex-direction: column; justify-content: center; box-shadow: none; }.login-panel h2 { margin: 4px 0 8px; font-size: 2rem; }.login-panel > div > p { color: var(--muted); }.login-brand { align-self: flex-start; }
.error-page { min-height: 100vh; display:grid;place-items:center;padding:30px;background:var(--bg); }.error-page .neo-card { padding:50px;text-align:center; }.error-code { color:var(--navy);font-size:4rem;font-weight:800; }

@media (max-width: 1300px) { .kpi-grid { grid-template-columns: repeat(3,1fr); }.client-card-grid,.kit-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 920px) { .app-shell { grid-template-columns:1fr; }.sidebar { position:fixed;left:-280px;width:260px;transition:left .2s;box-shadow:18px 0 35px rgba(11,31,58,.23); }.sidebar.open { left:0; }.mobile-menu { display:grid !important; }.content-grid.two-thirds,.content-grid.half,.content-grid.one-third { grid-template-columns:1fr; }.login-shell { grid-template-columns:1fr; }.login-visual { min-height:360px; }.login-panel { border-radius:0; }.topbar-actions { display:none; } }
@media (max-width: 650px) { .page-content { padding:22px 14px 45px; }.topbar { min-height:86px;padding:18px 15px; }.kpi-grid,.client-card-grid,.kit-grid,.form-grid,.assignment-grid { grid-template-columns:1fr; }.kpi-card { min-height:96px; }.section-head,.detail-hero { align-items:flex-start;flex-direction:column; }.search-box { width:100%;min-width:0; }.detail-hero .badge { position:absolute;right:20px;top:20px; }.detail-hero { position:relative; }.login-page { padding:0; }.login-shell { min-height:100vh;border-radius:0; }.login-visual { padding:32px 25px; }.login-panel { padding:38px 24px; }.login-stats { gap:25px; }.button-row { width:100%;justify-content:flex-start; } }
