/* ============================================================
   Wilen Group — Vendor Risk Management Portal
   app.css — Global styles
   ============================================================ */

/* ── Fonts ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  /* Wilen brand colors */
  --navy:           #0d2145;
  --navy-mid:       #1a3560;
  --blue:           #1f5c8b;
  --blue-mid:       #2d72a8;
  --blue-light:     #5ba3cc;
  --blue-pale:      #e8f2f9;
  --blue-xpale:     #f0f6fb;

  /* Neutrals */
  --white:          #ffffff;
  --bg:             #f2f5f8;
  --bg-card:        #ffffff;
  --border:         #dce4ed;
  --border-light:   #eef2f7;
  --text:           #1e1e1e;
  --text-mid:       #4a5568;
  --text-muted:     #8a9bb0;

  /* Status colors */
  --green:          #2e7d52;
  --green-bg:       #eaf5ef;
  --orange:         #d4762a;
  --orange-bg:      #fdf2e8;
  --red:            #c0392b;
  --red-bg:         #fdf0ee;
  --yellow:         #b7860b;
  --yellow-bg:      #fdf8e8;

  /* Risk level colors */
  --risk-low:       #2e7d52;
  --risk-low-bg:    #eaf5ef;
  --risk-medium:    #b7860b;
  --risk-medium-bg: #fdf8e8;
  --risk-high:      #d4762a;
  --risk-high-bg:   #fdf2e8;
  --risk-critical:  #c0392b;
  --risk-critical-bg: #fdf0ee;

  /* Layout */
  --sidebar-w:      240px;
  --header-h:       60px;
  --radius:         8px;
  --radius-lg:      12px;
  --radius-xl:      16px;
  --shadow:         0 2px 12px rgba(13, 33, 69, 0.08);
  --shadow-md:      0 4px 24px rgba(13, 33, 69, 0.12);
  --shadow-lg:      0 8px 40px rgba(13, 33, 69, 0.16);

  /* Typography — Century Gothic with fallbacks */
  --font:           'Century Gothic', 'CenturyGothic', 'AppleGothic', 'DM Sans', sans-serif;
  --font-body:      'DM Sans', 'Century Gothic', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-mid); }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); }

/* ── App shell ──────────────────────────────────────────────── */
#app { display: flex; min-height: 100vh; }

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.2s ease;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.sidebar-logo-text {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  line-height: 1.3;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.3);
  padding: 12px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.65);
  font-size: 13.5px;
  font-weight: 400;
  transition: all 0.15s;
  cursor: pointer;
  border-left: 3px solid transparent;
  user-select: none;
}
.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
}
.nav-item.active {
  background: rgba(91,163,204,0.15);
  color: var(--blue-light);
  border-left-color: var(--blue-light);
  font-weight: 500;
}
.nav-item .nav-icon {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  flex-shrink: 0;
}
.nav-item.active .nav-icon { opacity: 1; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-transform: capitalize;
}
.sidebar-logout {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}
.sidebar-logout:hover { color: rgba(255,255,255,0.7); }

