:root {
  --navy: #102a43;
  --blue: #145da0;
  --blue-soft: #eaf4ff;
  --gold: #d5a021;
  --surface: #ffffff;
  --bg: #f3f6f9;
  --border: #dbe4ec;
  --text: #25364a;
  --muted: #6b7c8f;
  --success: #177245;
  --success-bg: #e8f7ef;
  --danger: #b42318;
  --danger-bg: #feeeee;
  --warning: #9a6700;
  --warning-bg: #fff6db;
  --shadow: 0 10px 30px rgba(16, 42, 67, .08);
  --radius: 14px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, "Segoe UI", Arial, sans-serif; color: var(--text); background: var(--bg); line-height: 1.5; }
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font: inherit; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50; display: flex; flex-direction: column; padding: 22px 16px; color: #fff; background: linear-gradient(180deg, #0c2843 0%, #123e62 100%); }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 22px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.14); }
.brand-logo-wrap { width: 48px; height: 58px; display: grid; place-items: center; flex: 0 0 48px; }
.brand-logo { display: block; width: 46px; height: 56px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,.24)); }
.brand strong, .brand small, .sidebar-footer strong, .sidebar-footer small { display: block; }
.brand strong { font-size: 16px; }
.brand small { color: #c5d9ea; font-size: 11px; }
.nav-menu { margin-top: 20px; overflow-y: auto; }
.nav-menu a { display: flex; align-items: center; gap: 11px; padding: 11px 13px; margin-bottom: 4px; border-radius: 9px; color: #d5e5f2; transition: .2s ease; }
.nav-menu a span { width: 20px; text-align: center; font-size: 17px; }
.nav-menu a:hover, .nav-menu a.active { color: #fff; background: rgba(255,255,255,.13); }
.nav-menu a.active { box-shadow: inset 3px 0 var(--gold); }
.nav-heading { margin: 22px 13px 8px; color: #90b1c9; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sidebar-footer { display: flex; align-items: center; gap: 10px; padding: 15px 8px 0; margin-top: auto; border-top: 1px solid rgba(255,255,255,.14); }
.sidebar-footer small { color: #b9d0e2; font-size: 11px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 800; }
.main-content { width: calc(100% - 260px); min-height: 100vh; margin-left: 260px; display: flex; flex-direction: column; }
.topbar { min-height: 84px; display: flex; align-items: center; gap: 16px; padding: 15px 28px; background: #fff; border-bottom: 1px solid var(--border); }
.topbar h1 { margin: 0; font-size: 22px; color: var(--navy); }
.eyebrow { margin: 0 0 1px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.top-actions { display: flex; gap: 8px; margin-left: auto; }
.menu-toggle { display: none; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 21px; }
.content { flex: 1; padding: 28px; }
.footer { padding: 18px 28px; color: var(--muted); border-top: 1px solid var(--border); font-size: 12px; text-align: center; }
.page-actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.page-actions > div { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-weight: 650; font-size: 13px; transition: .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--blue); }
.btn-success { color: #fff; background: var(--success); }
.btn-danger { color: var(--danger); background: var(--danger-bg); border-color: #f8c5c1; }
.btn-warning { color: #704d00; background: #ffe9a8; border-color: #ead07f; }
.btn-light { color: var(--text); background: #f6f8fa; border-color: var(--border); }
.btn-outline { color: var(--blue); background: #fff; border-color: #9dbbd4; }
.btn-sm { min-height: 31px; padding: 5px 9px; font-size: 12px; }
.btn-icon { align-self: end; width: 40px; padding-inline: 0; font-size: 19px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.card-header h2, .card-header h3 { margin: 0; color: var(--navy); font-size: 17px; }
.card-body { padding: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card { position: relative; overflow: hidden; padding: 19px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card::after { content: ""; position: absolute; right: -18px; bottom: -28px; width: 90px; height: 90px; border-radius: 50%; background: var(--blue-soft); }
.stat-card p { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.stat-card strong { color: var(--navy); font-size: 28px; }
.stat-card small { display: block; margin-top: 4px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field { min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field-grow { flex: 1; }
.field label { display: block; margin-bottom: 6px; color: #354b60; font-size: 12px; font-weight: 700; }
.required::after { content: " *"; color: var(--danger); }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 11px; color: var(--text); background: #fff; border: 1px solid #bdcbd7; border-radius: 8px; outline: none; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20,93,160,.12); }
.field small, .help-text { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.filter-bar { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1.5fr auto; gap: 10px; padding: 16px; margin-bottom: 18px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.filter-bar .field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 11px 12px; color: #526a7d; background: #f4f7fa; border-bottom: 1px solid var(--border); text-align: left; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid #e9eef2; vertical-align: top; }
tbody tr:hover { background: #f9fbfd; }
.actions { display: flex; gap: 5px; flex-wrap: wrap; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge-success { color: var(--success); background: var(--success-bg); }
.badge-info { color: #0f5f9b; background: var(--blue-soft); }
.badge-danger { color: var(--danger); background: var(--danger-bg); }
.badge-muted { color: #5e6d7a; background: #edf1f4; }
.badge-warning { color: var(--warning); background: var(--warning-bg); }
.alert { padding: 12px 15px; margin-bottom: 17px; border: 1px solid; border-radius: 9px; font-size: 13px; }
.alert-success { color: var(--success); background: var(--success-bg); border-color: #a9dec2; }
.alert-danger { color: var(--danger); background: var(--danger-bg); border-color: #f2bbb6; }
.alert-warning { color: var(--warning); background: var(--warning-bg); border-color: #ead28a; }
.alert-info { color: #0f5f9b; background: var(--blue-soft); border-color: #b7d8f5; }
.evidence-row { display: flex; gap: 10px; align-items: flex-end; padding: 14px; margin-bottom: 10px; background: #f6f9fb; border: 1px solid var(--border); border-radius: 10px; }
.progress { height: 8px; overflow: hidden; background: #e7edf2; border-radius: 99px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #55a4df); border-radius: inherit; }
.empty-state { padding: 45px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--navy); }
.detail-list { display: grid; grid-template-columns: 170px 1fr; margin: 0; }
.detail-list dt, .detail-list dd { padding: 10px 0; margin: 0; border-bottom: 1px solid #edf1f4; }
.detail-list dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.metric-highlight { padding: 18px; text-align: center; background: var(--blue-soft); border-radius: 10px; }
.metric-highlight strong { display: block; color: var(--blue); font-size: 30px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top right, #1c669f, #0b2944 55%, #081d30); }
.login-box { width: min(940px, 100%); display: grid; grid-template-columns: 1fr .95fr; overflow: hidden; background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.login-hero { position: relative; padding: 56px 45px; color: #fff; background: linear-gradient(145deg, #123e62, #0c2843); }
.login-hero::after { content: ""; position: absolute; right: -80px; bottom: -100px; width: 280px; height: 280px; border: 55px solid rgba(213,160,33,.15); border-radius: 50%; }
.login-logo-wrap { width: 98px; height: 126px; display: grid; place-items: center; margin-bottom: 24px; }
.login-logo { display: block; width: 94px; height: 124px; object-fit: contain; filter: drop-shadow(0 7px 12px rgba(0,0,0,.25)); }
.login-hero h1 { margin: 0 0 10px; font-size: 34px; }
.login-hero p { max-width: 390px; color: #c7dcea; }
.login-form { padding: 56px 45px; }
.login-form h2 { margin: 0 0 4px; color: var(--navy); }
.login-form > p { margin: 0 0 26px; color: var(--muted); }
.login-form .field { margin-bottom: 15px; }
.login-form .btn { width: 100%; margin-top: 7px; }
.login-note { padding: 10px; margin-top: 22px; color: var(--muted); background: #f5f8fa; border-radius: 8px; font-size: 11px; }
.sidebar-overlay { display: none; }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.nowrap { white-space: nowrap; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.print-only { display: none; }

@media (max-width: 1050px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.show { position: fixed; inset: 0; z-index: 40; display: block; background: rgba(5,20,33,.55); }
  .main-content { width: 100%; margin-left: 0; }
  .menu-toggle { display: block; }
  .topbar { padding: 13px 16px; }
  .topbar h1 { font-size: 18px; }
  .top-actions .btn-light { display: none; }
  .content { padding: 18px 14px; }
  .form-grid, .filter-bar { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card strong { font-size: 23px; }
  .evidence-row { align-items: stretch; flex-direction: column; }
  .btn-icon { align-self: flex-end; }
  .detail-list { grid-template-columns: 1fr; }
  .detail-list dt { padding-bottom: 0; border-bottom: 0; }
  .login-box { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-form { padding: 38px 28px; }
}
@media print {
  .sidebar, .topbar, .footer, .no-print, .sidebar-overlay { display: none !important; }
  .main-content { width: 100%; margin: 0; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 0; }
  body { background: #fff; color: #000; }
  .print-only { display: block !important; }
}
