/* ==========================================================================
   DIU ICE Class Routine Generator - Editorial Zen Minimalist Design
   Inspired by Reference: Warm Oatmeal Canvas, Matte Charcoal Cards, 
   Electric Lime Accent (#d6f83b), Sage Matcha (#dde7d4), & Blush (#f4ded7)
   Fonts: Google Sans + Google Sans Text + Noto Sans Bengali (All Google Sans)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,wght@0,400;0,500;0,700;1,400;1,700&family=Google+Sans+Text:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,700&family=Noto+Sans+Bengali:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Typography - Unified Google Sans & Bengali */
  --font-serif: 'Google Sans', 'Google Sans Text', 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Google Sans', 'Google Sans Text', 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-bengali: 'Noto Sans Bengali', 'Google Sans', 'Google Sans Text', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Reference Canvas & Card Colors */
  --bg-page: #f5f4ee;
  --bg-page-subtle: #eae9e1;
  --card-bg: #ffffff;
  --card-bg-subtle: #fcfbf7;

  /* Reference Dark Matte Charcoal Card */
  --card-dark: #191c19;
  --card-dark-hover: #222622;
  --card-dark-text: #f5f6f4;
  --card-dark-muted: #9aa099;

  /* Reference Electric Lime / Chartreuse Pop */
  --lime-accent: #d6f83b;
  --lime-hover: #c7eb2c;
  --lime-active: #b8dc20;
  --lime-text: #141712;
  --lime-glow: rgba(214, 248, 59, 0.35);

  /* Reference Pastel Card Types */
  --card-sage: #dde7d4;
  --card-sage-text: #1d2b1b;
  --card-sage-muted: #4e5f4b;

  --card-blush: #f4ded7;
  --card-blush-text: #3d231d;
  --card-blush-muted: #6e4d45;

  /* Borders */
  --card-border: rgba(26, 30, 26, 0.08);
  --card-border-soft: rgba(26, 30, 26, 0.05);
  --card-border-hover: rgba(26, 30, 26, 0.18);
  --card-border-lime: rgba(214, 248, 59, 0.9);

  /* Primary Accent (mapped to Dark Charcoal + Lime Pop) */
  --primary: #191c19;
  --primary-hover: #2a2e2a;
  --primary-light: #f5f4ee;
  --primary-glow: rgba(25, 28, 25, 0.12);

  /* Secondary Accents */
  --accent-emerald: #10b981;
  --accent-emerald-light: #e6f9f0;
  --accent-rose: #ef4444;
  --accent-rose-light: #fef2f2;
  --accent-amber: #f59e0b;
  --accent-amber-light: #fffbeb;
  --accent-blue: #3b82f6;
  --accent-blue-light: #eff6ff;

  /* Text Colors */
  --text-main: #181b18;
  --text-body: #3c423b;
  --text-muted: #727871;
  --text-subtle: #9fa59e;

  /* Multi-Layer Soft Shadows */
  --shadow-xs: 0 1px 2px rgba(22, 26, 22, 0.03);
  --shadow-sm: 0 2px 8px -2px rgba(22, 26, 22, 0.05);
  --shadow-card: 0 2px 14px -2px rgba(22, 26, 22, 0.04), 0 8px 24px -4px rgba(22, 26, 22, 0.04);
  --shadow-card-hover: 0 4px 18px -2px rgba(22, 26, 22, 0.06), 0 16px 36px -6px rgba(22, 26, 22, 0.07);
  --shadow-dropdown: 0 16px 40px -4px rgba(22, 26, 22, 0.12), 0 4px 14px -2px rgba(22, 26, 22, 0.06);

  /* Smooth Rounded Radii (Reference uses smooth 24px-28px curves) */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 26px;
  --radius-pill: 9999px;

  /* Soft Pastel Day Colors */
  --day-sat-bg: #e5e1f2;
  --day-sat-text: #34284d;

  --day-sun-bg: #dde7d4;
  --day-sun-text: #1d2b1b;

  --day-mon-bg: #f4ded7;
  --day-mon-text: #3d231d;

  --day-tue-bg: #f7e2ea;
  --day-tue-text: #4d2235;

  --day-wed-bg: #ede7db;
  --day-wed-text: #3d3422;

  --day-thu-bg: #f6eed1;
  --day-thu-text: #423812;

  --day-offday-bg: #ecebe4;
  --day-offday-text: #5e615b;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--lime-accent);
  color: var(--lime-text);
}

/* Custom Minimalist Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: var(--bg-page);
}

::-webkit-scrollbar-thumb {
  background: #d4d2c7;
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg-page);
}

::-webkit-scrollbar-thumb:hover {
  background: #b5b3a6;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #000000;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  background: rgba(251, 250, 246, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(22, 26, 22, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 24px -4px rgba(20, 23, 18, 0.04), 0 1px 2px rgba(20, 23, 18, 0.02), inset 0 -1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.25s ease;
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-info h1 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: #141712;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.brand-info h1 .brand-highlight {
  font-style: normal;
  font-weight: 900;
  color: #141712;
  background: var(--lime-accent);
  padding: 0.14rem 0.62rem;
  border-radius: 9px;
  border: 1.5px solid rgba(20, 23, 18, 0.18);
  letter-spacing: 0.02em;
  box-shadow: 0 3px 12px rgba(214, 248, 59, 0.45);
  display: inline-block;
  transform-origin: center center;
  animation: iceBadgeFloat 3.2s ease-in-out infinite;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow;
}

@keyframes iceBadgeFloat {
  0% {
    transform: translateY(0px) rotate(-2deg) scale(1);
    box-shadow: 0 3px 10px rgba(214, 248, 59, 0.45);
    border-color: rgba(20, 23, 18, 0.18);
  }
  25% {
    transform: translateY(-2.5px) rotate(2deg) scale(1.03);
    box-shadow: 0 6px 16px rgba(214, 248, 59, 0.65);
    border-color: rgba(20, 23, 18, 0.28);
  }
  50% {
    transform: translateY(1.5px) rotate(-1deg) scale(0.98);
    box-shadow: 0 2px 8px rgba(214, 248, 59, 0.35);
    border-color: rgba(20, 23, 18, 0.15);
  }
  75% {
    transform: translateY(-1.5px) rotate(2.5deg) scale(1.02);
    box-shadow: 0 5px 14px rgba(214, 248, 59, 0.55);
    border-color: rgba(20, 23, 18, 0.25);
  }
  100% {
    transform: translateY(0px) rotate(-2deg) scale(1);
    box-shadow: 0 3px 10px rgba(214, 248, 59, 0.45);
    border-color: rgba(20, 23, 18, 0.18);
  }
}

.brand-info h1:hover .brand-highlight,
.brand-highlight:hover {
  animation: iceBadgeWiggle 0.5s ease-in-out infinite alternate;
}

@keyframes iceBadgeWiggle {
  0% {
    transform: translateY(-3px) rotate(-5deg) scale(1.08);
    box-shadow: 0 6px 20px rgba(214, 248, 59, 0.75);
  }
  100% {
    transform: translateY(-3px) rotate(5deg) scale(1.08);
    box-shadow: 0 6px 20px rgba(214, 248, 59, 0.75);
  }
}

.brand-badge-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.brand-dept-tag {
  font-size: 0.72rem;
  color: #4b5346;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.14rem 0.55rem;
  background: rgba(26, 30, 26, 0.04);
  border: 1px solid rgba(26, 30, 26, 0.06);
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.brand-dept-tag:hover {
  background: rgba(26, 30, 26, 0.07);
  color: #1a1e1a;
}

.brand-dept-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime-accent);
  box-shadow: 0 0 6px rgba(214, 248, 59, 0.9);
  border: 1px solid rgba(20, 23, 18, 0.25);
  display: inline-block;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* Live Today's Date Pill in Navbar (Clickable to open Today's Classes Modal) */
.header-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.44rem 1.05rem;
  background: #ffffff;
  color: #191c19;
  border: 1px solid rgba(26, 30, 26, 0.12);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  cursor: pointer;
}

.header-date-pill:hover {
  background: var(--lime-accent);
  color: #141712;
  border-color: rgba(20, 23, 18, 0.22);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 14px rgba(214, 248, 59, 0.45);
}

