/* ==========================================================================
   Nurse Bella NSW — Cute Kawaii-Clinical Pastel Design System
   Soft strawberry-milk blush, cherry-rose uniform accents, mint & lavender
   ========================================================================== */

:root {
  --bg: #fff6f8;
  --bg-accent-glow: radial-gradient(circle at 12% 8%, rgba(255, 198, 214, 0.35), transparent 36%),
                    radial-gradient(circle at 90% 18%, rgba(196, 241, 226, 0.32), transparent 34%),
                    radial-gradient(circle at 80% 88%, rgba(226, 212, 255, 0.28), transparent 36%);
  --surface: #ffffff;
  --surface-subtle: #fff0f4;
  --surface-hover: #ffe6ed;
  --border: #f5d8e0;
  --border-strong: #ebb8c7;

  --text: #331e29;
  --text-secondary: #684c5a;
  --text-muted: #937383;

  /* Primary Brand: Nurse Bella Cherry Rose / Strawberry Pink */
  --primary: #e24d6b;
  --primary-hover: #cc3a58;
  --primary-soft: #ffe8ee;
  --primary-soft-border: #f9becd;

  /* Cute Pastel Clinical Accents */
  --accent-blue: #3b7be3;
  --accent-blue-soft: #ebf3ff;
  --success: #14966c;
  --success-soft: #e6f9f1;
  --warning: #c9720e;
  --warning-soft: #fff5df;
  --warning-border: #fbd48c;
  --danger: #d9264e;
  --danger-soft: #ffe5ec;
  --danger-border: #f9b0c2;
  --purple: #7c4dff;
  --purple-soft: #f2ecff;

  /* NSW SAGO Chart Zones (kept crisp for clinical safety readability!) */
  --sago-white: #ffffff;
  --sago-yellow-bg: #fef3c7;
  --sago-yellow-text: #92400e;
  --sago-yellow-border: #fbbf24;
  --sago-red-bg: #ffe4e6;
  --sago-red-text: #9f1239;
  --sago-red-border: #fb7185;

  --font-display: 'Quicksand', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-xs: 0 2px 6px rgba(226, 77, 107, 0.05);
  --shadow-sm: 0 4px 14px rgba(226, 77, 107, 0.08);
  --shadow-md: 0 10px 28px rgba(226, 77, 107, 0.12);
  --shadow-lg: 0 20px 48px rgba(105, 38, 60, 0.18);

  --sidebar-width: 276px;
  --topbar-height: 70px;
  --transition: 200ms cubic-bezier(0.25, 0.9, 0.35, 1.1);
}

