/* ================================================================
   HOSPITAL TRAINING SYSTEM v5 — Clinical Precision Design
   Aesthetic: Deep Indigo × Amber Gold — authoritative, refined
   Fonts: DM Serif Display (headings) + Plus Jakarta Sans (body)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ── Variables ──────────────────────────────────────────── */
:root {
  --color-pass: #0D9488;
  --color-fail: #F87171;
  --color-neutral: #2563EB;
  --color-warning: #D97706;
  --color-sidebar: #0B1A3B;
  --color-bg: #F0F4F9;
  --color-card: #FFFFFF;
  --color-border: #E2E8F0;

  /* Brand */
  --indigo-900: #0F1B4C;
  --indigo-800: #1a2a6c;
  --indigo-700: #1e3a8a;
  --indigo-600: #2563eb;
  --indigo-500: #3b82f6;
  --indigo-100: #e0e7ff;
  --indigo-50:  #eef2ff;

  --amber-500: #F59E0B;
  --amber-400: #FBBF24;
  --amber-100: #FEF3C7;
  --amber-50:  #FFFBEB;

  --emerald-500: #10B981;
  --emerald-100: #D1FAE5;
  --rose-500: #F43F5E;
  --rose-100: #FFE4E6;
  --violet-500: #8B5CF6;
  --violet-100: #EDE9FE;
  --sky-500: #0EA5E9;
  --sky-100: #E0F2FE;

  /* Neutral */
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1F2937;
  --gray-700: #374151;
  --gray-600: #4B5563;
  --gray-500: #6B7280;
  --gray-400: #9CA3AF;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50:  #F9FAFB;
  --white: #FFFFFF;

  /* Semantic */
  --primary: var(--indigo-700);
  --primary-hover: var(--indigo-800);
  --primary-light: var(--indigo-50);
  --accent: var(--amber-500);
  --accent-light: var(--amber-50);

  --success: var(--emerald-500);
  --success-light: var(--emerald-100);
  --danger: var(--rose-500);
  --danger-light: var(--rose-100);
  --warning: var(--amber-500);
  --warning-light: var(--amber-100);
  --info: var(--indigo-600);
  --info-light: var(--indigo-50);

  /* Surfaces */
  --bg: var(--color-bg);
  --surface: var(--color-card);
  --surface-2: #F8FAFF;
  --surface-dark: var(--indigo-900);
  --sidebar-bg: var(--color-sidebar);
  --sidebar-w: 252px;

  /* Text */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-tertiary: var(--gray-400);
  --text-disabled: var(--gray-300);
  --text-on-dark: rgba(255,255,255,0.9);
  --text-on-dark-muted: rgba(255,255,255,0.5);

  /* Borders */
  --border: var(--color-border);
  --border-light: var(--gray-100);
  --border-dark: rgba(255,255,255,0.08);

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(15,27,76,.08), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 32px rgba(15,27,76,.10), 0 2px 8px rgba(0,0,0,.06);
  --shadow-xl: 0 24px 64px rgba(15,27,76,.14);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,.08);

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, 'PingFang SC', sans-serif;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
  /* Subtle dot-grid background texture */
  background-image: radial-gradient(circle, var(--indigo-100) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: 0 0;
}

/* ── Screens ────────────────────────────────────────────── */
.screen { position: fixed; inset: 0; }
.screen.active { display: flex; }
.screen.hidden { display: none !important; }

#boot-screen {
  align-items: center;
  justify-content: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 16%, rgba(10,132,255,0.16), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(48,185,138,0.12), transparent 26%),
    linear-gradient(180deg, #F8FAFC 0%, #F3F6FA 45%, #EEF3F8 100%);
}
.boot-card {
  width: min(360px, calc(100vw - 36px));
  padding: 32px 28px;
  border-radius: 26px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(255,255,255,0.88);
  box-shadow: 0 30px 80px rgba(15,23,42,0.12), inset 0 1px 0 rgba(255,255,255,0.95);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  text-align: center;
}
.boot-logo {
  width: 50px;
  height: 50px;
  margin: 0 auto 18px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #0A84FF, #30B98A);
  box-shadow: 0 10px 24px rgba(10,132,255,0.18);
}
.boot-logo svg {
  width: 30px;
  height: 30px;
}
.boot-title {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Helvetica Neue', sans-serif;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: 0;
  color: #1D1D1F;
}
.boot-subtitle {
  margin-top: 8px;
  color: #86868B;
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════
   LOGIN SCREEN
═══════════════════════════════════════════════════════════ */
#login-screen {
  align-items: center;
  justify-content: center;
  background: var(--indigo-900);
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(37,99,235,0.25) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(245,158,11,0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(30,58,138,0.6) 0%, transparent 60%);
}

/* Animated orbs */
.login-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 12s ease-in-out infinite;
}
.orb-1 { width: 600px; height: 600px; background: radial-gradient(circle, rgba(37,99,235,0.4), transparent 70%); top: -20%; left: -10%; animation-duration: 15s; }
.orb-2 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(245,158,11,0.2), transparent 70%); bottom: -10%; right: 5%; animation-duration: 18s; animation-direction: reverse; }
.orb-3 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(139,92,246,0.2), transparent 70%); top: 30%; right: 25%; animation-duration: 22s; animation-delay: 3s; }

/* Geometric grid overlay */
#login-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Medical cross decoration */
#login-screen::after {
  content: '';
  position: absolute;
  width: 160px;
  height: 160px;
  opacity: 0.04;
  background:
    linear-gradient(white, white) center center / 40px 160px no-repeat,
    linear-gradient(white, white) center center / 160px 40px no-repeat;
  top: 12%;
  right: 8%;
  animation: spinSlow 60s linear infinite;
}

.login-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-2xl);
  padding: 48px 44px;
  width: 420px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5), var(--shadow-inset);
  animation: cardReveal 0.6s cubic-bezier(0.16,1,0.3,1);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}
.login-hospital-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--indigo-600), var(--indigo-800));
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.login-hospital-logo.placeholder svg { width: 28px; height: 28px; }
.login-title { font-family: var(--font-display); font-size: 20px; color: white; line-height: 1.2; }
.login-subtitle { font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 3px; letter-spacing: 0.3px; }

.login-card .form-group { margin-bottom: 14px; }
.login-card label { display: block; font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.55); margin-bottom: 7px; letter-spacing: 0.5px; text-transform: uppercase; }
.login-card input {
  width: 100%; padding: 12px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  color: white;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}
.login-card input::placeholder { color: rgba(255,255,255,0.3); }
.login-card input:focus {
  background: rgba(255,255,255,0.12);
  border-color: rgba(245,158,11,0.6);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
}

.error-msg {
  color: var(--danger);
  font-size: 13px;
  padding: 9px 13px;
  background: rgba(244,63,94,0.12);
  border: 1px solid rgba(244,63,94,0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.login-card .btn-primary {
  width: 100%;
  height: 46px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--amber-400), var(--amber-500));
  color: var(--indigo-900);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-top: 6px;
  transition: all 0.2s;
  font-family: var(--font-body);
}
.login-card .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(245,158,11,0.35); }
.login-card .btn-primary:active { transform: translateY(0); }

.login-hint { text-align: center; font-size: 12px; color: rgba(255,255,255,0.35); margin-top: 16px; }
.login-hint a { color: rgba(245,158,11,0.7); text-decoration: none; }
.login-hint a:hover { color: var(--amber-400); }

/* ═══════════════════════════════════════════════════════════
   MAIN LAYOUT
═══════════════════════════════════════════════════════════ */
#main-screen { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  position: relative;
  box-shadow: 4px 0 24px rgba(0,0,0,0.2);
}
/* Subtle gradient accent line on right edge */
.sidebar::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(13,148,136,0.32) 40%, rgba(13,148,136,0.32) 60%, transparent);
  pointer-events: none;
}

.sidebar-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border-dark);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-default {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--indigo-600), var(--amber-500));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.logo-default svg { width: 16px; height: 16px; }
.sidebar-logo span {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-on-dark);
  letter-spacing: 0.3px;
  line-height: 1.3;
}

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-section { margin-bottom: 4px; }
.nav-section-title {
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  padding: 10px 10px 4px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-on-dark-muted);
  transition: all 0.15s;
  user-select: none;
  text-decoration: none;
  margin-bottom: 1px;
  position: relative;
}
.nav-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.7; }
.nav-item:hover { background: rgba(255,255,255,0.07); color: var(--text-on-dark); }
.nav-item:hover svg { opacity: 1; }
.nav-item.active {
  background: rgba(13,148,136,0.18);
  color: #2DD4BF;
  border: 1px solid rgba(45,212,191,0.18);
}
.nav-item.active svg { opacity: 1; }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: #2DD4BF;
  border-radius: 0 2px 2px 0;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 14px 14px 16px;
  border-top: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--indigo-600), var(--violet-500));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.15);
}
.user-details { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text-on-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-on-dark-muted); margin-top: 1px; }
.btn-logout {
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-on-dark-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.btn-logout svg { width: 14px; height: 14px; }
.btn-logout:hover { background: rgba(244,63,94,0.15); border-color: rgba(244,63,94,0.2); color: var(--danger); }

/* ── Main content ───────────────────────────────────────── */
.main-content {
  flex: 1;
  overflow-y: auto;
  background: transparent;
  height: 100vh;
}
.page { display: none; min-height: 100%; }
.page.active { display: block; }
.page.hidden { display: none; }

/* Page header */
.page-header {
  padding: 26px 32px 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(240,244,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.7);
}
.page-title {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--gray-900);
  line-height: 1.2;
  letter-spacing: -0.3px;
}
.page-subtitle { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; align-items: center; }
.page-body { padding: 24px 32px; }

/* ═══════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to right, var(--surface), var(--surface-2));
}
.card-title { font-size: 14px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.1px; }
.card-body { padding: 20px 22px; }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px 20px 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.2s;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--color-neutral);
}
.stat-card:nth-child(1)::after { background: var(--color-warning); }
.stat-card:nth-child(2)::after { background: var(--color-neutral); }
.stat-card:nth-child(3)::after { background: var(--color-pass); }
.stat-card:nth-child(4)::after { background: var(--color-warning); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card:hover::before { opacity: 1; }
.stat-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.stat-label { font-size: 11px; color: var(--text-tertiary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; }
.stat-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.stat-icon svg { width: 16px; height: 16px; }
.stat-value { font-family: var(--font-display); font-size: 28px; line-height: 1; font-weight: 700; }
.stat-change { font-size: 12px; color: var(--text-tertiary); margin-top: 5px; }

/* ═══════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 10px 18px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 12px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text-primary);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.1s; }
tbody tr:hover td { background: var(--indigo-50); }
.table-actions { display: flex; gap: 5px; }

/* ═══════════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 15px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-4col { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }

input, textarea, select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--surface);
  transition: all 0.15s;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--indigo-600);
  box-shadow: 0 0 0 3px rgba(30,58,138,0.08);
}
textarea { resize: vertical; min-height: 90px; }
input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
input[type="file"] { padding: 7px 11px; cursor: pointer; }

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
  user-select: none;
  letter-spacing: 0.1px;
}
.btn svg { width: 14px; height: 14px; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: linear-gradient(135deg, var(--indigo-700), var(--indigo-800));
  color: white;
  box-shadow: 0 1px 3px rgba(30,58,138,0.3);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--indigo-800), var(--indigo-900)); box-shadow: 0 4px 12px rgba(30,58,138,0.25); transform: translateY(-1px); }

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-300); }

.btn-danger { background: var(--danger-light); color: var(--danger); }
.btn-danger:hover { background: #ffd0d6; }
.btn-success { background: var(--success-light); color: #059669; }
.btn-warning { background: var(--warning-light); color: #b45309; }
.btn-ai {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: white;
  box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}
.btn-ai:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(79,70,229,0.35); }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-full { width: 100%; }
.btn-icon { padding: 7px; }

/* ═══════════════════════════════════════════════════════════
   BADGES
═══════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.badge-blue { background: var(--indigo-50); color: var(--indigo-700); border: 1px solid var(--indigo-100); }
.badge-green { background: var(--emerald-100); color: #059669; border: 1px solid #a7f3d0; }
.badge-red { background: var(--rose-100); color: var(--rose-500); border: 1px solid #fecdd3; }
.badge-orange { background: var(--amber-100); color: #b45309; border: 1px solid #fde68a; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200); }
.badge-purple { background: var(--violet-100); color: var(--violet-500); border: 1px solid #ddd6fe; }
.badge-cyan { background: #ecfeff; color: #0891b2; border: 1px solid #a5f3fc; }

/* ═══════════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15,27,76,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
.modal-overlay.hidden { display: none !important; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.2s cubic-bezier(0.16,1,0.3,1);
  border: 1px solid rgba(255,255,255,0.8);
}
.modal-header {
  padding: 20px 26px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.2px; }
.modal-close {
  background: var(--gray-100);
  border: none; width: 28px; height: 28px; border-radius: 8px;
  cursor: pointer; font-size: 12px; color: var(--text-tertiary);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--gray-200); color: var(--text-primary); }
.modal-body { padding: 20px 26px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 14px 26px 20px;
  border-top: 1px solid var(--border-light);
  display: flex; justify-content: flex-end; gap: 8px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════════════ */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--gray-900);
  color: white;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.05);
  animation: slideInRight 0.25s cubic-bezier(0.16,1,0.3,1);
  display: flex; align-items: center; gap: 9px;
  max-width: 320px;
  border-left: 3px solid transparent;
}
.toast-success { background: #052e16; border-left-color: var(--emerald-500); }
.toast-error { background: #2d0a0e; border-left-color: var(--rose-500); }
.toast-info { background: #0c1a4a; border-left-color: var(--indigo-500); }
.toast-warning { background: #2d1a00; border-left-color: var(--amber-500); }

/* ═══════════════════════════════════════════════════════════
   MISCELLANEOUS
═══════════════════════════════════════════════════════════ */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.progress-bar { width: 100%; height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.3s ease; }
.progress-blue { background: linear-gradient(90deg, var(--color-neutral), #60A5FA); }
.progress-green { background: linear-gradient(90deg, var(--color-pass), #2DD4BF); }
.progress-red { background: linear-gradient(90deg, var(--color-fail), #FCA5A5); }

.pill-group { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  color: var(--text-secondary);
  background: var(--surface);
  letter-spacing: 0.2px;
}
.pill:hover { border-color: var(--indigo-400); color: var(--indigo-700); }
.pill.selected { background: var(--indigo-50); border-color: var(--indigo-400); color: var(--indigo-700); }

.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 5px; font-size: 12px; font-weight: 500; margin: 2px; background: var(--indigo-50); color: var(--indigo-700); border: 1px solid var(--indigo-100); }

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px 20px; text-align: center;
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.15; }
.empty-state h3 { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 13px; color: var(--text-tertiary); }

.hidden { display: none !important; }
.divider { height: 1px; background: var(--border-light); margin: 14px 0; }
.section-label { font-size: 11px; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 10px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--indigo-600); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }

/* ── Tabs ───────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--border-light); margin-bottom: 18px; gap: 2px; }
.tab-btn {
  padding: 10px 16px;
  background: none; border: none;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  color: var(--text-tertiary); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab-btn.active { color: var(--indigo-700); border-bottom-color: var(--indigo-700); background: var(--indigo-50); }
.tab-btn:hover { color: var(--text-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Score circles ──────────────────────────────────────── */
.score-circle {
  width: 80px; height: 80px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 22px;
  border: 3px solid;
}
.score-pass { color: #059669; border-color: var(--emerald-500); background: var(--emerald-100); }
.score-fail { color: var(--rose-500); border-color: var(--rose-500); background: var(--rose-100); }

/* ── Questions ──────────────────────────────────────────── */
.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: box-shadow 0.15s;
}
.question-card:hover { box-shadow: var(--shadow-md); }
.question-filter-card {
  padding: 14px 18px !important;
}
.question-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.question-filter-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
}
.question-filter-summary {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-tertiary);
}
.question-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.question-filter-search {
  width: min(320px, 34vw);
  min-width: 220px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.question-filter-search:focus {
  border-color: var(--indigo-400);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(30,58,138,0.08);
}
.question-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 86px;
  overflow: hidden;
}
.question-filter-pills.expanded {
  max-height: none;
  overflow: visible;
}
.question-filter-pills .pill {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.question-filter-empty {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-tertiary);
  font-size: 12px;
}
.question-text { font-size: 14px; font-weight: 600; margin: 8px 0; line-height: 1.6; }
.question-option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.1s;
  font-size: 13px;
  line-height: 1.5;
}
.question-option:hover { background: var(--indigo-50); }
.question-option.selected { background: var(--indigo-50); }
.question-option.correct { background: var(--emerald-100); }
.question-option.wrong { background: var(--rose-100); }
.opt-key {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
  transition: all 0.15s;
}
.question-option.selected .opt-key { background: var(--indigo-700); border-color: var(--indigo-700); color: white; }
.question-option.correct .opt-key { background: #059669; border-color: #059669; color: white; }
.question-option.wrong .opt-key { background: var(--rose-500); border-color: var(--rose-500); color: white; }
.fill-answer-input {
  width: 100%; max-width: 380px;
  margin-top: 10px; padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font-body); outline: none;
}
.fill-answer-input:focus { border-color: var(--indigo-600); box-shadow: 0 0 0 3px rgba(30,58,138,0.08); }

/* ── Exam / Study screens ───────────────────────────────── */
#exam-screen, #study-screen {
  background: var(--bg);
  flex-direction: column;
  overflow-y: auto;
  background-image: radial-gradient(circle, var(--indigo-100) 1px, transparent 1px);
  background-size: 28px 28px;
}
.exam-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.exam-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.exam-timer { font-size: 20px; font-weight: 700; color: var(--indigo-700); font-variant-numeric: tabular-nums; font-family: var(--font-display); }
.exam-timer.warning { color: var(--rose-500); animation: pulse 1s ease-in-out infinite; }
.exam-body { padding: 24px 36px; max-width: 820px; margin: 0 auto; width: 100%; }
.exam-progress-bar { height: 4px; background: var(--gray-200); border-radius: 2px; margin-bottom: 20px; }
.exam-progress-fill { height: 100%; background: linear-gradient(90deg, var(--indigo-600), var(--amber-500)); border-radius: 2px; transition: width 0.3s; }
.exam-result-overlay {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 44px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  margin: 32px auto;
  border: 1px solid var(--border);
}
.study-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.study-body { padding: 28px 40px; max-width: 900px; margin: 0 auto; width: 100%; }
.study-content-text { font-size: 14px; line-height: 2; color: var(--text-secondary); white-space: pre-wrap; }
.study-progress-info {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--indigo-50), var(--amber-50));
  border: 1px solid var(--indigo-100);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--indigo-700);
}

/* ── AI dots ────────────────────────────────────────────── */
.ai-dots { display: flex; gap: 5px; }
.ai-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--indigo-500);
  animation: aiDot 1.4s ease-in-out infinite;
}
.ai-dot:nth-child(2) { animation-delay: 0.2s; background: var(--amber-500); }
.ai-dot:nth-child(3) { animation-delay: 0.4s; background: var(--violet-500); }

/* ── Chart containers ───────────────────────────────────── */
.chart-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.chart-card:hover { box-shadow: var(--shadow-md); }
.chart-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to right, var(--surface), var(--surface-2));
}
.chart-card-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.chart-card-body { padding: 16px 18px; }
.chart-container { position: relative; height: 240px; }
.btn-dl-chart {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-tertiary);
  display: flex; align-items: center; gap: 4px;
  transition: all 0.15s;
  font-family: var(--font-body);
}
.btn-dl-chart:hover { background: var(--indigo-50); color: var(--indigo-700); border-color: var(--indigo-200); }

/* ── Content card ───────────────────────────────────────── */
.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 13px 14px;
  display: flex; align-items: center; gap: 12px;
  transition: all 0.15s;
  min-width: 0;
}
.content-card:hover { box-shadow: var(--shadow-md); border-color: var(--indigo-200); }
.content-info { flex: 1; min-width: 0; }
.content-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
  max-width: 220px;
}