.header-date-icon {
  color: #191c19;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.header-date-pill:hover .header-date-icon {
  transform: scale(1.1);
}

.date-pulse-dot {
  position: relative;
  width: 7px;
  height: 7px;
  display: inline-flex;
  flex-shrink: 0;
}

.date-pulse-core {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime-accent);
  border: 1px solid rgba(20, 23, 18, 0.25);
  transition: background 0.2s ease;
}

.header-date-pill:hover .date-pulse-core {
  background: #141712;
}

.date-pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--lime-accent);
  animation: datePing 2s infinite;
}

@keyframes datePing {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.8); opacity: 0; }
}

.header-date-text {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Digital Clock Pill */
.header-clock-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-body);
  font-family: var(--font-mono);
  box-shadow: var(--shadow-xs);
}

.clock-icon-svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.clock-ampm {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Live Date Pill */
.header-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-body);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-date-pill:hover {
  background: var(--card-bg-subtle);
  border-color: var(--card-border-hover);
  transform: translateY(-1px);
}

/* Live Beacon Indicator */
.live-dot-beacon {
  position: relative;
  display: inline-flex;
  width: 8px;
  height: 8px;
}

.dot-core {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
}

.dot-ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  animation: beaconPing 2s infinite;
}

@keyframes beaconPing {
  75%, 100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* ==========================================================================
   Main Wrapper
   ========================================================================== */
.main-wrapper {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

/* ==========================================================================
   1. Real-Time Routine Updates News Ticker
   ========================================================================== */
.routine-news-ticker {
  background: var(--lime-accent);
  color: var(--lime-text);
  border: 1px solid rgba(20, 23, 18, 0.12);
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 10px rgba(214, 248, 59, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0.32rem 0.65rem;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  user-select: none;
}

.routine-news-ticker:hover {
  box-shadow: 0 4px 18px rgba(214, 248, 59, 0.45);
  transform: translateY(-1px);
}

.routine-news-ticker.has-updates {
  background: var(--lime-accent);
  border-color: rgba(20, 23, 18, 0.2);
  box-shadow: 0 4px 16px rgba(214, 248, 59, 0.45);
}

.ticker-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
  outline: none;
  /* Smooth edge vignette so text glides seamlessly in and out without harsh borders */
  mask-image: linear-gradient(90deg, transparent 0%, black 28px, black calc(100% - 28px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 28px, black calc(100% - 28px), transparent 100%);
}

.ticker-track {
  display: flex;
  width: max-content;
  align-items: center;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
}

.ticker-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-right: 1.25rem; /* Exactly matches the gap between items */
  flex-shrink: 0;
  will-change: transform;
}

.ticker-track.is-animated {
  animation: tickerMarquee var(--ticker-duration, 32s) linear infinite;
}

/* Pause smoothly on hover or when touched on mobile */
.routine-news-ticker:hover .ticker-track.is-animated,
.routine-news-ticker:active .ticker-track.is-animated,
.ticker-viewport:focus .ticker-track.is-animated {
  animation-play-state: paused;
}

@keyframes tickerMarquee {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--lime-text);
  background: rgba(20, 23, 18, 0.08);
  border: 1px solid rgba(20, 23, 18, 0.12);
  padding: 0.22rem 0.8rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.ticker-item:hover {
  background: var(--card-dark);
  color: #ffffff;
  border-color: var(--card-dark);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.ticker-batch-tag {
  font-weight: 800;
  color: var(--lime-accent);
  background: var(--card-dark);
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  font-size: 0.72rem;
}

.ticker-day-tag {
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--lime-text);
}

.ticker-item:hover .ticker-day-tag {
  color: var(--lime-accent);
}

.ticker-empty-item {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.84rem;
  color: var(--lime-text);
  padding: 0 0.4rem;
  white-space: nowrap;
}

.ticker-spark-icon {
  font-size: 0.88rem;
}

.ticker-empty-text {
  font-family: inherit;
  color: var(--lime-text);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.ticker-diamond-sep {
  color: rgba(20, 23, 18, 0.4);
  font-size: 0.75rem;
  margin-left: 0.35rem;
}

/* ==========================================================================
   2. Batch Selector Section
   ========================================================================== */
.batch-selector-section {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 0.65rem 0.85rem 0.65rem 1.15rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
  transition: all 0.2s ease;
}

.batch-bar-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  padding-right: 0.85rem;
  border-right: 1px solid var(--card-border);
}

.batch-bar-title-left {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.batch-swipe-hint {
  display: none;
}

.batch-bar-title svg {
  color: var(--text-muted);
}

.batch-chips-grid {
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1;
  width: 100%;
  padding: 0.1rem 0;
  position: relative;
  user-select: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.batch-chips-grid::-webkit-scrollbar {
  display: none;
}

.batch-chips-grid:active {
  cursor: default;
}

/* Inner ticker track — translated by JS for GPU-smooth animation */
.batch-chips-track {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: max-content;
  will-change: transform;
}

/* Desktop: buttons expand to fill width with balanced compact gap */
.batch-chips-track.batch-chips-desktop {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  will-change: auto;
  transform: none !important;
}

.batch-chips-track.batch-chips-desktop .batch-chip {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.48rem 0.5rem;
  text-align: center;
  font-size: 0.86rem;
}



.batch-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.42rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 700;
  background: var(--bg-page-subtle);
  border: 1px solid var(--card-border);
  color: var(--text-body);
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  cursor: pointer;
}

.batch-chip:hover {
  background: #ffffff;
  border-color: var(--card-border-hover);
  color: var(--text-main);
  transform: translateY(-1px);
}

/* Active Batch Chip (Electric Lime Reference Style) */
.batch-chip.active {
  background: var(--lime-accent);
  color: var(--lime-text);
  border-color: rgba(0, 0, 0, 0.1);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(214, 248, 59, 0.45);
  transform: translateY(-1px);
}

/* ==========================================================================
   3. Quick Stats Banner (The 4 Distinct Reference Card Types)
   ========================================================================== */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.stat-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 1.05rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-card);
}

.stat-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.stat-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  z-index: 1;
  min-width: 0;
}