/* Cozy Berry-Plum Dark Mode */
[data-theme="dark"] {
  --bg: #18111a;
  --bg-accent-glow: radial-gradient(circle at 12% 10%, rgba(244, 114, 152, 0.13), transparent 38%),
                    radial-gradient(circle at 88% 15%, rgba(167, 139, 250, 0.11), transparent 36%);
  --surface: #231926;
  --surface-subtle: #2e2132;
  --surface-hover: #38283e;
  --border: #3f2d45;
  --border-strong: #563e5e;

  --text: #fdf2f6;
  --text-secondary: #dec7d4;
  --text-muted: #ac90a1;

  --primary: #fb7193;
  --primary-hover: #f4547b;
  --primary-soft: rgba(251, 113, 147, 0.16);
  --primary-soft-border: rgba(251, 113, 147, 0.36);

  --accent-blue: #7ab3ff;
  --accent-blue-soft: rgba(122, 179, 255, 0.16);
  --success: #4ade9d;
  --success-soft: rgba(74, 222, 157, 0.15);
  --warning: #fcd34d;
  --warning-soft: rgba(252, 211, 77, 0.15);
  --warning-border: rgba(252, 211, 77, 0.38);
  --danger: #ff7b9c;
  --danger-soft: rgba(255, 123, 156, 0.16);
  --danger-border: rgba(255, 123, 156, 0.38);
  --purple: #c4b5fd;
  --purple-soft: rgba(196, 181, 253, 0.16);

  --sago-white: #2e2132;
  --sago-yellow-bg: rgba(251, 191, 36, 0.2);
  --sago-yellow-text: #fde68a;
  --sago-yellow-border: rgba(251, 191, 36, 0.45);
  --sago-red-bg: rgba(251, 113, 133, 0.22);
  --sago-red-text: #fda4af;
  --sago-red-border: rgba(251, 113, 133, 0.48);

  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 22px 52px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   University-Matched Cute Pastel Colour Themes (Light + Cozy Dark Modes)
   ========================================================================== */

/* WSU — Cute Crimson & Strawberry Blush */
[data-uni="wsu"] {
  --bg: #fff6f7;
  --bg-accent-glow: radial-gradient(circle at 10% 8%, rgba(225, 29, 72, 0.16), transparent 36%),
                    radial-gradient(circle at 90% 18%, rgba(251, 182, 206, 0.32), transparent 36%);
  --surface-subtle: #fff0f3;
  --surface-hover: #ffe4ea;
  --border: #f5d0da;
  --border-strong: #ebadc0;
  --primary: #b81d46;
  --primary-hover: #991337;
  --primary-soft: #ffe6ed;
  --primary-soft-border: #f7b4c7;
  --hero-grad: linear-gradient(135deg, #9f1239 0%, #e11d48 56%, #fb7185 100%);
  --btn-grad: linear-gradient(135deg, #d81f50 0%, #a8123b 100%);
}
[data-theme="dark"][data-uni="wsu"] {
  --bg: #1a1014;
  --surface: #25171d;
  --surface-subtle: #321f27;
  --border: #4a2d3a;
  --primary: #fb7185;
  --primary-soft: rgba(251, 113, 133, 0.18);
  --primary-soft-border: rgba(251, 113, 133, 0.38);
}

/* UTS — Cute Cobalt & Pastel Sky */
[data-uni="uts"] {
  --bg: #f4f8ff;
  --bg-accent-glow: radial-gradient(circle at 12% 8%, rgba(56, 189, 248, 0.24), transparent 38%),
                    radial-gradient(circle at 88% 18%, rgba(147, 197, 253, 0.28), transparent 36%);
  --surface-subtle: #edf4ff;
  --surface-hover: #e1ecff;
  --border: #d4e3fc;
  --border-strong: #b4cdfa;
  --text: #162542;
  --text-secondary: #415678;
  --text-muted: #6c82a3;
  --primary: #1d5ef0;
  --primary-hover: #1449c7;
  --primary-soft: #e6f0ff;
  --primary-soft-border: #b3cffd;
  --hero-grad: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 55%, #38bdf8 100%);
  --btn-grad: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}
[data-theme="dark"][data-uni="uts"] {
  --bg: #0f1624;
  --surface: #172136;
  --surface-subtle: #1f2d47;
  --border: #2c4063;
  --text: #eff6ff;
  --text-secondary: #cbd9f0;
  --text-muted: #90a6c7;
  --primary: #60a5fa;
  --primary-soft: rgba(96, 165, 250, 0.18);
  --primary-soft-border: rgba(96, 165, 250, 0.38);
}

/* USYD — Cute Warm Sandstone Ochre & Peach Cream */
[data-uni="usyd"] {
  --bg: #fff8f2;
  --bg-accent-glow: radial-gradient(circle at 10% 10%, rgba(251, 146, 60, 0.22), transparent 38%),
                    radial-gradient(circle at 88% 20%, rgba(253, 224, 71, 0.2), transparent 35%);
  --surface-subtle: #fff1e5;
  --surface-hover: #ffe6d1;
  --border: #f5d9c4;
  --border-strong: #ebc0a0;
  --text: #331f16;
  --text-secondary: #6b4b3c;
  --text-muted: #967262;
  --primary: #c95119;
  --primary-hover: #a84010;
  --primary-soft: #ffede0;
  --primary-soft-border: #f9c8a6;
  --hero-grad: linear-gradient(135deg, #b84210 0%, #e06526 55%, #f59e0b 100%);
  --btn-grad: linear-gradient(135deg, #dc5c1e 0%, #b84210 100%);
}
[data-theme="dark"][data-uni="usyd"] {
  --bg: #1c130f;
  --surface: #291c16;
  --surface-subtle: #36251d;
  --border: #4d352a;
  --text: #fff7ed;
  --text-secondary: #e6cfc0;
  --text-muted: #b59786;
  --primary: #fb923c;
  --primary-soft: rgba(251, 146, 60, 0.18);
  --primary-soft-border: rgba(251, 146, 60, 0.38);
}

/* ACU — Cute Royal Lavender & Lilac Mist */
[data-uni="acu"] {
  --bg: #faf6ff;
  --bg-accent-glow: radial-gradient(circle at 12% 10%, rgba(168, 85, 247, 0.2), transparent 38%),
                    radial-gradient(circle at 90% 18%, rgba(244, 114, 182, 0.2), transparent 36%);
  --surface-subtle: #f3ebff;
  --surface-hover: #eae0ff;
  --border: #e3d3fb;
  --border-strong: #ccb1f7;
  --text: #2a1940;
  --text-secondary: #5c4678;
  --text-muted: #8670a3;
  --primary: #7c3aed;
  --primary-hover: #6426cf;
  --primary-soft: #f2e8ff;
  --primary-soft-border: #d5b8fc;
  --hero-grad: linear-gradient(135deg, #5b21b6 0%, #8b5cf6 56%, #d946ef 100%);
  --btn-grad: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}
[data-theme="dark"][data-uni="acu"] {
  --bg: #161021;
  --surface: #211830;
  --surface-subtle: #2c2140;
  --border: #42325e;
  --text: #f5f3ff;
  --text-secondary: #d7ccf0;
  --text-muted: #a393c4;
  --primary: #c084fc;
  --primary-soft: rgba(192, 132, 252, 0.18);
  --primary-soft-border: rgba(192, 132, 252, 0.38);
}

/* Avondale — Cute Eucalyptus Mint & Emerald */
[data-uni="avondale"] {
  --bg: #f3fbf7;
  --bg-accent-glow: radial-gradient(circle at 10% 10%, rgba(52, 211, 153, 0.22), transparent 38%),
                    radial-gradient(circle at 88% 18%, rgba(253, 230, 138, 0.22), transparent 35%);
  --surface-subtle: #e8f7f0;
  --surface-hover: #daf2e7;
  --border: #c8eadb;
  --border-strong: #9fdac1;
  --text: #133026;
  --text-secondary: #3c6355;
  --text-muted: #658d7f;
  --primary: #0b875f;
  --primary-hover: #086e4d;
  --primary-soft: #e2f8ef;
  --primary-soft-border: #a7e6cd;
  --hero-grad: linear-gradient(135deg, #047857 0%, #10b981 58%, #34d399 100%);
  --btn-grad: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
[data-theme="dark"][data-uni="avondale"] {
  --bg: #0e1915;
  --surface: #152620;
  --surface-subtle: #1d342c;
  --border: #2a4a3f;
  --text: #ecfdf5;
  --text-secondary: #c2e5d8;
  --text-muted: #86b3a3;
  --primary: #34d399;
  --primary-soft: rgba(52, 211, 153, 0.18);
  --primary-soft-border: rgba(52, 211, 153, 0.38);
}

/* UON — Cute Coastal Ocean Cerulean & Seafoam */
[data-uni="uon"] {
  --bg: #f2faff;
  --bg-accent-glow: radial-gradient(circle at 12% 10%, rgba(14, 165, 233, 0.2), transparent 38%),
                    radial-gradient(circle at 88% 20%, rgba(45, 212, 191, 0.22), transparent 36%);
  --surface-subtle: #e7f6fe;
  --surface-hover: #d8effd;
  --border: #c8e5f7;
  --border-strong: #9fd1ef;
  --text: #112938;
  --text-secondary: #3c5d70;
  --text-muted: #66889c;
  --primary: #0277a8;
  --primary-hover: #025f87;
  --primary-soft: #e3f5ff;
  --primary-soft-border: #a7daf7;
  --hero-grad: linear-gradient(135deg, #0369a1 0%, #0ea5e9 58%, #2dd4bf 100%);
  --btn-grad: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}
[data-theme="dark"][data-uni="uon"] {
  --bg: #0d171f;
  --surface: #142430;
  --surface-subtle: #1c3142;
  --border: #28455c;
  --text: #f0f9ff;
  --text-secondary: #c4dfee;
  --text-muted: #89aec4;
  --primary: #38bdf8;
  --primary-soft: rgba(56, 189, 248, 0.18);
  --primary-soft-border: rgba(56, 189, 248, 0.38);
}

/* Notre Dame (UNDA) — Cute Periwinkle Navy & Warm Honey Gold */
[data-uni="unda"] {
  --bg: #f5f7ff;
  --bg-accent-glow: radial-gradient(circle at 12% 10%, rgba(79, 70, 229, 0.18), transparent 38%),
                    radial-gradient(circle at 88% 18%, rgba(251, 191, 36, 0.22), transparent 36%);
  --surface-subtle: #eef1ff;
  --surface-hover: #e2e8ff;
  --border: #d6ddfa;
  --border-strong: #b4c1f5;
  --text: #182040;
  --text-secondary: #444f78;
  --text-muted: #6e7aa3;
  --primary: #3148a8;
  --primary-hover: #243787;
  --primary-soft: #e8ecff;
  --primary-soft-border: #bbc6fa;
  --hero-grad: linear-gradient(135deg, #1e3a8a 0%, #4338ca 56%, #eab308 100%);
  --btn-grad: linear-gradient(135deg, #4338ca 0%, #1e3a8a 100%);
}
[data-theme="dark"][data-uni="unda"] {
  --bg: #101426;
  --surface: #181f38;
  --surface-subtle: #212b4d;
  --border: #324070;
  --text: #eef2ff;
  --text-secondary: #ccd4f2;
  --text-muted: #939fc9;
  --primary: #818cf8;
  --primary-soft: rgba(129, 140, 248, 0.18);
  --primary-soft-border: rgba(129, 140, 248, 0.38);
}

/* General NSW — Nurse Bella Signature Cherry-Blush */
[data-uni="general"] {
  --hero-grad: linear-gradient(135deg, #f45c7d 0%, #f07d99 52%, #ffa896 100%);
  --btn-grad: linear-gradient(135deg, #e85574 0%, #d93b5c 100%);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  background-image: var(--bg-accent-glow);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-title, .hero-title, .card-title, .page-title {
  font-family: var(--font-display);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

.mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   Nurse Bella Avatar & Mascot Styles
   ========================================================================== */

@keyframes bellaFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

@keyframes bellaCelebrateJump {
  0% { transform: scale(0.75) translateY(20px) rotate(-6deg); opacity: 0; }
  40% { transform: scale(1.1) translateY(-10px) rotate(4deg); opacity: 1; }
  65% { transform: scale(0.97) translateY(0px) rotate(-3deg); }
  85% { transform: scale(1.04) translateY(-4px) rotate(2deg); }
  100% { transform: scale(1) translateY(0px) rotate(0deg); }
}

@keyframes bellaEncourageTilt {
  0% { transform: scale(0.85) translateY(14px); opacity: 0; }
  40% { transform: scale(1.02) rotate(-5deg); opacity: 1; }
  70% { transform: scale(1) rotate(4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes emoteSparkle {
  0% { transform: translateY(6px) scale(0.4); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateY(-28px) scale(1.2); opacity: 0; }
}

.bella-bubble-card.celebrate .bella-bubble-avatar {
  animation: bellaCelebrateJump 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bella-bubble-card.encourage .bella-bubble-avatar {
  animation: bellaEncourageTilt 620ms ease-out;
}

.bella-emote-pop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 140;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 22px;
  background: var(--surface);
  border: 2px solid var(--primary-soft-border);
  box-shadow: var(--shadow-lg);
  max-width: 340px;
  pointer-events: none;
}

.bella-emote-pop.celebrate {
  border-color: #34d399;
  background: linear-gradient(135deg, var(--surface) 0%, var(--success-soft) 100%);
}

.bella-emote-pop.encourage {
  border-color: var(--warning-border);
  background: linear-gradient(135deg, var(--surface) 0%, var(--warning-soft) 100%);
}

.bella-emote-img-wrap {
  position: relative;
  flex-shrink: 0;
}

.bella-emote-pop.celebrate img {
  height: 82px;
  width: auto;
  animation: bellaCelebrateJump 680ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bella-emote-pop.encourage img {
  height: 82px;
  width: auto;
  animation: bellaEncourageTilt 650ms ease-out;
}

.emote-particle {
  position: absolute;
  font-size: 16px;
  animation: emoteSparkle 1.1s ease-out forwards;
}

.coffee-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffdd57 0%, #ffb74d 100%);
  color: #4a2511;
  font-weight: 800;
  font-size: 12.8px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
  transition: transform var(--transition), filter var(--transition);
}

.coffee-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.uni-emblem-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Ask Nurse Bella Chat & Decluttered Hub Tiles */
.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.chat-msg.user {
  justify-content: flex-end;
}

.chat-avatar {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--primary-soft);
  border: 1.5px solid var(--primary-soft-border);
  padding: 2px;
  flex-shrink: 0;
}

.chat-bubble {
  max-width: 78%;
  padding: 13px 16px;
  border-radius: 18px;
  border: 1.5px solid var(--border);
}

.chat-bubble.bella {
  background: var(--surface-subtle);
  border-bottom-left-radius: 6px;
}

.chat-bubble.user {
  background: var(--btn-grad, var(--primary));
  color: #ffffff;
  border-color: transparent;
  border-bottom-right-radius: 6px;
}

.hub-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.hub-tile:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.hub-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.custom-flow-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-subtle);
}

.custom-flow-step {
  padding: 7px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1.5px solid var(--primary-soft-border);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
}

/* Interactive Textbook Medical Model Stage & Pulsing Anatomical Hotspots */
.med-model-stage {
  position: relative;
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.med-model-stage.portrait {
  max-width: 340px;
}

.med-model-stage.wide {
  max-width: 100%;
}

.med-model-img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.med-overlay-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@keyframes hotspotPulse {
  0% { box-shadow: 0 0 0 0 rgba(226, 77, 107, 0.55); }
  70% { box-shadow: 0 0 0 11px rgba(226, 77, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 77, 107, 0); }
}

.hotspot-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  background: rgba(51, 30, 41, 0.84);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.28);
  transition: transform 160ms ease, background 160ms ease;
  z-index: 5;
}

.hotspot-pin:hover {
  transform: translate(-50%, -50%) scale(1.09);
  background: var(--primary);
  z-index: 10;
}

.hotspot-pin.active {
  background: var(--primary);
  transform: translate(-50%, -50%) scale(1.12);
  animation: hotspotPulse 1.6s infinite;
  z-index: 12;
}

.hotspot-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fde047;
  flex-shrink: 0;
}

.brand-avatar-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffe5ec 0%, #fff6da 100%);
  border: 2.5px solid #f9becd;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(226, 77, 107, 0.2);
  flex-shrink: 0;
}

.brand-avatar-img {
  width: 44px;
  height: auto;
  margin-top: 2px;
  object-fit: contain;
}

.bella-hero-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.bella-hero-img {
  height: 172px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(135, 32, 58, 0.22));
  animation: bellaFloat 3.6s ease-in-out infinite;
}

.bella-bubble-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--surface) 0%, var(--primary-soft) 100%);
  border: 1.5px solid var(--primary-soft-border);
  box-shadow: var(--shadow-sm);
}

.bella-bubble-card.celebrate {
  background: linear-gradient(135deg, var(--surface) 0%, var(--success-soft) 100%);
  border-color: rgba(20, 150, 108, 0.32);
}

.bella-bubble-card.encourage {
  background: linear-gradient(135deg, var(--surface) 0%, var(--warning-soft) 100%);
  border-color: var(--warning-border);
}

.bella-bubble-avatar {
  height: 108px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 12px rgba(226, 77, 107, 0.16));
}

.bella-bubble-avatar.sm {
  height: 82px;
}

.bella-speech-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

/* ==========================================================================
   Layout Shell
   ========================================================================== */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  transition: transform var(--transition);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  user-select: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.brand-nsw {
  color: var(--primary);
}

.brand-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 2px;
}

.uni-selector-wrap {
  padding: 0 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.uni-picker-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
  padding-left: 2px;
}

.uni-select {
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--primary-soft-border);
  background: var(--surface-subtle);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.uni-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.uni-modal-trigger {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  padding: 2px 4px;
  cursor: pointer;
  transition: opacity var(--transition);
}

.uni-modal-trigger:hover {
  opacity: 0.78;
  text-decoration: underline;
}

.year-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 1.5px solid var(--border);
}

.year-pill {
  border: none;
  background: transparent;
  padding: 5px 4px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.year-pill:hover {
  color: var(--primary);
}

.year-pill.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}

.sidebar-nav {
  flex: 1;
  padding: 2px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 12px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 13px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 13.8px;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.nav-item:hover {
  background: var(--surface-subtle);
  color: var(--text);
  transform: translateX(2px);
}

.nav-item.active {
  background: var(--primary-soft);
  border-color: var(--primary-soft-border);
  color: var(--primary);
}

.nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-soft-border);
}

.nav-badge.coach-alert {
  background: var(--danger);
  color: #fff;
  border-color: transparent;
}

.nav-item.active .nav-badge {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

[data-theme="dark"] .nav-item.active .nav-badge {
  color: #18111a;
}

.sidebar-footer {
  padding: 12px 14px 16px;
  border-top: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sago-quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--warning-border);
  background: var(--warning-soft);
  color: var(--warning);
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
  transition: transform var(--transition), filter var(--transition);
}

.sago-quick-btn:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}

.sago-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.22);
}