/* ── Apple-rich dashboard skin ─────────────────────────── */
.apple-dashboard {
  --apple-bg:#F5F5F7;
  --apple-card:#FFFFFF;
  --apple-border:rgba(0,0,0,0.06);
  --apple-text:#1D1D1F;
  --apple-sub:#6E6E73;
  --apple-faint:#AEAEB2;
  --apple-blue:#0A84FF;
  --apple-teal:#30B98A;
  --apple-orange:#FF9F0A;
  --apple-red:#FF3B30;
  --apple-purple:#BF5AF2;
  --apple-shadow:0 2px 20px rgba(0,0,0,0.06),0 1px 4px rgba(0,0,0,0.04);
  font-family:-apple-system,BlinkMacSystemFont,'SF Pro Display','PingFang SC','Helvetica Neue',sans-serif;
  color:var(--apple-text);
}
.apple-dashboard .page-header {
  align-items:flex-end;
  padding:2px 0 18px;
  border-bottom:none;
}
.apple-dashboard .page-title {
  font-size:24px;
  letter-spacing:-.03em;
  font-weight:750;
}
.apple-dashboard .page-subtitle {
  font-size:12px;
  color:var(--apple-sub);
  margin-top:4px;
}
.apple-dashboard .page-body {
  background:var(--apple-bg);
  border-radius:18px;
  padding:18px;
}
.apple-dashboard .stats-grid {
  grid-template-columns:repeat(6,minmax(128px,1fr));
  gap:9px;
  margin-bottom:12px;
}
.apple-dashboard .stat-card,
.apple-dashboard .card,
.apple-dashboard .chart-card {
  background:var(--apple-card);
  border:1px solid var(--apple-border);
  border-radius:14px;
  box-shadow:var(--apple-shadow);
  overflow:hidden;
  transition:transform .16s ease, box-shadow .16s ease;
}
.apple-dashboard .stat-card:hover,
.apple-dashboard .card:hover,
.apple-dashboard .chart-card:hover {
  transform:translateY(-1px);
  box-shadow:0 4px 28px rgba(0,0,0,0.09),0 1px 6px rgba(0,0,0,0.04);
}
.apple-dashboard .stat-card {
  padding:11px 13px 10px;
  min-height:96px;
}
.apple-dashboard .stat-card::before,
.apple-dashboard .stat-card::after {
  display:none;
}
.apple-dashboard .stat-card-header {
  margin-bottom:6px;
}
.apple-dashboard .stat-label {
  color:var(--apple-sub);
  font-size:11px;
  font-weight:600;
  letter-spacing:0;
  text-transform:none;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.apple-dashboard .stat-icon {
  width:24px;
  height:24px;
  border-radius:9px;
  flex:0 0 auto;
}
.apple-dashboard .stat-value {
  font-family:inherit;
  font-size:23px;
  font-weight:750;
  letter-spacing:-.04em;
  line-height:1.08;
}
.apple-dashboard .stat-change {
  font-size:10.5px;
  color:var(--apple-faint);
  margin-top:3px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.apple-dashboard .card-header,
.apple-dashboard .chart-card-header {
  padding:12px 14px 9px;
  background:transparent;
  border-bottom:1px solid var(--apple-border);
}
.apple-dashboard .card-title,
.apple-dashboard .chart-card-title {
  font-size:14px;
  color:var(--apple-text);
  font-weight:650;
  letter-spacing:-.02em;
}
.apple-dashboard .card-body,
.apple-dashboard .chart-card-body {
  padding:12px 14px;
}
.apple-dashboard .dash-card-sub {
  color:var(--apple-faint);
  font-size:11px;
  margin-top:3px;
  font-weight:400;
}
.apple-dashboard .stat-split {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  align-items:end;
}
.apple-dashboard .stat-split-item + .stat-split-item {
  padding-left:14px;
  border-left:1px solid var(--apple-border);
}
.apple-dashboard .stat-split-label {
  font-size:11px;
  color:var(--apple-faint);
  margin-bottom:5px;
  font-weight:600;
}
.apple-dashboard .stat-value-compact {
  font-size:26px;
  line-height:1.05;
}
.apple-dashboard .two-col,
.apple-dashboard .dash-grid-2,
.apple-dashboard .dash-priority-grid,
.apple-dashboard .dash-analytics-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.apple-dashboard .dash-score-activity-grid {
  display:grid;
  grid-template-columns:minmax(0, 1.04fr) minmax(360px, .96fr);
  gap:10px;
  align-items:stretch;
}
.apple-dashboard .three-col {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.apple-dashboard table thead th {
  background:transparent;
  color:var(--apple-faint);
  font-size:10px;
  letter-spacing:.05em;
  padding:9px 12px;
}
.apple-dashboard table tbody td {
  padding:9px 12px;
  font-size:12.5px;
}
.apple-dashboard table tbody tr:hover td {
  background:rgba(10,132,255,.035);
}
.apple-dashboard .dash-recent-table thead th {
  position:sticky;
  top:0;
  z-index:1;
  background:rgba(255,255,255,.96);
  backdrop-filter:saturate(180%) blur(10px);
  padding:6px 10px;
}
.apple-dashboard .dash-recent-table {
  height:100%;
  table-layout:fixed;
}
.apple-dashboard .dash-recent-table tbody tr {
  height:32px;
}
.apple-dashboard .dash-recent-table tbody td {
  padding:6px 10px;
  line-height:1.25;
}
.apple-dashboard .dash-recent-table tbody td:nth-child(2) {
  max-width:260px;
}
.apple-dashboard .dash-risk-card {
  border-color:rgba(255,59,48,.18);
}
.apple-dashboard .dash-priority-grid > .card {
  height:340px;
}
.apple-dashboard .dash-priority-grid .card-body {
  overflow:hidden;
}
.apple-dashboard .dash-task-progress-body {
  display:grid;
  grid-template-rows:repeat(5, minmax(0, 1fr));
  gap:5px;
  padding:8px 10px;
}
.apple-dashboard .dash-task-progress-item {
  cursor:pointer;
  position:relative;
  margin-bottom:0;
  padding:6px 8px 7px;
  border-radius:10px;
  border:1px solid var(--border);
  transition:box-shadow .15s;
  min-height:0;
}
.apple-dashboard .dash-task-progress-item:last-child {
  margin-bottom:0;
}
.apple-dashboard .dash-task-progress-item .progress-bar {
  height:4px;
  margin-top:4px;
}
.apple-dashboard .dash-task-progress-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}
.apple-dashboard .dash-task-title-wrap {
  min-width:0;
  flex:1;
}
.apple-dashboard .dash-task-title {
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  font-weight:650;
}
.apple-dashboard .dash-task-dept {
  display:inline-block;
  margin-top:0;
  font-size:10px;
  color:var(--text-tertiary);
}
.apple-dashboard .dash-task-stats {
  display:flex;
  align-items:center;
  gap:3px;
  flex-shrink:0;
}
.apple-dashboard .dash-task-stats strong {
  min-width:32px;
  text-align:right;
  font-size:12px;
}
.apple-dashboard .dash-mini {
  font-size:9.5px;
  line-height:1;
  padding:2px 4px;
  border-radius:5px;
  white-space:nowrap;
}
.apple-dashboard .dash-mini.orange { background:var(--orange-muted); color:#b86800; }
.apple-dashboard .dash-mini.blue { background:var(--blue-muted); color:var(--blue); }
.apple-dashboard .dash-mini.green { background:var(--green-muted); color:#1a8f3d; }
.apple-dashboard .dash-task-total {
  position:absolute;
  right:9px;
  bottom:1px;
  font-size:10px;
  color:var(--text-tertiary);
}

.dash-card-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  padding: 4px 0;
  white-space: nowrap;
}

.dash-card-link:hover {
  color: var(--primary);
}
.apple-dashboard .dash-risk-compact-body {
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:5px 10px 9px;
}
.apple-dashboard .dash-risk-item {
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:6px 0;
  border-bottom:1px solid var(--apple-border);
}
.apple-dashboard .dash-risk-item:last-child {
  border-bottom:none;
}
.apple-dashboard .dash-risk-main {
  min-width:0;
  flex:1;
}
.apple-dashboard .dash-risk-person {
  font-size:12px;
  font-weight:700;
  color:var(--apple-text);
}
.apple-dashboard .dash-risk-person span {
  margin-left:6px;
  font-size:10.5px;
  font-weight:500;
  color:var(--apple-faint);
}
.apple-dashboard .dash-risk-task {
  margin-top:1px;
  color:var(--apple-sub);
  font-size:11px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.apple-dashboard .dash-risk-side {
  text-align:right;
  flex-shrink:0;
  font-size:10.5px;
  color:var(--apple-faint);
}
.apple-dashboard .dash-risk-side strong,
.apple-dashboard .dash-risk-side span {
  display:block;
}
.apple-dashboard .dash-risk-side em {
  display:inline-block;
  margin-top:2px;
  margin-left:3px;
  padding:1px 5px;
  border-radius:999px;
  background:rgba(255,59,48,.1);
  color:var(--color-fail);
  font-style:normal;
}
.apple-dashboard .dash-compact-empty {
  padding:82px 0;
}
.apple-dashboard .dash-risk-table thead th {
  padding:8px 12px;
}
.apple-dashboard .dash-risk-table tbody td {
  padding:8px 12px;
  font-size:12px;
}
.apple-dashboard .progress-bar {
  background:rgba(0,0,0,0.06);
}
.apple-dashboard .btn-dl-chart {
  border-color:var(--apple-border);
  color:var(--apple-sub);
  border-radius:8px;
  background:rgba(0,0,0,0.025);
}
.apple-dashboard .btn-dl-chart:hover {
  background:rgba(10,132,255,.08);
  color:var(--apple-blue);
  border-color:rgba(10,132,255,.18);
}
.dash-rank-list {
  padding:8px 10px 10px;
}
.dash-rank-columns {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.dash-rank-item {
  display:flex;
  align-items:center;
  gap:6px;
  padding:5px 0;
  border-bottom:1px solid var(--apple-border);
}
.dash-rank-item:last-child {
  border-bottom:none;
}
.dash-rank-medal {
  width:21px;
  height:21px;
  border-radius:6px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:10px;
  font-weight:800;
  flex-shrink:0;
}
.dash-rank-medal.r1 { background:linear-gradient(135deg,#FFD700,#FFA500); }
.dash-rank-medal.r2 { background:linear-gradient(135deg,#D8D8DC,#A0A0A6); }
.dash-rank-medal.r3 { background:linear-gradient(135deg,#CD7F32,#A05A20); }
.dash-rank-medal.rn { background:rgba(0,0,0,0.06); color:var(--apple-sub); }
.dash-rank-avatar {
  width:24px;
  height:24px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:11px;
  font-weight:700;
  flex-shrink:0;
  background:linear-gradient(135deg,var(--apple-teal),var(--apple-blue));
}
.dash-rank-main {
  min-width:0;
  flex:1;
}
.dash-rank-name {
  font-size:11.5px;
  font-weight:650;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.dash-rank-dept {
  color:var(--apple-faint);
  font-size:9.5px;
  margin-top:1px;
}
.dash-rank-track {
  width:100%;
  height:4px;
  margin-top:4px;
  background:rgba(0,0,0,0.06);
  border-radius:999px;
  overflow:hidden;
}
.dash-rank-track div {
  height:100%;
  border-radius:999px;
}
.dash-rank-score {
  font-size:12px;
  font-weight:800;
  letter-spacing:-.02em;
  flex-shrink:0;
}
.dash-heat-wrap {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  overflow-x:auto;
  width:100%;
  padding:6px 2px;
}
.dash-heat-days {
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  align-self:stretch;
  padding:2px 0;
  color:var(--apple-faint);
  font-size:10px;
  width:16px;
  flex-shrink:0;
}
.dash-heat-grid {
  display:flex;
  gap:clamp(4px, .42vw, 8px);
}
.dash-heat-col {
  display:flex;
  flex-direction:column;
  gap:clamp(4px, .42vw, 8px);
}
.dash-heat-cell {
  width:clamp(13px, 1.05vw, 20px);
  height:clamp(13px, 1.05vw, 20px);
  border-radius:5px;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,0.03);
}
@media (max-width: 1200px) {
  .apple-dashboard .three-col,
  .apple-dashboard .dash-grid-2,
  .apple-dashboard .two-col,
  .apple-dashboard .dash-score-activity-grid {
    grid-template-columns:1fr;
  }
}
@media (max-width: 900px) {
  .apple-dashboard .stats-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* ── Apple sidebar refinement ──────────────────────────── */
:root {
  --sidebar-w: 218px;
  --sidebar-bg:#FAFAFA;
}
body {
  background:#F5F5F7;
  background-image:none;
}
.sidebar {
  width:var(--sidebar-w);
  background:#FAFAFA;
  color:#1D1D1F;
  box-shadow:none;
  border-right:1px solid rgba(0,0,0,0.06);
}
.sidebar::after {
  display:none;
}
.sidebar-brand {
  padding:18px 14px 12px;
  gap:10px;
}
.sidebar-divider {
  margin:0 12px;
  background:rgba(0,0,0,0.06);
}
.sidebar-brand-logo {
  width:36px;
  height:36px;
  border-radius:9px;
  background:linear-gradient(145deg,#FF6EC7,#BF5AF2);
  border:none;
  box-shadow:0 2px 8px rgba(191,90,242,0.25);
}
.sidebar-brand-logo img {
  border-radius:9px;
}
.sidebar-brand-logo svg {
  width:18px;
  height:18px;
}
.sidebar-brand-logo::before {
  display:none;
}
.sidebar-brand-name {
  font-family:-apple-system,BlinkMacSystemFont,'SF Pro Display','PingFang SC','Helvetica Neue',sans-serif;
  color:#1D1D1F;
  font-size:13px;
  font-weight:650;
  letter-spacing:0;
}
.sidebar-brand-sub {
  color:#AEAEB2;
  font-size:10px;
  margin-top:1px;
  letter-spacing:0;
  text-transform:none;
  font-weight:500;
}
.sidebar-nav {
  padding:8px 10px;
}
.nav-section-title {
  color:#AEAEB2;
  font-size:10px;
  font-weight:650;
  letter-spacing:.05em;
  padding:8px 8px 3px;
}
.nav-item {
  color:#6E6E73;
  gap:9px;
  padding:6.5px 10px;
  border-radius:8px;
  font-size:13px;
  font-weight:500;
  margin-bottom:1px;
  border:1px solid transparent;
}
.nav-item svg {
  width:14px;
  height:14px;
  opacity:1;
  color:#6E6E73;
}
.nav-item:hover {
  background:rgba(0,0,0,0.04);
  color:#1D1D1F;
}
.nav-item:hover svg {
  color:#1D1D1F;
}
.nav-item.active {
  background:rgba(10,132,255,0.08);
  color:#0A84FF;
  border-color:transparent;
  font-weight:600;
}
.nav-item.active svg {
  color:#0A84FF;
  opacity:1;
}
.nav-item.active::before {
  display:none;
}
.sidebar-footer {
  border-top:1px solid rgba(0,0,0,0.06);
  padding:12px 14px;
  color:#1D1D1F;
}
.user-avatar {
  width:30px;
  height:30px;
  border-radius:50%;
  border:none;
  background:linear-gradient(135deg,#30B98A,#0A84FF);
  box-shadow:none;
}
.user-name {
  color:#1D1D1F;
  font-size:12.5px;
  font-weight:600;
}
.user-role {
  color:#AEAEB2;
  font-size:10px;
}
.btn-logout {
  width:24px;
  height:24px;
  border-radius:7px;
  background:rgba(0,0,0,0.04);
  border:none;
  color:#AEAEB2;
}
.btn-logout:hover {
  background:rgba(255,59,48,0.08);
  color:#FF3B30;
  border:none;
}
.main-content {
  background:#F5F5F7;
}
.page-header {
  background:rgba(245,245,247,0.82);
  border-bottom:1px solid rgba(0,0,0,0.06);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
}
.page-title {
  font-family:-apple-system,BlinkMacSystemFont,'SF Pro Display','PingFang SC','Helvetica Neue',sans-serif;
  letter-spacing:-.03em;
}
.sidebar::-webkit-scrollbar-thumb {
  background:rgba(0,0,0,0.12);
}
.content-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.content-meta { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; line-height: 1.55; }

/* ── Dept rows ──────────────────────────────────────────── */
.dept-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.dept-row:last-child { border-bottom: none; }
.dept-rank { width: 24px; height: 24px; border-radius: 8px; background: var(--gray-100); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.dept-rank-1 { background: linear-gradient(135deg, #FFD700, #FFA500); color: white; }
.dept-rank-2 { background: linear-gradient(135deg, #C0C0C0, #A0A0A0); color: white; }
.dept-rank-3 { background: linear-gradient(135deg, #CD7F32, #A0522D); color: white; }
.dept-name { flex: 1; font-size: 13px; }
.dept-score { font-size: 14px; font-weight: 700; color: var(--indigo-700); }

/* ── Upload area ────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface-2);
}
.upload-area:hover, .upload-area.drag-over { border-color: var(--indigo-400); background: var(--indigo-50); }
.upload-area svg { width: 36px; height: 36px; color: var(--text-tertiary); margin-bottom: 10px; }
.upload-area p { font-size: 13px; color: var(--text-tertiary); }
.upload-area strong { color: var(--indigo-700); }
.file-preview {
  padding: 10px 14px; background: var(--gray-50);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; margin-top: 10px;
}
.file-preview .fp-name { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-preview .fp-remove { cursor: pointer; color: var(--text-tertiary); font-size: 16px; flex-shrink: 0; }
.file-preview .fp-remove:hover { color: var(--danger); }

/* ── AI Report ──────────────────────────────────────────── */
.ai-report { font-size: 14px; line-height: 1.9; color: var(--text-primary); }
.ai-report h2 { font-family: var(--font-display); font-size: 18px; margin: 24px 0 10px; color: var(--indigo-800); border-bottom: 1px solid var(--indigo-100); padding-bottom: 6px; }
.ai-report h3 { font-size: 14px; margin: 16px 0 6px; color: var(--text-primary); font-weight: 700; }
.ai-report ul { padding-left: 20px; margin-bottom: 12px; }
.ai-report li { margin-bottom: 5px; }
.ai-report p { margin-bottom: 12px; }
.ai-report strong { font-weight: 700; color: var(--indigo-800); }

/* ── Retake badge ───────────────────────────────────────── */
.retake-pending { background: var(--amber-100); color: #b45309; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--amber-200); }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════════ */
@keyframes fadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp   { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes spin      { to { transform: rotate(360deg); } }
@keyframes pulse     { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes aiDot     { 0%,100% { transform: translateY(0); opacity: 0.4; } 50% { transform: translateY(-6px); opacity: 1; } }
@keyframes orbFloat  { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-40px) scale(1.06); } }
@keyframes cardReveal { from { transform: translateY(24px) scale(0.97); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes spinSlow  { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   SIDEBAR BRAND BLOCK
═══════════════════════════════════════════════════════════ */
.sidebar-brand {
  padding: 22px 18px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  position: relative;
}

/* Subtle shimmer line below brand */
.sidebar-divider {
  height: 1px;
  margin: 0 16px;
  background: linear-gradient(90deg, transparent, rgba(13,148,136,0.32) 30%, rgba(13,148,136,0.32) 70%, transparent);
}

.sidebar-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37,99,235,0.76), rgba(13,148,136,0.55));
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.1);
  overflow: hidden;
  position: relative;
}
.sidebar-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.sidebar-brand-logo svg {
  width: 22px;
  height: 22px;
}

/* Glow ring around logo */
.sidebar-brand-logo::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(45,212,191,0.42), rgba(37,99,235,0.42));
  z-index: -1;
}

.sidebar-brand-text {
  min-width: 0;
  flex: 1;
}
.sidebar-brand-name {
  font-family: var(--font-display);
  font-size: 15px;
  color: rgba(255,255,255,0.95);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}
.sidebar-brand-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  margin-top: 3px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   HOSPITAL BANNER (Dashboard top)
═══════════════════════════════════════════════════════════ */
.hosp-banner {
  background: linear-gradient(135deg, var(--indigo-900) 0%, var(--indigo-800) 60%, #1a3a6e 100%);
  border-bottom: none;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

/* Decorative elements */
.hosp-banner::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.12), transparent 70%);
  pointer-events: none;
}
.hosp-banner::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,0.4) 30%, rgba(245,158,11,0.4) 70%, transparent);
}

/* Cross watermark */
.hosp-banner-cross {
  position: absolute;
  right: 180px; top: 50%;
  transform: translateY(-50%);
  opacity: 0.04;
  pointer-events: none;
}

.hosp-banner-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hosp-banner-logo {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  flex-shrink: 0;
}

.hosp-banner-logo-default {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37,99,235,0.6), rgba(245,158,11,0.4));
  border: 2px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.hosp-banner-logo-default svg {
  width: 28px;
  height: 28px;
}

.hosp-banner-name {
  font-family: var(--font-display);
  font-size: 22px;
  color: white;
  line-height: 1.2;
  letter-spacing: 0.3px;
  margin-bottom: 5px;
}
.hosp-banner-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.3px;
}

.hosp-banner-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.hosp-banner-tag {
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  backdrop-filter: blur(8px);
}

/* ═══════════════════════════════════════════════════════════
   DEPT TREE SIDEBAR (Users page)
═══════════════════════════════════════════════════════════ */
.dept-tree-sidebar {
  width: 180px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  overflow-y: auto;
  max-height: calc(100vh - 120px);
  position: sticky;
  top: 0;
}
.dept-tree-header {
  padding: 12px 14px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: .6px;
  border-bottom: 1px solid var(--border);
}
.dept-tree-group {
  padding: 8px 14px 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 4px;
}
.dept-tree-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}
.dept-tree-item:hover { background: var(--surface-2); color: var(--text-primary); }
.dept-tree-item.active { background: var(--blue-muted); color: var(--blue); border-left-color: var(--blue); font-weight: 600; }
.dept-tree-count {
  margin-left: auto;
  font-size: 11px;
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 10px;
  color: var(--text-tertiary);
}
.dept-tree-item.active .dept-tree-count { background: var(--blue)18; color: var(--blue); }

/* ── Article training editor ─────────────────────────────────── */
.article-editor-shell {
  display: grid;
  grid-template-columns: minmax(0,1fr) 405px;
  gap: 20px;
  align-items: start;
}
.article-editor-main { min-width: 0; }
.article-toolbar {
  position: sticky;
  top: -20px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  margin-bottom: 12px;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
}
.article-toolbar button {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
}
.article-toolbar button.warn { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.article-toolbar button.tip { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.article-toolbar button.danger { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.article-editor {
  min-height: 520px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}
.article-block {
  position: relative;
  margin-bottom: 14px;
}
.article-block p,
.article-block h2 {
  outline: none;
  line-height: 1.9;
}
.article-block p {
  white-space: pre-wrap;
  word-break: break-word;
}
.article-block h2 { font-size: 20px; margin: 18px 0 8px; color: var(--text-primary); }
.article-media img,
.article-media video {
  width: 100%;
  display: block;
  border-radius: 8px;
  background: #020617;
}
.article-media-title {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-tertiary);
}
.article-media.audio {
  display: grid;
  grid-template-columns: 14px 1fr 220px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--gray-50);
}
.article-media.audio small { display: block; color: var(--text-tertiary); margin-top: 2px; }
.audio-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 6px rgba(244,63,94,.12);
}
.medical-box {
  padding: 14px 16px;
  border-radius: 8px;
  border-left: 5px solid;
}
.medical-box.warning { background: #fff7ed; border-left-color: #f97316; }
.medical-box.tip { background: #eff6ff; border-left-color: #2563eb; }
.medical-box.danger { background: #fef2f2; border-left-color: #dc2626; }
.medical-box-title { font-weight: 800; margin-bottom: 6px; outline: none; }
.medical-box-body { outline: none; line-height: 1.8; }
.medical-step-block {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.medical-step-block > span {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #0f766e; color: #fff; font-weight: 800;
}
.medical-step-block strong,
.medical-step-block p { outline: none; }
.article-editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-tertiary);
}
.article-phone { position: sticky; top: 20px; }
.article-phone-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  text-align: center;
}
.article-phone-frame {
  width: 375px;
  height: 720px;
  margin: 0 auto;
  overflow-y: auto;
  border: 10px solid #0f172a;
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15,23,42,.22);
}
.phone-article-head {
  padding: 22px 18px 8px;
}
.phone-article-head span {
  display: inline-flex;
  padding: 2px 9px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  font-size: 12px;
  font-weight: 800;
}
.phone-article-head h1 {
  margin: 12px 0 8px;
  font-size: 24px;
  line-height: 1.25;
}
.phone-article-head p {
  color: #64748b;
  line-height: 1.7;
}
.phone-article-content,
.article-preview-modal {
  padding: 8px 18px 28px;
  line-height: 1.9;
}
.article-preview-summary {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--indigo-50);
  color: var(--text-secondary);
}

.ai-outline-card {
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.ai-outline-label {
  font-size: 13px;
  font-weight: 800;
  color: #0369a1;
  margin-bottom: 4px;
}
.ai-outline-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}
.ai-outline-article .ai-training-article {
  color: var(--text-secondary);
  line-height: 1.9;
  font-size: 14px;
}
.ai-outline-article h1 {
  font-size: 24px;
  line-height: 1.35;
  color: var(--text-primary);
  margin: 2px 0 14px;
  letter-spacing: 0;
}
.ai-outline-article h2 {
  font-size: 17px;
  color: #0f766e;
  margin: 22px 0 10px;
  padding-left: 10px;
  border-left: 4px solid #14b8a6;
  letter-spacing: 0;
}
.ai-outline-article h3 {
  font-size: 15px;
  color: var(--text-primary);
  margin: 12px 0 8px;
}
.ai-outline-article p {
  margin: 10px 0;
}
.ai-outline-article ul,
.ai-outline-article ol {
  padding-left: 20px;
  margin: 10px 0;
}
.ai-outline-article li {
  margin: 6px 0;
}
.ai-outline-article strong,
.ai-outline-article .ai-key {
  color: #be123c;
  font-weight: 800;
}
.ai-outline-article .ai-lead {
  font-size: 15px;
  color: #334155;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 12px 14px;
}
.ai-outline-article blockquote,
.ai-outline-article .ai-tip,
.ai-outline-article .ai-warning,
.ai-outline-article .ai-review,
.ai-outline-article .ai-note {
  margin: 14px 0;
  border-radius: 8px;
  padding: 12px 14px;
}
.ai-outline-article blockquote,
.ai-outline-article .ai-tip,
.ai-outline-article .ai-note {
  background: #ecfeff;
  border-left: 4px solid #06b6d4;
}
.ai-outline-article .ai-warning {
  background: #fff7ed;
  border-left: 4px solid #f97316;
}
.ai-outline-article .ai-review {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
}

@media (max-width: 1100px) {
  .article-editor-shell { grid-template-columns: 1fr; }
  .article-phone { position: static; }
}

/* ── Apple sidebar final overrides ─────────────────────── */
:root {
  --sidebar-w: 218px;
  --sidebar-bg: #FAFAFA;
}

body {
  background: #F5F5F7;
  background-image: none;
}

.sidebar {
  width: var(--sidebar-w);
  background: #FAFAFA;
  color: #1D1D1F;
  box-shadow: none;
  border-right: 1px solid rgba(0,0,0,0.06);
}

.sidebar::after,
.sidebar-brand-logo::before,
.nav-item.active::before {
  display: none;
}

.sidebar-brand {
  padding: 18px 14px 12px;
  gap: 10px;
  min-height: auto;
  background: transparent;
}

.sidebar-divider {
  margin: 0 12px;
  background: rgba(0,0,0,0.06);
}

.sidebar-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(145deg, #FF6EC7, #BF5AF2);
  border: none;
  box-shadow: 0 2px 8px rgba(191,90,242,0.25);
}

.sidebar-brand-logo img {
  border-radius: 9px;
}

.sidebar-brand-logo svg {
  width: 18px;
  height: 18px;
}

.sidebar-brand-name {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Helvetica Neue', sans-serif;
  color: #1D1D1F;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
}

.sidebar-brand-sub {
  color: #AEAEB2;
  font-size: 10px;
  margin-top: 1px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}

.sidebar-nav {
  padding: 8px 10px;
}

.nav-section-title {
  color: #AEAEB2;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.05em;
  padding: 8px 8px 3px;
}

.nav-item {
  color: #6E6E73;
  gap: 9px;
  padding: 6.5px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  background: transparent;
}

.nav-item svg {
  width: 14px;
  height: 14px;
  opacity: 1;
  color: #6E6E73;
}

.nav-item:hover {
  background: rgba(0,0,0,0.04);
  color: #1D1D1F;
}

.nav-item:hover svg {
  color: #1D1D1F;
}

.nav-item.active {
  background: rgba(10,132,255,0.08);
  color: #0A84FF;
  border-color: transparent;
  font-weight: 600;
}

.nav-item.active svg {
  color: #0A84FF;
  opacity: 1;
}

.sidebar-footer {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 12px 14px;
  color: #1D1D1F;
  background: transparent;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #30B98A, #0A84FF);
  box-shadow: none;
}

.user-name {
  color: #1D1D1F;
  font-size: 12.5px;
  font-weight: 600;
}

.user-role {
  color: #AEAEB2;
  font-size: 10px;
}

.btn-logout {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(0,0,0,0.04);
  border: none;
  color: #AEAEB2;
}

.btn-logout:hover {
  background: rgba(255,59,48,0.08);
  color: #FF3B30;
  border: none;
}

.main-content {
  background: #F5F5F7;
}

.page-header {
  background: rgba(245,245,247,0.82);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ── Apple dashboard cohesion final overrides ───────────── */
.apple-dashboard {
  --apple-blue: #0A84FF;
  --apple-green: #30B98A;
  --apple-orange: #FF9F0A;
  --apple-red: #FF453A;
  --apple-card: rgba(255,255,255,0.88);
  --apple-border: rgba(0,0,0,0.075);
  --apple-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 14px 32px rgba(0,0,0,0.055);
  padding: 18px 20px 28px;
}

.apple-dashboard .hosp-banner {
  margin: 0 0 14px;
  padding: 14px 18px;
  min-height: 74px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.78));
  border: 1px solid var(--apple-border);
  border-radius: 18px;
  box-shadow: var(--apple-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.apple-dashboard .hosp-banner::before,
.apple-dashboard .hosp-banner::after,
.apple-dashboard .hosp-banner-cross {
  display: none;
}

.apple-dashboard .hosp-banner-left {
  gap: 12px;
}

.apple-dashboard .hosp-banner-logo,
.apple-dashboard .hosp-banner-logo-default {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 6px 18px rgba(10,132,255,0.12);
}

.apple-dashboard .hosp-banner-logo-default {
  background: linear-gradient(145deg, rgba(10,132,255,0.95), rgba(48,185,138,0.82));
  color: #fff;
}

.apple-dashboard .hosp-banner-logo-default svg {
  width: 22px;
  height: 22px;
}

.apple-dashboard .hosp-banner-name {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Helvetica Neue', sans-serif;
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -0.03em;
  color: #1D1D1F;
  margin-bottom: 3px;
}

.apple-dashboard .hosp-banner-sub {
  font-size: 11.5px;
  color: #86868B;
  letter-spacing: 0;
}

.apple-dashboard .hosp-banner-right {
  gap: 6px;
}

.apple-dashboard .hosp-banner-tag {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(10,132,255,0.075);
  border: 1px solid rgba(10,132,255,0.12);
  color: #0A84FF;
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0;
  box-shadow: none;
}

.apple-dashboard .page-header {
  margin: 0 0 12px;
  padding: 2px 2px 12px;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.apple-dashboard .page-body {
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.apple-dashboard .chart-card {
  overflow: hidden;
}

.apple-dashboard .chart-card-header {
  min-height: 48px;
  padding: 11px 13px 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.72));
}

.apple-dashboard .chart-card-body {
  padding: 11px 13px 13px;
  background: rgba(255,255,255,0.68);
}

.apple-dashboard .dash-chart-box {
  position: relative;
  width: 100%;
  height: clamp(160px, 14vw, 190px);
}

.apple-dashboard .dash-chart-box-lg {
  height: clamp(175px, 15vw, 205px);
}

.apple-dashboard .dash-chart-box-xl {
  height: clamp(190px, 16vw, 230px);
}

.apple-dashboard .dash-primary-charts {
  align-items:stretch;
}
.apple-dashboard .dash-primary-charts > .chart-card {
  height:360px;
  display:flex;
  flex-direction:column;
}
.apple-dashboard .dash-primary-charts .chart-card-body {
  flex:1;
  min-height:0;
}
.apple-dashboard .dash-primary-charts .dash-chart-box-lg {
  height:100%;
  min-height:0;
}
.apple-dashboard .dash-primary-charts .dash-rank-list {
  overflow:hidden;
}

.apple-dashboard .dash-score-activity-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.apple-dashboard .dash-score-activity-grid > .chart-card,
.apple-dashboard .dash-heat-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.apple-dashboard .dash-score-activity-grid .chart-card-body,
.apple-dashboard .dash-heat-body {
  flex: 1;
}

.apple-dashboard .dash-heat-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 205px;
}

.tasks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.task-filter-panel {
  flex: 1;
  min-width: 360px;
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.task-filter-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.task-filter-controls select {
  height: 34px;
  min-width: 132px;
  padding: 0 30px 0 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background-color: rgba(248, 250, 252, 0.9);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 650;
  outline: none;
}

.task-filter-controls select:focus {
  border-color: rgba(10, 132, 255, 0.38);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.10);
}

.task-filter-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.task-filter-summary span {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.85);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.task-filter-summary b {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1;
}

.task-card {
  margin: 0;
  min-width: 0;
}

.task-card .card-header {
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
}

.task-card .card-body {
  padding: 14px 16px 15px;
}

.task-card .card-title {
  line-height: 1.35;
}

.task-card .table-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 230px;
}

.task-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.task-card-progress {
  grid-column: 1 / -1;
}

.task-card-meta {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-tertiary);
}

@media (max-width: 1200px) {
  .apple-dashboard .dash-priority-grid,
  .apple-dashboard .dash-analytics-grid,
  .apple-dashboard .dash-score-activity-grid,
  .apple-dashboard .three-col,
  .apple-dashboard .two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .apple-dashboard .dash-heat-body {
    min-height: 260px;
  }
}

@media (max-width: 980px) {
  .apple-dashboard .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .apple-dashboard .dash-priority-grid,
  .apple-dashboard .dash-analytics-grid,
  .apple-dashboard .dash-score-activity-grid,
  .apple-dashboard .three-col,
  .apple-dashboard .two-col {
    grid-template-columns: 1fr;
  }

  .apple-dashboard .dash-priority-grid > .card {
    height:auto;
    max-height:420px;
  }

  .apple-dashboard .dash-chart-box,
  .apple-dashboard .dash-chart-box-lg,
  .apple-dashboard .dash-chart-box-xl {
    height: 210px;
  }

  .apple-dashboard .dash-heat-body {
    min-height: 220px;
  }

  .dash-heat-cell {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 520px) {
  .apple-dashboard .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .content-grid,
  .tasks-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .content-card {
    align-items: flex-start;
  }

  .content-card-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .task-card .card-header {
    flex-direction: column;
  }

  .task-card .table-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .task-card-grid {
    grid-template-columns: 1fr;
  }

  .task-card-progress {
    grid-column: auto;
  }
}

.apple-dashboard canvas {
  width: 100% !important;
  height: 100% !important;
  filter: saturate(0.96);
}

.apple-dashboard .btn-dl-chart {
  height: 28px;
  padding: 0 9px;
  border-radius: 9px;
  font-size: 11px;
}

/* ── Apple login final overrides ───────────────────────── */
#login-screen {
  align-items: center;
  justify-content: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 16%, rgba(10,132,255,0.16), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(48,185,138,0.12), transparent 26%),
    linear-gradient(180deg, #F8FAFC 0%, #F3F6FA 45%, #EEF3F8 100%);
  overflow: hidden;
}

#login-screen::before {
  background-image:
    linear-gradient(rgba(0,0,0,0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.026) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 72%);
}

#login-screen::after {
  width: 520px;
  height: 520px;
  top: auto;
  right: -180px;
  bottom: -220px;
  opacity: 0.5;
  background:
    radial-gradient(circle, rgba(255,255,255,0.78) 0%, rgba(255,255,255,0.22) 38%, transparent 70%);
  animation: none;
}

.login-bg {
  opacity: 1;
}

.login-orb {
  filter: blur(46px);
  animation: orbFloat 18s ease-in-out infinite;
}

.orb-1 {
  width: 360px;
  height: 360px;
  top: -120px;
  left: -80px;
  background: radial-gradient(circle, rgba(10,132,255,0.18), transparent 70%);
}

.orb-2 {
  width: 320px;
  height: 320px;
  right: -60px;
  bottom: 8%;
  background: radial-gradient(circle, rgba(48,185,138,0.14), transparent 70%);
}

.orb-3 {
  width: 260px;
  height: 260px;
  top: 18%;
  right: 24%;
  background: radial-gradient(circle, rgba(191,90,242,0.10), transparent 72%);
}

.login-card {
  width: min(430px, calc(100vw - 36px));
  padding: 34px 34px 28px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(255,255,255,0.88);
  border-radius: 28px;
  box-shadow:
    0 30px 80px rgba(15,23,42,0.12),
    0 8px 24px rgba(15,23,42,0.06),
    inset 0 1px 0 rgba(255,255,255,0.95);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
}

.login-logo {
  gap: 13px;
  margin-bottom: 30px;
}

.login-hospital-logo {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(145deg, #0A84FF, #30B98A);
  border: 1px solid rgba(255,255,255,0.72);
  box-shadow: 0 10px 24px rgba(10,132,255,0.18);
}

.login-hospital-logo.placeholder svg {
  width: 28px;
  height: 28px;
}

.login-hospital-logo.placeholder svg rect:first-child {
  fill: transparent;
}

.login-title {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Helvetica Neue', sans-serif;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.04em;
  color: #1D1D1F;
}

.login-subtitle {
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 0;
  color: #86868B;
}

.login-card .form-group {
  margin-bottom: 15px;
}

.login-card label {
  color: #6E6E73;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.login-card input {
  height: 44px;
  padding: 0 14px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 12px;
  color: #1D1D1F;
  font-size: 15px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.025);
}

.login-card input::placeholder {
  color: #AEAEB2;
}

.login-card input:focus {
  background: #fff;
  border-color: rgba(10,132,255,0.58);
  box-shadow: 0 0 0 4px rgba(10,132,255,0.12);
}

.login-card button[onclick*="togglePwd"] {
  color: #86868B !important;
  font-size: 12px !important;
  font-weight: 600;
}

.login-card button[onclick*="togglePwd"]:hover {
  color: #0A84FF !important;
}

.login-card .btn-primary {
  height: 46px;
  margin-top: 6px;
  border-radius: 13px;
  background: linear-gradient(180deg, #1E9BFF 0%, #0A84FF 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 720;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 22px rgba(10,132,255,0.24);
}

.login-card .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(10,132,255,0.28);
}

.login-card .btn-primary:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.error-msg {
  color: #B42318;
  background: rgba(255,69,58,0.09);
  border: 1px solid rgba(255,69,58,0.18);
  border-radius: 12px;
}

.login-hint {
  margin-top: 18px;
  color: #86868B;
}

.login-hint a,
.login-hint a[style] {
  color: #86868B !important;
  font-size: 12px !important;
}

.login-hint a:hover {
  color: #0A84FF !important;
}

@media (max-width: 520px) {
  #login-screen {
    padding: 18px;
  }
  .login-card {
    padding: 28px 22px 24px;
    border-radius: 24px;
  }
  .login-title {
    font-size: 19px;
  }
}

/* Uploaded sidebar logo should render without synthetic brand color. */
.sidebar-brand-logo:has(img) {
  background: transparent;
  border: none;
  box-shadow: none;
}

.sidebar-brand-logo:has(img) img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.weak-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  color: #92400E;
  margin: 3px;
}

/* Apple Pro / Linear visual refresh --------------------------------------- */
:root {
  --pro-bg: #f5f7fb;
  --pro-ink: #172033;
  --pro-muted: #788195;
  --pro-faint: #a8afbd;
  --pro-line: rgba(255,255,255,0.58);
  --pro-hairline: rgba(94,111,138,0.13);
  --pro-glass: rgba(255,255,255,0.68);
  --pro-glass-strong: rgba(255,255,255,0.82);
  --pro-blue: #1478ff;
  --pro-mint: #2fbf9f;
  --pro-orange: #ff9f43;
  --pro-rose: #ff5d6c;
  --pro-violet: #7f6bff;
  --pro-radius: 18px;
  --pro-radius-sm: 13px;
  --pro-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pro-shadow: 0 20px 60px rgba(44,60,90,0.10), 0 2px 10px rgba(44,60,90,0.05);
  --pro-shadow-soft: 0 10px 34px rgba(44,60,90,0.08), 0 1px 3px rgba(44,60,90,0.04);
  --pro-shadow-hover: 0 26px 76px rgba(44,60,90,0.16), 0 8px 22px rgba(44,60,90,0.08);
  --primary: var(--pro-blue);
  --primary-hover: #075fcf;
  --text-primary: var(--pro-ink);
  --text-secondary: var(--pro-muted);
  --text-tertiary: var(--pro-faint);
  --border: var(--pro-hairline);
  --surface: var(--pro-glass-strong);
  --surface-2: rgba(248,250,255,0.76);
}

html {
  background: var(--pro-bg);
}

body {
  color: var(--pro-ink);
  background:
    linear-gradient(135deg, rgba(246,249,255,1) 0%, rgba(235,241,250,1) 48%, rgba(248,250,255,1) 100%);
  background-image: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(115deg, rgba(20,120,255,0.10), transparent 32%),
    linear-gradient(245deg, rgba(47,191,159,0.10), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(242,246,252,0.86));
}

body,
button,
input,
textarea,
select {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'PingFang SC', 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0;
}

.screen,
.card,
.chart-card,
.stat-card,
.content-card,
.task-card,
.question-card,
.modal,
.toast,
.btn,
.nav-item,
input,
textarea,
select,
table tbody tr {
  transition: all .4s var(--pro-ease);
}

.main-content {
  background: transparent;
}

.page {
  color: var(--pro-ink);
}

.page-header {
  min-height: 68px;
  padding: 18px 24px 14px;
  background: rgba(247,249,253,0.72);
  border-bottom: 1px solid rgba(255,255,255,0.66);
  box-shadow: 0 1px 0 rgba(90,105,130,0.06), 0 18px 46px rgba(44,60,90,0.045);
  backdrop-filter: blur(28px) saturate(155%);
  -webkit-backdrop-filter: blur(28px) saturate(155%);
}

.page-title {
  font-size: 24px;
  font-weight: 820;
  color: var(--pro-ink);
  letter-spacing: -0.035em;
}

.page-subtitle {
  color: var(--pro-muted);
  font-size: 12px;
  font-weight: 560;
}

.sidebar {
  background: rgba(250,251,254,0.72);
  border-right: 1px solid rgba(255,255,255,0.72);
  box-shadow: 18px 0 54px rgba(44,60,90,0.08);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
}

.sidebar-brand {
  padding: 20px 14px 14px;
}

.sidebar-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(20,120,255,0.96), rgba(47,191,159,0.88));
  border: 1px solid rgba(255,255,255,0.70);
  box-shadow: 0 10px 24px rgba(20,120,255,0.20), inset 0 1px 0 rgba(255,255,255,0.45);
}

.sidebar-brand-name {
  font-size: 13.5px;
  font-weight: 760;
  color: var(--pro-ink);
  letter-spacing: -0.02em;
}

.sidebar-brand-sub,
.nav-section-title,
.user-role {
  color: var(--pro-faint);
}

.nav-section-title {
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .08em;
}

.nav-item {
  border-radius: 12px;
  padding: 8px 10px;
  color: #667085;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,0.58);
  color: var(--pro-ink);
  border-color: rgba(255,255,255,0.70);
  box-shadow: 0 10px 26px rgba(44,60,90,0.08);
  transform: translateY(-1px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(20,120,255,0.13), rgba(47,191,159,0.09));
  color: var(--pro-blue);
  border-color: rgba(255,255,255,0.76);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 12px 30px rgba(20,120,255,0.10);
}

.nav-item svg {
  color: currentColor;
}

.sidebar-footer {
  background: rgba(255,255,255,0.42);
  border-top: 1px solid rgba(255,255,255,0.64);
}

.user-avatar {
  background: linear-gradient(145deg, var(--pro-mint), var(--pro-blue));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 10px 20px rgba(20,120,255,0.18);
}

.card,
.chart-card,
.stat-card,
.content-card,
.task-card,
.question-card,
.dept-tree-sidebar,
.ai-outline-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.60));
  border: 1px solid var(--pro-line);
  border-radius: var(--pro-radius);
  box-shadow: var(--pro-shadow-soft);
  backdrop-filter: blur(24px) saturate(155%);
  -webkit-backdrop-filter: blur(24px) saturate(155%);
}