.stat-extra {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  z-index: 1;
  flex-shrink: 0;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-pill);
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.stat-pill-sub {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.stat-watermark {
  position: absolute;
  right: -6px;
  bottom: -8px;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  transform: rotate(-10deg);
}

.stat-box:hover .stat-watermark {
  transform: rotate(0deg) scale(1.1);
}

/* Stat Box 1: Matte Charcoal Card (like "CURRENT STREAK") */
.stat-box:nth-child(1) {
  background: var(--card-dark);
  color: var(--card-dark-text);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-box:nth-child(1) .stat-icon {
  background: rgba(255, 255, 255, 0.1);
  color: var(--lime-accent);
}

.stat-box:nth-child(1) .stat-value {
  color: #ffffff;
}

.stat-box:nth-child(1) .stat-label {
  color: var(--card-dark-muted);
}

.stat-box:nth-child(1) .stat-pill {
  background: rgba(255, 255, 255, 0.12);
  color: var(--lime-accent);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-box:nth-child(1) .stat-pill-sub {
  color: rgba(255, 255, 255, 0.6);
}

.stat-box:nth-child(1) .stat-watermark {
  opacity: 0.08;
  color: #ffffff;
}

.stat-box:nth-child(1):hover .stat-watermark {
  opacity: 0.15;
}

/* Stat Box 2: Sage Matcha Card (like "FOR YOU TODAY") */
.stat-box:nth-child(2) {
  background: var(--card-sage);
  color: var(--card-sage-text);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.stat-box:nth-child(2) .stat-icon {
  background: #ffffff;
  color: var(--card-sage-text);
}

.stat-box:nth-child(2) .stat-value {
  color: var(--card-sage-text);
}

.stat-box:nth-child(2) .stat-label {
  color: var(--card-sage-muted);
}

.stat-box:nth-child(2) .stat-pill {
  background: rgba(255, 255, 255, 0.7);
  color: var(--card-sage-text);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.stat-box:nth-child(2) .stat-pill-sub {
  color: var(--card-sage-muted);
}

.stat-box:nth-child(2) .stat-watermark {
  opacity: 0.09;
  color: var(--card-sage-text);
}

.stat-box:nth-child(2):hover .stat-watermark {
  opacity: 0.16;
}

/* Stat Box 3: Soft Blush Card (like "BOOK") */
.stat-box:nth-child(3) {
  background: var(--card-blush);
  color: var(--card-blush-text);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.stat-box:nth-child(3) .stat-icon {
  background: #ffffff;
  color: var(--card-blush-text);
}

.stat-box:nth-child(3) .stat-value {
  color: var(--card-blush-text);
}

.stat-box:nth-child(3) .stat-label {
  color: var(--card-blush-muted);
}

.stat-box:nth-child(3) .stat-pill {
  background: rgba(255, 255, 255, 0.7);
  color: var(--card-blush-text);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.stat-box:nth-child(3) .stat-pill-sub {
  color: var(--card-blush-muted);
}

.stat-box:nth-child(3) .stat-watermark {
  opacity: 0.09;
  color: var(--card-blush-text);
}

.stat-box:nth-child(3):hover .stat-watermark {
  opacity: 0.16;
}

/* Stat Box 4: Warm White Card */
.stat-box:nth-child(4) {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--card-border);
}

.stat-box:nth-child(4) .stat-icon {
  background: var(--bg-page-subtle);
  color: var(--text-body);
}

.stat-box:nth-child(4) .stat-value {
  color: var(--text-main);
}

.stat-box:nth-child(4) .stat-label {
  color: var(--text-muted);
}

.stat-box:nth-child(4) .stat-pill {
  background: var(--bg-page-subtle);
  color: var(--text-body);
  border: 1px solid var(--card-border);
}

.stat-box:nth-child(4) .stat-pill-sub {
  color: var(--text-muted);
}

.stat-box:nth-child(4) .stat-watermark {
  opacity: 0.06;
  color: var(--text-main);
}

.stat-box:nth-child(4):hover .stat-watermark {
  opacity: 0.13;
}

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

.stat-data {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.stat-unit {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.8;
}

.stat-label {
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}

/* ==========================================================================
   4. Action Toolbar & Navigation Tabs
   ========================================================================== */
.action-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.25rem 0;
}

/* Nav Tabs: Clean Floating Segmented Control */
.nav-tabs {
  background: #ffffff;
  padding: 0.3rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-xs);
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-tab-btn svg {
  color: var(--text-subtle);
  transition: color 0.15s ease;
}

.nav-tab-btn:hover {
  color: var(--text-main);
}

.nav-tab-btn.active {
  background: var(--card-dark);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-tab-btn.active svg {
  color: var(--lime-accent);
}

/* Toolbar Search & Buttons */
.toolbar-center-tools {
  flex: 1;
  max-width: 320px;
  min-width: 180px;
}

.routine-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon-svg {
  position: absolute;
  left: 0.9rem;
  color: var(--text-subtle);
  pointer-events: none;
}

.routine-search-input {
  width: 100%;
  padding: 0.48rem 2.2rem 0.48rem 2.35rem;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  color: var(--text-main);
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.routine-search-input:focus {
  outline: none;
  border-color: #181b18;
  box-shadow: 0 0 0 3px rgba(24, 27, 24, 0.08);
}

.search-clear-btn {
  position: absolute;
  right: 0.65rem;
  width: 20px;
  height: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  border-radius: 50%;
  transition: all 0.15s;
}

.search-clear-btn.visible {
  display: inline-flex;
}

.toolbar-buttons {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.825rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--card-dark);
  color: #ffffff;
  border: 1px solid transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-primary:hover {
  background: #000000;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid var(--card-border);
  color: var(--text-body);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--bg-page-subtle);
  border-color: var(--card-border-hover);
  color: var(--text-main);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.38rem 0.85rem;
  font-size: 0.78rem;
}

/* Download Routine Dropdown Button */
.download-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.btn-download-glow {
  background: var(--card-dark);
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  font-weight: 600;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-download-glow svg {
  color: var(--lime-accent);
}

.btn-download-glow:hover {
  background: #000000;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.dropdown-chevron {
  transition: transform 0.2s ease;
}

.download-dropdown-wrapper.is-open .dropdown-chevron {
  transform: rotate(180deg);
}

.download-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-dropdown);
  padding: 0.45rem;
  min-width: 220px;
  z-index: 120;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.download-dropdown-wrapper.is-open .download-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.download-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  text-align: left;
  transition: background-color 0.15s ease;
}

.download-menu-item:hover {
  background: var(--bg-page);
}

.menu-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-item-icon.image-icon {
  background: var(--lime-accent);
  color: var(--lime-text);
}

.menu-item-icon.pdf-icon {
  background: var(--card-blush);
  color: var(--card-blush-text);
}

.menu-item-info {
  display: flex;
  flex-direction: column;
}

.menu-item-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

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

/* ==========================================================================
   5. Routine Display Area & View Toggle Bar
   ========================================================================== */
.routine-presentation-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.print-only-routine-header {
  display: none;
}

.routine-view-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--card-border-soft);
}

.routine-view-indicator-pill {
  display: none;
}

.view-toggle-pill-group,
.day-filter-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-page-subtle);
  padding: 0.28rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--card-border);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.42rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  user-select: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-toggle-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.55);
}

.view-toggle-btn.active {
  background: #ffffff;
  color: var(--text-main);
  font-weight: 700;
  border-color: rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Emoji Icon Wrapper & Smooth Hover */
.btn-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-toggle-btn:hover .btn-emoji {
  transform: scale(1.15);
}

/* Active Today Emoji Animation: Electric Sparkle & Pulse */
.view-toggle-btn.active .today-emoji {
  display: inline-block;
  animation: electricSparkle 1.6s ease-in-out infinite;
  transform-origin: center;
}

@keyframes electricSparkle {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 1px rgba(245, 158, 11, 0.4));
  }
  15% {
    transform: scale(1.35) rotate(-14deg);
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.9));
  }
  30% {
    transform: scale(1.1) rotate(8deg);
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6));
  }
  45% {
    transform: scale(1.3) rotate(-8deg);
    filter: drop-shadow(0 0 9px rgba(245, 158, 11, 0.85));
  }
  60% {
    transform: scale(1.05) rotate(0deg);
    filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.4));
  }
}

/* Active All Days Emoji Animation: Playful Calendar Flip & Wobble */
.view-toggle-btn.active .all-days-emoji {
  display: inline-block;
  animation: calendarWobble 1.8s ease-in-out infinite;
  transform-origin: center;
}

@keyframes calendarWobble {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 1px rgba(59, 130, 246, 0.3));
  }
  15% {
    transform: scale(1.3) rotate(-12deg);
    filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.7));
  }
  30% {
    transform: scale(1.12) rotate(10deg);
    filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.5));
  }
  45% {
    transform: scale(1.24) rotate(-8deg);
    filter: drop-shadow(0 0 7px rgba(59, 130, 246, 0.6));
  }
  60% {
    transform: scale(1.06) rotate(0deg);
  }
}

/* ==========================================================================
   6. Routine Timetable Grid View
   ========================================================================== */
.table-scroll-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--card-border);
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  -webkit-overflow-scrolling: touch;
}

.routine-grid-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.85rem;
}

.routine-grid-table thead th {
  background: var(--card-dark);
  color: #f5f6f4;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.95rem 1.25rem;
  border-bottom: 3px solid var(--lime-accent);
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
}

.routine-grid-table thead th:first-child {
  border-top-left-radius: calc(var(--radius-xl) - 1px);
}

.routine-grid-table thead th:last-child {
  border-top-right-radius: calc(var(--radius-xl) - 1px);
}

.routine-grid-table tbody td {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid rgba(26, 30, 26, 0.06);
  vertical-align: middle;
  transition: all 0.15s ease;
}

/* Time, Room, Teacher cells — horizontally & vertically centered */
.routine-grid-table tbody td.cell-center {
  text-align: center;
  vertical-align: middle;
}

/* Time cell inner content block should be inline so centering works */
.routine-grid-table tbody td.cell-center.time-cell-text > div {
  display: inline-block;
}