.sidebar-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ghost-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ghost-mini-btn:hover {
  border-color: var(--primary-soft-border);
  color: var(--primary);
}

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

/* Main Content */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1.5px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 16px;
}

[data-theme="dark"] .topbar {
  background: rgba(35, 25, 38, 0.88);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-heading {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.page-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.global-search-wrap {
  position: relative;
  width: 280px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  display: flex;
  pointer-events: none;
}

.global-search-input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface-subtle);
  font-size: 13px;
  font-weight: 600;
  transition: border-color var(--transition), background var(--transition);
}

.global-search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 370px;
  max-width: calc(100vw - 32px);
  max-height: 420px;
  overflow-y: auto;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 60;
}

.search-result-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.search-result-item:hover {
  background: var(--surface-subtle);
}

.search-result-type {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.search-result-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.search-result-snippet {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--warning-soft);
  border: 1.5px solid var(--warning-border);
  color: var(--warning);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}

.streak-label {
  font-weight: 700;
  font-size: 12px;
}

.main-content {
  flex: 1;
  padding: 26px 28px 44px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}

.app-footer {
  border-top: 1.5px solid var(--border);
  padding: 16px 28px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface);
}

.app-footer p {
  margin: 0 auto;
  max-width: 1240px;
}

/* ==========================================================================
   Reusable Cute Cards & Controls
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
}

.card-interactive {
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.card-interactive:hover {
  transform: translateY(-3px);
  border-color: var(--primary-soft-border);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-subtitle {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-planner { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--btn-grad, linear-gradient(135deg, #e85574 0%, #d93b5c 100%));
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
}

[data-theme="dark"] .btn-primary {
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.04);
  box-shadow: 0 6px 18px rgba(226, 77, 107, 0.36);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-subtle);
  border-color: var(--primary-soft-border);
}

.btn-soft {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-soft-border);
}

.btn-soft:hover:not(:disabled) {
  filter: brightness(0.96);
}

.btn-danger-soft {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger-border);
}

.btn-sm {
  padding: 6px 13px;
  font-size: 12.5px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 14.5px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--surface-subtle);
  color: var(--primary);
  border-color: var(--primary-soft-border);
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.badge-teal { background: var(--primary-soft); color: var(--primary); }
.badge-blue { background: var(--accent-blue-soft); color: var(--accent-blue); }
.badge-green { background: var(--success-soft); color: var(--success); }
.badge-amber { background: var(--warning-soft); color: var(--warning); }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-neutral { background: var(--surface-subtle); color: var(--text-secondary); border: 1px solid var(--border); }

/* Tabs */
.tabs-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: var(--surface-subtle);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