.card:hover,
.chart-card:hover,
.stat-card:hover,
.content-card:hover,
.task-card:hover,
.question-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--pro-shadow-hover);
  border-color: rgba(255,255,255,0.82);
}

.card-header,
.chart-card-header {
  background: linear-gradient(180deg, rgba(255,255,255,0.60), rgba(255,255,255,0.28));
  border-bottom: 1px solid rgba(255,255,255,0.54);
}

.card-title,
.chart-card-title {
  color: var(--pro-ink);
  font-weight: 760;
  letter-spacing: -0.025em;
}

.stat-label,
.dash-card-sub {
  color: var(--pro-muted);
  font-weight: 640;
}

.stat-value,
.stat-val,
.apple-dashboard .stat-value {
  font-weight: 880;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.stat-icon {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.54), 0 8px 18px rgba(44,60,90,0.08);
}

.btn {
  border-radius: 12px;
  font-weight: 720;
  border: 1px solid rgba(255,255,255,0.58);
  box-shadow: 0 8px 22px rgba(44,60,90,0.07);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(44,60,90,0.12);
}

.btn-primary {
  background: linear-gradient(180deg, #2990ff 0%, #1478ff 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.42);
  box-shadow: 0 14px 30px rgba(20,120,255,0.25), inset 0 1px 0 rgba(255,255,255,0.38);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #4aa1ff 0%, #0b6eea 100%);
  box-shadow: 0 18px 38px rgba(20,120,255,0.30), inset 0 1px 0 rgba(255,255,255,0.46);
}

.btn-secondary {
  background: rgba(255,255,255,0.62);
  color: var(--pro-ink);
  border-color: rgba(255,255,255,0.72);
}

.btn-danger {
  background: linear-gradient(180deg, rgba(255,93,108,0.95), rgba(230,58,76,0.95));
  color: #fff;
}

input,
textarea,
select {
  background: rgba(255,255,255,0.66);
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 13px;
  color: var(--pro-ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.58), 0 1px 0 rgba(44,60,90,0.03);
}

input:hover,
textarea:hover,
select:hover {
  background: rgba(255,255,255,0.78);
  border-color: rgba(255,255,255,0.88);
}

input:focus,
textarea:focus,
select:focus {
  background: rgba(255,255,255,0.92);
  border-color: rgba(20,120,255,0.45);
  box-shadow: 0 0 0 4px rgba(20,120,255,0.11), inset 0 1px 0 rgba(255,255,255,0.74);
}

.form-group label {
  color: #69758a;
  font-weight: 690;
  letter-spacing: 0;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  background: rgba(247,249,253,0.72);
  color: #7b8495;
  font-size: 11.5px;
  font-weight: 760;
  letter-spacing: 0;
  border-bottom: 1px solid rgba(94,111,138,0.10);
}

tbody td {
  border-bottom: 1px solid rgba(94,111,138,0.08);
}

tbody tr:hover td {
  background: rgba(255,255,255,0.64);
}

.modal-overlay {
  background: rgba(226,232,242,0.54);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.modal {
  background: linear-gradient(180deg, rgba(255,255,255,0.90), rgba(255,255,255,0.72));
  border: 1px solid rgba(255,255,255,0.76);
  border-radius: 24px;
  box-shadow: 0 34px 110px rgba(44,60,90,0.24), inset 0 1px 0 rgba(255,255,255,0.70);
  backdrop-filter: blur(32px) saturate(155%);
  -webkit-backdrop-filter: blur(32px) saturate(155%);
}

.modal-header,
.modal-footer {
  background: transparent;
  border-color: rgba(255,255,255,0.58);
}

.toast {
  background: rgba(22,28,40,0.82);
  border: 1px solid rgba(255,255,255,0.12);
  border-left-width: 3px;
  border-radius: 16px;
  box-shadow: 0 20px 56px rgba(22,28,40,0.22);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}

#boot-screen,
#login-screen {
  background:
    linear-gradient(135deg, rgba(246,249,255,1), rgba(233,240,251,1) 50%, rgba(248,250,255,1)),
    linear-gradient(120deg, rgba(20,120,255,0.10), transparent 34%),
    linear-gradient(250deg, rgba(47,191,159,0.10), transparent 36%);
}

.boot-card,
.login-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.62));
  border: 1px solid rgba(255,255,255,0.78);
  box-shadow: 0 34px 100px rgba(44,60,90,0.16), inset 0 1px 0 rgba(255,255,255,0.86);
  backdrop-filter: blur(34px) saturate(160%);
  -webkit-backdrop-filter: blur(34px) saturate(160%);
}

.login-card .btn-primary {
  letter-spacing: 0.05em;
}

.apple-dashboard {
  --apple-card: rgba(255,255,255,0.68);
  --apple-border: rgba(255,255,255,0.64);
  --apple-shadow: var(--pro-shadow-soft);
  padding: 20px 22px 30px;
}

.apple-dashboard .hosp-banner,
.apple-dashboard .stat-card,
.apple-dashboard .card,
.apple-dashboard .chart-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.58));
  border: 1px solid rgba(255,255,255,0.68);
  box-shadow: var(--pro-shadow-soft);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
}

.apple-dashboard .hosp-banner {
  min-height: 80px;
  border-radius: 22px;
}

.apple-dashboard .stats-grid {
  gap: 10px;
}

.apple-dashboard .stat-card {
  min-height: 104px;
  padding: 13px 14px 12px;
}

.apple-dashboard .stat-label {
  color: #7d8798;
}

.apple-dashboard .stat-change {
  color: #9ea6b6;
}

.apple-dashboard .chart-card-header,
.apple-dashboard .card-header {
  background: linear-gradient(180deg, rgba(255,255,255,0.60), rgba(255,255,255,0.24));
}

.apple-dashboard .chart-card-body,
.apple-dashboard .card-body {
  background: transparent;
}

.dash-mini {
  border: 1px solid rgba(255,255,255,0.52);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.42);
}

.progress-bar {
  background: rgba(95,111,135,0.10);
}

.progress-fill {
  box-shadow: 0 6px 18px rgba(20,120,255,0.18);
}

@media (prefers-reduced-motion: reduce) {
  .screen,
  .card,
  .chart-card,
  .stat-card,
  .content-card,
  .task-card,
  .question-card,
  .modal,
  .toast,
  .btn,
  .nav-item,
  input,
  textarea,
  select,
  table tbody tr {
    transition: none;
  }
}

/* Apple Pro v2 visible redesign: macOS glass, cyber accent, dense 12 column board */
:root {
  --liquid-bg: #eef2f7;
  --liquid-bg-2: #f8fafc;
  --liquid-ink: #101827;
  --liquid-muted: #667085;
  --liquid-faint: #98a2b3;
  --liquid-blue: #0a84ff;
  --liquid-cyan: #36d8ff;
  --liquid-violet: #7c3cff;
  --liquid-green: #20c997;
  --liquid-orange: #ff9f0a;
  --liquid-red: #ff453a;
  --liquid-glass: rgba(255,255,255,0.62);
  --liquid-glass-strong: rgba(255,255,255,0.78);
  --liquid-line: rgba(255,255,255,0.72);
  --liquid-hairline: rgba(16,24,39,0.07);
  --liquid-shadow: 0 22px 70px rgba(36,52,84,0.13), 0 2px 10px rgba(36,52,84,0.04);
  --liquid-shadow-hover: 0 30px 90px rgba(36,52,84,0.18), 0 8px 24px rgba(10,132,255,0.09);
  --liquid-radius: 26px;
  --liquid-radius-sm: 18px;
  --sidebar-w: 216px;
}

html,
body {
  min-height: 100%;
  background: var(--liquid-bg);
}

body {
  color: var(--liquid-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 8% -8%, rgba(10,132,255,0.18), transparent 58%),
    radial-gradient(900px 560px at 92% 0%, rgba(124,60,255,0.15), transparent 56%),
    radial-gradient(900px 640px at 58% 105%, rgba(32,201,151,0.13), transparent 54%),
    linear-gradient(180deg, #f9fbff 0%, #eef3f9 42%, #e8edf5 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.40), transparent 30%, rgba(255,255,255,0.20)),
    linear-gradient(rgba(255,255,255,0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.18) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.40), transparent 76%);
}

.screen {
  background: transparent !important;
}

#main-screen {
  gap: 0;
  padding: 14px 14px 14px 0;
}

.main-content {
  background: transparent !important;
  padding: 0 !important;
  min-width: 0;
}

.page.active {
  animation: liquidFade 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes liquidFade {
  from { opacity: 0; transform: translateY(8px) scale(0.996); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.sidebar {
  margin: 14px 0 14px 14px !important;
  height: calc(100vh - 28px) !important;
  width: var(--sidebar-w) !important;
  flex: 0 0 var(--sidebar-w) !important;
  border-radius: 0 30px 30px 0 !important;
  border: 1px solid rgba(255,255,255,0.70) !important;
  border-left: 0 !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.80), rgba(255,255,255,0.46)),
    rgba(245,248,252,0.58) !important;
  box-shadow: 18px 0 60px rgba(36,52,84,0.10), inset 1px 1px 0 rgba(255,255,255,0.86) !important;
  backdrop-filter: blur(34px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(34px) saturate(190%) !important;
  overflow: hidden !important;
}

.sidebar::after {
  display: block !important;
  left: auto !important;
  right: 0 !important;
  width: 1px !important;
  background: linear-gradient(180deg, transparent, rgba(10,132,255,0.28), rgba(124,60,255,0.18), transparent) !important;
  opacity: 1 !important;
}

.sidebar-brand {
  padding: 18px 16px 14px !important;
  gap: 11px !important;
}

.sidebar-brand-logo,
.login-logo .login-hospital-logo,
.boot-logo {
  border-radius: 18px !important;
  background:
    linear-gradient(145deg, rgba(10,132,255,0.95), rgba(124,60,255,0.82)),
    #0a84ff !important;
  box-shadow: 0 14px 30px rgba(10,132,255,0.28), inset 0 1px 0 rgba(255,255,255,0.42) !important;
}

.sidebar-brand-name {
  color: #121826 !important;
  font-size: 15px !important;
  font-weight: 820 !important;
  letter-spacing: -0.01em !important;
}

.sidebar-brand-sub,
.nav-section-title,
.user-role {
  color: var(--liquid-muted) !important;
  letter-spacing: 0 !important;
}

.sidebar-divider {
  margin: 0 16px 8px !important;
  height: 1px !important;
  background: linear-gradient(90deg, transparent, rgba(16,24,39,0.12), transparent) !important;
}

.sidebar-nav {
  padding: 8px 10px 14px !important;
}

.nav-section {
  margin-bottom: 14px !important;
}

.nav-section-title {
  padding: 8px 12px 6px !important;
  font-size: 11px !important;
  font-weight: 720 !important;
}

.nav-item {
  min-height: 38px !important;
  padding: 0 12px !important;
  margin: 3px 0 !important;
  border-radius: 15px !important;
  color: #344054 !important;
  font-size: 13px !important;
  font-weight: 680 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.nav-item svg {
  width: 17px !important;
  height: 17px !important;
  color: #667085 !important;
}

.nav-item:hover {
  color: #101827 !important;
  background: rgba(255,255,255,0.62) !important;
  border-color: rgba(255,255,255,0.72) !important;
  transform: translateX(3px) !important;
  box-shadow: 0 10px 24px rgba(36,52,84,0.08), inset 0 1px 0 rgba(255,255,255,0.70) !important;
}

.nav-item.active {
  color: #fff !important;
  background:
    linear-gradient(135deg, rgba(10,132,255,0.98), rgba(56,142,255,0.88) 54%, rgba(124,60,255,0.82)) !important;
  border-color: rgba(255,255,255,0.50) !important;
  box-shadow: 0 16px 34px rgba(10,132,255,0.30), inset 0 1px 0 rgba(255,255,255,0.42) !important;
}

.nav-item.active svg {
  color: #fff !important;
}

.sidebar-footer {
  margin: 0 12px 12px !important;
  padding: 10px !important;
  border-radius: 20px !important;
  background: rgba(255,255,255,0.58) !important;
  border: 1px solid rgba(255,255,255,0.72) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.76), 0 12px 30px rgba(36,52,84,0.08) !important;
}

.user-avatar {
  background: linear-gradient(145deg, #111827, #344054) !important;
  box-shadow: 0 8px 22px rgba(17,24,39,0.22) !important;
}

.btn-logout {
  border-radius: 13px !important;
  background: rgba(255,255,255,0.70) !important;
  border: 1px solid rgba(255,255,255,0.70) !important;
}

.apple-dashboard {
  padding: 16px 18px 24px !important;
  max-width: 1760px;
  margin: 0 auto;
}

.apple-dashboard .hosp-banner {
  min-height: 104px !important;
  padding: 18px 22px !important;
  border-radius: 30px !important;
  color: #fff !important;
  background:
    linear-gradient(135deg, rgba(11,15,25,0.92), rgba(16,32,58,0.78) 50%, rgba(36,32,78,0.74)),
    radial-gradient(600px 220px at 85% 0%, rgba(54,216,255,0.24), transparent 58%) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  box-shadow: 0 26px 80px rgba(11,15,25,0.22), inset 0 1px 0 rgba(255,255,255,0.24) !important;
  overflow: hidden !important;
}

.apple-dashboard .hosp-banner::before {
  display: block !important;
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.10), transparent 32%, rgba(54,216,255,0.10)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.045) 0, rgba(255,255,255,0.045) 1px, transparent 1px, transparent 42px) !important;
  pointer-events: none !important;
}

.apple-dashboard .hosp-banner-name {
  color: #fff !important;
  font-size: clamp(23px, 2vw, 34px) !important;
  font-weight: 860 !important;
  letter-spacing: -0.025em !important;
}

.apple-dashboard .hosp-banner-sub,
.apple-dashboard .hosp-banner-tag {
  color: rgba(255,255,255,0.76) !important;
}

.apple-dashboard .hosp-banner-tag {
  border-radius: 999px !important;
  background: rgba(255,255,255,0.12) !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
  backdrop-filter: blur(14px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(140%) !important;
}

.apple-dashboard .page-header {
  min-height: 48px !important;
  margin: 12px 0 !important;
  padding: 0 2px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.apple-dashboard .page-title {
  color: #141b2d !important;
  font-size: 24px !important;
  font-weight: 860 !important;
  letter-spacing: -0.025em !important;
}

.apple-dashboard .page-subtitle {
  color: #667085 !important;
  font-size: 12px !important;
  margin-top: 2px !important;
}

.apple-dashboard .page-body {
  display: block !important;
}

.card,
.chart-card,
.stat-card,
.content-card,
.task-card,
.question-card,
.settings-card,
.dept-tree-sidebar,
.modal {
  border-radius: var(--liquid-radius) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.56)),
    rgba(255,255,255,0.46) !important;
  border: 1px solid var(--liquid-line) !important;
  box-shadow: var(--liquid-shadow) !important;
  backdrop-filter: blur(28px) saturate(185%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(185%) !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.card:hover,
.chart-card:hover,
.stat-card:hover,
.content-card:hover,
.task-card:hover,
.question-card:hover {
  transform: translateY(-4px) scale(1.006) !important;
  box-shadow: var(--liquid-shadow-hover) !important;
  border-color: rgba(255,255,255,0.92) !important;
}

.card-header,
.chart-card-header,
.modal-header {
  min-height: 46px !important;
  padding: 11px 15px !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.66), rgba(255,255,255,0.20)) !important;
  border-bottom: 1px solid rgba(16,24,39,0.06) !important;
}

.card-body,
.chart-card-body {
  padding: 12px 14px !important;
}

.card-title,
.chart-card-title {
  color: #141b2d !important;
  font-size: 14px !important;
  font-weight: 820 !important;
  letter-spacing: -0.01em !important;
}

.dash-card-sub {
  color: #7b8495 !important;
  font-size: 11px !important;
}

.apple-dashboard .stats-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}

.apple-dashboard .stat-card {
  min-height: 94px !important;
  padding: 12px 13px !important;
  border-radius: 22px !important;
  overflow: hidden !important;
}

.apple-dashboard .stat-card::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  opacity: 1 !important;
  background: linear-gradient(135deg, rgba(10,132,255,0.08), transparent 42%, rgba(124,60,255,0.07)) !important;
  pointer-events: none !important;
}

.apple-dashboard .stat-card:nth-child(1)::before { background: linear-gradient(135deg, rgba(255,159,10,0.16), transparent 54%) !important; }
.apple-dashboard .stat-card:nth-child(2)::before { background: linear-gradient(135deg, rgba(10,132,255,0.15), transparent 54%) !important; }
.apple-dashboard .stat-card:nth-child(3)::before { background: linear-gradient(135deg, rgba(32,201,151,0.15), transparent 54%) !important; }
.apple-dashboard .stat-card:nth-child(4)::before { background: linear-gradient(135deg, rgba(124,60,255,0.14), transparent 54%) !important; }
.apple-dashboard .stat-card:nth-child(5)::before { background: linear-gradient(135deg, rgba(255,159,10,0.15), transparent 54%) !important; }
.apple-dashboard .stat-card:nth-child(6)::before { background: linear-gradient(135deg, rgba(255,69,58,0.14), transparent 54%) !important; }

.apple-dashboard .stat-card-header {
  margin-bottom: 8px !important;
}

.apple-dashboard .stat-label {
  color: #667085 !important;
  font-size: 11px !important;
  font-weight: 760 !important;
  white-space: nowrap !important;
}

.apple-dashboard .stat-icon {
  width: 28px !important;
  height: 28px !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.74), 0 8px 18px rgba(36,52,84,0.08) !important;
}

.apple-dashboard .stat-value {
  font-size: clamp(26px, 2.2vw, 34px) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: -0.04em !important;
}

.apple-dashboard .stat-change {
  margin-top: 6px !important;
  color: #8a94a6 !important;
  font-size: 11px !important;
  font-weight: 650 !important;
}

.apple-dashboard .dash-priority-grid,
.apple-dashboard .dash-analytics-grid,
.apple-dashboard .dash-score-activity-grid,
.apple-dashboard .three-col,
.apple-dashboard .two-col,
.apple-dashboard .dash-grid-2 {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.apple-dashboard .dash-priority-grid > .card:nth-child(1) { grid-column: span 6 !important; }
.apple-dashboard .dash-priority-grid > .card:nth-child(2) { grid-column: span 3 !important; }
.apple-dashboard .dash-priority-grid > .card:nth-child(3) { grid-column: span 3 !important; }
.apple-dashboard .dash-analytics-grid > .chart-card { grid-column: span 4 !important; }
.apple-dashboard .two-col > * { grid-column: span 6 !important; }
.apple-dashboard .three-col > * { grid-column: span 4 !important; }

.apple-dashboard .dash-primary-charts > .chart-card {
  min-height: 260px !important;
}

.apple-dashboard .dash-chart-box {
  height: 220px !important;
  min-height: 220px !important;
}

.apple-dashboard .dash-chart-box-lg {
  height: 230px !important;
  min-height: 230px !important;
}

.apple-dashboard .dash-chart-box-xl {
  height: 270px !important;
  min-height: 270px !important;
}

.apple-dashboard canvas {
  width: 100% !important;
  max-width: 100% !important;
}

.apple-dashboard .dash-task-progress-body {
  padding: 8px 10px 10px !important;
}

.apple-dashboard .dash-task-progress-item {
  padding: 8px 9px !important;
  margin-bottom: 6px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255,255,255,0.62) !important;
  background: rgba(255,255,255,0.46) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.62) !important;
}

.apple-dashboard .dash-task-title {
  color: #1d2939 !important;
  font-size: 12px !important;
  font-weight: 760 !important;
  line-height: 1.25 !important;
}

.apple-dashboard .dash-task-dept {
  border-radius: 999px !important;
  background: rgba(10,132,255,0.10) !important;
  color: #075bb5 !important;
  border: 1px solid rgba(10,132,255,0.12) !important;
}

.apple-dashboard .dash-mini {
  height: 20px !important;
  padding: 0 7px !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  font-weight: 780 !important;
}

.apple-dashboard .progress-bar {
  height: 6px !important;
  margin-top: 6px !important;
  border-radius: 999px !important;
  background: rgba(16,24,39,0.07) !important;
}

.progress-fill {
  border-radius: inherit !important;
  background: linear-gradient(90deg, var(--liquid-blue), var(--liquid-cyan)) !important;
}