/* ── Main content area ──────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.3px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-content {
  padding: 28px 32px 60px;
  flex: 1;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.card-title {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.2px;
}
.card-body { padding: 24px; }

/* ── Stat cards (dashboard) ─────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.stat-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon.blue   { background: var(--blue-pale);   }
.stat-icon.green  { background: var(--green-bg);    }
.stat-icon.orange { background: var(--orange-bg);   }
.stat-icon.red    { background: var(--red-bg);      }
.stat-icon svg    { width: 20px; height: 20px;      }
.stat-info { flex: 1; }
.stat-value {
  font-family: var(--font);
  font-size: 26px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.1;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: var(--font-body);
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-primary {
  background: var(--blue);
  color: white;
}
.btn-primary:hover { background: var(--blue-mid); }
.btn-secondary {
  background: var(--blue-pale);
  color: var(--blue);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #daeaf5; }
.btn-ghost {
  background: transparent;
  color: var(--text-mid);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg); }
.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #f0c0bb;
}
.btn-danger:hover { background: #fae0de; }
.btn-success {
  background: var(--green);
  color: white;
}
.btn-success:hover { background: #256644; }
.btn-navy {
  background: var(--navy);
  color: white;
}
.btn-navy:hover { background: var(--navy-mid); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Badges / pills ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge-low      { background: var(--risk-low-bg);      color: var(--risk-low);      }
.badge-medium   { background: var(--risk-medium-bg);   color: var(--risk-medium);   }
.badge-high     { background: var(--risk-high-bg);     color: var(--risk-high);     }
.badge-critical { background: var(--risk-critical-bg); color: var(--risk-critical); }
.badge-low      .badge-dot { background: var(--risk-low);      }
.badge-medium   .badge-dot { background: var(--risk-medium);   }
.badge-high     .badge-dot { background: var(--risk-high);     }
.badge-critical .badge-dot { background: var(--risk-critical); }

.badge-approved   { background: var(--green-bg);   color: var(--green);  }
.badge-submitted  { background: var(--blue-pale);  color: var(--blue);   }
.badge-draft      { background: var(--bg);         color: var(--text-muted); border: 1px solid var(--border); }
.badge-in-progress{ background: var(--yellow-bg);  color: var(--yellow); }
.badge-rejected   { background: var(--red-bg);     color: var(--red);    }
.badge-overdue    { background: var(--red-bg);     color: var(--red);    }
.badge-due-soon   { background: var(--orange-bg);  color: var(--orange); }
.badge-current    { background: var(--green-bg);   color: var(--green);  }
.badge-never      { background: var(--bg);         color: var(--text-muted); border: 1px solid var(--border); }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 10px 16px;
  border-bottom: 2px solid var(--border);
  background: var(--bg);
  white-space: nowrap;
}
tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--blue-xpale); }
tbody tr { transition: background 0.1s; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-mid);
}
.form-input,
.form-select,
.form-textarea {
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
}
.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.form-textarea { resize: vertical; min-height: 90px; }
.form-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Risk question rows ─────────────────────────────────────── */
.risk-table { width: 100%; border-collapse: collapse; }
.risk-table th {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 10px 16px;
  border-bottom: 2px solid var(--border);
  background: var(--bg);
  text-align: left;
}
.risk-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
.risk-table tr:last-child td { border-bottom: none; }
.risk-table tr:hover td { background: var(--blue-xpale); }
.q-text { font-weight: 500; font-size: 13.5px; color: var(--navy); margin-bottom: 3px; }
.q-weight { font-size: 11px; color: var(--text-muted); }
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  transition: all 0.15s;
}
.radio-option:hover { background: var(--blue-pale); }
.radio-option input[type="radio"] { accent-color: var(--blue); flex-shrink: 0; }
.radio-option.selected {
  background: var(--blue-pale);
  border-color: var(--blue-light);
}
.radio-label { font-size: 13px; color: var(--text); flex: 1; }
.radio-pts {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
}
.score-cell {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}
.score-cell.scored { color: var(--blue); }

/* ── Score banner ───────────────────────────────────────────── */
.score-banner {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.score-banner-value {
  font-family: var(--font);
  font-size: 40px;
  font-weight: 600;
  color: var(--blue-light);
  line-height: 1;
}
.score-banner-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 2px;
}
.score-banner-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}
.score-divider {
  width: 1px;
  height: 52px;
  background: rgba(255,255,255,0.1);
}
.score-bar-wrap { flex: 1; min-width: 200px; }
.score-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}
.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--blue-light);
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
}

/* ── Document checklist ─────────────────────────────────────── */
.doc-table { width: 100%; border-collapse: collapse; }
.doc-table th {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 10px 16px;
  border-bottom: 2px solid var(--border);
  background: var(--bg);
  text-align: left;
}
.doc-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.doc-table tr:last-child td { border-bottom: none; }
.doc-status-select {
  font-family: var(--font-body);
  font-size: 12.5px;
  padding: 5px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  min-width: 180px;
}
.doc-notes-input {
  font-family: var(--font-body);
  font-size: 12.5px;
  padding: 5px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  width: 100%;
  resize: none;
}
.doc-notes-input:focus,
.doc-status-select:focus { outline: none; border-color: var(--blue); background: white; }

/* ── Recommendation options ─────────────────────────────────── */
.rec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.rec-options { display: flex; flex-direction: column; gap: 10px; }
.rec-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg);
}
.rec-option:hover { border-color: var(--blue-light); background: var(--blue-pale); }
.rec-option.selected-approve  { border-color: var(--green);  background: var(--green-bg);  }
.rec-option.selected-conditions{ border-color: var(--yellow); background: var(--yellow-bg); }
.rec-option.selected-defer    { border-color: var(--orange); background: var(--orange-bg); }
.rec-option.selected-reject   { border-color: var(--red);    background: var(--red-bg);    }
.rec-text { font-size: 13.5px; font-weight: 500; color: var(--text); }