/* Filter Chips */
.chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.chip:hover {
  border-color: var(--primary-soft-border);
  color: var(--primary);
}

.chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Form Controls */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-secondary);
}

.input, .textarea, .select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.textarea {
  resize: vertical;
  min-height: 92px;
  line-height: 1.5;
}

/* Progress Bar */
.progress-track {
  width: 100%;
  height: 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  box-shadow: inset 0 1px 3px rgba(51, 30, 41, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--btn-grad, linear-gradient(90deg, #f47298 0%, #e24d6b 100%));
  transition: width 350ms ease;
}

.progress-fill.green { background: linear-gradient(90deg, #34d399 0%, #14966c 100%); }
.progress-fill.amber { background: linear-gradient(90deg, #fbbf24 0%, #d97706 100%); }
.progress-fill.blue { background: linear-gradient(90deg, #60a5fa 0%, #3b7be3 100%); }

/* ==========================================================================
   Dashboard & University Curriculum Cards
   ========================================================================== */

.hero-banner {
  background: var(--hero-grad, linear-gradient(135deg, #f45c7d 0%, #f07d99 52%, #ffa896 100%));
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero-banner::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}

.hero-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-desc {
  margin: 0 0 18px;
  font-size: 14.5px;
  opacity: 0.96;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 1;
}

.btn-hero-white {
  background: #ffffff;
  color: var(--primary);
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
}

.btn-hero-white:hover {
  background: #fff5f8;
}

.btn-hero-glass {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.38);
}

.btn-hero-glass:hover {
  background: rgba(255, 255, 255, 0.3);
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 700;
}

.unit-chip-card {
  padding: 13px 15px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.unit-chip-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.uni-card-option {
  padding: 15px 16px;
  border-radius: 18px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all var(--transition);
}

.uni-card-option:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.uni-card-option.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Flashcards & Quizzes
   ========================================================================== */

.flashcard-stage {
  perspective: 1200px;
  max-width: 700px;
  margin: 0 auto;
}

.flashcard-box {
  position: relative;
  min-height: 310px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 200ms ease, border-color 200ms ease;
}

.flashcard-box:hover {
  border-color: var(--primary-soft-border);
}

.flashcard-box.flipped {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--surface) 0%, var(--primary-soft) 185%);
}

.flashcard-prompt {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  margin: 26px 0;
}

.flashcard-answer {
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  margin: 18px 0;
}

.clinical-pearl {
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  font-size: 13.5px;
  color: var(--text);
  text-align: left;
}

.sr-rating-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 700px;
  margin: 16px auto 0;
}

.sr-btn {
  padding: 12px 10px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-weight: 800;
  font-size: 13.5px;
  transition: transform var(--transition);
}

.sr-btn:hover { transform: translateY(-2px); }
.sr-btn small { font-size: 11px; font-weight: 600; opacity: 0.85; }
.sr-btn.again { border-color: var(--danger-border); color: var(--danger); background: var(--danger-soft); }
.sr-btn.hard { border-color: var(--warning-border); color: var(--warning); background: var(--warning-soft); }
.sr-btn.good { border-color: var(--primary-soft-border); color: var(--primary); background: var(--primary-soft); }
.sr-btn.easy { border-color: #86efac; color: var(--success); background: var(--success-soft); }

/* Quiz Options */
.quiz-option {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--surface-subtle);
}

.quiz-option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-subtle);
  color: var(--primary);
  font-weight: 800;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quiz-option.correct {
  border-color: var(--success);
  background: var(--success-soft);
}

.quiz-option.correct .quiz-option-letter {
  background: var(--success);
  color: #fff;
}

.quiz-option.wrong {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.quiz-option.wrong .quiz-option-letter {
  background: var(--danger);
  color: #fff;
}

/* ==========================================================================
   Medication Calculation Trainer
   ========================================================================== */

.med-order-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-top: 5px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.med-rx-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1.5px dashed var(--border-strong);
  flex-wrap: wrap;
}

.med-scenario {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
  margin: 0 0 20px;
}

.med-input-group {
  display: flex;
  align-items: stretch;
  gap: 10px;
  max-width: 440px;
}

.med-answer-input {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  padding: 12px 16px;
}

.unit-tag {
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 14px;
  background: var(--surface-subtle);
  border: 1.5px solid var(--primary-soft-border);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
  white-space: nowrap;
}

.workings-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  background: var(--surface-subtle);
  border: 1.5px solid var(--border);
}

.workings-step {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  font-size: 14px;
  border-bottom: 1px dashed var(--border);
}

.workings-step:last-child {
  border-bottom: none;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.formula-card {
  padding: 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
}

.formula-math {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  padding: 10px 12px;
  background: var(--surface-subtle);
  border-radius: 12px;
  border: 1px solid var(--primary-soft-border);
  margin: 8px 0;
}

/* ==========================================================================
   OSCE Checklists & Timers
   ========================================================================== */

.osce-timer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  border: 1.5px solid var(--border);
  flex-wrap: wrap;
}

.timer-readout {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.timer-readout.urgent {
  color: var(--danger);
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.checklist-item:hover {
  background: var(--surface-subtle);
}

.checklist-item.checked {
  background: var(--success-soft);
  border-color: rgba(20, 150, 108, 0.36);
}

.checklist-item input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: var(--primary);
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}

.verbal-tip {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 6px 11px;
  border-radius: 10px;
  display: inline-block;
  font-weight: 600;
}

.critical-tag {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
  margin-left: 6px;
}

/* ==========================================================================
   SAGO Table & Placement Compliance
   ========================================================================== */

.sago-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.sago-table th, .sago-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.sago-table th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--surface-subtle);
}

.zone-pill {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.zone-normal { background: var(--success-soft); color: var(--success); }
.zone-yellow { background: var(--sago-yellow-bg); color: var(--sago-yellow-text); border: 1px solid var(--sago-yellow-border); }
.zone-red { background: var(--sago-red-bg); color: var(--sago-red-text); border: 1px solid var(--sago-red-border); }

.compliance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  flex-wrap: wrap;
}

.compliance-row.done {
  border-color: rgba(20, 150, 108, 0.36);
  background: var(--success-soft);
}

/* ==========================================================================
   Planner, Pomodoro & Notes
   ========================================================================== */

.pomodoro-display {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  margin: 12px 0;
  color: var(--primary);
}

.note-card-preview {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  max-height: 150px;
  overflow: hidden;
  position: relative;
}

/* ==========================================================================
   Modal & Toast
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(51, 30, 41, 0.52);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-card {
  width: 100%;
  max-width: 820px;
  max-height: 88vh;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1.5px solid var(--border);
  background: var(--surface-subtle);
}

.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.modal-body {
  padding: 22px 24px;
  overflow-y: auto;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 120;
}

.toast {
  background: linear-gradient(135deg, #3c1f2e 0%, #5c2740 100%);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  animation: toastIn 220ms ease;
}

[data-theme="dark"] .toast {
  background: #ffe8ee;
  color: #331e29;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive Design (Tablet & Mobile)
   ========================================================================== */

.mobile-only {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

/* Harmonious Tonal Dashboard Stat & Spotlight Cards (auto-harmonised to active uni theme!) */
:root {
  --tone-1: var(--primary);
  --tone-2: color-mix(in srgb, var(--primary) 72%, #ec4899);
  --tone-3: color-mix(in srgb, var(--primary) 62%, #8b5cf6);
  --tone-4: color-mix(in srgb, var(--primary) 68%, #fb7185);
}
[data-uni="uts"], [data-uni="uon"], [data-uni="unda"] {
  --tone-2: color-mix(in srgb, var(--primary) 72%, #0ea5e9);
  --tone-3: color-mix(in srgb, var(--primary) 66%, #6366f1);
  --tone-4: color-mix(in srgb, var(--primary) 68%, #38bdf8);
}
[data-uni="usyd"] {
  --tone-2: color-mix(in srgb, var(--primary) 72%, #f59e0b);
  --tone-3: color-mix(in srgb, var(--primary) 66%, #e11d48);
  --tone-4: color-mix(in srgb, var(--primary) 68%, #fb923c);
}
[data-uni="avondale"] {
  --tone-2: color-mix(in srgb, var(--primary) 72%, #14b8a6);
  --tone-3: color-mix(in srgb, var(--primary) 66%, #0284c7);
  --tone-4: color-mix(in srgb, var(--primary) 68%, #34d399);
}

.dash-stat-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition);
}
.dash-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.dash-stat-card.tone-1 {
  background: linear-gradient(155deg, var(--surface) 15%, var(--primary-soft) 100%);
  border-color: var(--primary-soft-border);
}
.dash-stat-card.tone-2 {
  background: linear-gradient(155deg, var(--surface) 15%, color-mix(in srgb, var(--tone-2) 13%, var(--surface)) 100%);
  border-color: color-mix(in srgb, var(--tone-2) 28%, var(--border));
}
.dash-stat-card.tone-3 {
  background: linear-gradient(155deg, var(--surface) 15%, color-mix(in srgb, var(--tone-3) 13%, var(--surface)) 100%);
  border-color: color-mix(in srgb, var(--tone-3) 26%, var(--border));
}
.dash-stat-card.tone-4 {
  background: linear-gradient(155deg, var(--surface) 15%, color-mix(in srgb, var(--tone-4) 12%, var(--surface-subtle)) 100%);
  border-color: color-mix(in srgb, var(--tone-4) 28%, var(--border));
}

.dash-stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--primary) 13%, var(--surface));
  color: var(--primary);
}
.dash-stat-card.tone-2 .dash-stat-icon {
  background: color-mix(in srgb, var(--tone-2) 14%, var(--surface));
  color: var(--tone-2);
}
.dash-stat-card.tone-3 .dash-stat-icon {
  background: color-mix(in srgb, var(--tone-3) 14%, var(--surface));
  color: var(--tone-3);
}
.dash-stat-card.tone-4 .dash-stat-icon {
  background: color-mix(in srgb, var(--tone-4) 14%, var(--surface));
  color: var(--tone-4);
}

.progress-fill.harm-2 {
  background: linear-gradient(90deg, var(--primary), var(--tone-2));
}
.progress-fill.harm-3 {
  background: linear-gradient(90deg, var(--tone-3), var(--primary));
}
.progress-fill.harm-4 {
  background: linear-gradient(90deg, var(--tone-2), var(--tone-3));
}

.dash-card-assessments {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary-soft) 55%, var(--surface)) 0%, var(--surface) 88px);
  border-color: var(--primary-soft-border);
}
.dash-card-subject {
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone-3) 10%, var(--surface)) 0%, var(--surface) 88px);
  border-color: color-mix(in srgb, var(--tone-3) 24%, var(--border));
}
.dash-card-recent {
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone-2) 10%, var(--surface)) 0%, var(--surface) 88px);
  border-color: color-mix(in srgb, var(--tone-2) 24%, var(--border));
}
.dash-spotlight-box {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary-soft) 0%, color-mix(in srgb, var(--tone-3) 12%, var(--surface)) 100%);
  border: 1.5px solid var(--primary-soft-border);
}

/* Bigger, Fancy Outlined Capsule Progress Bars on Dashboard */
.dash-stat-card .progress-track,
.dash-spotlight-box .progress-track {
  height: 16px;
  padding: 2px;
  background: var(--surface);
  border: 2px solid color-mix(in srgb, var(--primary) 42%, var(--border-strong));
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--primary) 11%, transparent),
    inset 0 2px 4px rgba(51, 30, 41, 0.09);
  overflow: hidden;
}
.dash-stat-card.tone-2 .progress-track {
  border-color: color-mix(in srgb, var(--tone-2) 45%, var(--border-strong));
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--tone-2) 11%, transparent),
    inset 0 2px 4px rgba(51, 30, 41, 0.09);
}
.dash-stat-card.tone-3 .progress-track {
  border-color: color-mix(in srgb, var(--tone-3) 45%, var(--border-strong));
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--tone-3) 11%, transparent),
    inset 0 2px 4px rgba(51, 30, 41, 0.09);
}
.dash-stat-card.tone-4 .progress-track {
  border-color: color-mix(in srgb, var(--tone-4) 45%, var(--border-strong));
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--tone-4) 11%, transparent),
    inset 0 2px 4px rgba(51, 30, 41, 0.09);
}
.dash-stat-card .progress-fill,
.dash-spotlight-box .progress-fill {
  position: relative;
  border-radius: 999px;
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.45);
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 1060px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-search-wrap { width: 210px; }
}