.progress-green { background: linear-gradient(90deg, #12b76a, #20c997) !important; }
.progress-red { background: linear-gradient(90deg, #ff453a, #ff8a7a) !important; }

.apple-dashboard .dash-recent-table {
  width: 100% !important;
}

.apple-dashboard .dash-recent-table thead th,
thead th {
  background: rgba(248,250,252,0.68) !important;
  color: #7b8495 !important;
  font-size: 10.5px !important;
  font-weight: 780 !important;
  height: 30px !important;
  padding: 7px 10px !important;
  border-bottom: 1px solid rgba(16,24,39,0.06) !important;
}

.apple-dashboard .dash-recent-table tbody td,
tbody td {
  height: 34px !important;
  padding: 7px 10px !important;
  color: #344054 !important;
  border-bottom: 1px solid rgba(16,24,39,0.055) !important;
}

tbody tr:hover td {
  background: rgba(255,255,255,0.72) !important;
}

.apple-dashboard .dash-rank-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.apple-dashboard .dash-rank-item,
.apple-dashboard .dash-risk-item {
  border-radius: 15px !important;
  background: rgba(255,255,255,0.48) !important;
  border: 1px solid rgba(255,255,255,0.62) !important;
}

.apple-dashboard .dash-heat-body {
  min-height: 222px !important;
  align-content: center !important;
}

.btn,
.btn-primary,
.btn-secondary,
.btn-dl-chart,
button:not(.nav-item) {
  border-radius: 14px !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-primary,
.btn-dl-chart {
  background: linear-gradient(135deg, #0a84ff, #3b8cff 52%, #7c3cff) !important;
  border: 1px solid rgba(255,255,255,0.48) !important;
  color: #fff !important;
  box-shadow: 0 14px 34px rgba(10,132,255,0.25), inset 0 1px 0 rgba(255,255,255,0.34) !important;
}

.btn:hover,
.btn-dl-chart:hover,
button:hover {
  transform: translateY(-2px);
}

input,
textarea,
select,
.select,
.form-control {
  border-radius: 16px !important;
  background: rgba(255,255,255,0.68) !important;
  border: 1px solid rgba(255,255,255,0.76) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 1px 0 rgba(16,24,39,0.04) !important;
}

input:focus,
textarea:focus,
select:focus {
  background: rgba(255,255,255,0.90) !important;
  border-color: rgba(10,132,255,0.42) !important;
  box-shadow: 0 0 0 4px rgba(10,132,255,0.12), inset 0 1px 0 rgba(255,255,255,0.80) !important;
}

.modal-overlay {
  background: rgba(236,242,250,0.54) !important;
  backdrop-filter: blur(24px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(150%) !important;
}

.modal {
  border-radius: 30px !important;
}

#boot-screen,
#login-screen {
  background:
    radial-gradient(900px 560px at 15% 0%, rgba(10,132,255,0.22), transparent 60%),
    radial-gradient(800px 520px at 88% 10%, rgba(124,60,255,0.16), transparent 58%),
    linear-gradient(180deg, #f9fbff, #eaf0f8) !important;
}

.boot-card,
.login-card {
  border-radius: 32px !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.58)) !important;
  border: 1px solid rgba(255,255,255,0.76) !important;
  box-shadow: 0 34px 110px rgba(36,52,84,0.18), inset 0 1px 0 rgba(255,255,255,0.86) !important;
  backdrop-filter: blur(34px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(34px) saturate(190%) !important;
}

.login-title,
.boot-title {
  color: #101827 !important;
  letter-spacing: -0.02em !important;
}

.login-subtitle,
.boot-subtitle {
  color: #667085 !important;
}

@media (max-width: 1400px) {
  :root { --sidebar-w: 218px; }
  .apple-dashboard .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .apple-dashboard .dash-priority-grid > .card:nth-child(1) { grid-column: span 12 !important; }
  .apple-dashboard .dash-priority-grid > .card:nth-child(2),
  .apple-dashboard .dash-priority-grid > .card:nth-child(3) { grid-column: span 6 !important; }
}

@media (max-width: 980px) {
  #main-screen { padding: 0 !important; }
  .sidebar {
    margin: 0 !important;
    height: auto !important;
    border-radius: 0 0 26px 26px !important;
  }
  .apple-dashboard { padding: 12px !important; }
  .apple-dashboard .stats-grid,
  .apple-dashboard .dash-priority-grid,
  .apple-dashboard .dash-analytics-grid,
  .apple-dashboard .dash-score-activity-grid,
  .apple-dashboard .three-col,
  .apple-dashboard .two-col,
  .apple-dashboard .dash-grid-2 {
    grid-template-columns: 1fr !important;
  }
  .apple-dashboard .stats-grid > *,
  .apple-dashboard .dash-priority-grid > *,
  .apple-dashboard .dash-analytics-grid > *,
  .apple-dashboard .dash-score-activity-grid > *,
  .apple-dashboard .three-col > *,
  .apple-dashboard .two-col > *,
  .apple-dashboard .dash-grid-2 > * {
    grid-column: 1 / -1 !important;
  }
  .apple-dashboard .dash-rank-list { grid-template-columns: 1fr !important; }
}

/* Apple Pro v2 balance fixes: keep dense, prevent cramped ranking rows */
.apple-dashboard .dash-primary-charts {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
}

.apple-dashboard .dash-primary-charts > .chart-card:nth-child(1),
.apple-dashboard .dash-primary-charts > .chart-card:nth-child(2) {
  grid-column: span 3 !important;
}

.apple-dashboard .dash-primary-charts > .chart-card:nth-child(3) {
  grid-column: span 6 !important;
}

.apple-dashboard .dash-primary-charts > .chart-card:nth-child(3) .chart-card-body {
  padding: 10px 12px 12px !important;
}

.apple-dashboard .dash-primary-charts > .chart-card:nth-child(3) .chart-card-header {
  min-height: 52px !important;
}

.apple-dashboard .dash-rank-list {
  display: block !important;
}

.apple-dashboard .dash-rank-columns {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
}

.apple-dashboard .dash-rank-columns > div {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  min-width: 0 !important;
}

.apple-dashboard .dash-rank-item {
  display: grid !important;
  grid-template-columns: 24px 28px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 42px !important;
  padding: 7px 8px !important;
  border: 1px solid rgba(255,255,255,0.66) !important;
  border-radius: 16px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.70), rgba(255,255,255,0.42)),
    rgba(255,255,255,0.48) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 7px 18px rgba(36,52,84,0.055) !important;
  overflow: hidden !important;
}

.apple-dashboard .dash-rank-item:hover {
  transform: translateY(-1px) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86), 0 12px 24px rgba(36,52,84,0.09) !important;
}

.apple-dashboard .dash-rank-medal {
  width: 23px !important;
  height: 23px !important;
  border-radius: 8px !important;
  font-size: 10px !important;
  font-weight: 860 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.46), 0 5px 12px rgba(36,52,84,0.10) !important;
}

.apple-dashboard .dash-rank-avatar {
  width: 28px !important;
  height: 28px !important;
  border-radius: 12px !important;
  font-size: 12px !important;
  font-weight: 820 !important;
  background: linear-gradient(145deg, #1fb6c9, #0a84ff) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.42), 0 7px 16px rgba(10,132,255,0.18) !important;
}

.apple-dashboard .dash-rank-main {
  min-width: 0 !important;
  overflow: hidden !important;
}

.apple-dashboard .dash-rank-name {
  color: #182230 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.apple-dashboard .dash-rank-dept {
  color: #8a94a6 !important;
  font-size: 10.5px !important;
  line-height: 1.15 !important;
  margin-top: 2px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.apple-dashboard .dash-rank-track {
  height: 3px !important;
  margin-top: 5px !important;
  background: rgba(16,24,39,0.06) !important;
}

.apple-dashboard .dash-rank-score {
  justify-self: end !important;
  min-width: 44px !important;
  text-align: right !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: -0.035em !important;
}

@media (max-width: 1180px) {
  .apple-dashboard .dash-primary-charts > .chart-card:nth-child(1),
  .apple-dashboard .dash-primary-charts > .chart-card:nth-child(2) {
    grid-column: span 6 !important;
  }

  .apple-dashboard .dash-primary-charts > .chart-card:nth-child(3) {
    grid-column: span 12 !important;
  }
}

@media (max-width: 980px) {
  .apple-dashboard .dash-rank-columns {
    grid-template-columns: 1fr !important;
  }
}

/* Apple Glass v4 pixel pass: material, ambient color, typography hierarchy */
:root {
  --color-pass: #18b884;
  --color-fail: #f05a63;
  --color-neutral: #2678ff;
  --color-warning: #f2a13a;
  --success: #18b884;
  --danger: #f05a63;
  --warning: #f2a13a;
  --bg: #edf2f8;
  --surface: rgba(255,255,255,0.62);
  --border: rgba(255,255,255,0.52);
  --text-primary: #111827;
  --text-secondary: #667085;
  --text-tertiary: #98a2b3;
  --glass-bg: rgba(255,255,255,0.66);
  --glass-bg-soft: rgba(255,255,255,0.48);
  --glass-border: rgba(255,255,255,0.56);
  --glass-highlight: rgba(255,255,255,0.86);
  --glass-shadow:
    0 24px 72px rgba(36,52,84,0.12),
    0 8px 24px rgba(36,52,84,0.07),
    inset 0 1px 0 rgba(255,255,255,0.78),
    inset 0 -1px 0 rgba(255,255,255,0.24);
  --glass-shadow-soft:
    0 14px 38px rgba(36,52,84,0.09),
    inset 0 1px 0 rgba(255,255,255,0.72);
  --glass-shadow-hover:
    0 30px 86px rgba(36,52,84,0.16),
    0 10px 28px rgba(38,120,255,0.10),
    inset 0 1px 0 rgba(255,255,255,0.86);
  --radius-xl: 26px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --ambient-blue: linear-gradient(135deg, #2678ff 0%, #4fdcff 100%);
  --ambient-mint: linear-gradient(135deg, #18b884 0%, #62e6c4 100%);
  --ambient-orange: linear-gradient(135deg, #f2a13a 0%, #ffd27a 100%);
  --ambient-red: linear-gradient(135deg, #f05a63 0%, #ff9a76 100%);
  --ambient-purple: linear-gradient(135deg, #7d5cff 0%, #5ec7ff 100%);
}

body {
  background:
    radial-gradient(920px 560px at 10% -10%, rgba(76,157,255,0.20), transparent 62%),
    radial-gradient(860px 520px at 95% 6%, rgba(125,92,255,0.16), transparent 60%),
    radial-gradient(780px 520px at 52% 104%, rgba(98,230,196,0.15), transparent 58%),
    linear-gradient(180deg, #f8fbff 0%, #eef3fa 46%, #e8eef6 100%) !important;
  color: var(--text-primary) !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::before {
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(38,120,255,0.18), transparent 62%),
    radial-gradient(760px 460px at 90% 2%, rgba(125,92,255,0.14), transparent 60%),
    radial-gradient(820px 520px at 58% 108%, rgba(24,184,132,0.13), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.70), rgba(237,242,248,0.84)) !important;
}

#main-screen {
  background: transparent !important;
}

.main-content {
  background: transparent !important;
}

.page {
  color: var(--text-primary);
}

.card,
.chart-card,
.stat-card,
.content-card,
.task-card,
.question-card,
.settings-card,
.dept-tree-sidebar,
.table-wrap,
.modal,
.ai-outline-card,
.exam-card,
.record-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.50)),
    rgba(255,255,255,0.52) !important;
  border: 0.5px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow) !important;
  backdrop-filter: blur(26px) saturate(178%) contrast(1.02) !important;
  -webkit-backdrop-filter: blur(26px) saturate(178%) contrast(1.02) !important;
}

.card,
.chart-card,
.content-card,
.task-card,
.question-card,
.settings-card,
.table-wrap,
.modal,
.ai-outline-card,
.exam-card,
.record-card {
  border-radius: var(--radius-xl) !important;
}

.stat-card {
  border-radius: var(--radius-lg) !important;
}

.card:hover,
.chart-card:hover,
.stat-card:hover,
.content-card:hover,
.task-card:hover,
.question-card:hover,
.exam-card:hover,
.record-card:hover {
  border-color: rgba(255,255,255,0.78) !important;
  box-shadow: var(--glass-shadow-hover) !important;
  transform: translateY(-3px) !important;
}

.card-header,
.chart-card-header,
.modal-header,
.content-card-header {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.64), rgba(255,255,255,0.18)) !important;
  border-bottom: 0.5px solid rgba(17,24,39,0.055) !important;
}

.card-title,
.chart-card-title,
.modal-title,
.page-title,
h1,
h2,
h3 {
  color: #111827 !important;
  font-weight: 850 !important;
  letter-spacing: -0.025em !important;
}

.card-title,
.chart-card-title {
  font-size: 14px !important;
  line-height: 1.25 !important;
}

.page-title {
  font-size: 25px !important;
  line-height: 1.05 !important;
}

.page-subtitle,
.dash-card-sub,
.stat-label,
.form-group label,
.meta-label,
.text-muted,
.empty-state,
.sidebar-brand-sub,
.nav-section-title {
  color: var(--text-secondary) !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
}

.stat-value,
.apple-dashboard .stat-value,
.stat-value-compact,
.metric-value,
.kpi-value,
.dashboard-number {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Noto Sans SC", sans-serif !important;
  font-weight: 950 !important;
  letter-spacing: -0.045em !important;
  line-height: 0.96 !important;
  font-variant-numeric: tabular-nums;
}

.apple-dashboard .stat-value {
  font-size: clamp(30px, 2.45vw, 40px) !important;
}

.stat-label,
.apple-dashboard .stat-label {
  font-size: 11px !important;
  color: #7b8496 !important;
}

.stat-change,
.apple-dashboard .stat-change {
  color: #98a2b3 !important;
  font-weight: 650 !important;
}

.apple-dashboard .stats-grid {
  gap: 12px !important;
}

.apple-dashboard .stat-card {
  position: relative !important;
  min-height: 106px !important;
  padding: 14px 15px 13px !important;
  overflow: hidden !important;
}

.apple-dashboard .stat-card::before {
  opacity: 1 !important;
  background:
    radial-gradient(150px 90px at 15% 0%, rgba(255,255,255,0.60), transparent 65%),
    linear-gradient(135deg, rgba(38,120,255,0.10), transparent 56%) !important;
}

.apple-dashboard .stat-card:nth-child(1)::before,
.apple-dashboard .stat-card:nth-child(5)::before {
  background:
    radial-gradient(150px 90px at 15% 0%, rgba(255,255,255,0.58), transparent 65%),
    linear-gradient(135deg, rgba(242,161,58,0.24), rgba(255,210,122,0.08) 48%, transparent 68%) !important;
}

.apple-dashboard .stat-card:nth-child(2)::before {
  background:
    radial-gradient(150px 90px at 15% 0%, rgba(255,255,255,0.58), transparent 65%),
    linear-gradient(135deg, rgba(38,120,255,0.22), rgba(79,220,255,0.08) 48%, transparent 68%) !important;
}

.apple-dashboard .stat-card:nth-child(3)::before {
  background:
    radial-gradient(150px 90px at 15% 0%, rgba(255,255,255,0.58), transparent 65%),
    linear-gradient(135deg, rgba(24,184,132,0.24), rgba(98,230,196,0.09) 48%, transparent 68%) !important;
}

.apple-dashboard .stat-card:nth-child(4)::before {
  background:
    radial-gradient(150px 90px at 15% 0%, rgba(255,255,255,0.58), transparent 65%),
    linear-gradient(135deg, rgba(125,92,255,0.20), rgba(94,199,255,0.08) 48%, transparent 68%) !important;
}

.apple-dashboard .stat-card:nth-child(6)::before {
  background:
    radial-gradient(150px 90px at 15% 0%, rgba(255,255,255,0.58), transparent 65%),
    linear-gradient(135deg, rgba(240,90,99,0.22), rgba(255,154,118,0.08) 48%, transparent 68%) !important;
}

.stat-icon,
.apple-dashboard .stat-icon {
  background: rgba(255,255,255,0.54) !important;
  border: 0.5px solid rgba(255,255,255,0.62) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    0 10px 22px rgba(36,52,84,0.08) !important;
}

.stat-icon > div {
  background: var(--ambient-blue) !important;
  box-shadow: 0 4px 12px rgba(38,120,255,0.24);
}

.stat-card:nth-child(1) .stat-icon > div,
.stat-card:nth-child(5) .stat-icon > div { background: var(--ambient-orange) !important; }
.stat-card:nth-child(3) .stat-icon > div { background: var(--ambient-mint) !important; }
.stat-card:nth-child(4) .stat-icon > div { background: var(--ambient-purple) !important; }
.stat-card:nth-child(6) .stat-icon > div { background: var(--ambient-red) !important; }

.badge,
.dash-mini,
.status-badge,
.role-tag,
.tag {
  border-radius: 999px !important;
  border: 0.5px solid rgba(255,255,255,0.58) !important;
  font-weight: 750 !important;
  letter-spacing: -0.01em !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.64), 0 7px 16px rgba(36,52,84,0.06) !important;
}

.badge-green,
.badge-success,
.dash-mini.green,
.btn-success {
  background: linear-gradient(135deg, rgba(24,184,132,0.18), rgba(98,230,196,0.10)) !important;
  color: #087f5b !important;
  border-color: rgba(24,184,132,0.22) !important;
}

.badge-red,
.badge-danger,
.dash-mini.red,
.btn-danger {
  background: linear-gradient(135deg, rgba(240,90,99,0.18), rgba(255,154,118,0.10)) !important;
  color: #c92a3a !important;
  border-color: rgba(240,90,99,0.22) !important;
}

.badge-orange,
.badge-warning,
.dash-mini.orange,
.btn-warning {
  background: linear-gradient(135deg, rgba(242,161,58,0.20), rgba(255,210,122,0.10)) !important;
  color: #a75d00 !important;
  border-color: rgba(242,161,58,0.24) !important;
}

.badge-blue,
.dash-mini.blue {
  background: linear-gradient(135deg, rgba(38,120,255,0.16), rgba(79,220,255,0.09)) !important;
  color: #075ec8 !important;
  border-color: rgba(38,120,255,0.20) !important;
}

.badge-purple {
  background: linear-gradient(135deg, rgba(125,92,255,0.16), rgba(94,199,255,0.08)) !important;
  color: #6042d8 !important;
  border-color: rgba(125,92,255,0.18) !important;
}

.badge-gray {
  background: rgba(255,255,255,0.48) !important;
  color: #667085 !important;
  border-color: rgba(255,255,255,0.58) !important;
}

.progress-bar,
.dash-rank-track {
  background: rgba(17,24,39,0.055) !important;
  box-shadow: inset 0 1px 1px rgba(17,24,39,0.045) !important;
}

.progress-fill,
.progress-blue {
  background: var(--ambient-blue) !important;
  box-shadow: 0 5px 16px rgba(38,120,255,0.22) !important;
}

.progress-green {
  background: var(--ambient-mint) !important;
  box-shadow: 0 5px 16px rgba(24,184,132,0.20) !important;
}

.progress-red {
  background: var(--ambient-red) !important;
  box-shadow: 0 5px 16px rgba(240,90,99,0.20) !important;
}

.btn {
  border-radius: 16px !important;
  border: 0.5px solid rgba(255,255,255,0.56) !important;
  background: rgba(255,255,255,0.56) !important;
  color: #1d2939 !important;
  font-weight: 760 !important;
  letter-spacing: -0.01em !important;
  box-shadow: var(--glass-shadow-soft) !important;
  backdrop-filter: blur(18px) saturate(170%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(170%) !important;
}

.btn-primary,
.btn-dl-chart {
  color: #fff !important;
  background: linear-gradient(135deg, #2678ff 0%, #4f9cff 50%, #7d5cff 100%) !important;
  border-color: rgba(255,255,255,0.42) !important;
  box-shadow:
    0 18px 38px rgba(38,120,255,0.24),
    inset 0 1px 0 rgba(255,255,255,0.42) !important;
}

input,
textarea,
select,
.form-control,
.select {
  border-radius: 16px !important;
  background: rgba(255,255,255,0.58) !important;
  border: 0.5px solid rgba(255,255,255,0.62) !important;
  color: #182230 !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.72),
    0 6px 18px rgba(36,52,84,0.04) !important;
  backdrop-filter: blur(16px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(160%) !important;
}

input::placeholder,
textarea::placeholder {
  color: #a4acba !important;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(38,120,255,0.46) !important;
  background: rgba(255,255,255,0.78) !important;
  box-shadow:
    0 0 0 4px rgba(38,120,255,0.11),
    inset 0 1px 0 rgba(255,255,255,0.84) !important;
}

table {
  color: #344054 !important;
}

thead th {
  background: rgba(255,255,255,0.42) !important;
  color: #7b8496 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

tbody td {
  color: #344054 !important;
  font-weight: 560 !important;
}

tbody tr:hover td {
  background: rgba(255,255,255,0.52) !important;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.76), rgba(255,255,255,0.46)),
    rgba(244,248,253,0.48) !important;
  border-color: rgba(255,255,255,0.60) !important;
  box-shadow:
    16px 0 56px rgba(36,52,84,0.10),
    inset 1px 1px 0 rgba(255,255,255,0.82) !important;
}

.nav-item {
  color: #445064 !important;
  font-weight: 720 !important;
}

.nav-item.active {
  background: linear-gradient(135deg, #2678ff 0%, #4f9cff 48%, #7d5cff 100%) !important;
  box-shadow:
    0 16px 34px rgba(38,120,255,0.26),
    inset 0 1px 0 rgba(255,255,255,0.42) !important;
}

.apple-dashboard .hosp-banner {
  background:
    radial-gradient(620px 240px at 82% 0%, rgba(79,220,255,0.18), transparent 62%),
    linear-gradient(135deg, rgba(17,24,39,0.92), rgba(32,48,78,0.82) 52%, rgba(49,44,94,0.78)) !important;
}

.apple-dashboard .hosp-banner-name {
  font-weight: 900 !important;
  letter-spacing: -0.035em !important;
}

.apple-dashboard .dash-task-progress-item,
.apple-dashboard .dash-rank-item,
.apple-dashboard .dash-risk-item {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.68), rgba(255,255,255,0.42)),
    rgba(255,255,255,0.46) !important;
  border: 0.5px solid rgba(255,255,255,0.58) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 8px 18px rgba(36,52,84,0.055) !important;
}

.apple-dashboard .dash-task-title,
.apple-dashboard .dash-rank-name,
.dash-risk-person {
  color: #182230 !important;
  font-weight: 820 !important;
  letter-spacing: -0.015em !important;
}

.apple-dashboard .dash-rank-score,
.dash-risk-side strong {
  font-weight: 940 !important;
  letter-spacing: -0.04em !important;
  font-variant-numeric: tabular-nums;
}

.toast {
  background: rgba(17,24,39,0.78) !important;
  border: 0.5px solid rgba(255,255,255,0.14) !important;
  border-left-width: 3px !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 70px rgba(17,24,39,0.28), inset 0 1px 0 rgba(255,255,255,0.10) !important;
  backdrop-filter: blur(22px) saturate(170%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(170%) !important;
}

.toast-success { border-left-color: #62e6c4 !important; }
.toast-warning { border-left-color: #ffd27a !important; }
.toast-error { border-left-color: #ff9a76 !important; }

#boot-screen,
#login-screen {
  background:
    radial-gradient(960px 560px at 16% -8%, rgba(38,120,255,0.22), transparent 62%),
    radial-gradient(820px 500px at 90% 6%, rgba(125,92,255,0.16), transparent 60%),
    radial-gradient(760px 500px at 54% 105%, rgba(98,230,196,0.15), transparent 58%),
    linear-gradient(180deg, #f8fbff 0%, #edf2f8 100%) !important;
}

.boot-card,
.login-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.76), rgba(255,255,255,0.50)),
    rgba(255,255,255,0.50) !important;
  border: 0.5px solid rgba(255,255,255,0.62) !important;
  box-shadow:
    0 34px 112px rgba(36,52,84,0.18),
    inset 0 1px 0 rgba(255,255,255,0.86) !important;
}

@media (prefers-reduced-motion: reduce) {
  .card:hover,
  .chart-card:hover,
  .stat-card:hover,
  .content-card:hover,
  .task-card:hover,
  .question-card:hover,
  .exam-card:hover,
  .record-card:hover {
    transform: none !important;
  }
}

/* Dashboard IA v1: fewer modules, clearer management priority */
.dash-home-v2 .hosp-banner {
  margin-bottom: 12px !important;
}

.dash-home-v2 .dash-home-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin: 10px 0 12px !important;
}

.dash-home-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.dash-home-v2 .dash-home-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.dash-home-v2 .dash-home-kpis {
  margin-bottom: 0 !important;
}

.dash-home-v2 .dash-home-kpis .stat-card {
  min-height: 104px !important;
}

.dash-command-grid,
.dash-insight-grid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-items: stretch !important;
}

.dash-command-grid > .dash-home-task-card {
  grid-column: span 8 !important;
}

.dash-command-grid > .dash-risk-card {
  grid-column: span 4 !important;
}

.dash-insight-grid > .dash-trend-card {
  grid-column: span 8 !important;
}

.dash-insight-grid > .dash-recent-card {
  grid-column: span 4 !important;
}

.dash-home-task-card,
.dash-risk-card,
.dash-trend-card,
.dash-recent-card {
  min-height: 286px !important;
}

.dash-home-v2 .dash-task-progress-body {
  padding: 9px 10px 10px !important;
}

.dash-home-v2 .dash-task-progress-item {
  min-height: 45px !important;
  padding: 8px 10px !important;
  margin-bottom: 7px !important;
}

.dash-home-v2 .dash-task-title {
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.dash-home-v2 .dash-risk-compact-body {
  padding: 8px 10px 10px !important;
}

.dash-home-v2 .dash-risk-item {
  min-height: 52px !important;
  padding: 8px 9px !important;
  margin-bottom: 7px !important;
}

.dash-home-v2 .dash-chart-box {
  height: 220px !important;
  min-height: 220px !important;
}

.dash-home-v2 .dash-recent-table tbody td {
  height: 32px !important;
  padding: 6px 9px !important;
}

.dash-dept-summary {
  margin-top: 0 !important;
}

.dash-dept-summary .table-wrap {
  border-radius: 0 0 var(--radius-xl) var(--radius-xl) !important;
  box-shadow: none !important;
  border: 0 !important;
  background: transparent !important;
}

.dash-dept-summary tbody tr:nth-child(n+13) {
  display: none;
}

@media (max-width: 1320px) {
  .dash-command-grid > .dash-home-task-card,
  .dash-command-grid > .dash-risk-card,
  .dash-insight-grid > .dash-trend-card,
  .dash-insight-grid > .dash-recent-card {
    grid-column: span 12 !important;
  }

  .dash-home-task-card,
  .dash-risk-card,
  .dash-trend-card,
  .dash-recent-card {
    min-height: auto !important;
  }
}

@media (max-width: 760px) {
  .dash-home-v2 .dash-home-header {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .dash-home-actions {
    width: 100%;
  }

  .dash-home-actions .btn {
    flex: 1;
  }
}

/* Apple Hero v2: quiet macOS-style hospital identity strip */
.dash-home-v2 {
  --apple-page-bg: #f3f6fb;
  --apple-panel: rgba(255,255,255,0.66);
  --apple-panel-strong: rgba(255,255,255,0.78);
  --apple-text: #111827;
  --apple-subtle: #667085;
  --apple-soft-line: rgba(17,24,39,0.065);
  --apple-soft-shadow: 0 18px 52px rgba(36,52,84,0.09), inset 0 1px 0 rgba(255,255,255,0.82);
}

.dash-home-v2 .hosp-banner {
  min-height: 72px !important;
  margin: 0 0 10px !important;
  padding: 12px 16px !important;
  border-radius: 24px !important;
  color: var(--apple-text) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.52)),
    rgba(255,255,255,0.56) !important;
  border: 0.5px solid rgba(255,255,255,0.68) !important;
  box-shadow: var(--apple-soft-shadow) !important;
  backdrop-filter: blur(24px) saturate(165%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(165%) !important;
  overflow: hidden !important;
}

.dash-home-v2 .hosp-banner::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background:
    linear-gradient(90deg, rgba(38,120,255,0.055), transparent 34%, rgba(24,184,132,0.04)),
    radial-gradient(360px 120px at 14% 0%, rgba(255,255,255,0.70), transparent 66%) !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

.dash-home-v2 .hosp-banner::after {
  content: "" !important;
  position: absolute !important;
  left: 18px !important;
  right: 18px !important;
  bottom: 0 !important;
  height: 1px !important;
  background: linear-gradient(90deg, transparent, rgba(17,24,39,0.075), transparent) !important;
  opacity: 1 !important;
}

.dash-home-v2 .hosp-banner-cross {
  display: none !important;
}

.dash-home-v2 .hosp-banner-left {
  position: relative !important;
  z-index: 1 !important;
  gap: 12px !important;
  min-width: 0 !important;
}

.dash-home-v2 .hosp-banner-logo,
.dash-home-v2 .hosp-banner-logo-default {
  width: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  border: 0.5px solid rgba(255,255,255,0.76) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.88), rgba(255,255,255,0.46)),
    linear-gradient(145deg, rgba(38,120,255,0.16), rgba(24,184,132,0.12)) !important;
  box-shadow: 0 10px 24px rgba(36,52,84,0.10), inset 0 1px 0 rgba(255,255,255,0.78) !important;
  object-fit: cover !important;
  flex: 0 0 44px !important;
}

.dash-home-v2 .hosp-banner-logo-default svg {
  width: 22px !important;
  height: 22px !important;
  color: #2678ff !important;
}

.dash-home-v2 .hosp-banner-logo-default svg rect {
  fill: #2678ff !important;
  opacity: 0.92 !important;
}

.dash-home-v2 .hosp-banner-info {
  min-width: 0 !important;
}