/* Course cell stays left-aligned */
.routine-grid-table tbody td.course-cell-code {
  text-align: left;
  vertical-align: middle;
}


/* Subtle Alternating Row Tints */
.routine-grid-table tbody tr.row-fill-green td {
  background-color: #ffffff;
}

.routine-grid-table tbody tr.row-fill-purple td {
  background-color: #faf9f4; /* warm subtle linen tint */
}

.routine-grid-table tbody tr:last-child td {
  border-bottom: none;
}

/* Explicit Themed Day Divider Borders in Table View */
.routine-grid-table tbody tr.day-boundary td {
  border-bottom-width: 3.5px !important;
}

.routine-grid-table tbody tr.day-boundary-saturday td {
  border-bottom-color: #7c5cb7 !important;
}

.routine-grid-table tbody tr.day-boundary-sunday td {
  border-bottom-color: #4d7a46 !important;
}

.routine-grid-table tbody tr.day-boundary-monday td {
  border-bottom-color: #c95c42 !important;
}

.routine-grid-table tbody tr.day-boundary-tuesday td {
  border-bottom-color: #b84f80 !important;
}

.routine-grid-table tbody tr.day-boundary-wednesday td {
  border-bottom-color: #997b48 !important;
}

.routine-grid-table tbody tr.day-boundary-thursday td {
  border-bottom-color: #ba962b !important;
}

.routine-grid-table tbody tr.day-boundary-friday td {
  border-bottom-color: #71776f !important;
}

.routine-grid-table tbody tr:hover td {
  background-color: #f2f7dc !important; /* Soft lime-tinted hover highlight */
}

/* Running Class Live Highlight (Electric Lime Glow) */
.routine-grid-table tbody tr.row-running-class td {
  background-color: #f5fad2 !important;
  border-top: 2px solid var(--lime-accent);
  border-bottom: 2px solid var(--lime-accent);
}

.routine-grid-table tbody tr.row-running-class .course-code-main {
  background: var(--lime-accent) !important;
  border-color: rgba(20, 23, 18, 0.25) !important;
  color: #141712 !important;
  box-shadow: 0 2px 8px rgba(214, 248, 59, 0.45);
}

/* Sticky Day Cell with Rich Curated Pastel Colors */
.day-head-cell {
  position: sticky;
  left: 0;
  z-index: 5;
  font-weight: 700;
  border-right: 1px solid var(--card-border);
  min-width: 135px;
  padding: 1.1rem 1.25rem !important;
  vertical-align: middle;
}

.day-cell-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.day-cell-name {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* Distinctive Day Color Accents matching Reference Palette */
.day-saturday .day-cell-name { color: #3b2c56; }
.day-sunday .day-cell-name   { color: #1e3a1e; }
.day-monday .day-cell-name   { color: #4a2118; }
.day-tuesday .day-cell-name  { color: #4e1a33; }
.day-wednesday .day-cell-name{ color: #3e3116; }
.day-thursday .day-cell-name { color: #42350a; }

.day-saturday.day-head-cell {
  background: #ebe6f7 !important;
  border-left: 5px solid #7c5cb7 !important;
}

.day-sunday.day-head-cell {
  background: #e2ecd9 !important;
  border-left: 5px solid #4d7a46 !important;
}

.day-monday.day-head-cell {
  background: #f8e1da !important;
  border-left: 5px solid #c95c42 !important;
}

.day-tuesday.day-head-cell {
  background: #f8e0eb !important;
  border-left: 5px solid #b84f80 !important;
}

.day-wednesday.day-head-cell {
  background: #eee6d8 !important;
  border-left: 5px solid #997b48 !important;
}

.day-thursday.day-head-cell {
  background: #f7ebc6 !important;
  border-left: 5px solid #ba962b !important;
}

/* Today Active Day Pill */
.day-head-cell.is-today-day-cell {
  background: var(--lime-accent) !important;
  border-left: 5px solid #191c19 !important;
  box-shadow: inset 0 0 14px rgba(214, 248, 59, 0.4);
}

.day-head-cell.is-today-day-cell .day-cell-name {
  color: #141712 !important;
  font-weight: 900;
}

.today-tag-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--card-dark);
  color: var(--lime-accent);
  font-size: 0.64rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.today-spark-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime-accent);
}

/* Course Code Badge */
.course-cell-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.course-code-main {
  display: inline-flex;
  align-items: center;
  font-size: 0.92rem;
  font-weight: 800;
  color: #191c19;
  background: #eaf3e5; /* soft matcha green chip */
  padding: 0.24rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #d1e5c8;
  letter-spacing: 0.01em;
  width: fit-content;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.18s ease;
}

.routine-grid-table tbody tr:hover .course-code-main {
  background: var(--lime-accent);
  border-color: #bedf22;
  color: #141712;
  transform: translateX(2px);
}

.course-title-sub {
  font-size: 0.76rem;
  color: #555b53;
  font-weight: 500;
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Time Cell */
.time-cell-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #1d211d;
  white-space: nowrap;
}

.time-cell-text > div:first-child {
  background: #f4f3ec;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  border: 1px solid #e3e1d6;
  display: inline-block;
  color: #242923;
}

/* Room Pill */
.room-cell-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a3c61;
  background: #e6f0fa; /* soft azure tint */
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid #cbe0f5;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  width: fit-content;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Teacher Initial Tag */
.teacher-initial-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.8rem;
  background: var(--card-dark);
  border: 1px solid var(--card-dark);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--lime-accent);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.teacher-initial-tag:hover {
  background: var(--lime-accent);
  color: var(--lime-text);
  border-color: var(--lime-accent);
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 4px 14px rgba(214, 248, 59, 0.5);
}

/* Offday Merged Block */
.offday-merged-block {
  text-align: center;
  font-size: 0.92rem;
  font-weight: 800;
  color: #71776f;
  background: repeating-linear-gradient(
    45deg,
    #f8f7f2,
    #f8f7f2 12px,
    #eeebe4 12px,
    #eeebe4 24px
  ) !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2.4rem 1rem !important;
}

.live-class-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.badge-now {
  background: var(--lime-accent);
  color: var(--lime-text);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.badge-beacon {
  position: relative;
  width: 7px;
  height: 7px;
  display: inline-flex;
}

.beacon-core {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--card-dark);
}

.beacon-wave {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--card-dark);
  animation: beaconWave 1.8s infinite cubic-bezier(0, 0, 0.2, 1);
}

@keyframes beaconWave {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.8); opacity: 0; }
}

.routine-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  padding-top: 0.65rem;
  border-top: 1px solid var(--card-border-soft);
}

/* ==========================================================================
   7. Mobile & Cards View
   ========================================================================== */
