@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Caveat:wght@600;700&display=swap');

/* ========================================================== */
/* 1. DESIGN TOKENS & SYSTEM VARIABLES                        */
/* ========================================================== */
:root {
  /* Dark Theme (Default) */
  --bg-body: #070b14;
  --bg-sidebar: #0a0f1d;
  --bg-card: rgba(13, 20, 36, 0.75);
  --bg-card-solid: #0d1424;
  --bg-card-hover: rgba(18, 27, 48, 0.9);
  --bg-input: rgba(255, 255, 255, 0.04);
  --bg-pill: rgba(255, 255, 255, 0.05);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-card: rgba(255, 255, 255, 0.09);

  /* Primary Brand Blue / Indigo (Matching Reference Mockup) */
  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --accent-gradient: linear-gradient(135deg, #2563eb, #3b82f6);
  --accent-glow: rgba(37, 99, 235, 0.35);

  /* Status Tokens */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --success-border: rgba(16, 185, 129, 0.28);
  --success-text: #34d399;

  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --warning-border: rgba(245, 158, 11, 0.28);
  --warning-text: #fbbf24;

  --danger: #f43f5e;
  --danger-bg: rgba(244, 63, 94, 0.12);
  --danger-border: rgba(244, 63, 94, 0.28);
  --danger-text: #fb7185;

  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-cursive: 'Caveat', cursive, sans-serif;

  /* Dimensions & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 24px var(--accent-glow);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-body: #f4f6fc;
  --bg-sidebar: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-solid: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f1f5f9;
  --bg-pill: #f1f5f9;

  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-card: #e2e8f0;

  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --accent-gradient: linear-gradient(135deg, #2563eb, #1d4ed8);
  --accent-glow: rgba(37, 99, 235, 0.2);

  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.1);
  --success-border: rgba(5, 150, 105, 0.25);
  --success-text: #047857;

  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.1);
  --warning-border: rgba(217, 119, 6, 0.25);
  --warning-text: #b45309;

  --danger: #e11d48;
  --danger-bg: rgba(225, 29, 72, 0.1);
  --danger-border: rgba(225, 29, 72, 0.25);
  --danger-text: #be123c;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #f8fafc;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);
}

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

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

/* ========================================================== */
/* 2. SHARED REUSABLE COMPONENTS                              */
/* ========================================================== */

/* Radar Beacon Icon Component */
.radar-beacon-icon {
  position: relative;
  width: 38px;
  height: 38px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 19px;
  box-shadow: 0 4px 14px var(--accent-glow);
  flex-shrink: 0;
}

.radar-beacon-icon.mini {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

.beacon-pulse {
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid var(--accent-primary);
  opacity: 0.6;
  animation: beaconPulse 2.4s infinite ease-out;
}

@keyframes beaconPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  70% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary-gradient {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary-gradient:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  border: 1px solid var(--accent-primary);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.btn-icon-round {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
}

/* Status Pills */
.card-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.card-pill.safe {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}

.card-pill.danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.card-pill.neutral {
  background: var(--bg-pill);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.status-dot {
  font-size: 10px;
  line-height: 1;
}

.status-dot.online {
  color: var(--success);
}

.status-dot.offline {
  color: var(--danger);
}

/* Circular Gauge Track & Fill */
.gauge-svg {
  width: 84px;
  height: 84px;
  transform: rotate(-90deg);
}

.gauge-track {
  fill: none;
  stroke: var(--border-subtle);
  stroke-width: 7;
}

.gauge-fill-bar {
  fill: none;
  stroke: var(--success);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease, stroke 0.4s ease;
}

/* ========================================================== */
/* 3. LANDING PAGE VIEW STYLES                                */
/* ========================================================== */
.landing-view-container {
  display: block;
  min-height: 100vh;
  position: relative;
  background-color: var(--bg-body);
}

/* Landing Top Sticky Navbar */
.landing-nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 24px;
}

[data-theme="light"] .landing-nav-bar {
  background: rgba(255, 255, 255, 0.9);
}

.landing-nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.brand-headings {
  display: flex;
  flex-direction: column;
}

.brand-main-name {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-sub-credit {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.landing-links-shelf {
  display: flex;
  align-items: center;
  gap: 24px;
}

.landing-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  transition: color 0.15s ease;
  background: none;
  border: none;
  cursor: pointer;
}

.landing-nav-link:hover, .landing-nav-link.active {
  color: var(--text-primary);
}

.action-btn-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Pulse animation for Connect button */
.pulse-cta {
  animation: softPulse 3s infinite ease-in-out;
}

@keyframes softPulse {
  0%, 100% { box-shadow: 0 4px 14px var(--accent-glow); }
  50% { box-shadow: 0 4px 22px rgba(37, 99, 235, 0.6); }
}

/* Landing Hero Section */
.landing-hero-section {
  position: relative;
  min-height: calc(100vh - 66px);
  display: flex;
  align-items: center;
  padding: 60px 24px;
  overflow: hidden;
}

.hero-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.65);
}

.hero-overlay-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(7, 11, 20, 0.75) 0%, rgba(7, 11, 20, 0.92) 100%);
}

[data-theme="light"] .hero-overlay-gradient {
  background: radial-gradient(circle at center, rgba(244, 246, 252, 0.75) 0%, rgba(244, 246, 252, 0.94) 100%);
}

.hero-content-wrapper {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Hero Centered Presentation */
.hero-left-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.hero-badges-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: rgba(14, 21, 37, 0.7);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
}

[data-theme="light"] .hero-pill-badge {
  background: rgba(255, 255, 255, 0.85);
}

.hero-pill-badge.college .pill-dot {
  color: var(--success);
}

.hero-pill-badge.inst .pill-code {
  font-family: var(--font-mono);
  color: var(--accent-primary);
  font-weight: 700;
}

.hero-headline {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-align: center;
}

.hero-gradient-headline {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 620px;
  margin: 0 auto 32px auto;
  text-align: center;
}

/* 3 Feature Pills */
.hero-features-strip {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.hero-feature-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(14, 21, 37, 0.65);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

[data-theme="light"] .hero-feature-pill {
  background: rgba(255, 255, 255, 0.85);
}

.hf-icon {
  font-size: 18px;
}

.hf-text strong {
  display: block;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.hf-text small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Hero CTA Buttons */
.hero-cta-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px var(--accent-glow);
  transition: all 0.2s ease;
}

.btn-hero-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--accent-glow);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  background: rgba(14, 21, 37, 0.6);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="light"] .btn-hero-secondary {
  background: rgba(255, 255, 255, 0.9);
}