.dash-home-v2 .hosp-banner-name {
  margin: 0 !important;
  color: #111827 !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Noto Sans SC", sans-serif !important;
  font-size: 19px !important;
  line-height: 1.12 !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  max-width: 58vw !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.dash-home-v2 .hosp-banner-sub {
  margin-top: 4px !important;
  color: #7b8496 !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  font-weight: 560 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.dash-home-v2 .hosp-banner-right {
  position: relative !important;
  z-index: 1 !important;
  gap: 7px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  max-width: 42% !important;
}

.dash-home-v2 .hosp-banner-tag,
.dash-home-v2 .hosp-banner-tag[style] {
  padding: 5px 10px !important;
  border-radius: 999px !important;
  color: #475467 !important;
  background: rgba(255,255,255,0.58) !important;
  border: 0.5px solid rgba(255,255,255,0.70) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 6px 16px rgba(36,52,84,0.055) !important;
  backdrop-filter: blur(14px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(150%) !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
  font-weight: 680 !important;
  letter-spacing: 0 !important;
  max-width: 180px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.dash-home-v2 .dash-home-header {
  margin: 2px 0 10px !important;
  padding: 0 2px !important;
}

.dash-home-v2 .page-title {
  font-size: 22px !important;
  line-height: 1.08 !important;
  font-weight: 820 !important;
  letter-spacing: 0 !important;
}

.dash-home-v2 .page-subtitle {
  margin-top: 3px !important;
  color: #7b8496 !important;
}

.dash-home-v2 .dash-home-actions .btn {
  min-height: 34px !important;
  padding: 0 13px !important;
  border-radius: 13px !important;
  box-shadow: 0 8px 22px rgba(36,52,84,0.08), inset 0 1px 0 rgba(255,255,255,0.68) !important;
}

@media (max-width: 980px) {
  .dash-home-v2 .hosp-banner {
    min-height: auto !important;
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .dash-home-v2 .hosp-banner-name {
    max-width: calc(100vw - 120px) !important;
  }

  .dash-home-v2 .hosp-banner-right {
    max-width: 100% !important;
    justify-content: flex-start !important;
  }
}

/* Cupertino v1: restrained Apple System Settings inspired shell */
:root {
  --cu-bg: #f5f5f7;
  --cu-bg-deep: #eceff3;
  --cu-surface: rgba(255,255,255,0.82);
  --cu-surface-solid: #ffffff;
  --cu-sidebar: rgba(246,247,249,0.76);
  --cu-line: rgba(0,0,0,0.075);
  --cu-line-strong: rgba(0,0,0,0.12);
  --cu-text: #1d1d1f;
  --cu-text-2: #6e6e73;
  --cu-text-3: #86868b;
  --cu-blue: #007aff;
  --cu-green: #34c759;
  --cu-orange: #ff9500;
  --cu-red: #ff3b30;
  --cu-shadow: 0 1px 2px rgba(0,0,0,0.035), 0 10px 30px rgba(0,0,0,0.045);
  --cu-shadow-hover: 0 2px 6px rgba(0,0,0,0.055), 0 14px 34px rgba(0,0,0,0.065);
  --color-pass: var(--cu-green);
  --color-fail: var(--cu-red);
  --color-neutral: var(--cu-blue);
  --color-warning: var(--cu-orange);
  --success: var(--cu-green);
  --danger: var(--cu-red);
  --warning: var(--cu-orange);
  --text-primary: var(--cu-text);
  --text-secondary: var(--cu-text-2);
  --text-tertiary: var(--cu-text-3);
}

html,
body {
  background: var(--cu-bg) !important;
}

body {
  color: var(--cu-text) !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif !important;
  letter-spacing: 0 !important;
}

body::before,
body::after {
  background: none !important;
  display: none !important;
}

#main-screen {
  padding: 10px 12px 10px 0 !important;
  background: var(--cu-bg) !important;
}

.main-content {
  background: var(--cu-bg) !important;
}

.apple-dashboard {
  max-width: 1680px !important;
  padding: 14px 18px 24px !important;
}

.sidebar {
  margin: 10px 0 10px 10px !important;
  height: calc(100vh - 20px) !important;
  border-radius: 0 18px 18px 0 !important;
  background: var(--cu-sidebar) !important;
  border: 1px solid rgba(255,255,255,0.72) !important;
  border-left: 0 !important;
  box-shadow: 1px 0 0 rgba(0,0,0,0.035), 8px 0 24px rgba(0,0,0,0.035) !important;
  backdrop-filter: blur(28px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(160%) !important;
}

.sidebar::after {
  background: rgba(0,0,0,0.055) !important;
  width: 1px !important;
}

.sidebar-brand {
  padding: 16px 14px 12px !important;
}

.sidebar-brand-logo {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  border: 1px solid var(--cu-line) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

.sidebar-brand-logo svg rect {
  fill: var(--cu-blue) !important;
}

.sidebar-brand-name {
  color: var(--cu-text) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

.sidebar-brand-sub,
.nav-section-title,
.user-role {
  color: var(--cu-text-3) !important;
  font-weight: 500 !important;
}

.nav-item {
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 9px !important;
  margin: 2px 0 !important;
  padding: 0 10px !important;
  color: #3a3a3c !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.nav-item:hover {
  background: rgba(0,0,0,0.045) !important;
  transform: none !important;
  box-shadow: none !important;
}

.nav-item.active {
  color: #ffffff !important;
  background: var(--cu-blue) !important;
  border: 0 !important;
  box-shadow: none !important;
}

.nav-item svg {
  width: 16px !important;
  height: 16px !important;
}

.sidebar-footer {
  margin: 0 10px 10px !important;
  padding: 8px !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,0.56) !important;
  border: 1px solid rgba(255,255,255,0.72) !important;
  box-shadow: none !important;
}

.dash-home-v2 .hosp-banner {
  min-height: 60px !important;
  margin: 0 0 8px !important;
  padding: 6px 2px !important;
  border-radius: 0 !important;
  color: var(--cu-text) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
}

.dash-home-v2 .hosp-banner::before,
.dash-home-v2 .hosp-banner::after,
.dash-home-v2 .hosp-banner-cross {
  display: none !important;
}

.dash-home-v2 .hosp-banner-left {
  gap: 12px !important;
}

.dash-home-v2 .hosp-banner-logo,
.dash-home-v2 .hosp-banner-logo-default {
  width: 42px !important;
  height: 42px !important;
  flex-basis: 42px !important;
  border-radius: 11px !important;
  background: #ffffff !important;
  border: 1px solid var(--cu-line) !important;
  box-shadow: var(--cu-shadow) !important;
}

.dash-home-v2 .hosp-banner-logo-default svg rect {
  fill: var(--cu-blue) !important;
}

.dash-home-v2 .hosp-banner-name {
  color: var(--cu-text) !important;
  font-size: 24px !important;
  line-height: 1.12 !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  margin: 0 !important;
}

.dash-home-v2 .hosp-banner-sub {
  color: var(--cu-text-2) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  margin-top: 4px !important;
}

.dash-home-v2 .hosp-banner-right {
  gap: 6px !important;
  max-width: 38% !important;
}

.dash-home-v2 .hosp-banner-tag,
.dash-home-v2 .hosp-banner-tag[style] {
  height: 26px !important;
  padding: 0 9px !important;
  border-radius: 8px !important;
  color: var(--cu-text-2) !important;
  background: rgba(255,255,255,0.72) !important;
  border: 1px solid var(--cu-line) !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
}

.dash-home-v2 .dash-home-header {
  margin: 2px 0 12px !important;
  padding: 0 2px 10px !important;
  border-bottom: 1px solid rgba(0,0,0,0.055) !important;
}

.dash-home-v2 .page-title {
  font-size: 18px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  color: var(--cu-text) !important;
}

.dash-home-v2 .page-subtitle {
  color: var(--cu-text-3) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
}

.card,
.chart-card,
.stat-card,
.content-card,
.task-card,
.question-card,
.settings-card,
.table-wrap,
.modal,
.ai-outline-card,
.exam-card,
.record-card {
  background: var(--cu-surface-solid) !important;
  border: 1px solid var(--cu-line) !important;
  box-shadow: var(--cu-shadow) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.card,
.chart-card,
.content-card,
.task-card,
.question-card,
.settings-card,
.table-wrap,
.modal,
.ai-outline-card,
.exam-card,
.record-card {
  border-radius: 14px !important;
}

.stat-card {
  border-radius: 14px !important;
  min-height: 94px !important;
}

.card:hover,
.chart-card:hover,
.stat-card:hover,
.content-card:hover,
.task-card:hover,
.question-card:hover,
.exam-card:hover,
.record-card:hover {
  transform: none !important;
  box-shadow: var(--cu-shadow-hover) !important;
  border-color: var(--cu-line-strong) !important;
}

.card-header,
.chart-card-header,
.modal-header,
.content-card-header {
  min-height: 42px !important;
  padding: 10px 14px !important;
  background: transparent !important;
  border-bottom: 1px solid rgba(0,0,0,0.055) !important;
}

.card-body,
.chart-card-body {
  padding: 12px 14px !important;
}

.card-title,
.chart-card-title,
.modal-title {
  color: var(--cu-text) !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
}

.dash-card-sub,
.stat-label,
.stat-change,
.form-group label {
  color: var(--cu-text-3) !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

.apple-dashboard .stat-card::before,
.stat-card::before,
.stat-card::after {
  display: none !important;
}

.apple-dashboard .stat-label {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--cu-text-2) !important;
}

.apple-dashboard .stat-value,
.stat-value {
  font-size: 32px !important;
  font-weight: 720 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
}

.apple-dashboard .stat-change {
  font-size: 11px !important;
  color: var(--cu-text-3) !important;
}

.stat-icon,
.apple-dashboard .stat-icon {
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
  background: #f2f2f7 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.stat-icon > div {
  border-radius: 999px !important;
  box-shadow: none !important;
}

.dash-home-v2 .dash-task-progress-item,
.dash-home-v2 .dash-risk-item,
.apple-dashboard .dash-rank-item {
  background: #f9f9fb !important;
  border: 1px solid rgba(0,0,0,0.055) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.dash-mini,
.badge,
.status-badge,
.role-tag,
.tag {
  border-radius: 7px !important;
  border: 0 !important;
  box-shadow: none !important;
  font-weight: 500 !important;
}

.dash-mini.green,
.badge-green,
.badge-success {
  background: rgba(52,199,89,0.13) !important;
  color: #248a3d !important;
}

.dash-mini.orange,
.badge-orange,
.badge-warning {
  background: rgba(255,149,0,0.14) !important;
  color: #a05a00 !important;
}

.dash-mini.blue,
.badge-blue {
  background: rgba(0,122,255,0.12) !important;
  color: #005ecb !important;
}

.badge-red,
.badge-danger {
  background: rgba(255,59,48,0.12) !important;
  color: #c92a22 !important;
}

.progress-bar,
.dash-rank-track {
  height: 5px !important;
  background: rgba(0,0,0,0.075) !important;
  box-shadow: none !important;
}

.progress-fill,
.progress-blue {
  background: var(--cu-blue) !important;
  box-shadow: none !important;
}

.progress-green {
  background: var(--cu-green) !important;
  box-shadow: none !important;
}

.progress-red {
  background: var(--cu-red) !important;
  box-shadow: none !important;
}

.btn {
  min-height: 34px !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  color: var(--cu-text) !important;
  border: 1px solid var(--cu-line) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.035) !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.btn-primary,
.btn-dl-chart {
  background: var(--cu-blue) !important;
  color: #ffffff !important;
  border-color: var(--cu-blue) !important;
  box-shadow: none !important;
}

input,
textarea,
select,
.form-control,
.select {
  border-radius: 9px !important;
  background: #ffffff !important;
  border: 1px solid var(--cu-line) !important;
  box-shadow: none !important;
  color: var(--cu-text) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(0,122,255,0.55) !important;
  box-shadow: 0 0 0 3px rgba(0,122,255,0.14) !important;
}

thead th {
  background: #fbfbfd !important;
  color: var(--cu-text-2) !important;
  font-weight: 500 !important;
}

tbody td {
  color: #2c2c2e !important;
}

tbody tr:hover td {
  background: #f5f5f7 !important;
}

@media (max-width: 980px) {
  .dash-home-v2 .hosp-banner {
    padding: 4px 0 !important;
  }

  .dash-home-v2 .hosp-banner-name {
    font-size: 20px !important;
    max-width: calc(100vw - 118px) !important;
  }
}

/* Demo Replica v1: clean Apple dashboard from provided reference */
:root {
  --demo-bg: #F2F2F7;
  --demo-sidebar: #FFFFFF;
  --demo-card: #FFFFFF;
  --demo-line: rgba(203, 213, 225, 0.62);
  --demo-line-soft: rgba(226, 232, 240, 0.82);
  --demo-text: #0F172A;
  --demo-muted: #64748B;
  --demo-faint: #94A3B8;
  --demo-blue: #2563EB;
  --demo-green: #10B981;
  --demo-orange: #F59E0B;
  --demo-red: #E11D48;
  --demo-shadow: 0 1px 2px rgba(15, 23, 42, 0.045);
  --demo-shadow-hover: 0 8px 22px rgba(15, 23, 42, 0.08);
  --sidebar-w: 216px;
  --color-pass: var(--demo-green);
  --color-fail: var(--demo-red);
  --color-neutral: var(--demo-blue);
  --color-warning: var(--demo-orange);
  --success: var(--demo-green);
  --danger: var(--demo-red);
  --warning: var(--demo-orange);
  --text-primary: var(--demo-text);
  --text-secondary: var(--demo-muted);
  --text-tertiary: var(--demo-faint);
}

html,
body,
#main-screen,
.main-content {
  background: var(--demo-bg) !important;
}

body {
  color: var(--demo-text) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0 !important;
}

body::before,
body::after {
  display: none !important;
}

#main-screen {
  padding: 0 !important;
}

.sidebar {
  width: var(--sidebar-w) !important;
  flex: 0 0 var(--sidebar-w) !important;
  height: 100vh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  background: var(--demo-sidebar) !important;
  border: 0 !important;
  border-right: 1px solid rgba(226, 232, 240, 0.88) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.sidebar::after {
  display: none !important;
}

.sidebar-brand {
  height: 73px !important;
  padding: 18px 14px !important;
  border-bottom: 1px solid rgba(241, 245, 249, 0.95) !important;
  gap: 12px !important;
}

.sidebar-brand-logo {
  width: 36px !important;
  height: 36px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #3B82F6, #4F46E5) !important;
  border: 0 !important;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.18) !important;
}

.sidebar-brand-logo svg rect {
  fill: #FFFFFF !important;
}

.sidebar-brand-name {
  color: var(--demo-text) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
}

.sidebar-brand-sub {
  color: var(--demo-faint) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  margin-top: 2px !important;
}

.sidebar-divider {
  display: none !important;
}

.sidebar-nav {
  padding: 16px 12px !important;
}

.nav-section {
  margin-bottom: 20px !important;
}

.nav-section-title {
  padding: 0 12px 8px !important;
  color: var(--demo-faint) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.nav-item {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 12px !important;
  margin: 2px 0 !important;
  border-radius: 12px !important;
  color: #475569 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  transition: background-color .18s ease, color .18s ease !important;
}

.nav-item svg {
  width: 16px !important;
  height: 16px !important;
  color: currentColor !important;
}

.nav-item:hover {
  transform: none !important;
  color: var(--demo-text) !important;
  background: #F1F5F9 !important;
  box-shadow: none !important;
}

.nav-item.active {
  color: #FFFFFF !important;
  background: var(--demo-blue) !important;
  box-shadow: none !important;
}

.sidebar-footer {
  margin: 0 !important;
  padding: 14px 16px !important;
  border-radius: 0 !important;
  background: rgba(248, 250, 252, 0.88) !important;
  border: 0 !important;
  border-top: 1px solid rgba(241, 245, 249, 0.95) !important;
  box-shadow: none !important;
}

.user-avatar {
  width: 32px !important;
  height: 32px !important;
  background: #E2E8F0 !important;
  color: #334155 !important;
  box-shadow: none !important;
}

.main-content {
  height: 100vh !important;
  overflow: hidden !important;
}

.page.active {
  height: 100% !important;
}

.apple-dashboard.dash-home-v2 {
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  background: var(--demo-bg) !important;
}

.dash-home-v2 .hosp-banner {
  display: none !important;
}

.dash-home-v2 .dash-home-header {
  height: 64px !important;
  min-height: 64px !important;
  margin: 0 !important;
  padding: 0 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: rgba(255, 255, 255, 0.82) !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.88) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  z-index: 2 !important;
}

.dash-home-v2 .page-title {
  font-size: 18px !important;
  line-height: 1.2 !important;
  color: var(--demo-text) !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

.dash-home-v2 .page-subtitle {
  display: inline-flex !important;
  margin-top: 0 !important;
  margin-left: 14px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  background: #F1F5F9 !important;
  border: 1px solid rgba(226, 232, 240, 0.86) !important;
  color: var(--demo-muted) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  vertical-align: middle !important;
}

.dash-home-v2 .dash-home-header > div:first-child {
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
}

.dash-home-actions {
  gap: 10px !important;
}

.dash-home-v2 .dash-home-actions .btn {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.dash-home-v2 .dash-home-body {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
}

.card,
.chart-card,
.stat-card,
.content-card,
.task-card,
.question-card,
.settings-card,
.table-wrap,
.modal,
.ai-outline-card,
.exam-card,
.record-card {
  background: var(--demo-card) !important;
  border: 1px solid rgba(226, 232, 240, 0.78) !important;
  box-shadow: var(--demo-shadow) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.card,
.chart-card,
.content-card,
.task-card,
.question-card,
.settings-card,
.table-wrap,
.modal,
.ai-outline-card,
.exam-card,
.record-card {
  border-radius: 24px !important;
}

.stat-card {
  height: 112px !important;
  min-height: 112px !important;
  border-radius: 16px !important;
  padding: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

.card:hover,
.chart-card:hover,
.stat-card:hover {
  transform: none !important;
  box-shadow: var(--demo-shadow-hover) !important;
}

.card-header,
.chart-card-header {
  min-height: 54px !important;
  padding: 18px 22px 12px !important;
  background: transparent !important;
  border-bottom: 0 !important;
}

.card-body,
.chart-card-body {
  padding: 0 22px 20px !important;
}

.card-title,
.chart-card-title {
  color: var(--demo-text) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

.dash-card-sub {
  color: var(--demo-faint) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  margin-top: 2px !important;
}

.dash-home-v2 .dash-home-kpis {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

.apple-dashboard .stat-card::before,
.stat-card::before,
.stat-card::after {
  display: none !important;
}

.apple-dashboard .stat-card-header {
  margin-bottom: 0 !important;
}

.apple-dashboard .stat-label {
  color: var(--demo-faint) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

.apple-dashboard .stat-icon {
  display: none !important;
}

.apple-dashboard .stat-value {
  color: var(--demo-text) !important;
  font-size: 28px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
}

.apple-dashboard .stat-change {
  color: var(--demo-faint) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
}

.dash-command-grid,
.dash-insight-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 24px !important;
}

.dash-command-grid > .dash-home-task-card,
.dash-command-grid > .dash-risk-card,
.dash-insight-grid > .dash-trend-card,
.dash-insight-grid > .dash-recent-card {
  grid-column: auto !important;
  min-height: 360px !important;
}

.dash-home-v2 .dash-task-progress-body,
.dash-home-v2 .dash-risk-compact-body {
  padding: 0 18px 18px !important;
}

.dash-home-v2 .dash-task-progress-item,
.dash-home-v2 .dash-risk-item {
  min-height: 52px !important;
  padding: 10px 12px !important;
  margin-bottom: 10px !important;
  border-radius: 14px !important;
  background: #F8FAFC !important;
  border: 1px solid rgba(226, 232, 240, 0.74) !important;
  box-shadow: none !important;
}

.dash-home-v2 .dash-task-title,
.dash-risk-person {
  color: var(--demo-text) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.dash-mini,
.badge,
.status-badge {
  border-radius: 7px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.progress-bar {
  height: 6px !important;
  background: #E2E8F0 !important;
  box-shadow: none !important;
}

.progress-fill,
.progress-blue {
  background: var(--demo-blue) !important;
  box-shadow: none !important;
}

.progress-green {
  background: var(--demo-green) !important;
}

.progress-red {
  background: var(--demo-red) !important;
}

.dash-home-v2 .dash-chart-box {
  height: 270px !important;
  min-height: 270px !important;
}

.dash-recent-table thead th,
thead th {
  height: 36px !important;
  padding: 10px 14px !important;
  background: #F8FAFC !important;
  color: var(--demo-faint) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

.dash-recent-table tbody td,
tbody td {
  height: 42px !important;
  padding: 10px 14px !important;
  color: #475569 !important;
  border-bottom: 1px solid #F1F5F9 !important;
}

tbody tr:hover td {
  background: #F8FAFC !important;
}

.btn {
  border-radius: 12px !important;
  border: 1px solid rgba(226, 232, 240, 0.90) !important;
  background: #FFFFFF !important;
  color: #334155 !important;
  box-shadow: var(--demo-shadow) !important;
  font-weight: 700 !important;
}

.btn-primary,
.btn-dl-chart {
  background: #0F172A !important;
  color: #FFFFFF !important;
  border-color: #0F172A !important;
  box-shadow: none !important;
}

@media (max-width: 1440px) {
  .dash-home-v2 .dash-home-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1100px) {
  .dash-command-grid,
  .dash-insight-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  .sidebar {
    width: 72px !important;
    flex-basis: 72px !important;
  }

  .sidebar-brand-text,
  .nav-section-title,
  .nav-item span,
  .sidebar-footer .user-details {
    display: none !important;
  }

  .dash-home-v2 .dash-home-header {
    height: auto !important;
    min-height: 64px !important;
    padding: 14px 16px !important;
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .dash-home-v2 .dash-home-body {
    padding: 16px !important;
    gap: 16px !important;
  }

  .dash-home-v2 .dash-home-kpis {
    grid-template-columns: 1fr !important;
  }
}

/* Demo Replica v2: closer to 数据看板_苹果风优化版 */
:root {
  --demo-bg: #F5F5F7;
  --demo-card: #FFFFFF;
  --demo-text: #1D1D1F;
  --demo-muted: #6E6E73;
  --demo-faint: #AEAEB2;
  --demo-sep: rgba(0,0,0,.065);
  --demo-blue: #0A84FF;
  --demo-blue-soft: rgba(10,132,255,.10);
  --demo-green: #30D158;
  --demo-green-soft: rgba(48,209,88,.12);
  --demo-orange: #FF9F0A;
  --demo-orange-soft: rgba(255,159,10,.12);
  --demo-red: #FF3B30;
  --demo-red-soft: rgba(255,59,48,.10);
  --demo-purple: #BF5AF2;
  --demo-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 24px rgba(0,0,0,.045);
  --demo-shadow-hover: 0 2px 6px rgba(0,0,0,.06), 0 16px 32px rgba(0,0,0,.08);
  --sidebar-w: 232px;
  --color-pass: var(--demo-green);
  --color-fail: var(--demo-red);
  --color-neutral: var(--demo-blue);
  --color-warning: var(--demo-orange);
}

html,
body,
#main-screen,
.main-content,
.apple-dashboard.dash-home-v2 {
  background: var(--demo-bg) !important;
}

.sidebar {
  width: 216px !important;
  flex-basis: 216px !important;
  background: #FBFBFD !important;
  border-right: 1px solid var(--demo-sep) !important;
}

.sidebar-brand {
  padding: 18px 12px !important;
  height: 73px !important;
  border-bottom: 1px solid var(--demo-sep) !important;
}

.sidebar-brand-logo {
  width: 36px !important;
  height: 36px !important;
  border-radius: 11px !important;
  background: linear-gradient(160deg,#34D399,#10B981) !important;
  box-shadow: none !important;
}

.sidebar-brand-name {
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
  color: var(--demo-text) !important;
}

.sidebar-brand-sub {
  font-size: 11.5px !important;
  color: var(--demo-faint) !important;
}

.sidebar-nav {
  padding: 6px 8px 10px !important;
}

.nav-section-title {
  margin: 16px 10px 6px !important;
  padding: 0 !important;
  color: var(--demo-faint) !important;
  font-size: 10.5px !important;
  font-weight: 650 !important;
  letter-spacing: .06em !important;
}

.nav-item {
  height: 36px !important;
  min-height: 36px !important;
  padding: 8px 10px !important;
  border-radius: 9px !important;
  color: var(--demo-muted) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  gap: 10px !important;
}

.nav-item svg {
  width: 18px !important;
  height: 18px !important;
}

.nav-item:hover {
  background: rgba(0,0,0,.035) !important;
  color: var(--demo-text) !important;
}

.nav-item.active {
  background: var(--demo-blue-soft) !important;
  color: var(--demo-blue) !important;
  font-weight: 600 !important;
}

#nav-risks.nav-item.active,
.nav-item[data-page="risks"].active {
  background: var(--demo-red-soft) !important;
  color: var(--demo-red) !important;
}

.sidebar-footer {
  padding: 12px 14px !important;
  border-top: 1px solid var(--demo-sep) !important;
  background: #FBFBFD !important;
}

.dash-home-v2 .dash-home-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  height: 65px !important;
  min-height: 65px !important;
  padding: 14px 32px !important;
  background: rgba(245,245,247,.78) !important;
  border-bottom: 1px solid var(--demo-sep) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
}

.dash-home-v2 .page-title {
  font-size: 21px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

.dash-home-v2 .page-subtitle {
  display: none !important;
}

.dash-home-actions {
  margin-left: auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.dash-home-actions::before {
  content: "⌕  搜索任务 / 科室" !important;
  display: inline-flex !important;
  align-items: center !important;
  width: 220px !important;
  height: 32px !important;
  padding: 0 11px !important;
  border-radius: 10px !important;
  background: rgba(0,0,0,.045) !important;
  color: var(--demo-faint) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

.dash-home-actions::after {
  content: "今日   本月" !important;
  display: inline-flex !important;
  align-items: center !important;
  height: 32px !important;
  padding: 0 12px !important;
  border-radius: 9px !important;
  background: linear-gradient(90deg,#fff 0 48%, transparent 48% 100%), rgba(0,0,0,.045) !important;
  color: var(--demo-muted) !important;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.045) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  word-spacing: 14px !important;
  order: 1 !important;
}

.dash-home-actions .btn-secondary {
  display: none !important;
}

.dash-home-actions .btn-primary {
  order: 3 !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  background: var(--demo-text) !important;
  border-color: var(--demo-text) !important;
  color: #fff !important;
  font-size: 12px !important;
}

.dash-home-v2 .dash-home-body {
  padding: 24px 32px 56px !important;
  max-width: 1480px !important;
  width: 100% !important;
  margin: 0 auto !important;
  gap: 18px !important;
}

.dash-home-v2 .dash-home-kpis {
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  gap: 18px !important;
  margin-bottom: 2px !important;
}

.stat-card {
  height: 126px !important;
  min-height: 126px !important;
  border-radius: 20px !important;
  padding: 20px !important;
}

.apple-dashboard .stat-card-header {
  margin-bottom: 14px !important;
}

.apple-dashboard .stat-icon {
  display: flex !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 9px !important;
  background: var(--demo-blue-soft) !important;
}

.apple-dashboard .stat-label {
  color: var(--demo-muted) !important;
  font-size: 13px !important;
  font-weight: 550 !important;
}

.apple-dashboard .stat-value {
  font-size: 32px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  color: var(--demo-text) !important;
}

.apple-dashboard .stat-change {
  margin-top: 6px !important;
  font-size: 12.5px !important;
  color: var(--demo-faint) !important;
  font-weight: 500 !important;
}

.card,
.chart-card,
.dash-dept-summary {
  border-radius: 20px !important;
  border: 1px solid rgba(0,0,0,.035) !important;
  box-shadow: var(--demo-shadow) !important;
}

.card:hover,
.chart-card:hover {
  box-shadow: var(--demo-shadow-hover) !important;
}

.card-header,
.chart-card-header {
  padding: 22px 22px 16px !important;
  min-height: auto !important;
}

.card-title,
.chart-card-title {
  font-size: 15.5px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
}

.dash-card-sub {
  font-size: 12px !important;
  color: var(--demo-faint) !important;
}

.dash-command-grid {
  grid-template-columns: 1.4fr 1fr !important;
  gap: 18px !important;
  margin-bottom: 0 !important;
}

.dash-insight-grid {
  grid-template-columns: 1fr 1.4fr !important;
  gap: 18px !important;
}

.dash-command-grid > .dash-home-task-card,
.dash-command-grid > .dash-risk-card,
.dash-insight-grid > .dash-trend-card,
.dash-insight-grid > .dash-recent-card {
  min-height: 360px !important;
}

.dash-home-v2 .dash-task-progress-item,
.dash-home-v2 .dash-risk-item {
  border-radius: 10px !important;
  background: #fff !important;
  border: 0 !important;
  border-bottom: 1px solid var(--demo-sep) !important;
  box-shadow: none !important;
  padding: 10px 0 !important;
}

.dash-home-v2 .dash-task-progress-item:last-child,
.dash-home-v2 .dash-risk-item:last-child {
  border-bottom: 0 !important;
}

.dash-dept-summary .card-header {
  padding-bottom: 12px !important;
}

.dash-dept-summary .table-wrap {
  border-radius: 0 !important;
}

thead th {
  background: #fff !important;
  color: var(--demo-faint) !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
}

tbody td {
  height: 46px !important;
  color: var(--demo-muted) !important;
}

@media (max-width: 1180px) {
  .dash-home-v2 .dash-home-kpis {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }
  .dash-command-grid,
  .dash-insight-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  .dash-home-actions::before,
  .dash-home-actions::after {
    display: none !important;
  }
  .dash-home-v2 .dash-home-kpis {
    grid-template-columns: 1fr !important;
  }
}

/* Demo Replica v3: structural clone of 数据看板_苹果风优化版 */
:root {
  --demo-bg:#F5F5F7;
  --demo-card:#FFFFFF;
  --demo-text:#1D1D1F;
  --demo-muted:#6E6E73;
  --demo-faint:#AEAEB2;
  --demo-sep:rgba(0,0,0,.065);
  --demo-blue:#0A84FF;
  --demo-blue-soft:rgba(10,132,255,.10);
  --demo-green:#30D158;
  --demo-green-soft:rgba(48,209,88,.12);
  --demo-orange:#FF9F0A;
  --demo-orange-soft:rgba(255,159,10,.12);
  --demo-red:#FF3B30;
  --demo-red-soft:rgba(255,59,48,.10);
  --demo-indigo:#5E5CE6;
  --demo-indigo-soft:rgba(94,92,230,.12);
  --demo-shadow:0 1px 2px rgba(0,0,0,.04), 0 10px 24px rgba(0,0,0,.045);
  --demo-shadow-hover:0 2px 6px rgba(0,0,0,.06), 0 16px 32px rgba(0,0,0,.08);
}

#main-screen,
.main-content,
.dash-demo {
  background:var(--demo-bg) !important;
}

.dash-demo {
  min-height:100%;
  color:var(--demo-text);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","PingFang SC","Helvetica Neue",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  font-feature-settings:"tnum";
  padding:0 !important;
}

.dash-demo .demo-topbar {
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  align-items:center;
  gap:16px;
  height:65px;
  padding:14px 32px;
  background:rgba(245,245,247,.78);
  border-bottom:1px solid var(--demo-sep);
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
}

.dash-demo .demo-topbar h1 {
  margin:0;
  font-size:21px;
  font-weight:700;
  letter-spacing:-.02em;
  color:var(--demo-text);
}

.dash-demo .demo-pro-topbar {
  height:70px;
  padding:10px 24px 10px 28px;
  gap:18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.82), rgba(248,250,252,.56) 58%, rgba(236,246,241,.42)),
    rgba(245,247,250,.52);
  border-bottom:1px solid rgba(0,0,0,.05);
  box-shadow:0 1px 0 rgba(255,255,255,.7) inset, 0 14px 34px rgba(15,23,42,.045);
  backdrop-filter:blur(28px) saturate(180%);
  -webkit-backdrop-filter:blur(28px) saturate(180%);
}

.dash-demo .demo-topbar-title {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.dash-demo .demo-title-line {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.dash-demo .demo-pro-topbar h1 {
  font-size:22px;
  font-weight:800;
  letter-spacing:-.035em;
  line-height:1.1;
}

.dash-demo .demo-version-pill {
  display:inline-flex;
  align-items:center;
  height:22px;
  padding:0 9px;
  border-radius:999px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(0,0,0,.045);
  box-shadow:0 1px 0 rgba(255,255,255,.9) inset, 0 8px 18px rgba(15,23,42,.04);
  color:rgba(71,85,105,.82);
  font-size:11px;
  font-weight:800;
  letter-spacing:.02em;
  white-space:nowrap;
}

.dash-demo .demo-topbar-sub {
  max-width:min(62vw, 640px);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:rgba(100,116,139,.88);
  font-size:13px;
  font-weight:600;
  letter-spacing:-.01em;
}

.dash-demo .demo-pro-actions {
  gap:8px;
  flex-wrap:nowrap;
  padding:3px;
  border-radius:999px;
  background:rgba(255,255,255,.44);
  border:1px solid rgba(0,0,0,.035);
  box-shadow:0 1px 0 rgba(255,255,255,.72) inset;
}

.dash-demo .demo-status-pill,
.dash-demo .demo-user-pill,
.dash-demo .demo-time-pill {
  transition:all .34s cubic-bezier(.16,1,.3,1);
}

.dash-demo .demo-status-pill,
.dash-demo .demo-user-pill {
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(0,0,0,.05);
  box-shadow:0 1px 0 rgba(255,255,255,.86) inset, 0 12px 26px rgba(15,23,42,.055);
  backdrop-filter:blur(18px) saturate(170%);
  -webkit-backdrop-filter:blur(18px) saturate(170%);
  white-space:nowrap;
}

.dash-demo .demo-status-pill {
  height:34px;
  gap:8px;
  padding:0 12px;
  color:rgba(51,65,85,.86);
  font-size:12.5px;
  font-weight:700;
}

.dash-demo .demo-status-pill i {
  width:8px;
  height:8px;
  border-radius:999px;
  background:#34c759;
  box-shadow:0 0 0 5px rgba(52,199,89,.13), 0 0 16px rgba(52,199,89,.42);
  animation:demoStatusPulse 1.9s ease-in-out infinite;
  flex:0 0 auto;
}

@keyframes demoStatusPulse {
  0%,100% { transform:scale(1); box-shadow:0 0 0 4px rgba(52,199,89,.12), 0 0 14px rgba(52,199,89,.36); }
  50% { transform:scale(.82); box-shadow:0 0 0 8px rgba(52,199,89,.06), 0 0 22px rgba(52,199,89,.46); }
}

.dash-demo .demo-user-pill {
  height:36px;
  gap:8px;
  padding:3px 13px 3px 14px;
}

.dash-demo .demo-user-pill b {
  color:rgba(15,23,42,.92);
  font-size:13.5px;
  font-weight:800;
  letter-spacing:-.02em;
}

.dash-demo .demo-user-pill span {
  color:rgba(100,116,139,.88);
  font-size:12px;
  font-weight:700;
  padding-left:8px;
  border-left:1px solid rgba(15,23,42,.08);
}

.dash-demo .demo-time-pill {
  display:inline-flex;
  align-items:center;
  gap:8px;
  height:36px;
  padding:0 14px;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(29,35,48,.98), rgba(10,14,24,.96));
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 1px 0 rgba(255,255,255,.14) inset, 0 16px 32px rgba(15,23,42,.14);
  color:rgba(255,255,255,.92);
  font-size:12px;
  font-weight:800;
  letter-spacing:-.01em;
  white-space:nowrap;
}

.dash-demo .demo-time-pill i {
  position:relative;
  width:14px;
  height:14px;
  border-radius:4px;
  border:1.6px solid rgba(255,255,255,.9);
  box-shadow:inset 0 4px 0 rgba(255,255,255,.18);
  flex:0 0 auto;
}

.dash-demo .demo-time-pill i::before,
.dash-demo .demo-time-pill i::after {
  content:"";
  position:absolute;
  top:-3px;
  width:2px;
  height:4px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
}

.dash-demo .demo-time-pill i::before { left:3px; }
.dash-demo .demo-time-pill i::after { right:3px; }

.dash-demo .demo-bell-btn {
  position:relative;
  width:38px;
  height:38px;
  border:1px solid rgba(0,0,0,.045);
  border-radius:999px;
  background:rgba(255,255,255,.74);
  box-shadow:0 1px 0 rgba(255,255,255,.9) inset, 0 12px 26px rgba(15,23,42,.055);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:default;
}

.dash-demo .demo-bell-btn i {
  position:relative;
  width:14px;
  height:15px;
  border:1.7px solid rgba(51,65,85,.82);
  border-bottom:0;
  border-radius:8px 8px 5px 5px;
}

.dash-demo .demo-bell-btn i::before {
  content:"";
  position:absolute;
  left:50%;
  bottom:-5px;
  width:14px;
  height:1.7px;
  border-radius:999px;
  background:rgba(51,65,85,.82);
  transform:translateX(-50%);
}

.dash-demo .demo-bell-btn i::after {
  content:"";
  position:absolute;
  left:50%;
  bottom:-8px;
  width:4px;
  height:4px;
  border-radius:999px;
  background:rgba(51,65,85,.82);
  transform:translateX(-50%);
}

.dash-demo .demo-bell-btn em {
  position:absolute;
  top:9px;
  right:10px;
  width:7px;
  height:7px;
  border-radius:999px;
  background:#ff453a;
  border:1.5px solid rgba(255,255,255,.95);
  box-shadow:0 0 0 3px rgba(255,69,58,.12);
}

.dash-demo .demo-status-pill:hover,
.dash-demo .demo-user-pill:hover,
.dash-demo .demo-time-pill:hover {
  transform:translateY(-1px);
  box-shadow:0 1px 0 rgba(255,255,255,.88) inset, 0 16px 34px rgba(15,23,42,.08);
}

.dash-demo .demo-topbar-spacer {
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:10px;
}

.dash-demo .demo-search {
  display:flex;
  align-items:center;
  gap:8px;
  width:220px;
  height:32px;
  padding:0 11px;
  border-radius:10px;
  background:rgba(0,0,0,.045);
  color:var(--demo-faint);
  font-size:13px;
  font-weight:500;
}

.dash-demo .demo-search-icon {
  width:13px;
  height:13px;
  border:1.8px solid currentColor;
  border-radius:50%;
  position:relative;
  flex:none;
}

.dash-demo .demo-search-icon::after {
  content:"";
  width:6px;
  height:1.8px;
  background:currentColor;
  border-radius:2px;
  position:absolute;
  right:-5px;
  bottom:-3px;
  transform:rotate(45deg);
}

.dash-demo .demo-seg {
  display:flex;
  align-items:center;
  height:32px;
  padding:2px;
  border-radius:9px;
  background:rgba(0,0,0,.045);
}

.dash-demo .demo-seg button {
  border:0;
  background:transparent;
  border-radius:7px;
  padding:5px 12px;
  color:var(--demo-muted);
  font-size:12.5px;
  font-weight:550;
}

.dash-demo .demo-seg button.active {
  background:#fff;
  color:var(--demo-text);
  box-shadow:0 1px 2px rgba(0,0,0,.08);
}

.dash-demo .demo-icon-btn {
  width:32px;
  height:32px;
  border:0;
  border-radius:50%;
  background:rgba(0,0,0,.045);
  position:relative;
}

.dash-demo .demo-icon-btn::before {
  content:"";
  position:absolute;
  inset:8px 9px;
  border:1.8px solid var(--demo-muted);
  border-radius:4px;
}

.dash-demo .demo-icon-btn::after {
  content:"";
  position:absolute;
  top:6px;
  right:7px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--demo-red);
  border:1.5px solid #FBFBFD;
}

.dash-demo .demo-content {
  width:100%;
  max-width:1680px;
  margin:0 auto;
  padding:18px 4px 54px;
}

.dash-demo .demo-page-head {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin-bottom:22px;
}

.dash-demo .greet {
  color:var(--demo-muted);
  font-size:14px;
}

.dash-demo .greet b {
  color:var(--demo-text);
  font-weight:600;
}

.dash-demo .date {
  color:var(--demo-faint);
  font-size:13px;
}

.dash-demo .demo-card {
  background:var(--demo-card);
  border:1px solid rgba(0,0,0,.035);
  border-radius:20px;
  box-shadow:var(--demo-shadow);
  padding:22px 22px 20px;
  display:flex;
  flex-direction:column;
  min-width:0;
  transition:box-shadow .25s ease, transform .25s ease;
}

.dash-demo .demo-card:hover {
  box-shadow:var(--demo-shadow-hover);
}

.dash-demo .demo-card.is-clickable {
  cursor:pointer;
}

.dash-demo .demo-card.is-clickable:hover {
  transform:translateY(-1px);
}

.dash-demo .demo-card-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}

.dash-demo .demo-card-title {
  font-size:15.5px;
  font-weight:650;
  letter-spacing:-.005em;
  color:var(--demo-text);
}

.dash-demo .demo-card-sub {
  margin-top:2px;
  font-size:12px;
  color:var(--demo-faint);
}

.dash-demo .demo-card-link {
  border:0;
  background:transparent;
  color:var(--demo-blue);
  font-size:12.5px;
  font-weight:550;
  white-space:nowrap;
  padding:0;
}

.dash-demo .demo-card-link.danger {
  color:var(--demo-red);
}

.dash-demo .demo-stats-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
  margin-bottom:20px;
}

.dash-demo .demo-stat-card {
  height:126px;
  min-height:126px;
  padding:20px;
}

.dash-demo .demo-stat-top {
  display:flex;
  align-items:center;
  gap:9px;
  margin-bottom:14px;
}

.dash-demo .demo-stat-icon {
  width:30px;
  height:30px;
  border-radius:9px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:none;
}

.dash-demo .demo-stat-icon::before {
  content:"";
  width:14px;
  height:14px;
  border-radius:4px;
  background:currentColor;
}

.dash-demo .demo-stat-icon.blue { background:var(--demo-blue-soft); color:var(--demo-blue); }
.dash-demo .demo-stat-icon.green { background:var(--demo-green-soft); color:var(--demo-green); }
.dash-demo .demo-stat-icon.orange { background:var(--demo-orange-soft); color:var(--demo-orange); }
.dash-demo .demo-stat-icon.red { background:var(--demo-red-soft); color:var(--demo-red); }

.dash-demo .demo-stat-label {
  font-size:13px;
  font-weight:550;
  color:var(--demo-muted);
}

.dash-demo .demo-stat-num {
  font-size:32px;
  font-weight:700;
  letter-spacing:-.02em;
  line-height:1;
  color:var(--demo-text);
}

.dash-demo .demo-stat-num.blue { color:var(--demo-blue); }
.dash-demo .demo-stat-num.green { color:var(--demo-green); }
.dash-demo .demo-stat-num.orange { color:var(--demo-orange); }
.dash-demo .demo-stat-num.red { color:var(--demo-red); }

.dash-demo .demo-stat-cap {
  margin-top:6px;
  color:var(--demo-faint);
  font-size:12.5px;
  font-weight:500;
}

.dash-demo .demo-stat-cap b {
  color:var(--demo-muted);
  font-weight:650;
}

.dash-demo .demo-stat-cap.danger {
  color:var(--demo-red);
  font-weight:600;
}

.dash-demo .demo-dual-ring {
  display:flex;
  gap:18px;
  margin-top:2px;
}

.dash-demo .demo-ring-item {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.dash-demo .demo-ring-label {
  display:flex;
  flex-direction:column;
}

.dash-demo .demo-ring-label strong {
  color:var(--demo-text);
  font-size:18px;
  font-weight:820;
  letter-spacing:-.035em;
  line-height:1.1;
}

.dash-demo .demo-ring-label span {
  color:var(--demo-faint);
  font-size:11.5px;
}

.dash-demo .demo-grid-2col,
.dash-demo .demo-grid-2col-alt,
.dash-demo .demo-grid-2col-even,
.dash-demo .demo-grid-task-risk,
.dash-demo .demo-grid-trend-dist,
.dash-demo .demo-grid-issuer-trend {
  display:grid;
  gap:18px;
  margin-bottom:18px;
  align-items:stretch;
}

.dash-demo .demo-grid-2col { grid-template-columns:1fr 1.35fr; }
.dash-demo .demo-grid-2col-alt { grid-template-columns:1fr 1.4fr; }
.dash-demo .demo-grid-2col-even { grid-template-columns:1fr 1fr; }
.dash-demo .demo-grid-task-risk { grid-template-columns:1fr 1fr; }
.dash-demo .demo-grid-trend-dist { grid-template-columns:1fr 1fr; }
.dash-demo .demo-grid-issuer-trend { grid-template-columns:1fr 1fr; }

.dash-demo .demo-task-list,
.dash-demo .demo-alert-list,
.dash-demo .demo-act-list {
  flex:1;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  min-height:285px;
}


.dash-demo .demo-alert-list {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 18px;
  align-content:start;
  justify-content:stretch;
}

.dash-demo .demo-retake-list {
  flex:1;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:285px;
  justify-content:space-between;
}

.dash-demo .demo-retake-row {
  display:grid;
  grid-template-columns:32px minmax(0,1fr) 48px;
  gap:10px;
  align-items:center;
  padding:8px 0;
  border-bottom:1px solid var(--demo-sep);
}

.dash-demo .demo-retake-row:last-child {
  border-bottom:0;
}

.dash-demo .demo-retake-main {
  min-width:0;
}

.dash-demo .demo-retake-main > div:first-child {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.dash-demo .demo-retake-main strong {
  color:#172033;
  font-size:13px;
  font-weight:800;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dash-demo .demo-retake-main span {
  flex:none;
  max-width:42%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#7a8598;
  font-size:11px;
  font-weight:700;
}

.dash-demo .demo-retake-row b {
  justify-self:end;
  color:#ef6a45;
  font-size:13px;
  font-weight:900;
  letter-spacing:-.03em;
}

.dash-demo .demo-retake-bar {
  height:6px;
  margin-top:7px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(148,163,184,.16);
}

.dash-demo .demo-retake-bar i {
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#ff9b6b,#ff5f6d);
  box-shadow:0 8px 18px rgba(255,95,109,.2);
}

.dash-demo .demo-retake-bar.tone-1 i { background:linear-gradient(90deg,#fbc76b,#f59e0b); box-shadow:0 8px 18px rgba(245,158,11,.18); }
.dash-demo .demo-retake-bar.tone-2 i { background:linear-gradient(90deg,#7dd3fc,#3b82f6); box-shadow:0 8px 18px rgba(59,130,246,.18); }
.dash-demo .demo-retake-bar.tone-3 i { background:linear-gradient(90deg,#86efac,#10b981); box-shadow:0 8px 18px rgba(16,185,129,.18); }
.dash-demo .demo-retake-bar.tone-4 i { background:linear-gradient(90deg,#c4b5fd,#8b5cf6); box-shadow:0 8px 18px rgba(139,92,246,.18); }

.dash-demo .demo-trend-wide {
  margin-bottom:18px;
}

.dash-demo .demo-chart-wrap.wide {
  min-height:270px;
}

.dash-demo .demo-chart-wrap.compact,
.dash-demo .demo-chart-wrap.trend {
  min-height:260px;
}

.dash-demo .demo-issuer-svg {
  display:block;
  width:100%;
  height:100%;
  min-height:250px;
}

.dash-demo .demo-task-row,
.dash-demo .demo-alert-row,
.dash-demo .demo-act-row {
  border-bottom:1px solid var(--demo-sep);
}

.dash-demo .demo-task-row {
  padding:7px 0;
  cursor:pointer;
}

.dash-demo .demo-task-row:first-child,
.dash-demo .demo-alert-row:first-child,
.dash-demo .demo-act-row:first-child {
  padding-top:0;
}

.dash-demo .demo-task-row:last-child,
.dash-demo .demo-alert-row:last-child,
.dash-demo .demo-act-row:last-child {
  border-bottom:0;
  padding-bottom:0;
}

.dash-demo .demo-task-title {
  margin-bottom:6px;
  color:var(--demo-text);
  font-size:13px;
  font-weight:600;
  line-height:1.35;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.dash-demo .demo-task-line {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}

.dash-demo .demo-task-mainline {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex:1;
}

.dash-demo .demo-task-mainline strong {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--demo-text);
  font-size:13px;
  font-weight:780;
}

.dash-demo .demo-task-dept {
  flex:none;
  max-width:92px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  padding:2px 7px;
  border-radius:6px;
  background:rgba(10,132,255,.08);
  color:#1d5cff;
  font-size:11px;
  font-weight:750;
}

.dash-demo .demo-task-counts {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  flex:none;
  color:#53627a;
  font-size:11.5px;
  white-space:nowrap;
}

.dash-demo .demo-task-counts b {
  color:#ef4444;
  font-weight:850;
}

.dash-demo .demo-task-counts span:last-child b {
  color:#2563eb;
}

.dash-demo .demo-task-meta {
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--demo-faint);
  font-size:11.5px;
  margin-bottom:7px;
  flex-wrap:wrap;
}

.dash-demo .demo-task-meta em {
  font-style:normal;
  color:var(--demo-muted);
  background:rgba(0,0,0,.04);
  border-radius:6px;
  padding:1px 6px;
  font-weight:650;
}

.dash-demo .demo-task-bar {
  height:6px;
  margin-top:6px;
  border-radius:4px;
  background:rgba(0,0,0,.045);
  overflow:hidden;
}

.dash-demo .demo-task-bar i {
  display:block;
  height:100%;
  border-radius:4px;
  background:linear-gradient(90deg,#6BB8E8,#8DD7F5);
  box-shadow:0 3px 10px rgba(60,150,205,.10);
}

.dash-demo .demo-task-bar.tone-1 i {
  background:linear-gradient(90deg,#76D7A8,#9BE2C4);
  box-shadow:0 3px 10px rgba(70,165,112,.10);
}

.dash-demo .demo-task-bar.tone-2 i {
  background:linear-gradient(90deg,#E9B85C,#F2D47D);
  box-shadow:0 3px 10px rgba(196,135,38,.10);
}

.dash-demo .demo-task-bar.tone-3 i {
  background:linear-gradient(90deg,#A996E8,#91CAE8);
  box-shadow:0 3px 10px rgba(126,104,190,.10);
}

.dash-demo .demo-task-bar.tone-4 i {
  background:linear-gradient(90deg,#F09A82,#F2B76B);
  box-shadow:0 3px 10px rgba(198,103,78,.10);
}

.dash-demo .demo-task-foot {
  display:flex;
  justify-content:space-between;
  margin-top:1px;
  color:var(--demo-faint);
  font-size:10.5px;
}

.dash-demo .demo-task-foot b {
  color:var(--demo-muted);
}

.dash-demo .demo-alert-row,
.dash-demo .demo-act-row {
  display:flex;
  gap:9px;
  padding:8px 0;
  min-width:0;
}

.dash-demo .demo-alert-row {
  min-height:52px;
}

.dash-demo .demo-act-row {
  min-height:57px;
  align-items:center;
}

.dash-demo .demo-avatar {
  width:34px;
  height:34px;
  border-radius:50%;
  flex:none;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:13px;
  font-weight:650;
}

.dash-demo .demo-avatar.alt {
  background:linear-gradient(160deg,#34D399,#10B981);
}

.dash-demo .demo-alert-body,
.dash-demo .demo-act-body {
  flex:1;
  min-width:0;
}

.dash-demo .demo-alert-top,
.dash-demo .demo-act-body > div {
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}

.dash-demo .demo-alert-top strong,
.dash-demo .demo-act-body strong {
  font-size:13.4px;
  font-weight:720;
  color:var(--demo-text);
}

.dash-demo .demo-alert-top span,
.dash-demo .demo-act-body span {
  color:var(--demo-faint);
  font-size:11.4px;
  white-space:nowrap;
}

.dash-demo .demo-alert-top b {
  margin-left:auto;
  font-size:13px;
  font-weight:800;
}

.dash-demo .green { color:var(--demo-green) !important; }
.dash-demo .blue { color:var(--demo-blue) !important; }
.dash-demo .orange { color:var(--demo-orange) !important; }
.dash-demo .red { color:var(--demo-red) !important; }

.dash-demo .demo-alert-exam,
.dash-demo .demo-act-body p {
  margin:2px 0 4px;
  color:var(--demo-muted);
  font-size:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dash-demo .demo-badges {
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:nowrap;
  min-width:0;
  overflow:hidden;
}

.dash-demo .demo-badges em {
  border-radius:999px;
  background:#FDE8E8;
  color:#B94A48;
  border:1px solid rgba(185,74,72,.08);
  font-size:10.2px;
  font-style:normal;
  font-weight:640;
  padding:2px 6.5px;
  white-space:nowrap;
}

.dash-demo .demo-badges small {
  margin-left:auto;
  color:var(--demo-faint);
  font-size:10.8px;
  white-space:nowrap;
  flex:none;
}

.dash-demo .demo-chart-wrap {
  flex:1;
  min-height:285px;
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}

.dash-demo .demo-chart-wrap canvas {
  width:100% !important;
  height:280px !important;
}

.dash-demo .demo-line-svg {
  width:100%;
  max-width:640px;
  height:280px;
  display:block;
}

.dash-demo .demo-dist-list {
  flex:1;
  min-height:285px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.dash-demo .demo-dist-row {
  display:flex;
  align-items:center;
  gap:12px;
}

.dash-demo .demo-dist-label {
  width:52px;
  flex:none;
  color:var(--demo-muted);
  font-size:12.5px;
  font-weight:550;
}

.dash-demo .demo-dist-bar {
  flex:1;
  height:9px;
  border-radius:6px;
  background:rgba(0,0,0,.045);
  overflow:hidden;
}

.dash-demo .demo-dist-bar i {
  display:block;
  height:100%;
  border-radius:6px;
}

.dash-demo .demo-dist-val {
  width:42px;
  flex:none;
  text-align:right;
  color:var(--demo-muted);
  font-size:12.5px;
  font-weight:600;
}

.dash-demo .demo-act-score {
  flex:none;
  min-width:48px;
  text-align:right;
}

.dash-demo .demo-act-score b {
  display:block;
  font-size:14px;
  font-weight:800;
  line-height:1.1;
}

.dash-demo .demo-act-score span {
  display:block;
  margin-top:1px;
  color:var(--demo-faint);
  font-size:11px;
}

.dash-demo .demo-dept-card {
  margin-bottom:18px;
}

.dash-demo .demo-dept-table {
  width:100%;
  border-collapse:collapse;
}

.dash-demo .demo-dept-table th {
  padding:0 10px 10px;
  border-bottom:1px solid var(--demo-sep);
  color:var(--demo-faint);
  font-size:11.5px;
  font-weight:600;
  letter-spacing:.03em;
  text-align:left;
}

.dash-demo .demo-dept-table td {
  padding:13px 10px;
  border-bottom:1px solid var(--demo-sep);
  color:var(--demo-muted);
  font-size:13.5px;
  vertical-align:middle;
}

.dash-demo .demo-dept-table tr:last-child td {
  border-bottom:0;
}

.dash-demo .demo-dept-card .demo-extra-row {
  display:none;
}

.dash-demo .demo-dept-card.expanded .demo-extra-row {
  display:table-row;
}

.dash-demo .demo-dept-name {
  color:var(--demo-text) !important;
  font-weight:600;
}

.dash-demo .demo-dept-type {
  border-radius:6px;
  padding:2px 8px;
  font-size:11px;
  font-weight:600;
}

.dash-demo .demo-dept-type.fn { background:var(--demo-indigo-soft); color:var(--demo-indigo); }
.dash-demo .demo-dept-type.cl { background:var(--demo-blue-soft); color:var(--demo-blue); }

.dash-demo .demo-rate-cell {
  display:flex;
  align-items:center;
  gap:9px;
}

.dash-demo .demo-rate-cell span {
  width:84px;
  height:6px;
  border-radius:4px;
  background:rgba(0,0,0,.045);
  overflow:hidden;
}

.dash-demo .demo-rate-cell i {
  display:block;
  height:100%;
  border-radius:4px;
}

.dash-demo .demo-rate-cell i.green { background:var(--demo-green); }
.dash-demo .demo-rate-cell i.orange { background:var(--demo-orange); }
.dash-demo .demo-rate-cell i.red { background:var(--demo-red); }

.dash-demo .demo-rate-cell b {
  width:38px;
  color:var(--demo-muted);
  font-size:12.5px;
}

.dash-demo .demo-score-dot {
  display:inline-block;
  width:7px;
  height:7px;
  margin-right:6px;
  border-radius:50%;
  vertical-align:middle;
}

.dash-demo .demo-score-dot.blue { background:var(--demo-blue); }
.dash-demo .demo-score-dot.orange { background:var(--demo-orange); }
.dash-demo .demo-score-dot.red { background:var(--demo-red); }

.dash-demo .demo-show-more-wrap {
  text-align:center;
  margin-top:14px;
}

.dash-demo .demo-show-more-btn {
  border:1px solid var(--demo-sep);
  background:#fff;
  border-radius:20px;
  padding:7px 18px;
  color:var(--demo-blue);
  font-size:12.5px;
  font-weight:600;
  transition:background .2s ease, transform .2s ease;
}

.dash-demo .demo-show-more-btn:hover {
  background:var(--demo-blue-soft);
  transform:translateY(-1px);
}

.dash-demo .demo-lb-cols {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0 24px;
  flex:1;
}

.dash-demo .demo-lb-row {
  display:flex;
  align-items:center;
  gap:12px;
  min-height:66px;
  padding:12px 0;
  border-bottom:1px solid var(--demo-sep);
}

.dash-demo .demo-lb-row:last-child {
  border-bottom:0;
}

.dash-demo .demo-rank {
  width:24px;
  height:24px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:none;
  background:rgba(0,0,0,.05);
  color:var(--demo-muted);
  font-size:11.5px;
  font-weight:700;
}

.dash-demo .demo-rank.gold { background:#FFD60A; color:#3F3300; }
.dash-demo .demo-rank.silver { background:#D9D9DE; color:#5A5A60; }
.dash-demo .demo-rank.bronze { background:#FFB266; color:#7A3E00; }

.dash-demo .demo-lb-main {
  flex:1;
  min-width:0;
}

.dash-demo .demo-lb-main strong {
  display:block;
  color:var(--demo-text);
  font-size:13.5px;
  font-weight:700;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dash-demo .demo-lb-main em {
  display:block;
  color:var(--demo-faint);
  font-size:11.5px;
  font-style:normal;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dash-demo .demo-lb-row > b {
  border-radius:7px;
  background:#DCFCE7;
  color:var(--demo-green);
  padding:4px 10px;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.dash-demo .demo-action-stack {
  flex:1;
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

.dash-demo .demo-action-stack button {
  border:1px solid var(--demo-sep);
  border-radius:16px;
  background:#fff;
  padding:16px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:var(--demo-text);
  transition:background .2s ease, transform .2s ease;
}

.dash-demo .demo-action-stack button:hover {
  background:#F9F9FB;
  transform:translateY(-1px);
}

.dash-demo .demo-action-stack span {
  color:var(--demo-muted);
  font-size:13px;
  font-weight:600;
}

.dash-demo .demo-action-stack b {
  font-size:24px;
  font-weight:750;
  letter-spacing:-.02em;
}

.dash-demo .demo-empty {
  min-height:180px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--demo-faint);
}

@media (max-width:1180px) {
  .dash-demo .demo-status-pill { display:none; }
  .dash-demo .demo-topbar-sub { max-width:42vw; }
  .dash-demo .demo-stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dash-demo .demo-grid-2col,
  .dash-demo .demo-grid-2col-alt,
  .dash-demo .demo-grid-2col-even,
  .dash-demo .demo-grid-task-risk,
  .dash-demo .demo-grid-trend-dist,
  .dash-demo .demo-grid-issuer-trend { grid-template-columns:1fr; }
}

@media (max-width:760px) {
  .dash-demo .demo-topbar { padding:12px 16px; }
  .dash-demo .demo-pro-topbar { height:auto; min-height:66px; }
  .dash-demo .demo-topbar-sub,
  .dash-demo .demo-user-pill,
  .dash-demo .demo-time-pill { display:none; }
  .dash-demo .demo-search,
  .dash-demo .demo-seg { display:none; }
  .dash-demo .demo-content { padding:18px 12px 40px; }
  .dash-demo .demo-stats-grid,
  .dash-demo .demo-lb-cols { grid-template-columns:1fr; }
  .dash-demo .demo-dept-table { min-width:680px; }
  .dash-demo .demo-dept-card { overflow-x:auto; }
}

/* Demo Replica v3 hotfix: keep the app shell fixed, but let dashboard content scroll. */
.sidebar .nav-item {
  min-height:34px;
  border-radius:10px !important;
  gap:12px !important;
  font-weight:650 !important;
  letter-spacing:-.01em;
}

.sidebar .nav-item svg {
  width:18px !important;
  height:18px !important;
  flex:0 0 18px !important;
  opacity:1 !important;
  color:#8aa0b8;
  stroke-width:1.6;
  filter:none !important;
}

.sidebar .nav-item:hover svg {
  color:#64748b !important;
}

.sidebar .nav-item.active {
  background:#e7f1ff !important;
  color:#007aff !important;
  box-shadow:none !important;
}

.sidebar .nav-item.active svg {
  color:#007aff !important;
  stroke-width:1.75;
}

.sidebar .nav-item.active::before {
  display:none !important;
}

.sidebar .nav-section-title {
  padding-left:14px !important;
  color:#9aaabd !important;
  font-weight:800 !important;
  letter-spacing:.02em !important;
}

.sidebar .btn-logout svg {
  width:17px !important;
  height:17px !important;
}

.dash-demo.apple-dashboard {
  background:#f5f5f7 !important;
}

.dash-demo .demo-pro-topbar {
  height:58px;
  padding:11px 18px;
  background:rgba(255,255,255,.74);
  border-bottom:1px solid rgba(226,232,240,.62);
  box-shadow:none;
}

.dash-demo .demo-title-line h1,
.dash-demo .demo-pro-topbar h1 {
  font-size:18px;
  font-weight:800;
  color:#0f172a;
  letter-spacing:-.03em;
}

.dash-demo .demo-topbar-sub {
  max-width:none;
  color:#8aa0b8;
  font-size:11.5px;
  font-weight:650;
}

.dash-demo .demo-pro-actions {
  background:transparent;
  border:0;
  box-shadow:none;
  padding:0;
  gap:10px;
}

.dash-demo .demo-status-pill {
  height:30px;
  padding:0 12px;
  color:#059669;
  background:#ecfdf5;
  border:1px solid rgba(16,185,129,.16);
  box-shadow:none;
  font-size:12px;
}

.dash-demo .demo-user-pill {
  height:30px;
  padding:0 13px;
  background:#eef2f7;
  border:0;
  box-shadow:none;
}

.dash-demo .demo-user-pill b {
  color:#64748b;
  font-size:12px;
  font-weight:800;
}

.dash-demo .demo-content {
  max-width:none;
  padding:18px 18px 54px;
}

.dash-demo .demo-card {
  border-radius:16px;
  border:1px solid rgba(226,232,240,.68);
  background:#fff;
  box-shadow:0 8px 26px rgba(15,23,42,.035);
}

.dash-demo .demo-hero-stats {
  gap:18px;
  margin-bottom:22px;
}

.dash-demo .demo-stat-card {
  height:130px;
  min-height:130px;
  padding:18px 18px 14px;
}

.dash-demo .demo-stat-top {
  justify-content:space-between;
  margin-bottom:12px;
}

.dash-demo .demo-stat-label {
  color:#475569;
  font-size:13px;
  font-weight:750;
}

.dash-demo .demo-stat-icon {
  width:28px;
  height:28px;
  border-radius:9px;
  margin-left:auto;
  position:relative;
}

.dash-demo .demo-stat-icon.blue { background:#eff6ff; }
.dash-demo .demo-stat-icon.green { background:#ecfdf5; }
.dash-demo .demo-stat-icon.orange { background:#fff7ed; }
.dash-demo .demo-stat-icon.red { background:#fff1f2; }

.dash-demo .demo-stat-icon::after {
  content:"";
  position:absolute;
  inset:8px;
  border-radius:5px;
  border:1.7px solid currentColor;
  opacity:.82;
}

.dash-demo .demo-stat-icon.blue { color:#0a84ff; }
.dash-demo .demo-stat-icon.green { color:#22c55e; }
.dash-demo .demo-stat-icon.orange { color:#f59e0b; }
.dash-demo .demo-stat-icon.red { color:#fb7185; }

.dash-demo .demo-stat-num {
  color:#0f172a;
  font-size:30px;
  font-weight:900;
  line-height:1;
  letter-spacing:-.045em;
}

.dash-demo .demo-stat-num small {
  margin-left:6px;
  color:#94a3b8;
  font-size:12px;
  font-weight:700;
  letter-spacing:0;
}

.dash-demo .demo-stat-num em {
  display:inline-flex;
  margin-left:10px;
  transform:translateY(-5px);
  padding:3px 8px;
  border-radius:999px;
  background:#fff1f2;
  color:#e11d48;
  font-size:11px;
  font-style:normal;
  font-weight:800;
  letter-spacing:0;
}

.dash-demo .demo-stat-cap {
  margin-top:auto;
  padding-top:11px;
  border-top:1px solid #eef2f7;
  color:#64748b;
  font-size:12px;
}

.dash-demo .demo-stat-cap.split {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.dash-demo .demo-stat-cap i {
  display:inline-block;
  width:7px;
  height:7px;
  border-radius:99px;
  margin-right:6px;
}

.dash-demo .demo-stat-cap i.blue { background:#0a84ff; }
.dash-demo .demo-stat-cap i.cyan { background:#7dd3fc; }

.dash-demo .demo-stat-cap button {
  float:right;
  border:0;
  background:transparent;
  color:#0a84ff;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.dash-demo .demo-dual-ring {
  gap:26px;
  align-items:center;
}

.dash-demo .demo-ring-item {
  gap:10px;
}

.dash-demo .demo-ring-item svg {
  width:54px;
  height:54px;
}

.dash-demo .demo-ring-label strong {
  font-size:14px;
  font-weight:900;
  letter-spacing:-.03em;
}

.dash-demo .demo-ring-label span {
  max-width:72px;
  color:#64748b;
  font-size:11.5px;
  line-height:1.15;
  font-weight:650;
}

.dash-demo .demo-hero-workspace {
  grid-template-columns:minmax(0,1.42fr) minmax(420px,1fr);
  gap:20px;
  align-items:stretch;
}

.dash-demo .demo-grid-task-risk,
.dash-demo .demo-grid-trend-dist,
.dash-demo .demo-grid-issuer-trend {
  grid-template-columns:minmax(0,1.42fr) minmax(420px,1fr);
  gap:20px;
}

.dash-demo .demo-focus-task-card,
.dash-demo .demo-focus-risk-card {
  min-height:560px;
  padding:22px;
}

.dash-demo .demo-card-title {
  color:#0f172a;
  font-size:18px;
  font-weight:850;
  letter-spacing:-.035em;
}

.dash-demo .demo-card-sub {
  color:#8aa0b8;
  font-size:12px;
  font-weight:650;
}

.dash-demo .demo-task-search {
  width:220px;
  height:32px;
  border-radius:9px;
  background:#f1f5f9;
  border:1px solid #e2e8f0;
  color:#94a3b8;
  display:flex;
  align-items:center;
  padding:0 12px;
  font-size:12px;
  font-weight:650;
}

.dash-demo .demo-task-dept-select {
  position:relative;
  height:36px;
  padding:0 34px 0 14px;
  background:rgba(248,250,252,.92);
  border-color:#dbe5ef;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
}

.dash-demo .demo-task-search input {
  min-width:0;
  width:100%;
  height:100%;
  border:0;
  outline:0;
  background:transparent;
  color:#334155;
  font:inherit;
}

.dash-demo .demo-task-search input::placeholder {
  color:#94a3b8;
}

.dash-demo .demo-task-search select {
  min-width:0;
  width:100%;
  height:100%;
  display:block;
  border:0;
  outline:0;
  appearance:none;
  -webkit-appearance:none;
  background:transparent;
  color:#334155;
  font-size:13px;
  font-weight:750;
  line-height:36px;
  cursor:pointer;
  padding:0;
}

.dash-demo .demo-task-dept-select::after {
  content:"";
  position:absolute;
  right:11px;
  top:50%;
  width:7px;
  height:7px;
  border-right:1.7px solid #94a3b8;
  border-bottom:1.7px solid #94a3b8;
  transform:translateY(-65%) rotate(45deg);
  pointer-events:none;
}

.dash-demo .demo-task-search::before {
  content:"";
  width:12px;
  height:12px;
  margin-right:8px;
  border-radius:4px;
  background:linear-gradient(135deg, rgba(10,132,255,.22), rgba(48,209,88,.18));
  box-shadow:inset 0 0 0 1px rgba(10,132,255,.18);
  flex:0 0 auto;
}

.dash-demo .demo-task-dept-select::before {
  display:none;
}

.dash-demo .demo-task-list {
  gap:13px;
  min-height:0;
}

.dash-demo .demo-task-row {
  padding:14px 14px 12px;
  border:1px solid #e8eef5;
  border-radius:12px;
  background:linear-gradient(180deg,#fff,#fbfdff);
  cursor:pointer;
}

.dash-demo .demo-task-row:first-child { padding-top:14px; }
.dash-demo .demo-task-row:last-child { padding-bottom:12px; border-bottom:1px solid #e8eef5; }

.dash-demo .demo-task-search-empty {
  height:120px;
  border:1px dashed #dbe5ef;
  border-radius:12px;
  background:#f8fafc;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#94a3b8;
  font-size:13px;
  font-weight:750;
}

.dash-demo .demo-task-cardline {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}

.dash-demo .demo-task-mainline {
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
}

.dash-demo .demo-task-mainline strong {
  max-width:100%;
  color:#0f172a;
  font-size:14px;
  font-weight:850;
  line-height:1.25;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dash-demo .demo-task-mainline em {
  color:#64748b;
  font-size:11.5px;
  font-style:normal;
  font-weight:650;
}

.dash-demo .demo-task-dept {
  display:inline-flex;
  height:20px;
  align-items:center;
  padding:0 8px;
  border-radius:6px;
  font-size:11px;
  font-weight:850;
  background:#eff6ff;
  color:#2563eb;
}

.dash-demo .demo-task-dept.tone-1 { background:#eef2ff; color:#6366f1; }
.dash-demo .demo-task-dept.tone-2 { background:#fff7ed; color:#ea580c; }
.dash-demo .demo-task-dept.tone-3 { background:#ecfdf5; color:#16a34a; }
.dash-demo .demo-task-dept.tone-4 { background:#fdf2f8; color:#db2777; }

.dash-demo .demo-task-pct {
  flex:0 0 auto;
  min-width:48px;
  text-align:center;
  padding:6px 9px;
  border-radius:9px;
  background:#f1f5f9;
  color:#334155;
  font-size:14px;
  font-weight:900;
}

.dash-demo .demo-task-bar {
  height:6px;
  border-radius:99px;
  background:#eef2f7;
}

.dash-demo .demo-task-bar i {
  border-radius:99px;
  background:linear-gradient(90deg,#0a84ff,#14b8d8);
}

.dash-demo .demo-task-bar.tone-1 i { background:linear-gradient(90deg,#6366f1,#a855f7); }
.dash-demo .demo-task-bar.tone-2 i { background:linear-gradient(90deg,#f59e0b,#fb923c); }
.dash-demo .demo-task-bar.tone-3 i { background:linear-gradient(90deg,#22c55e,#14b8a6); }
.dash-demo .demo-task-bar.tone-4 i { background:linear-gradient(90deg,#ec4899,#f97316); }

.dash-demo .demo-wide-link {
  margin-top:auto;
  width:100%;
  height:34px;
  border:1px solid #e2e8f0;
  border-radius:11px;
  background:#f8fafc;
  color:#334155;
  font-size:12px;
  font-weight:850;
  cursor:pointer;
}

.dash-demo .demo-risk-tabs {
  display:flex;
  gap:8px;
  padding-bottom:14px;
  margin-bottom:14px;
  border-bottom:1px solid #e8eef5;
}

.dash-demo .demo-risk-tabs span {
  display:inline-flex;
  align-items:center;
  height:24px;
  padding:0 10px;
  border-radius:999px;
  background:#f8fafc;
  border:1px solid #e8eef5;
  color:#64748b;
  font-size:11px;
  font-weight:800;
}

.dash-demo .demo-risk-tabs span:first-child {
  background:#eef2f7;
  color:#334155;
}

.dash-demo .demo-focus-risk-card .demo-alert-list {
  display:flex;
  flex-direction:column;
  gap:12px;
  min-height:0;
}

.dash-demo .demo-alert-row {
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:13px 13px;
  border:1px solid #e8eef5;
  border-radius:12px;
  background:#fff;
  min-height:82px;
}

.dash-demo .demo-alert-row:first-child { padding-top:13px; }
.dash-demo .demo-alert-row:last-child { padding-bottom:13px; border-bottom:1px solid #e8eef5; }

.dash-demo .demo-alert-body {
  min-width:0;
}

.dash-demo .demo-alert-top {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.dash-demo .demo-alert-top strong {
  color:#0f172a;
  font-size:14px;
  font-weight:850;
}

.dash-demo .demo-alert-top span {
  color:#94a3b8;
  font-size:11px;
  font-weight:700;
}

.dash-demo .demo-alert-exam {
  margin-top:5px;
  color:#64748b;
  font-size:12px;
  font-weight:650;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dash-demo .demo-badges {
  margin-top:8px;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.dash-demo .demo-badges em {
  margin:0;
  padding:3px 7px;
  border-radius:6px;
  background:#fff7ed;
  color:#ea580c;
  border:1px solid #fed7aa;
  font-size:10.5px;
  font-weight:850;
  font-style:normal;
}

.dash-demo .demo-badges em:first-child {
  background:#fff1f2;
  color:#e11d48;
  border-color:#fecdd3;
}

.dash-demo .demo-alert-score {
  flex:0 0 58px;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  gap:4px;
}

.dash-demo .demo-alert-score b {
  font-size:17px;
  font-weight:900;
  letter-spacing:-.03em;
}

.dash-demo .demo-alert-score b.green { color:#22c55e; }
.dash-demo .demo-alert-score b.blue { color:#334155; }
.dash-demo .demo-alert-score b.red { color:#f43f5e; }

.dash-demo .demo-alert-score small {
  color:#94a3b8;
  font-size:10.5px;
  font-weight:700;
  white-space:nowrap;
}

.main-content {
  overflow-y:auto !important;
  overflow-x:hidden !important;
}

.main-content.users-shell-mode {
  overflow: hidden !important;
}

#page-dashboard.page.active {
  height:auto !important;
  min-height:100% !important;
  overflow:visible !important;
}

.dash-demo {
  height:auto !important;
  overflow:visible !important;
}

/* Sidebar hospital name: split long regional names into two readable lines. */
.sidebar-brand {
  height: auto !important;
  min-height: 76px !important;
  align-items: center !important;
}

.sidebar-brand-text {
  min-width: 0 !important;
  overflow: hidden !important;
}

.sidebar-brand-name {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.15 !important;
  max-width: 116px !important;
}

.sidebar-brand-name .sidebar-hosp-region {
  display: block !important;
  color: var(--demo-faint, #8E8E93) !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  line-height: 1.15 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.sidebar-brand-name .sidebar-hosp-name-main {
  display: block !important;
  color: var(--demo-text, #1D1D1F) !important;
  font-size: 13px !important;
  font-weight: 780 !important;
  line-height: 1.18 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.sidebar-brand-sub {
  margin-top: 2px !important;
}

/* Secondary pages polish: filters, tables, and semantic actions */
.page-body > .card {
  border-color: rgba(148,163,184,0.20);
  box-shadow: 0 12px 34px rgba(15,23,42,0.055), inset 0 1px 0 rgba(255,255,255,0.78);
}
.page-body > .card:hover {
  box-shadow: 0 14px 38px rgba(15,23,42,0.065), inset 0 1px 0 rgba(255,255,255,0.78);
}
.page-body > .card > .card-body[style*="padding:10px"] {
  min-height: 64px;
  padding: 12px 20px !important;
  display: flex;
  align-items: center;
}
.page-body > .card > .card-body[style*="padding:10px"] > div {
  width: 100%;
  align-items: center !important;
}
.page-body > .card > .card-body[style*="padding:10px"] span {
  line-height: 1;
}
.page-body select,
.page-body input:not([type="checkbox"]):not([type="radio"]),
.page-body textarea {
  border-color: rgba(148,163,184,0.28);
  background: rgba(255,255,255,0.86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}
.page-body select {
  height: 42px;
  padding-top: 0;
  padding-bottom: 0;
}
.page-body .card > .card-body[style*="padding:0"] {
  padding: 0 !important;
}
.page-body .table-wrap {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
}
.page-body .table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
}
.page-body .table-wrap thead th {
  background: rgba(248,250,252,0.86);
  border-bottom: 1px solid rgba(148,163,184,0.18);
  color: rgba(100,116,139,0.76);
}
.page-body .table-wrap tbody td {
  border-bottom: 1px solid rgba(226,232,240,0.72);
}
.page-body .table-wrap tbody tr:last-child td {
  border-bottom: 0;
}
.page-body .table-wrap tbody tr:hover td {
  background: rgba(241,245,249,0.64);
}
.table-actions {
  gap: 7px;
  align-items: center;
  flex-wrap: nowrap;
}
.table-actions .btn-sm {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  box-shadow: 0 4px 10px rgba(15,23,42,0.045);
}
.btn-view {
  background: rgba(219,234,254,0.82);
  color: #1d4ed8;
  border-color: rgba(147,197,253,0.62) !important;
}
.btn-view:hover {
  background: rgba(191,219,254,0.92);
}
.btn-export {
  background: rgba(220,252,231,0.82);
  color: #15803d;
  border-color: rgba(134,239,172,0.62) !important;
}
.btn-export:hover {
  background: rgba(187,247,208,0.92);
}
.btn-delete,
.table-actions .btn-danger {
  background: rgba(254,226,226,0.86);
  color: #b91c1c;
  border-color: rgba(252,165,165,0.68) !important;
}
.btn-delete:hover,
.table-actions .btn-danger:hover {
  background: rgba(254,202,202,0.96);
}

/* Users page Apple-like directory polish */
.users-page-body {
  display: flex;
  gap: 16px !important;
  align-items: flex-start;
}
.users-main-panel {
  flex: 1;
  min-width: 0;
}
.users-page-body .dept-tree-sidebar {
  width: 218px;
  position: sticky !important;
  top: 18px !important;
  align-self: flex-start;
  border-right: 0;
  border-radius: 24px;
  background: rgba(255,255,255,0.74);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid rgba(255,255,255,0.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86), 0 18px 46px rgba(15,23,42,0.08);
  padding: 10px 8px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.users-page-body .dept-tree-header {
  border-bottom: 0;
  padding: 10px 8px 12px;
  color: rgba(100,116,139,0.72);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}
.users-page-body .dept-tree-group {
  padding: 12px 10px 6px;
  color: rgba(100,116,139,0.72);
  letter-spacing: 0;
  text-transform: none;
}
.users-page-body .dept-tree-item {
  min-height: 38px;
  padding: 9px 10px;
  border-left: 0;
  border-radius: 14px;
  gap: 8px;
  color: rgba(51,65,85,0.82);
}
.users-page-body .dept-tree-item:hover {
  background: rgba(241,245,249,0.78);
}
.users-page-body .dept-tree-item.active {
  background: linear-gradient(135deg, rgba(219,234,254,0.92), rgba(255,255,255,0.74));
  color: #0f172a;
  border-left-color: transparent;
  box-shadow: inset 3px 0 0 rgba(37,99,235,0.9), 0 8px 20px rgba(37,99,235,0.08);
}
.dept-tree-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(100,116,139,0.45);
  flex: 0 0 auto;
}
.dept-tree-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.users-page-body .dept-tree-count {
  background: rgba(241,245,249,0.86);
  color: rgba(100,116,139,0.8);
}
.users-page-body .dept-tree-item.active .dept-tree-count {
  background: rgba(37,99,235,0.10);
  color: #2563eb;
}
.user-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.user-role-card {
  min-height: 68px;
  border-radius: 20px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(255,255,255,0.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82), 0 10px 26px rgba(15,23,42,0.052);
  transition: transform .22s cubic-bezier(.16,1,.3,1), box-shadow .22s ease, background .22s ease;
}
.user-role-card:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86), 0 16px 34px rgba(15,23,42,0.075);
}
.user-role-card.active {
  background: linear-gradient(135deg, rgba(239,246,255,0.96), rgba(255,255,255,0.82));
  border-color: rgba(147,197,253,0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.88), 0 0 0 4px rgba(37,99,235,0.08), 0 16px 36px rgba(37,99,235,0.10);
}
.user-role-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(241,245,249,0.82);
  font-size: 18px;
}
.user-role-name {
  font-size: 12px;
  font-weight: 760;
  line-height: 1.15;
}
.user-role-count {
  margin-top: 3px;
  font-size: 11px;
  color: rgba(100,116,139,0.76);
}
.user-search-card {
  margin-bottom: 14px;
}
.user-search-card > .card-body {
  min-height: 72px;
  padding: 14px 20px !important;
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-search-box {
  width: min(440px, 100%);
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 14px;
  border-radius: 999px;
  background: rgba(248,250,252,0.88);
  border: 1px solid rgba(148,163,184,0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
}
.user-search-icon {
  color: rgba(100,116,139,0.72);
  font-size: 15px;
}
.user-search-box input {
  height: 34px;
  flex: 1;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 4px !important;
}
.user-search-box input:focus {
  box-shadow: none !important;
}
.user-search-box .btn {
  border-radius: 999px;
  min-height: 34px;
  padding-inline: 16px;
}
.users-main-panel .table-wrap tbody td {
  padding-top: 14px;
  padding-bottom: 14px;
}
.users-main-panel .table-actions .btn-secondary {
  background: rgba(219,234,254,0.82);
  color: #1d4ed8;
  border-color: rgba(147,197,253,0.62) !important;
}
.user-list-avatar {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  font-size: 11px !important;
  font-weight: 820 !important;
  letter-spacing: -0.02em;
  border: 1px solid rgba(255,255,255,0.72) !important;
}

/* Users page fixed chrome: keep title and dept filter still, scroll only the list */
#page-users.active {
  height: 100%;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column;
  overflow: hidden !important;
}
#page-users .page-header {
  flex: 0 0 auto;
  position: relative;
  top: auto;
  z-index: 20;
}
#page-users .users-page-body {
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden !important;
  align-items: stretch !important;
}
#page-users .users-page-body .dept-tree-sidebar {
  position: relative !important;
  top: auto !important;
  height: 100%;
  max-height: none;
  overflow-y: auto;
  flex: 0 0 218px;
}
#page-users .users-main-panel {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#page-users .user-role-grid,
#page-users .user-search-card {
  flex: 0 0 auto;
}
#page-users .users-main-panel > .card:last-child {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#page-users .users-main-panel > .card:last-child > .card-body {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}
#page-users .users-main-panel > .card:last-child .table-wrap {
  height: 100%;
  overflow: auto !important;
  overscroll-behavior: contain;
}
#page-users .users-main-panel > .card:last-child thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

/* Training content library refresh: compact Apple-style 4-column cards. */
#page-content {
  background:#f6f8fc;
}

#page-content .content-library-page {
  min-height:calc(100vh - 72px);
  padding:24px 24px 40px;
  background:
    radial-gradient(circle at 10% 0%, rgba(219,234,254,.55), transparent 26%),
    radial-gradient(circle at 88% 6%, rgba(236,253,245,.42), transparent 30%),
    linear-gradient(180deg,#f8fafc 0%,#f4f7fb 100%);
}

#page-content .content-library-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

#page-content .content-breadcrumb {
  color:#8a95a7;
  font-size:12px;
  font-weight:700;
}

#page-content .content-breadcrumb span {
  margin:0 8px;
  color:#b7c0cc;
}

#page-content .content-library-title {
  margin-top:8px;
  color:#111827;
  font-size:24px;
  font-weight:950;
  line-height:1;
  letter-spacing:-.035em;
}

#page-content .content-library-actions {
  display:flex;
  align-items:center;
  gap:10px;
}

#page-content .content-library-actions .btn {
  height:38px;
  border-radius:10px;
  padding:0 16px;
  font-size:13px;
  font-weight:850;
  box-shadow:0 8px 18px rgba(0,102,204,.12);
}

#page-content .content-library-toolbar {
  min-height:50px;
  display:grid;
  grid-template-columns:auto auto 1fr auto;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
  padding:9px 12px;
  border:1px solid #d7e0ed;
  border-radius:13px;
  background:rgba(255,255,255,.9);
  box-shadow:0 10px 26px rgba(15,23,42,.035);
}

#page-content .content-library-tabs {
  display:flex;
  align-items:center;
  gap:4px;
  padding:3px;
  border-radius:10px;
  background:#f2f6fb;
}

#page-content .content-library-tabs button,
#page-content .content-library-filter button,
#page-content .content-library-filter select {
  height:32px;
  border:0;
  border-radius:8px;
  padding:0 13px;
  color:#6b778a;
  background:transparent;
  font-size:12px;
  font-weight:850;
  cursor:pointer;
}

#page-content .content-library-tabs button.active {
  color:#0066cc;
  background:#fff;
  box-shadow:0 5px 14px rgba(15,23,42,.06);
}

#page-content .content-library-tabs b {
  margin-left:4px;
  color:#9aa6b8;
}

#page-content .content-library-filter button,
#page-content .content-library-filter select {
  min-width:92px;
  border:1px solid #d7e0ed;
  background:#fff;
  color:#344054;
}

#page-content .content-library-count {
  justify-self:end;
  color:#667085;
  font-size:12px;
  font-weight:760;
}

#page-content .content-library-view {
  display:flex;
  align-items:center;
  gap:11px;
  padding-left:12px;
  border-left:1px solid #dce4ee;
}

#page-content .content-library-view span {
  width:18px;
  height:18px;
  position:relative;
  opacity:.75;
}

#page-content .content-library-view .grid::before {
  content:"";
  position:absolute;
  inset:1px;
  background:
    linear-gradient(#344054,#344054) left top/6px 6px no-repeat,
    linear-gradient(#344054,#344054) right top/6px 6px no-repeat,
    linear-gradient(#344054,#344054) left bottom/6px 6px no-repeat,
    linear-gradient(#344054,#344054) right bottom/6px 6px no-repeat;
  border-radius:2px;
}

#page-content .content-library-view .list::before {
  content:"";
  position:absolute;
  inset:2px 1px;
  background:
    linear-gradient(#344054,#344054) 0 0/100% 3px no-repeat,
    linear-gradient(#344054,#344054) 0 6px/100% 3px no-repeat,
    linear-gradient(#344054,#344054) 0 12px/100% 3px no-repeat;
}

#page-content .content-grid.content-library-grid {
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:16px !important;
}

#page-content .content-card.content-library-card {
  min-width:0;
  min-height:224px;
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  gap:12px !important;
  padding:16px !important;
  border:1px solid #d9e2ef !important;
  border-radius:14px !important;
  background:#fff !important;
  box-shadow:0 12px 28px rgba(15,23,42,.045) !important;
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

#page-content .content-card.content-library-card:hover {
  transform:translateY(-2px);
  border-color:#bdd0e7 !important;
  box-shadow:0 18px 38px rgba(15,23,42,.075) !important;
}

#page-content .content-card-top {
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  gap:10px;
  align-items:start;
}

#page-content .content-file-icon {
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:1px solid rgba(0,0,0,.04);
  border-radius:10px;
  font-size:11px;
  font-weight:950;
  letter-spacing:-.02em;
  cursor:pointer;
}

#page-content .content-card-title-block {
  min-width:0;
  cursor:pointer;
}

#page-content .content-card-title-line {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:start;
}

#page-content .content-card-title-line strong {
  min-width:0;
  overflow:hidden;
  color:#101828;
  font-size:15px;
  font-weight:950;
  line-height:1.42;
  letter-spacing:-.02em;
  white-space:nowrap;
  text-overflow:ellipsis;
}

#page-content .content-card-title-line span {
  height:20px;
  display:inline-flex;
  align-items:center;
  padding:0 7px;
  border-radius:5px;
  color:#667085;
  background:#f5f6f8;
  border:1px solid #e6ebf2;
  font-size:9px;
  font-weight:900;
  text-transform:uppercase;
}

#page-content .content-card-tags,
#page-content .content-status-row {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px;
}

#page-content .content-card-tags {
  margin-top:7px;
}

#page-content .content-status-row {
  min-height:22px;
  padding-left:48px;
}

#page-content .content-card-tags .badge,
#page-content .content-status-row .badge {
  height:20px;
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:0 7px;
  font-size:10px !important;
  font-weight:850;
}

#page-content .content-card-stats {
  display:grid;
  grid-template-columns:1fr 1fr 1.05fr;
  margin-top:auto;
  padding:10px 11px;
  border:1px solid #eef1f6;
  border-radius:9px;
  background:#f8f6f8;
}

#page-content .content-card-stats div {
  min-width:0;
  padding:0 9px;
  border-left:1px solid #e8ecf2;
}

#page-content .content-card-stats div:first-child {
  padding-left:0;
  border-left:0;
}

#page-content .content-card-stats span {
  display:block;
  color:#8a95a7;
  font-size:10px;
  font-weight:760;
  line-height:1.1;
}

#page-content .content-card-stats strong {
  display:block;
  overflow:hidden;
  margin-top:6px;
  color:#111827;
  font-size:12px;
  font-weight:900;
  line-height:1.15;
  white-space:nowrap;
  text-overflow:ellipsis;
}

#page-content .content-card-bottom {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

#page-content .content-icon-actions,
#page-content .content-card-actions {
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
}

#page-content .content-icon-actions button {
  height:28px;
  min-width:34px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#0066cc;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}

#page-content .content-icon-actions button.delete {
  color:#dc2626;
}

#page-content .content-card-actions .btn {
  height:28px !important;
  padding:0 10px !important;
  border-radius:7px !important;
  font-size:11px !important;
  font-weight:900 !important;
}

#page-content .content-card-actions .btn-ai {
  background:#0066cc !important;
  color:#fff !important;
  border-color:#0066cc !important;
}

#page-content .content-upload-card {
  min-height:224px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  border:1.5px dashed #c9d5e6;
  border-radius:14px;
  background:rgba(255,255,255,.56);
  color:#8a95a7;
  cursor:pointer;
  transition:all .25s ease;
}

#page-content .content-upload-card:hover {
  border-color:#8eb5e8;
  background:#fff;
  transform:translateY(-2px);
}

#page-content .content-upload-card i {
  width:50px;
  height:50px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#e5e7eb;
  color:#667085;
  font-size:30px;
  font-style:normal;
  font-weight:500;
}

#page-content .content-upload-card strong {
  color:#374151;
  font-size:14px;
  font-weight:900;
}

#page-content .content-upload-card span {
  color:#a2acbb;
  font-size:11px;
  font-weight:700;
}

@media (max-width:1600px) {
  #page-content .content-grid.content-library-grid {
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}

@media (max-width:1180px) {
  #page-content .content-grid.content-library-grid {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  #page-content .content-library-toolbar {
    grid-template-columns:1fr;
    align-items:stretch;
  }
  #page-content .content-library-count {
    justify-self:start;
  }
}

@media (max-width:720px) {
  #page-content .content-library-page {
    padding:16px;
  }
  #page-content .content-library-header {
    flex-direction:column;
  }
  #page-content .content-grid.content-library-grid {
    grid-template-columns:1fr !important;
  }
}

/* Training content library cards: compact Apple-like white cards, based on the uploaded reference. */
#page-content .content-grid.content-library-grid {
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:20px !important;
  align-items:stretch;
}

#page-content .content-card.content-library-card {
  min-height:236px;
  gap:0 !important;
  padding:24px !important;
  border:1px solid rgba(15,23,42,.04) !important;
  border-radius:16px !important;
  background:#fff !important;
  box-shadow:0 4px 18px rgba(15,23,42,.035) !important;
  transition:transform .3s cubic-bezier(.25,.8,.25,1), box-shadow .3s cubic-bezier(.25,.8,.25,1), border-color .3s ease !important;
}

#page-content .content-card.content-library-card:hover {
  transform:translateY(-6px);
  border-color:rgba(47,84,235,.15) !important;
  box-shadow:0 12px 24px rgba(47,84,235,.08) !important;
}

#page-content .content-card-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

#page-content .content-card-title {
  flex:1;
  min-width:0;
  display:-webkit-box;
  margin:0;
  overflow:hidden;
  color:#262626;
  font-size:16px;
  font-weight:700;
  line-height:1.45;
  letter-spacing:0;
  cursor:pointer;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}

#page-content .content-format-badge {
  flex:0 0 auto;
  min-width:38px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 8px;
  border:0;
  border-radius:7px;
  background:#f5f5f5;
  color:#667085;
  font-size:11px;
  font-weight:850;
  letter-spacing:.02em;
  text-transform:uppercase;
  cursor:pointer;
}

#page-content .content-format-badge.format-ppt { background:#fff1f0; color:#e5484d; }
#page-content .content-format-badge.format-pdf { background:#f0fdf4; color:#16a34a; }
#page-content .content-format-badge.format-docx,
#page-content .content-format-badge.format-text { background:#eff6ff; color:#2563eb; }
#page-content .content-format-badge.format-video { background:#f5f3ff; color:#6d28d9; }
#page-content .content-format-badge.format-image,
#page-content .content-format-badge.format-article { background:#ecfeff; color:#0891b2; }

#page-content .content-card-category {
  min-height:18px;
  margin-bottom:13px;
  color:#8c8c8c;
  font-size:13px;
  font-weight:600;
  line-height:1.35;
}

#page-content .content-status-row {
  min-height:48px;
  display:flex;
  align-items:flex-start;
  flex-wrap:wrap;
  gap:6px;
  margin-bottom:18px;
  padding-left:0;
}

#page-content .content-status-row .badge {
  height:24px;
  padding:0 8px;
  border-radius:7px;
  font-size:11px !important;
  font-weight:700;
  letter-spacing:0;
  border:0;
}

#page-content .content-status-row .badge-green {
  background:#ecfdf3;
  color:#067647;
}

#page-content .content-status-row .badge-blue {
  background:#eef4ff;
  color:#175cd3;
}

#page-content .content-status-row .badge-red {
  background:#fff1f3;
  color:#c01048;
}

#page-content .content-status-row .content-tag-pic {
  background:#e6f7ff !important;
  color:#1890ff !important;
}

#page-content .content-status-row .content-tag-ai {
  background:#f9f0ff !important;
  color:#722ed1 !important;
}

#page-content .content-status-row .content-tag-share,
#page-content .content-status-row .content-shared-badge {
  background:#fff7e6 !important;
  color:#fa8c16 !important;
}

#page-content .content-card-stats {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:auto;
  margin-bottom:18px;
  padding:12px;
  border:0;
  border-radius:12px;
  background:#f5f5f5;
  text-align:center;
}

#page-content .content-card-stats div {
  min-width:0;
  padding:0;
  border-left:0;
}

#page-content .content-card-stats span {
  display:block;
  color:#8c8c8c;
  font-size:11px;
  font-weight:700;
  line-height:1.2;
}

#page-content .content-card-stats strong {
  display:block;
  overflow:hidden;
  margin-top:5px;
  color:#262626;
  font-size:13px;
  font-weight:750;
  line-height:1.2;
  white-space:nowrap;
  text-overflow:ellipsis;
}

#page-content .content-card-bottom {
  display:block;
  margin-top:0;
  padding-top:14px;
  border-top:1px solid #f0f0f0;
}

#page-content .content-icon-actions {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px 12px;
}

#page-content .content-action-btn {
  height:30px;
  min-width:0;
  padding:4px 8px;
  border:0;
  border-radius:7px;
  background:transparent;
  font-size:13px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
  transition:background .2s ease, color .2s ease, transform .2s ease;
}

#page-content .content-action-btn:hover { transform:translateY(-1px); }
#page-content .content-action-btn.action-view { color:#2f54eb; }
#page-content .content-action-btn.action-view:hover { background:#f0f5ff; }
#page-content .content-action-btn.action-edit,
#page-content .content-action-btn.action-muted { color:#8c8c8c; }
#page-content .content-action-btn.action-edit:hover,
#page-content .content-action-btn.action-muted:hover { background:#f5f5f5; color:#262626; }
#page-content .content-action-btn.action-delete { color:#e5484d; }
#page-content .content-action-btn.action-delete:hover { background:#fff1f0; }
#page-content .content-action-btn.action-ai { color:#2563eb; background:#eff6ff; }
#page-content .content-action-btn.action-ai:hover { background:#dbeafe; }

#page-content .content-upload-card {
  min-height:236px;
  border:1.5px dashed #d8dee8;
  border-radius:16px;
  background:#fff;
  box-shadow:0 4px 18px rgba(15,23,42,.025);
}

#page-content .content-upload-card:hover {
  border-color:rgba(47,84,235,.24);
  background:#fbfdff;
  transform:translateY(-4px);
  box-shadow:0 12px 24px rgba(47,84,235,.07);
}

@media (max-width:1500px) {
  #page-content .content-grid.content-library-grid {
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}

@media (max-width:1100px) {
  #page-content .content-grid.content-library-grid {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media (max-width:720px) {
  #page-content .content-grid.content-library-grid {
    grid-template-columns:1fr !important;
  }
}

/* Question bank two-column workspace, matching the course-catalog reference UI. */
#page-questions {
  background:#fbf9fc;
}

#page-questions .question-bank-page {
  height:calc(100vh - 72px);
  min-height:720px;
  display:flex;
  flex-direction:column;
  background:#fbf9fc;
  color:#111827;
}

#page-questions .question-bank-topbar {
  height:54px;
  flex:0 0 auto;
  display:grid;
  grid-template-columns:auto auto auto minmax(220px,340px) auto auto 36px;
  align-items:center;
  gap:12px;
  padding:0 20px;
  border-bottom:1px solid #e3e7ef;
  background:rgba(255,255,255,.86);
}