.mobile-cards-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-day-card,
.day-table-card {
  background: #ffffff;
  border: 2px solid var(--card-border);
  border-top-width: 6px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-day-card:hover,
.day-table-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* Day Tables Container Layout in Table View */
.day-tables-container {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.day-table-card .table-scroll-container {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #ffffff;
  margin: 0;
  padding: 0;
}

.day-table-card .routine-grid-table {
  border: none;
  margin: 0;
  width: 100%;
}

.day-table-card .routine-grid-table thead th {
  background: #f7f6ef;
  color: #4a5047;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.7rem 1.15rem;
  border-bottom: 1.5px solid var(--card-border-soft);
  position: static;
}

.day-table-card .routine-grid-table thead th:first-child,
.day-table-card .routine-grid-table thead th:last-child {
  border-radius: 0;
}

.day-table-card .routine-grid-table tbody tr:last-child td {
  border-bottom: none;
}

/* Saturday Theme Card */
.mobile-day-card.card-day-saturday,
.day-table-card.card-day-saturday {
  border-color: #d1c8e8;
  border-top-color: #7c5cb7;
}
.mobile-day-card.card-day-saturday .mobile-day-header,
.day-table-card.card-day-saturday .mobile-day-header {
  background: #f4f0fa;
  border-bottom: 1.5px solid #d1c8e8;
}
.mobile-day-card.card-day-saturday .day-name,
.day-table-card.card-day-saturday .day-name {
  color: #3b2c56;
}
.mobile-day-card.card-day-saturday .day-count-badge,
.day-table-card.card-day-saturday .day-count-badge {
  background: #ebe4f7;
  color: #3b2c56;
  border-color: #d1c8e8;
}

/* Sunday Theme Card */
.mobile-day-card.card-day-sunday,
.day-table-card.card-day-sunday {
  border-color: #c2dcb7;
  border-top-color: #4d7a46;
}
.mobile-day-card.card-day-sunday .mobile-day-header,
.day-table-card.card-day-sunday .mobile-day-header {
  background: #eef5e9;
  border-bottom: 1.5px solid #c2dcb7;
}
.mobile-day-card.card-day-sunday .day-name,
.day-table-card.card-day-sunday .day-name {
  color: #1e3a1e;
}
.mobile-day-card.card-day-sunday .day-count-badge,
.day-table-card.card-day-sunday .day-count-badge {
  background: #e0eed9;
  color: #1e3a1e;
  border-color: #c2dcb7;
}

/* Monday Theme Card */
.mobile-day-card.card-day-monday,
.day-table-card.card-day-monday {
  border-color: #f5cac0;
  border-top-color: #c95c42;
}
.mobile-day-card.card-day-monday .mobile-day-header,
.day-table-card.card-day-monday .mobile-day-header {
  background: #fbeee9;
  border-bottom: 1.5px solid #f5cac0;
}
.mobile-day-card.card-day-monday .day-name,
.day-table-card.card-day-monday .day-name {
  color: #4a2118;
}
.mobile-day-card.card-day-monday .day-count-badge,
.day-table-card.card-day-monday .day-count-badge {
  background: #f8dfd8;
  color: #4a2118;
  border-color: #f5cac0;
}

/* Tuesday Theme Card */
.mobile-day-card.card-day-tuesday,
.day-table-card.card-day-tuesday {
  border-color: #f2c7dc;
  border-top-color: #b84f80;
}
.mobile-day-card.card-day-tuesday .mobile-day-header,
.day-table-card.card-day-tuesday .mobile-day-header {
  background: #fbebf2;
  border-bottom: 1.5px solid #f2c7dc;
}
.mobile-day-card.card-day-tuesday .day-name,
.day-table-card.card-day-tuesday .day-name {
  color: #4e1a33;
}
.mobile-day-card.card-day-tuesday .day-count-badge,
.day-table-card.card-day-tuesday .day-count-badge {
  background: #f7dbe8;
  color: #4e1a33;
  border-color: #f2c7dc;
}

/* Wednesday Theme Card */
.mobile-day-card.card-day-wednesday,
.day-table-card.card-day-wednesday {
  border-color: #e5d7c3;
  border-top-color: #997b48;
}
.mobile-day-card.card-day-wednesday .mobile-day-header,
.day-table-card.card-day-wednesday .mobile-day-header {
  background: #f6efe4;
  border-bottom: 1.5px solid #e5d7c3;
}
.mobile-day-card.card-day-wednesday .day-name,
.day-table-card.card-day-wednesday .day-name {
  color: #3e3116;
}
.mobile-day-card.card-day-wednesday .day-count-badge,
.day-table-card.card-day-wednesday .day-count-badge {
  background: #ede2d3;
  color: #3e3116;
  border-color: #e5d7c3;
}

/* Thursday Theme Card */
.mobile-day-card.card-day-thursday,
.day-table-card.card-day-thursday {
  border-color: #ecdda4;
  border-top-color: #ba962b;
}
.mobile-day-card.card-day-thursday .mobile-day-header,
.day-table-card.card-day-thursday .mobile-day-header {
  background: #fcf4dd;
  border-bottom: 1.5px solid #ecdda4;
}
.mobile-day-card.card-day-thursday .day-name,
.day-table-card.card-day-thursday .day-name {
  color: #42350a;
}
.mobile-day-card.card-day-thursday .day-count-badge,
.day-table-card.card-day-thursday .day-count-badge {
  background: #f8ebc2;
  color: #42350a;
  border-color: #ecdda4;
}

/* Friday / Offday Card — Chill Beach Vibes */
.mobile-day-card.card-day-friday,
.day-table-card.card-day-friday,
.mobile-day-card.offday-card,
.day-table-card.offday-card {
  border-color: #b2e0f7;
  border-top: 4px solid #38bdf8;
  background: linear-gradient(135deg, #f0faff 0%, #e0f7ff 100%);
}
.mobile-day-card.card-day-friday .mobile-day-header,
.day-table-card.card-day-friday .mobile-day-header,
.mobile-day-card.offday-card .mobile-day-header,
.day-table-card.offday-card .mobile-day-header {
  background: linear-gradient(90deg, #e0f7ff 0%, #bae6fd 100%);
  border-bottom: 1.5px solid #7dd3fc;
}

/* Today Active Card (Bold Electric Lime Highlight) */
.mobile-day-card.is-today-card,
.day-table-card.is-today-card {
  border-color: #191c19 !important;
  border-top-color: #191c19 !important;
  border-top-width: 6px !important;
  box-shadow: 0 6px 24px rgba(214, 248, 59, 0.4) !important;
}

.mobile-day-card.is-today-card .mobile-day-header,
.day-table-card.is-today-card .mobile-day-header {
  background: var(--lime-accent) !important;
  border-bottom: 2px solid rgba(25, 28, 25, 0.15) !important;
}

.mobile-day-card.is-today-card .day-name,
.day-table-card.is-today-card .day-name {
  color: #141712 !important;
  font-weight: 900 !important;
}

.mobile-day-card.is-today-card .day-count-badge,
.day-table-card.is-today-card .day-count-badge {
  background: #191c19 !important;
  color: var(--lime-accent) !important;
  border-color: #191c19 !important;
  font-weight: 800;
}

.mobile-day-header {
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--card-border-soft);
}

.mobile-day-header .day-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.day-count-badge {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: var(--text-body);
  border: 1px solid var(--card-border);
}

.today-tag-card-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #191c19;
  color: var(--lime-accent);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.14rem 0.45rem;
  border-radius: var(--radius-pill);
}

.offday-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-pill);
  background: #bae6fd;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.mobile-offday-body {
  padding: 2.25rem 1.75rem;
  text-align: center;
  background: linear-gradient(135deg, #f0faff 0%, #e0f7ff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.offday-chill-emoji {
  font-size: 2.4rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(56, 189, 248, 0.35));
}

.offday-chill-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0284c7;
  letter-spacing: -0.01em;
}

.offday-chill-sub {
  font-size: 0.78rem;
  font-weight: 500;
  color: #38bdf8;
  background: #ffffff;
  padding: 0.25rem 0.85rem;
  border-radius: 99px;
  border: 1px solid #bae6fd;
  box-shadow: 0 1px 4px rgba(56, 189, 248, 0.12);
}

.mobile-day-classes-list {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mobile-class-card {
  background: var(--bg-page);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.mobile-class-card:hover {
  background: #ffffff;
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-sm);
}

.mobile-class-card.is-active-now {
  background: #ffffff;
  border: 2px solid var(--lime-accent);
  box-shadow: 0 4px 16px rgba(214, 248, 59, 0.3);
}

.class-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.class-card-code {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}

.class-card-time {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-body);
}

.class-card-name {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.class-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.2rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--card-border-soft);
}

.class-card-room {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-body);
}

/* ==========================================================================
   8. INTERACTIVE TODAY'S CLASSES POP-UP MODAL (EDITORIAL ZEN STYLE)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 26, 22, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  padding: 1.25rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Today's Classes Pop Modal Card (Editorial Zen Minimalist) */
.today-modal-card {
  background: #ffffff;
  border: 1px solid rgba(25, 28, 25, 0.08);
  border-radius: 22px;
  padding: 1.4rem 1.35rem 1.15rem;
  max-width: 440px;
  width: 100%;
  max-height: calc(100dvh - 3rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 20px 48px -12px rgba(18, 22, 18, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  position: relative;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
  overflow: hidden;
}

.today-modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--lime-accent), #86efac, transparent);
  border-radius: 3px;
  opacity: 0.95;
}

.modal-overlay.active .today-modal-card {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg-page-subtle);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  cursor: pointer;
}