/* ── File upload ────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
  background: var(--bg);
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--blue);
  background: var(--blue-pale);
}
.upload-zone-text { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.upload-zone-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.attachment-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.attachment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}
.attachment-item .file-name { flex: 1; color: var(--text); font-weight: 500; }
.attachment-item .file-size { color: var(--text-muted); font-size: 12px; }
.attachment-item .file-version { color: var(--blue); font-size: 11px; font-weight: 600; }

/* ── Page header ────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.page-header-left {}
.page-heading {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.3px;
}
.page-subheading {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}
.page-header-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

/* ── Section card headers ───────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.section-num {
  width: 26px; height: 26px;
  background: var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.section-title {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}

/* ── Toast notifications ────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  color: white;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.2s ease;
  max-width: 320px;
}
.toast-success { background: var(--green); }
.toast-error   { background: var(--red);   }
.toast-info    { background: var(--blue);  }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* ── Loading spinner ────────────────────────────────────────── */
.spinner {
  width: 24px; height: 24px;
  border: 2.5px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state-icon {
  width: 48px; height: 48px;
  margin: 0 auto 16px;
  opacity: 0.3;
}
.empty-state h3 {
  font-family: var(--font);
  font-size: 16px;
  color: var(--text-mid);
  margin-bottom: 8px;
}
.empty-state p { font-size: 13px; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 33, 69, 0.5);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0);    }
}
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s;
  display: flex;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Login page ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  padding: 24px;
}
.login-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.login-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
  margin-bottom: 24px;
}
.login-title {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}
.login-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.5;
}
.login-btn {
  width: 100%;
  padding: 13px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.login-btn:hover { background: var(--blue-mid); }
.login-footer {
  margin-top: 24px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ── Score history chart area ───────────────────────────────── */
.history-chart {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 20px 0 8px;
  min-height: 120px;
}
.history-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.history-bar-track {
  width: 100%;
  background: var(--border-light);
  border-radius: 4px;
  height: 80px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.history-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 0.5s cubic-bezier(.4,0,.2,1);
  min-height: 4px;
}
.history-bar.low      { background: var(--risk-low);      }
.history-bar.medium   { background: var(--risk-medium);   }
.history-bar.high     { background: var(--risk-high);     }
.history-bar.critical { background: var(--risk-critical); }
.history-year { font-size: 11px; color: var(--text-muted); }
.history-score { font-size: 13px; font-weight: 600; color: var(--navy); }

/* ── Approval block ─────────────────────────────────────────── */
.approval-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sig-field { display: flex; flex-direction: column; gap: 5px; }
.sig-field label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-mid);
}

/* ── Locked evaluation banner ───────────────────────────────── */
.locked-banner {
  background: var(--green-bg);
  border: 1px solid #b0d9c0;
  border-radius: var(--radius);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--green);
  font-weight: 500;
  margin-bottom: 20px;
}
.locked-banner svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Utility ────────────────────────────────────────────────── */
.text-muted   { color: var(--text-muted); }
.text-navy    { color: var(--navy); }
.text-blue    { color: var(--blue); }
.text-sm      { font-size: 12px; }
.text-xs      { font-size: 11px; }
.fw-500       { font-weight: 500; }
.fw-600       { font-weight: 600; }
.mt-4         { margin-top: 4px; }
.mt-8         { margin-top: 8px; }
.mt-16        { margin-top: 16px; }
.mt-24        { margin-top: 24px; }
.mb-16        { margin-bottom: 16px; }
.mb-24        { margin-bottom: 24px; }
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.gap-16       { gap: 16px; }
.hidden       { display: none !important; }

/* ── Note block ─────────────────────────────────────────────── */
.note-block {
  background: var(--blue-xpale);
  border-left: 3px solid var(--blue-light);
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--text-mid);
  border-radius: 0 4px 4px 0;
  font-style: italic;
  margin-bottom: 20px;
}

/* ── Search / filter bar ────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}
.search-input-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 12px 8px 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: white;
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s;
}
.search-input:focus { outline: none; border-color: var(--blue); }
.filter-select {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: white;
  color: var(--text);
  cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--blue); }