#page-questions .question-bank-title {
  color:#111827;
  font-size:16px;
  font-weight:950;
  letter-spacing:-.02em;
}

#page-questions .question-bank-tab {
  height:32px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#667085;
  font-size:13px;
  font-weight:850;
  cursor:pointer;
}

#page-questions .question-bank-tab.active {
  color:#0066cc;
  background:#eef5ff;
}

#page-questions .question-bank-search {
  position:relative;
  justify-self:end;
  width:100%;
}

#page-questions .question-bank-search::before {
  content:"";
  position:absolute;
  left:12px;
  top:50%;
  width:11px;
  height:11px;
  border:1.6px solid #98a2b3;
  border-radius:999px;
  transform:translateY(-50%);
  box-shadow:5px 5px 0 -4px #98a2b3;
}

#page-questions .question-bank-search input {
  width:100%;
  height:34px;
  border:1px solid #cfd8e6;
  border-radius:999px;
  background:#fff;
  padding:0 14px 0 32px;
  color:#334155;
  font-size:12px;
  font-weight:760;
  outline:0;
}

#page-questions .question-bank-topbar .btn {
  height:34px;
  border-radius:8px;
  padding:0 14px;
  font-size:13px;
  font-weight:900;
}

#page-questions .question-bank-layout {
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:260px minmax(0,1fr);
}