.modal-close-btn:hover {
  background: var(--card-dark);
  color: #ffffff;
  transform: rotate(90deg);
}

/* Editorial Header */
.today-modal-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-right: 2rem;
}

.today-modal-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.today-date-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.today-tag-pill {
  font-size: 0.62rem;
  font-weight: 800;
  background: var(--lime-accent);
  color: var(--lime-text);
  padding: 0.12rem 0.48rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.today-tag-pill .pulse-dot-mini {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #141712;
  animation: pulseDotAnim 1.8s infinite ease-in-out;
}

@keyframes pulseDotAnim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.today-modal-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  margin: 0;
}

.today-title-highlight {
  font-style: italic;
  position: relative;
  display: inline-block;
}

.today-title-highlight::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--lime-accent);
  border-radius: 2px;
  z-index: -1;
}

.today-modal-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

/* Batch switcher inside today modal */
.today-batch-selector-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem 0;
}

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

.today-batch-chips {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
}

.today-batch-pill {
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--bg-page-subtle);
  border: 1px solid var(--card-border);
  color: var(--text-body);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.today-batch-pill:hover {
  background: #ffffff;
}

.today-batch-pill.active {
  background: var(--lime-accent);
  color: var(--lime-text);
  border-color: rgba(0, 0, 0, 0.1);
  font-weight: 700;
}

/* Welcome Step: Choose Batch Grid */
.welcome-batch-step {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.welcome-batch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}

.welcome-batch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.6rem 0.2rem 0.52rem;
  min-height: 52px;
  background: #fafaf8;
  border: 1.5px solid rgba(25, 28, 25, 0.08);
  border-radius: 13px;
  color: #191c19;
  font-family: var(--font-sans);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
  position: relative;
}

.welcome-batch-btn .batch-code {
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #191c19;
  line-height: 1.1;
  transition: color 0.15s ease;
}

.welcome-batch-btn .batch-term-hint {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.welcome-batch-btn:hover {
  background: var(--lime-accent);
  border-color: rgba(20, 23, 18, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(214, 248, 59, 0.42);
}

.welcome-batch-btn:hover .batch-code {
  color: #141712;
}

.welcome-batch-btn:hover .batch-term-hint {
  color: rgba(20, 23, 18, 0.85);
}

.welcome-batch-btn:active {
  transform: scale(0.95);
}

.welcome-batch-btn.active {
  background: #191c19;
  border-color: #191c19;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.welcome-batch-btn.active .batch-code {
  color: #ffffff;
}

.welcome-batch-btn.active .batch-term-hint {
  color: var(--lime-accent);
}

/* Quick skip button inside welcome step */
.welcome-quick-dismiss {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
}

.welcome-skip-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.welcome-skip-btn:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.05);
}

/* When in welcome mode, hide heavy modal footer and let modal height be snug */
.modal-overlay.is-welcome-mode .today-modal-footer {
  display: none;
}

.modal-overlay.is-welcome-mode .today-classes-scroll {
  overflow: visible;
  max-height: none;
}

/* Today Classes Scrollable Container */
.today-classes-scroll {
  overflow-y: auto;
  max-height: 52vh;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-right: 0.25rem;
}

.today-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-body);
  padding: 0.4rem 0.65rem;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
}

.today-running-tag {
  color: #121512;
  font-weight: 700;
  background: var(--lime-accent);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
}

.today-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Today's Individual Class Item (Spacious & Clean Layout) */
.today-class-item {
  background: #ffffff;
  border: 1.5px solid var(--card-border);
  border-radius: 14px;
  padding: 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: all 0.18s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.today-class-item:hover {
  border-color: var(--card-border-hover);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.today-class-item.is-live-now {
  background: var(--card-dark);
  color: #ffffff;
  border: 1.5px solid var(--lime-accent);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.today-class-item.is-live-now .today-course-code {
  color: #ffffff;
}

.today-class-item.is-live-now .today-course-title {
  color: #d1d5db;
}

.today-class-item.is-live-now .today-item-time {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

.today-class-item.is-live-now .today-room-pill {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}

.today-class-item.is-live-now .today-teacher-static-badge {
  background: var(--lime-accent);
  color: #141712;
  box-shadow: 0 2px 6px rgba(214, 248, 59, 0.35);
}

.today-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.today-item-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex-shrink: 0;
}

.today-course-code {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.today-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--lime-accent);
  color: var(--lime-text);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.today-item-time {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1f231e;
  background: #f5f4ed;
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #e4e2d6;
  white-space: nowrap;
  font-family: var(--font-mono, inherit);
  flex-shrink: 0;
}

.today-course-title {
  font-size: 0.84rem;
  color: #555c53;
  line-height: 1.4;
  font-weight: 500;
}

.today-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.2rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.today-room-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1a3c61;
  background: #eaf2fb;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid #d0e3f7;
  white-space: nowrap;
}

.today-teacher-static-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background: #191c19;
  color: var(--lime-accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: default;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Relaxing Zen Offday Card (Reference "Take three deep breaths" aesthetic) */
.today-zen-offday-card {
  background: var(--card-sage);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  color: var(--card-sage-text);
}

.zen-offday-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.zen-icon {
  font-size: 1.8rem;
}

.zen-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}

.zen-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--card-sage-text);
  line-height: 1.25;
}

.zen-desc {
  font-size: 0.85rem;
  color: var(--card-sage-muted);
  max-width: 360px;
  line-height: 1.45;
}

.today-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--card-border-soft);
}

/* ==========================================================================
   9. Interactive Faculty Modal
   ========================================================================== */
.faculty-modal-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 0;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 60px -8px rgba(15, 23, 42, 0.18), 0 4px 16px rgba(0,0,0,0.07);
  position: relative;
  transform: translateY(12px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-overlay.active .faculty-modal-card {
  transform: translateY(0) scale(1);
}

/* Top accent bar — site theme: dark → lime */
.faculty-modal-card::before {
  content: "";
  display: block;
  height: 5px;
  background: linear-gradient(90deg, #191c19 0%, #2e3d1f 40%, #d6f83b 100%);
  border-radius: 20px 20px 0 0;
}

.faculty-modal-header {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 0;
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(135deg, #f8faff 0%, #f0f7ff 100%);
}

.faculty-photo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 3px #6366f1, 0 4px 12px rgba(99, 102, 241, 0.25);
  flex-shrink: 0;
}

.faculty-header-text h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.faculty-header-text p {
  font-size: 0.82rem;
  font-weight: 600;
  color: #6366f1;
  margin-top: 0.2rem;
}

.faculty-header-text span {
  font-size: 0.73rem;
  font-weight: 500;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.1rem 0.55rem;
  border-radius: 99px;
  display: inline-block;
  margin-top: 0.25rem;
  border: 1px solid #e2e8f0;
}

.faculty-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem 1.75rem 1.75rem;
}

.faculty-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  padding: 0.6rem 0.95rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  transition: border-color 0.15s;
}

.faculty-info-row:hover {
  border-color: #c7d2fe;
  background: #f5f7ff;
}

.faculty-info-row span:first-child {
  color: #64748b;
  font-weight: 500;
}

.faculty-info-row span:last-child {
  font-weight: 800;
  color: #1e293b;
}

/* ==========================================================================
   10. Master View, Teacher View, Room View & Courses
   ========================================================================== */
.control-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.text-input {
  padding: 0.55rem 0.95rem;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  color: var(--text-main);
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.text-input:focus {
  outline: none;
  border-color: #181b18;
  box-shadow: 0 0 0 3px rgba(24, 27, 24, 0.08);
}

.courses-catalog-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.catalog-header-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.catalog-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.catalog-title-group h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.catalog-title-group p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.catalog-stats-pills {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.catalog-stat-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--bg-page);
  border: 1px solid var(--card-border);
  color: var(--text-body);
}

.catalog-stat-pill.primary {
  background: var(--lime-accent);
  color: var(--lime-text);
  border-color: rgba(0, 0, 0, 0.1);
  font-weight: 700;
}

.catalog-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.catalog-search-wrapper {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.catalog-search-wrapper svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
}