@media (max-width: 860px) {
  .mobile-only {
    display: inline-flex;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-backdrop.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(51, 30, 41, 0.45);
    z-index: 35;
  }

  .main-wrapper {
    margin-left: 0;
    padding-bottom: 76px;
  }

  .topbar {
    min-height: 62px;
    height: auto;
    padding: 8px 14px;
  }

  .page-subtitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 215px;
  }

  .main-content {
    padding: 14px 14px 32px;
  }

  .tabs-bar {
    display: flex;
    width: 100%;
    border-radius: 16px;
    padding: 6px;
    gap: 6px;
  }

  .tab-btn {
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 12.8px;
  }

  .global-search-wrap {
    display: none;
  }

  .streak-label {
    display: none;
  }

  .hero-banner {
    flex-direction: column-reverse;
    text-align: center;
    padding: 22px 20px;
  }

  .hero-actions {
    justify-content: center;
  }

  .bella-hero-img {
    height: 138px;
  }

  .bella-bubble-card {
    flex-direction: column;
    text-align: center;
  }

  .grid-2, .grid-3, .grid-4, .grid-planner {
    grid-template-columns: 1fr;
  }

  .sr-rating-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .mobile-bottom-nav {
    display: flex;
    position: sticky;
    top: 62px;
    width: 100%;
    min-height: 54px;
    background: var(--surface);
    border-bottom: 1.5px solid var(--border);
    z-index: 24;
    justify-content: space-around;
    align-items: center;
    padding: 4px 6px;
    box-shadow: var(--shadow-xs);
  }

  .mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 800;
    padding: 6px 2px;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
  }

  .mobile-nav-btn.active {
    color: var(--primary);
    background: var(--primary-soft);
  }
}

@media print {
  .sidebar, .topbar, .mobile-bottom-nav, .app-footer, .no-print {
    display: none !important;
  }
  .main-wrapper {
    margin-left: 0;
  }
  .card {
    box-shadow: none;
    border: 1px solid #cbd5e1;
  }
}