#page-questions .question-bank-sidebar {
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
  gap:0;
  padding:18px 14px 14px;
  border-right:1px solid #e3e7ef;
  background:#f7f7fa;
  overflow:hidden;
}

#page-questions .question-bank-sidebar > .question-side-section:first-child {
  min-height:0;
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
}

#page-questions .question-bank-sidebar > .question-side-section:not(:first-child),
#page-questions .question-side-more,
#page-questions .question-capacity-card {
  display:none !important;
}

#page-questions .question-side-title {
  margin:0 0 10px;
  color:#667085;
  font-size:12px;
  font-weight:900;
}

#page-questions .question-course-nav {
  display:grid;
  gap:5px;
  min-height:0;
  flex:1 1 auto;
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:4px;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}

#page-questions .question-course-nav::-webkit-scrollbar {
  width:8px;
}

#page-questions .question-course-nav::-webkit-scrollbar-track {
  background:transparent;
}

#page-questions .question-course-nav::-webkit-scrollbar-thumb {
  border:2px solid #f7f7fa;
  border-radius:999px;
  background:#cfd8e6;
}

#page-questions .question-course-nav::-webkit-scrollbar-thumb:hover {
  background:#b8c4d6;
}

#page-questions .question-course-nav button {
  width:100%;
  min-height:34px;
  display:grid;
  grid-template-columns:16px minmax(0,1fr) auto;
  align-items:center;
  gap:7px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#344054;
  padding:7px 9px;
  text-align:left;
  cursor:pointer;
}