.catalog-search-input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--card-border);
  font-size: 0.84rem;
  background: #ffffff;
  transition: all 0.15s ease;
}

.catalog-search-input:focus {
  outline: none;
  border-color: #181b18;
  box-shadow: 0 0 0 3px rgba(24, 27, 24, 0.08);
}

.catalog-filter-chips {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.catalog-filter-btn {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-page-subtle);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.catalog-filter-btn:hover {
  color: var(--text-main);
  background: #ffffff;
}

.catalog-filter-btn.active {
  background: var(--card-dark);
  color: #ffffff;
  font-weight: 700;
}

.courses-table-wrapper {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  overflow-x: auto;
  box-shadow: var(--shadow-card);
}

.courses-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.84rem;
}

.courses-table thead th {
  background: var(--bg-page-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--card-border);
}

.courses-table tbody td {
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--card-border-soft);
  vertical-align: middle;
}

/* ==========================================================================
   11. Sheet Configuration & Sync (Bottom Section)
   ========================================================================== */
.sheet-config-section {
  background: #ffffff;
  border: 1.5px solid transparent;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
  background-clip: padding-box;
  position: relative;
}

/* Subtle gradient border — site theme: dark → lime */
.sheet-config-section::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  padding: 1.5px;
  background: linear-gradient(135deg, #191c19 0%, #3a4d1e 50%, #d6f83b 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

.mobile-sheet-toggle-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.35rem;
  background: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-body);
  transition: background 0.15s ease;
}

.mobile-sheet-toggle-bar:hover {
  background: var(--bg-page-subtle);
}

.toggle-bar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-bar-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-sheet-toggle-bar[aria-expanded="true"] .toggle-bar-arrow {
  transform: rotate(180deg);
}

.sheet-bar-content {
  display: none;
  padding: 1.35rem;
  flex-direction: column;
  gap: 1rem;
  border-top: 1px solid var(--card-border-soft);
  animation: drawerSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.sheet-bar-content.expanded {
  display: flex;
}

@keyframes drawerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sheet-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sheet-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  min-width: 0;
}

.sheet-title svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.sheet-status-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--accent-emerald-light);
  color: #065f46;
  white-space: nowrap;
  flex-shrink: 0;
}

.sheet-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.input-container {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.input-icon-svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
}

.input-container .text-input {
  width: 100%;
  padding-left: 2.35rem;
}

.sheet-button-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   12. Site Footer
   ========================================================================== */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, #faf9f4 0%, #f0eee3 100%);
  border-top: 1px solid rgba(26, 30, 26, 0.08);
  padding: 2.25rem 1.5rem;
  margin-top: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 -8px 24px -4px rgba(20, 23, 18, 0.02);
  overflow: hidden;
}

/* Subtle modern top ambient hairline highlight */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 248, 59, 0.75), transparent);
  pointer-events: none;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  width: 100%;
}

.footer-brand-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  flex: 1;
  min-width: 260px;
}

.footer-dept-title {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #141712;
  line-height: 1.3;
}