.btn-hero-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

/* Right: Glassmorphic Preview Card */
.glass-preview-card {
  background: rgba(13, 20, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px var(--accent-glow);
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .glass-preview-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 0 24px var(--accent-glow);
}

.preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

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

.preview-mini-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
}

.preview-brand-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.preview-brand-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.preview-live-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--success);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}

/* Gauge Preview Row */
.preview-gauge-block {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

[data-theme="light"] .preview-gauge-block {
  background: #f8fafc;
}

.preview-gauge-visual {
  position: relative;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.preview-gauge-num {
  position: absolute;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.preview-gauge-num span {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.preview-gauge-num small {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.preview-gauge-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-fraction-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.preview-note-text {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* 3 Mini Stats */
.preview-mini-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.preview-mini-stat {
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
}

[data-theme="light"] .preview-mini-stat {
  background: #f8fafc;
}

.pms-label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pms-num-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.pms-num-row strong {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.pms-badge {
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}

.pms-badge.live { background: var(--accent-glow); color: var(--accent-primary); }
.pms-badge.safe { background: var(--success-bg); color: var(--success); }
.pms-badge.good { background: var(--success-bg); color: var(--success); }

.pms-sub {
  display: block;
  font-size: 0.66rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.preview-watermark-row {
  text-align: right;
  padding-top: 8px;
}

.cursive-tagline {
  font-family: var(--font-cursive);
  font-size: 1.15rem;
  color: var(--text-muted);
  opacity: 0.85;
}

/* Landing Features Section */
.landing-features-section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 80px 24px;
}

.text-center { text-align: center; }

.section-badge-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--accent-glow);
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.section-heading-large {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 48px;
}

.features-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.feature-card-icon {
  font-size: 28px;
  margin-bottom: 16px;
}

.feature-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-card-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.landing-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 28px 24px;
  background: rgba(0, 0, 0, 0.2);
}

.landing-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-sub-note {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* ========================================================== */
/* 4. FULL SAAS APP LAYOUT STYLES                             */
/* ========================================================== */
.app-layout-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  background-color: var(--bg-body);
}

/* Left Sidebar */
.app-sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
  z-index: 100;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-brand-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.sidebar-credit {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Sidebar Navigation Items */
.sidebar-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
}

.sidebar-nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.sidebar-nav-item.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.sidebar-nav-item .nav-icon {
  font-size: 16px;
}

.cr-nav-item {
  border: 1px dashed rgba(245, 158, 11, 0.35);
  color: #f59e0b;
}

.cr-nav-item:hover {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.cr-nav-item.active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #000;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

/* Sidebar Bottom */
.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-ghost-link {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 0.76rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.btn-ghost-link:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.sidebar-user-card {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.suc-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  margin-bottom: 2px;
}

.suc-status-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.suc-name-row {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suc-student-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-sidebar-sync {
  width: 100%;
  padding: 9px;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-sidebar-sync:hover {
  background: var(--accent-primary-hover);
}

.btn-sidebar-connect {
  width: 100%;
  padding: 8px;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* App Main Shell */
.app-main-shell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Top Meta Utility Bar */
.app-top-utility-bar {
  height: 56px;
  padding: 0 32px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.util-left-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-hamburger-btn {
  display: none;
}

.system-meta-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.util-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  font-size: 0.73rem;
}

.ump-label {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.66rem;
  font-weight: 600;
}

.ump-val {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 600;
}

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

.digital-clock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* App Main Content Body */
.app-content-body {
  padding: 28px 32px 48px;
  flex: 1;
}

.pane-header-title {
  margin-bottom: 24px;
}

.pane-main-heading {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.pane-sub-heading {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========================================================== */
/* 5. TAB 1: DASHBOARD SPECIFIC STYLES                        */
/* ========================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.hero-gauge-card {
  grid-column: span 1;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.overall-gauge-flex {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gauge-box {
  position: relative;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gauge-center-val {
  position: absolute;
  text-align: center;
}

.gauge-center-val h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.hero-health-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.metric-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.gauge-target-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.metric-big-num {
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 4px;
}

.metric-footer-bar {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Subject Breakdown */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.subject-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.15s ease;
}

.subject-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.sub-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.sub-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.sub-pct-display {
  font-size: 1.05rem;
  font-weight: 800;
}

.sub-pct-display.safe { color: var(--success); }
.sub-pct-display.danger { color: var(--danger); }

.progress-track-wrapper {
  margin-top: 8px;
}

.progress-track-line {
  height: 6px;
  background: var(--bg-pill);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-track-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.progress-track-bar.safe { background: var(--success); }
.progress-track-bar.danger { background: var(--danger); }

/* ========================================================== */
/* 6. TAB 2: CALENDAR SUITE SPECIFIC STYLES                   */
/* ========================================================== */
.calendar-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.cal-nav-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-month-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 160px;
  text-align: center;
}

.cal-select-input {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 6px 10px;
  font-size: 0.78rem;
  outline: none;
}

.calendar-monthly-summary {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

/* 3-Column Suite */
.calendar-suite-grid {
  display: grid;
  grid-template-columns: 1.35fr 1.15fr 0.85fr;
  gap: 18px;
}

/* Column 1: Heatmap Grid */
.calendar-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.cal-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day-cell {
  min-height: 64px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="light"] .cal-day-cell {
  background: #f8fafc;
}

.cal-day-cell:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

.cal-day-cell.selected {
  border-color: var(--accent-primary);
  background: var(--accent-glow);
  box-shadow: 0 0 10px var(--accent-glow);
}

.cal-day-cell.today .cal-day-num {
  color: var(--accent-primary);
  font-weight: 800;
}

.cal-day-cell.empty {
  opacity: 0.2;
  pointer-events: none;
  background: transparent;
  border-style: dashed;
}

.cal-day-num {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.cal-badge-shelf {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-badge {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-badge.present { background: var(--success-bg); color: var(--success); }
.cal-badge.absent { background: var(--danger-bg); color: var(--danger); }

/* Column 2: Day Details Inspector */
.calendar-inspector-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.inspector-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.inspector-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 40px 10px;
}

.inspector-logs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
}

.inspector-log-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
}

.log-time-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  width: 70px;
  flex-shrink: 0;
}

.log-info-col {
  flex: 1;
  min-width: 0;
}

.log-sub-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-desc-text {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Column 3: Quick Stats Card */
.calendar-quick-stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quick-stats-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.quick-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
}

[data-theme="light"] .quick-stat-item {
  background: #f8fafc;
}

.qsi-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.qsi-val {
  font-size: 0.95rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.quick-insight-box {
  margin-top: 8px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* ========================================================== */
/* 7. TAB 3: SUBJECT LOGS STYLES                              */
/* ========================================================== */
.subject-pills-bar {
  margin-bottom: 16px;
}

.subject-pills-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.sub-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.sub-pill-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.sub-pill-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.sub-pill-count {
  font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.sub-detail-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sub-category-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.sub-detail-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.sub-detail-fraction {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.sub-score-box {
  text-align: right;
}

.sub-score-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-primary);
  display: block;
  line-height: 1;
}

.sub-score-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.timeline-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

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

.timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
}

.timeline-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.timeline-marker.safe { background: var(--success); box-shadow: 0 0 8px var(--success); }
.timeline-marker.danger { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.timeline-marker.neutral { background: var(--text-muted); }

.timeline-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.timeline-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 8px;
}

.timeline-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.timeline-event-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-event-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.timeline-progression {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

/* ========================================================== */
/* 8. TAB 4: DELTA STREAM & AUDIT TABLE STYLES                */
/* ========================================================== */
.audit-card-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.audit-table th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
}

.audit-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.audit-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.empty-table-cell {
  text-align: center;
  padding: 40px !important;
  color: var(--text-muted);
}

/* ========================================================== */
/* 9. TAB 5: CR PORTAL (RESTRICTED AREA) STYLES               */
/* ========================================================== */
.cr-lock-card {
  max-width: 520px;
  margin: 60px auto;
  text-align: center;
  padding: 40px 32px;
  background: var(--bg-card);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.prohibited-icon {
  font-size: 48px;
  margin-bottom: 14px;
}

.prohibited-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--danger);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.prohibited-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.pin-entry-box {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.pin-input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 0.85rem;
  outline: none;
  width: 220px;
}

.pin-input:focus {
  border-color: var(--accent-primary);
}

.admin-top-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.admin-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.admin-kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.admin-kpi-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 4px 0;
}

.admin-kpi-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.admin-directory-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.admin-directory-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.toolbar-input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px 14px;
  font-size: 0.82rem;
  outline: none;
  width: 280px;
}

.admin-filter-pills {
  display: flex;
  gap: 6px;
}

.admin-filter-pill {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-filter-pill.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

/* ========================================================== */
/* 10. TAB 6: SETTINGS STYLES                                 */
/* ========================================================== */
.settings-card-wrapper {
  max-width: 640px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
}

.input-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ========================================================== */
/* 11. MODALS & TOAST SHELF STYLES                            */
/* ========================================================== */
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-layer.active {
  display: flex;
}

.modal-container {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toast-shelf {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-msg {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-solid);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  transition: all 0.3s ease;
}

.toast-msg.success { border-color: var(--success); color: var(--success); }
.toast-msg.warning { border-color: var(--warning); color: var(--warning); }
.toast-msg.danger { border-color: var(--danger); color: var(--danger); }

/* ========================================================== */
/* 12. RESPONSIVE DESIGN & MEDIA QUERIES                      */
/* ========================================================== */
@media (max-width: 1024px) {
  /* Landing Hero */
  .hero-content-wrapper {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-headline {
    font-size: 2.8rem;
  }

  /* App Sidebar transforms to Off-Canvas Mobile Drawer */
  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  }

  .app-sidebar.drawer-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 990;
  }

  .sidebar-backdrop.active {
    display: block;
  }

  .mobile-hamburger-btn {
    display: inline-flex;
  }

  /* Metrics Grid */
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Calendar Suite */
  .calendar-suite-grid {
    grid-template-columns: 1fr;
  }

  .admin-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .landing-links-shelf {
    display: none;
  }

  .hero-headline {
    font-size: 2.2rem;
  }

  .landing-hero-section {
    padding: 36px 16px;
  }

  .preview-mini-stats-grid {
    grid-template-columns: 1fr;
  }

  .app-top-utility-bar {
    padding: 0 16px;
  }

  .app-content-body {
    padding: 18px 16px 36px;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .admin-kpi-grid {
    grid-template-columns: 1fr;
  }

  .hide-on-mobile {
    display: none !important;
  }

  .toolbar-input {
    width: 100%;
  }

  .pin-entry-box {
    flex-direction: column;
    align-items: center;
  }

  .pin-input {
    width: 100%;
  }
}