#page-questions .question-course-nav button.active {
  background:#dfeafb;
  color:#0066cc;
}

#page-questions .question-course-nav i {
  width:14px;
  height:11px;
  border:1.5px solid currentColor;
  border-radius:2px;
  position:relative;
}

#page-questions .question-course-nav i::before {
  content:"";
  position:absolute;
  left:1px;
  top:-4px;
  width:7px;
  height:4px;
  border:1.5px solid currentColor;
  border-bottom:0;
  border-radius:2px 2px 0 0;
}

#page-questions .question-course-nav span {
  overflow:hidden;
  font-size:12px;
  font-weight:850;
  white-space:nowrap;
  text-overflow:ellipsis;
}

#page-questions .question-course-nav b {
  color:#98a2b3;
  font-size:11px;
  font-weight:850;
}

#page-questions .question-side-more {
  width:100%;
  height:30px;
  margin-top:8px;
  border:0;
  border-radius:8px;
  color:#0066cc;
  background:#edf5ff;
  font-size:12px;
  font-weight:850;
}

#page-questions .question-type-checks {
  display:grid;
  gap:8px;
}

#page-questions .question-type-checks label {
  display:flex;
  align-items:center;
  gap:8px;
  color:#344054;
  font-size:12px;
  font-weight:850;
}

#page-questions .question-type-checks input {
  width:14px;
  height:14px;
  accent-color:#0066cc;
}

#page-questions .question-capacity-card {
  margin-top:auto;
  padding:13px;
  border:1px solid #bfd4f2;
  border-radius:10px;
  background:#ddecff;
}

#page-questions .question-capacity-card strong {
  display:block;
  color:#344054;
  font-size:12px;
  font-weight:900;
}

#page-questions .question-capacity-card div {
  overflow:hidden;
  height:5px;
  margin:9px 0 7px;
  border-radius:999px;
  background:#afbdd1;
}

#page-questions .question-capacity-card i {
  display:block;
  height:100%;
  border-radius:999px;
  background:#0066cc;
}

#page-questions .question-capacity-card span {
  color:#667085;
  font-size:11px;
  font-weight:760;
}

#page-questions .question-bank-main {
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  padding:24px 24px 32px;
  overflow:auto;
}

#page-questions .question-bank-main-head {
  flex:0 0 auto;
  height:38px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  border-bottom:1px solid #e5e9f0;
  color:#667085;
  font-size:12px;
  font-weight:760;
}

#page-questions .question-bank-main-head b {
  color:#111827;
  font-weight:950;
}

#page-questions .question-bank-icons {
  display:flex;
  gap:10px;
}

#page-questions .question-bank-icons button {
  width:24px;
  height:24px;
  border:0;
  background:transparent;
  position:relative;
}

#page-questions .question-bank-icons button:first-child::before {
  content:"";
  position:absolute;
  left:5px;
  top:6px;
  width:12px;
  height:2px;
  background:#344054;
  box-shadow:0 5px 0 #344054, 0 10px 0 #344054;
}

#page-questions .question-bank-icons button:last-child::before {
  content:"";
  position:absolute;
  left:8px;
  top:5px;
  width:8px;
  height:10px;
  border:1.6px solid #344054;
  border-top:0;
}

#page-questions .question-score-card {
  margin:16px 0;
  border:1px solid #d7e0ee;
  border-radius:12px;
  background:#fff;
  box-shadow:0 10px 24px rgba(15,23,42,.035);
}

#page-questions .question-score-card .card-header {
  border-bottom:1px solid #edf1f7;
}

#page-questions .question-bank-list {
  display:grid;
  gap:18px;
  padding-top:16px;
}

#page-questions .question-card.question-bank-card {
  margin:0;
  padding:20px 22px;
  border:1px solid #cfd8e6;
  border-radius:12px;
  background:#fff;
  box-shadow:none;
}

#page-questions .question-bank-card-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}

#page-questions .question-bank-card-meta {
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

#page-questions .question-bank-card-meta .badge,
#page-questions .question-bank-card-meta span {
  height:22px;
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:0 8px;
  font-size:11px;
  font-weight:900;
}

#page-questions .question-bank-card-meta span {
  color:#667085;
  background:#f7f8fb;
}

#page-questions .question-bank-card-meta em {
  max-width:240px;
  overflow:hidden;
  color:#98a2b3;
  font-size:11px;
  font-style:normal;
  font-weight:760;
  white-space:nowrap;
  text-overflow:ellipsis;
}

#page-questions .question-bank-text {
  margin-bottom:18px;
  color:#111827;
  font-size:17px;
  font-weight:950;
  line-height:1.65;
}

#page-questions .question-bank-options {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px 16px;
}

#page-questions .question-bank-options div {
  min-height:42px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border:1px solid #d7dfe9;
  border-radius:8px;
  background:#fff;
  color:#344054;
  font-size:13px;
  font-weight:780;
}

#page-questions .question-bank-options div.correct {
  border-color:#006edc;
  background:#edf5ff;
}

#page-questions .question-bank-options i {
  width:22px;
  height:22px;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#f2f4f7;
  color:#667085;
  font-size:11px;
  font-style:normal;
  font-weight:950;
}

#page-questions .question-bank-options .correct i {
  background:#0066cc;
  color:#fff;
}

#page-questions .question-bank-answer-only {
  padding:12px 14px;
  border:1px solid #d7dfe9;
  border-radius:8px;
  background:#f8fafc;
  color:#667085;
  font-size:13px;
  font-weight:760;
}

#page-questions .question-bank-answer-only b {
  color:#0066cc;
  font-weight:950;
}

#page-questions .question-bank-analysis {
  display:grid;
  grid-template-columns:100px minmax(0,1fr);
  gap:16px;
  margin-top:18px;
  padding:14px 16px;
  border-radius:9px;
  background:#f7f5f7;
  color:#667085;
}

#page-questions .question-bank-analysis strong {
  display:block;
  margin-bottom:6px;
  color:#667085;
  font-size:11px;
  font-weight:900;
}

#page-questions .question-bank-analysis b {
  color:#0066cc;
  font-size:17px;
  font-weight:950;
}

#page-questions .question-bank-analysis span {
  color:#475467;
  font-size:12px;
  font-weight:720;
  line-height:1.65;
}

@media (max-width:1180px) {
  #page-questions .question-bank-layout {
    grid-template-columns:220px minmax(0,1fr);
  }
  #page-questions .question-bank-options {
    grid-template-columns:1fr;
  }
}

@media (max-width:820px) {
  #page-questions .question-bank-page {
    height:auto;
    min-height:100vh;
  }
  #page-questions .question-bank-topbar {
    height:auto;
    grid-template-columns:1fr;
    padding:12px;
  }
  #page-questions .question-bank-layout {
    grid-template-columns:1fr;
  }
  #page-questions .question-bank-sidebar {
    height:auto;
    max-height:360px;
    border-right:0;
    border-bottom:1px solid #e3e7ef;
  }
  #page-questions .question-course-nav {
    max-height:300px;
  }
}

/* Content list: shared scope is an attribute, not a success state. Keep it calm and neutral. */
.content-shared-badge,
.content-shared-badge[style] {
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(226,232,240,0.70)) !important;
  color: #475569 !important;
  border: 0.5px solid rgba(148,163,184,0.30) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 5px 12px rgba(15,23,42,0.045) !important;
  font-weight: 650 !important;
}

/* Global Apple medical polish 20260706 */
:root {
  --apple-bg: #F5F7FB;
  --apple-surface: rgba(255,255,255,0.78);
  --apple-surface-strong: rgba(255,255,255,0.92);
  --apple-border: rgba(15,23,42,0.075);
  --apple-border-strong: rgba(15,23,42,0.105);
  --apple-text: #111827;
  --apple-muted: #6B7280;
  --apple-blue: #2563EB;
  --apple-green: #16A34A;
  --apple-red: #E5484D;
  --apple-amber: #D97706;
  --apple-shadow: 0 18px 46px rgba(15,23,42,0.075), 0 1px 0 rgba(255,255,255,0.9) inset;
  --apple-shadow-hover: 0 22px 54px rgba(15,23,42,0.105), 0 1px 0 rgba(255,255,255,0.95) inset;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
html, body {
  font-family: var(--font-body) !important;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 18% -8%, rgba(96,165,250,0.16), transparent 32%),
    radial-gradient(circle at 86% 3%, rgba(20,184,166,0.10), transparent 28%),
    var(--apple-bg) !important;
  color: var(--apple-text);
}
.main-content, .content-area, .page {
  background: transparent !important;
}
.page-header {
  min-height: 72px;
  padding: 16px 22px !important;
  background: rgba(246,248,252,0.82) !important;
  border-bottom: 1px solid rgba(15,23,42,0.06) !important;
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
}
.page-title {
  font-family: var(--font-display) !important;
  font-size: 25px !important;
  line-height: 1.1 !important;
  font-weight: 850 !important;
  letter-spacing: -0.035em !important;
  color: #0F172A !important;
}
.page-subtitle {
  margin-top: 4px !important;
  color: #64748B !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}
.page-actions {
  gap: 10px !important;
}
.page-body {
  padding: 18px 18px 28px !important;
}
.stats-grid {
  gap: 14px !important;
  margin-bottom: 18px !important;
}
.stat-card {
  min-height: 126px;
  border-radius: 22px !important;
  border: 1px solid var(--apple-border) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.74)) !important;
  box-shadow: var(--apple-shadow) !important;
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  padding: 22px 24px !important;
  transition: transform .26s cubic-bezier(.16,1,.3,1), box-shadow .26s cubic-bezier(.16,1,.3,1), border-color .26s;
}
.stat-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--apple-shadow-hover) !important;
  border-color: rgba(37,99,235,0.14) !important;
}
.stat-card::before, .stat-card::after {
  display: none !important;
}
.stat-label {
  color: #7C8491 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}
.stat-value {
  font-family: var(--font-display) !important;
  font-size: 34px !important;
  line-height: 1 !important;
  font-weight: 820 !important;
  letter-spacing: -0.045em !important;
  color: #17181C !important;
  font-variant-numeric: tabular-nums;
}
.card, .page-body > .card, .record-card, .exam-card, .settings-card, .question-card, .task-card {
  border-radius: 20px !important;
  border: 1px solid var(--apple-border) !important;
  background: var(--apple-surface-strong) !important;
  box-shadow: 0 14px 38px rgba(15,23,42,0.065) !important;
  backdrop-filter: blur(16px) saturate(1.12);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
}
.card:hover, .page-body > .card:hover {
  box-shadow: 0 18px 46px rgba(15,23,42,0.082) !important;
}
.card-header {
  background: linear-gradient(180deg, rgba(255,255,255,0.74), rgba(255,255,255,0.42)) !important;
  border-bottom: 1px solid rgba(15,23,42,0.055) !important;
}
.card-title {
  font-family: var(--font-display) !important;
  font-size: 15px !important;
  font-weight: 780 !important;
  letter-spacing: -0.015em !important;
  color: #111827 !important;
}
.page-body > .card > .card-body[style*="padding:10px"] {
  padding: 12px 18px !important;
}
.page-body > .card > .card-body[style*="padding:10px"] > div {
  align-items: center !important;
  gap: 12px !important;
}
.page-body > .card > .card-body[style*="padding:10px"] span {
  color: #8A93A3 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}
input:not([type="checkbox"]):not([type="radio"]), textarea, select {
  height: 42px;
  border-radius: 11px !important;
  border: 1px solid rgba(15,23,42,0.09) !important;
  background: rgba(255,255,255,0.82) !important;
  color: #172033 !important;
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  font-weight: 550 !important;
  box-shadow: 0 1px 2px rgba(15,23,42,0.035), inset 0 1px 0 rgba(255,255,255,0.75) !important;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:not([type="checkbox"]):not([type="radio"]):focus, textarea:focus, select:focus {
  border-color: rgba(37,99,235,0.42) !important;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.10), inset 0 1px 0 rgba(255,255,255,0.8) !important;
  background: #fff !important;
}
input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  border-radius: 5px;
  accent-color: #2563EB;
}
.page-body .table-wrap {
  border-radius: 18px !important;
  border: 1px solid var(--apple-border) !important;
  background: rgba(255,255,255,0.90) !important;
  box-shadow: 0 14px 36px rgba(15,23,42,0.055) !important;
  overflow: hidden auto !important;
}
.page-body .table-wrap table, table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-family: var(--font-body) !important;
}
.page-body .table-wrap thead th, table thead th {
  height: 42px !important;
  padding: 0 16px !important;
  background: rgba(248,250,252,0.84) !important;
  color: #9AA2AF !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  border-bottom: 1px solid rgba(15,23,42,0.06) !important;
}
.page-body .table-wrap tbody td, table tbody td {
  height: 54px !important;
  padding: 0 16px !important;
  border-bottom: 1px solid rgba(15,23,42,0.055) !important;
  color: #4B5563 !important;
  font-size: 13px !important;
  font-weight: 540 !important;
  vertical-align: middle !important;
}
.page-body .table-wrap tbody tr:nth-child(odd) td {
  background: rgba(248,250,252,0.56) !important;
}
.page-body .table-wrap tbody tr:hover td {
  background: rgba(239,246,255,0.72) !important;
}
.page-body .table-wrap tbody td strong, table tbody td strong {
  color: #20242C !important;
  font-weight: 720 !important;
}
.badge, .status-badge {
  min-height: 24px !important;
  padding: 4px 9px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 760 !important;
  letter-spacing: 0 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}
.badge-green { background: #E8F8EE !important; color: #14853D !important; border-color: #C8EFD6 !important; }
.badge-red { background: #FDECEC !important; color: #D33B43 !important; border-color: #F8CACA !important; }
.badge-orange { background: #FFF4DE !important; color: #B86E00 !important; border-color: #FFE0A6 !important; }
.badge-blue { background: #EAF2FF !important; color: #2563EB !important; border-color: #CFE0FF !important; }
.badge-gray { background: #F1F3F6 !important; color: #667085 !important; border-color: #E4E7EC !important; }
.btn {
  min-height: 36px;
  border-radius: 999px !important;
  padding: 8px 15px !important;
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  font-weight: 720 !important;
  letter-spacing: -0.005em !important;
  border: 1px solid rgba(15,23,42,0.08) !important;
  box-shadow: 0 8px 18px rgba(15,23,42,0.055), inset 0 1px 0 rgba(255,255,255,0.8);
  transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s cubic-bezier(.16,1,.3,1), background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(15,23,42,0.075), inset 0 1px 0 rgba(255,255,255,0.86); }
.btn:active { transform: scale(.98) !important; }
.btn-sm { min-height: 32px !important; padding: 6px 13px !important; font-size: 12px !important; }
.btn-primary { background: linear-gradient(180deg,#2F6BFF,#1D4ED8) !important; color: #fff !important; border-color: rgba(37,99,235,0.28) !important; }
.btn-secondary { background: rgba(255,255,255,0.88) !important; color: #243044 !important; border-color: rgba(15,23,42,0.09) !important; }
.btn-view { background: #F1F7FF !important; color: #2463D7 !important; border-color: #BFD7FF !important; }
.btn-export { background: #EFFBF4 !important; color: #168044 !important; border-color: #BFEBD0 !important; }
.btn-danger, .btn-delete { background: #FFF3F3 !important; color: #D33B43 !important; border-color: #FFCACA !important; }
.btn-warning { background: #FFF7E8 !important; color: #B86E00 !important; border-color: #FFE0A6 !important; }
.table-actions {
  gap: 8px !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}
.modal, .modal-content {
  border-radius: 22px !important;
  border: 1px solid rgba(255,255,255,0.72) !important;
  background: rgba(255,255,255,0.94) !important;
  box-shadow: 0 24px 70px rgba(15,23,42,0.18) !important;
  backdrop-filter: blur(22px) saturate(1.16);
  -webkit-backdrop-filter: blur(22px) saturate(1.16);
}
@media (max-width: 960px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .page-header { align-items: flex-start !important; gap: 12px !important; }
  .page-actions { flex-wrap: wrap !important; justify-content: flex-start !important; }
}
@media (max-width: 640px) {
  .page-body { padding: 12px !important; }
  .stats-grid { grid-template-columns: 1fr !important; }
  .stat-card { min-height: 104px; }
}