.footer-dept-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #ffffff;
  border: 1px solid rgba(26, 30, 26, 0.1);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.footer-dept-title:hover .footer-dept-icon-wrapper {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.footer-dept-logo-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.footer-sub-meta {
  font-size: 0.78rem;
  color: #636b60;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  line-height: 1.4;
}

.footer-faculty-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.65rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(26, 30, 26, 0.1);
  border-radius: var(--radius-pill);
  color: #1f241d;
  font-weight: 600;
  font-size: 0.76rem;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-faculty-link:hover {
  background: var(--lime-accent);
  color: #141712;
  border-color: rgba(20, 23, 18, 0.2);
  box-shadow: 0 2px 10px rgba(214, 248, 59, 0.4);
  transform: translateY(-1px);
  text-decoration: none;
}

.footer-visitor-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.realtime-visitor-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.46rem 1.2rem;
  background: linear-gradient(135deg, #d6f83b 0%, #c4ea27 100%);
  color: var(--lime-text);
  border: 1px solid rgba(20, 23, 18, 0.16);
  border-radius: var(--radius-pill);
  font-size: 0.79rem;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(214, 248, 59, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.realtime-visitor-pill:hover {
  background: linear-gradient(135deg, #ddfc45 0%, #cefb26 100%);
  box-shadow: 0 5px 20px rgba(214, 248, 59, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transform: translateY(-1.5px);
}

.visitor-live-group,
.visitor-total-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.visitor-pulse-dot {
  position: relative;
  display: inline-flex;
  width: 8px;
  height: 8px;
}

.pulse-core {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #141712;
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #141712;
  animation: beaconPing 2s infinite;
}

.visitor-eye-icon {
  color: #141712;
  flex-shrink: 0;
}

.visitor-stat-label {
  color: rgba(20, 23, 18, 0.75);
  font-weight: 700;
  font-size: 0.75rem;
}

.visitor-stat-value {
  color: #141712;
  font-weight: 900;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.visitor-pill-divider {
  width: 1px;
  height: 15px;
  background: rgba(20, 23, 18, 0.22);
}

.footer-credit-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex: 1;
  min-width: 200px;
}

.cyber-dev-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.15rem;
  background: #141712;
  color: #ffffff;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2), 0 0 16px rgba(214, 248, 59, 0.25);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Continuous Electric-Lime Running Light Beam */
.cyber-dev-pill::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: conic-gradient(
    transparent 0deg,
    transparent 45deg,
    rgba(214, 248, 59, 0.25) 90deg,
    var(--lime-accent) 180deg,
    rgba(214, 248, 59, 0.25) 270deg,
    transparent 315deg,
    transparent 360deg
  );
  animation: cyberRunningBorder 2.8s linear infinite;
  z-index: -2;
}

/* Inner Core to cut out border cleanly */
.cyber-dev-pill::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  background: #151814;
  border-radius: var(--radius-pill);
  z-index: -1;
  transition: background 0.2s ease;
}

.cyber-dev-pill:hover::after {
  background: #0d0f0c;
}

.cyber-dev-pill:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 24px rgba(214, 248, 59, 0.5);
  color: #ffffff;
}

@keyframes cyberRunningBorder {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.cyber-dev-text,
.cyber-bolt-icon,
.cyber-github-mini {
  position: relative;
  z-index: 2;
}

.cyber-bolt-icon {
  width: 13px;
  height: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--lime-accent);
}

.cyber-bolt-icon svg {
  width: 13px;
  height: 13px;
}

.cyber-github-mini {
  width: 14px;
  height: 14px;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cyber-dev-pill:hover .cyber-github-mini {
  opacity: 1;
  transform: scale(1.1);
}

/* ==========================================================================
   13. Empty States & Toast
   ========================================================================== */
.empty-search-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-page-subtle);
  border-radius: var(--radius-xl);
  border: 1px dashed var(--card-border);
}

.empty-icon {
  font-size: 2.2rem;
}

.empty-search-state h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.empty-search-state p {
  font-size: 0.84rem;
  color: var(--text-muted);
  max-width: 440px;
}

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.15rem;
  background: var(--card-dark);
  color: #ffffff;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-dropdown);
  font-size: 0.825rem;
  font-weight: 600;
  pointer-events: auto;
  animation: toastIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
  0% { transform: translateY(10px) scale(0.95); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.toast-dot.success {
  background: var(--lime-accent);
}

.toast-dot.error {
  background: var(--accent-rose);
}

/* ==========================================================================
   14. Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .stats-banner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0.75rem 1rem;
  }

  .brand-dept-tag {
    display: none;
  }

  .header-clock-pill {
    display: none;
  }

  .main-wrapper {
    padding: 0.85rem 0.85rem 3rem;
    gap: 0.85rem;
  }

  .batch-selector-section {
    flex-direction: column;
    align-items: stretch;
    padding: 0.65rem 0.65rem;
    gap: 0.45rem;
    border-radius: var(--radius-lg);
  }

  .batch-bar-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-right: none;
    padding-right: 0;
    font-size: 0.72rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--card-border-soft);
  }

  .batch-bar-title-left {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
  }

  .batch-swipe-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #3b4d00;
    background: rgba(214, 248, 59, 0.28);
    border: 1px solid rgba(180, 220, 20, 0.45);
    padding: 0.18rem 0.55rem;
    border-radius: var(--radius-pill);
    letter-spacing: 0.02em;
    text-transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  }

  .swipe-hint-text {
    font-size: 0.68rem;
    font-weight: 700;
    color: #3b4d00;
  }

  .swipe-arrow-animated {
    display: inline-flex;
    align-items: center;
    color: #4a6300;
    animation: cuteSwipeArrow 1.4s ease-in-out infinite;
  }

  .swipe-hand-animated {
    display: inline-block;
    font-size: 0.82rem;
    line-height: 1;
    animation: cuteSwipeHand 1.4s ease-in-out infinite;
  }

  @keyframes cuteSwipeArrow {
    0%, 100% {
      transform: translateX(2px);
      opacity: 0.65;
    }
    50% {
      transform: translateX(-3px);
      opacity: 1;
    }
  }

  @keyframes cuteSwipeHand {
    0%, 100% {
      transform: translateX(3px);
    }
    50% {
      transform: translateX(-3px);
    }
  }

  .batch-chips-grid {
    width: 100%;
    cursor: default;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 0.2rem 0;
  }

  .batch-chips-grid:active {
    cursor: default;
  }

  .batch-chips-track.batch-chips-mobile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: max-content;
    transform: none !important;
    padding: 0.1rem 0.2rem;
  }

  .batch-chips-track.batch-chips-mobile .batch-chip {
    flex: 0 0 auto;
    touch-action: manipulation;
    cursor: pointer;
  }

  /* Smooth news ticker on mobile */
  .routine-news-ticker {
    padding: 0.28rem 0.45rem;
  }

  .ticker-viewport {
    mask-image: linear-gradient(90deg, transparent 0%, black 16px, black calc(100% - 16px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 16px, black calc(100% - 16px), transparent 100%);
  }

  .ticker-group {
    gap: 0.9rem;
    padding-right: 0.9rem;
  }

  .ticker-empty-text {
    font-size: 0.78rem;
  }

  .action-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .toolbar-center-tools {
    max-width: 100%;
    width: 100%;
  }

  .toolbar-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .download-dropdown-wrapper {
    width: 100%;
  }

  .btn-download-glow {
    width: 100%;
    justify-content: center;
  }

  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .routine-view-toggle-bar {
    justify-content: center;
  }

  .day-filter-pill-group {
    width: 100%;
    justify-content: center;
  }

  .day-filter-pill-group .view-toggle-btn {
    flex: 1;
    justify-content: center;
  }

  /* Compact & aesthetic stats cards on mobile */
  .stats-banner {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.25rem;
  }

  .stat-box {
    padding: 0.6rem 0.75rem;
    border-radius: 14px;
    gap: 0.55rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  }

  .stat-extra {
    display: none !important;
  }

  .stat-watermark {
    display: block !important;
    position: absolute;
    right: -6px;
    bottom: -8px;
    pointer-events: none;
    z-index: 0;
    transform: rotate(-10deg);
  }

  .stat-watermark svg {
    width: 52px;
    height: 52px;
  }

  .stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .stat-icon svg {
    width: 16px;
    height: 16px;
  }

  .stat-value {
    font-size: 1.18rem;
    line-height: 1.1;
    font-weight: 800;
  }

  .stat-unit {
    font-size: 0.72rem;
    font-weight: 600;
  }

  .stat-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .routine-presentation-card {
    padding: 0.95rem;
    border-radius: var(--radius-lg);
  }

  .today-modal-card {
    padding: 1.15rem 1rem 0.95rem;
    max-height: calc(100dvh - 2rem);
    width: calc(100% - 1.25rem);
    max-width: 375px;
    margin: 0 auto;
    gap: 0.65rem;
    border-radius: 20px;
  }

  .today-modal-header {
    gap: 0.2rem;
    padding-right: 2rem;
  }

  .today-modal-title {
    font-size: 1.25rem;
  }

  .today-modal-subtitle {
    font-size: 0.74rem;
  }

  .welcome-batch-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.38rem;
  }

  .welcome-batch-btn {
    min-height: 48px;
    padding: 0.45rem 0.15rem 0.4rem;
    border-radius: 11px;
    gap: 0.1rem;
  }

  .welcome-batch-btn .batch-code {
    font-size: 0.88rem;
  }

  .welcome-batch-btn .batch-term-hint {
    font-size: 0.55rem;
    letter-spacing: 0.02em;
  }

  .today-classes-scroll {
    max-height: 52vh;
    gap: 0.75rem;
    padding-right: 0.15rem;
  }

  .today-items-list {
    gap: 0.75rem;
  }

  .today-class-item {
    padding: 0.9rem 1rem;
    gap: 0.45rem;
  }

  .today-course-code {
    font-size: 1rem;
  }

  .today-item-time {
    font-size: 0.76rem;
    padding: 0.22rem 0.55rem;
  }

  /* Sheet Config Drawer Mobile Alignment */
  .sheet-config-section {
    border-radius: var(--radius-lg);
  }

  .mobile-sheet-toggle-bar {
    padding: 0.8rem 1.05rem;
    font-size: 0.82rem;
  }

  .sheet-bar-content {
    padding: 1rem 1.05rem;
    gap: 0.85rem;
  }

  .sheet-bar-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .sheet-title {
    font-size: 0.82rem;
    font-weight: 700;
    white-space: normal;
    word-break: normal;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex: 1 1 auto;
    min-width: 0;
  }

  .sheet-title svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  .sheet-status-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
  }


  .sheet-input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    width: 100%;
  }

  .input-container {
    width: 100%;
    min-width: unset;
  }

  .sheet-button-group {
    width: 100%;
    display: flex;
    gap: 0.5rem;
  }

  .sheet-button-group .btn {
    flex: 1;
    justify-content: center;
    padding: 0.48rem 0.75rem;
    font-size: 0.78rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
  }

  .footer-brand-meta {
    align-items: center;
    text-align: center;
    min-width: unset;
  }

  .footer-dept-title {
    justify-content: center;
  }

  .footer-sub-meta {
    justify-content: center;
  }

  .footer-credit-group {
    justify-content: center;
    min-width: unset;
  }
}

@media (max-width: 480px) {
  .stats-banner {
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  .stat-box {
    padding: 0.5rem 0.65rem;
    border-radius: 12px;
    gap: 0.45rem;
  }

  .stat-watermark {
    right: -4px;
    bottom: -6px;
  }

  .stat-watermark svg {
    width: 44px;
    height: 44px;
  }

  .stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .stat-icon svg {
    width: 14px;
    height: 14px;
  }

  .stat-value {
    font-size: 1.05rem;
  }

  .stat-label {
    font-size: 0.58rem;
  }

  .batch-chip {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
  }

  .nav-tab-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.76rem;
  }

  .btn-today-pop {
    padding: 0.35rem 0.75rem;
    font-size: 0.76rem;
  }
}

/* ==========================================================================
   15. Print Styles
   ========================================================================== */
@media print {
  @page {
    size: A4 landscape;
    margin: 8mm;
  }

  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .no-print,
  .site-header,
  .site-footer,
  .routine-news-ticker,
  .batch-selector-section,
  .stats-banner,
  .action-toolbar,
  .routine-view-toggle-bar,
  .sheet-config-section,
  .modal-overlay,
  .toast-container {
    display: none !important;
  }

  .main-wrapper {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .routine-presentation-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .print-only-routine-header {
    display: block !important;
    margin-bottom: 0.6rem;
    text-align: center;
  }

  .print-only-routine-header h2 {
    font-family: var(--font-sans);
    font-size: 14pt;
    font-weight: 800;
    margin: 0 0 4px 0;
  }

  .table-scroll-container {
    border: 1.5px solid #000000 !important;
    box-shadow: none !important;
    overflow: visible !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .routine-grid-table {
    border-collapse: collapse !important;
    width: 100% !important;
    font-size: 8.5pt !important;
  }

  .routine-grid-table th,
  .routine-grid-table td {
    border: 1px solid #000000 !important;
    padding: 3.5pt 5pt !important;
    color: #000000 !important;
    background: #ffffff !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}
