@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #ffffff;
  /* Pure crisp white */
  --bg-secondary: #f8fafc;
  /* Slate 50 */
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-secondary-translucent: rgba(255, 255, 255, 0.85);
  --border-color: #e2e8f0;
  /* Slate 200 */
  --border-focus: #cbd5e1;
  /* Slate 300 */
  --border-glass: rgba(0, 0, 0, 0.08);

  --text-primary: #0f172a;
  /* Slate 900 */
  --text-secondary: #334155;
  /* Slate 700 */
  --text-muted: #64748b;
  /* Slate 500 */

  --primary: #2563eb;
  /* Royal Blue */
  --primary-subtle: #eff6ff;
  --secondary: #475569;
  /* Cool Slate */

  --success: #059669;
  /* Emerald */
  --success-subtle: #ecfdf5;
  --danger: #dc2626;
  /* Rose */
  --danger-subtle: #fff5f5;
  --warning: #d97706;
  /* Amber */
  --warning-subtle: #fef3c7;
  --info: #0891b2;
  /* Cyan */
  --info-subtle: #ecfeff;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --card-hover-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12), 0 0 20px rgba(37, 99, 235, 0.08);
  --hero-glow-bg: radial-gradient(circle at 50% 30%, rgba(37, 99, 235, 0.08) 0%, rgba(147, 51, 234, 0.04) 45%, transparent 70%);
  --gradient-text: linear-gradient(180deg, #0f172a 0%, #334155 100%);
  --btn-secondary-bg: rgba(15, 23, 42, 0.04);
  --btn-secondary-color: #0f172a;
  --btn-secondary-border: #cbd5e1;
}

[data-theme="dark"] {
  /** Base text colors */
  --cffy-theme-light-a0: #ffffff;
  --cffy-theme-dark-a0: #000000;

  /** Theme primary colors */
  --cffy-theme-primary-a0: #0709a8;
  --cffy-theme-primary-a10: #1234b3;
  --cffy-theme-primary-a20: #284fbe;
  --cffy-theme-primary-a30: #4067c8;
  --cffy-theme-primary-a40: #597dd1;
  --cffy-theme-primary-a50: #7393da;

  /** Theme accent colors */
  --cffy-theme-accent-a0: #a8075a;
  --cffy-theme-accent-a10: #b43269;
  --cffy-theme-accent-a20: #bf4d78;
  --cffy-theme-accent-a30: #c96488;
  --cffy-theme-accent-a40: #d37b98;
  --cffy-theme-accent-a50: #dc91a9;

  /** Theme surface colors */
  --cffy-theme-surface-a0: #000;
  --cffy-theme-surface-a10: #030303;
  --cffy-theme-surface-a20: #161616;
  --cffy-theme-surface-a30: #2e2e2e;
  --cffy-theme-surface-a40: #484848;
  --cffy-theme-surface-a50: #636363;

  /** Theme tonal surface colors */
  --cffy-theme-surface-tonal-a0: #000001;
  --cffy-theme-surface-tonal-a10: #04070e;
  --cffy-theme-surface-tonal-a20: #181c24;
  --cffy-theme-surface-tonal-a30: #2f333b;
  --cffy-theme-surface-tonal-a40: #494d54;
  --cffy-theme-surface-tonal-a50: #64686e;

  /** Success colors */
  --cffy-theme-success-a0: #7dff95;
  --cffy-theme-success-a10: #9dffac;
  --cffy-theme-success-a20: #b8ffc1;

  /** Warning colors */
  --cffy-theme-warning-a0: #ffbc5e;
  --cffy-theme-warning-a10: #ffca83;
  --cffy-theme-warning-a20: #ffd8a4;

  /** Danger colors */
  --cffy-theme-danger-a0: #ff8080;
  --cffy-theme-danger-a10: #ff9b99;
  --cffy-theme-danger-a20: #ffb5b2;

  /** Info colors */
  --cffy-theme-info-a0: #87d1ff;
  --cffy-theme-info-a10: #a1dbff;
  --cffy-theme-info-a20: #b9e4ff;

  /* Trackify Mapped Tokens */
  --bg-primary: var(--cffy-theme-surface-a0);
  --bg-secondary: var(--cffy-theme-surface-tonal-a10);
  --bg-card: var(--cffy-theme-surface-tonal-a20);
  --bg-card-subtle: rgba(255, 255, 255, 0.04);
  --bg-secondary-translucent: rgba(4, 7, 14, 0.9);
  --border-color: var(--cffy-theme-surface-a30);
  --border-focus: var(--cffy-theme-primary-a30);
  --border-glass: rgba(255, 255, 255, 0.08);

  --text-primary: var(--cffy-theme-light-a0);
  --text-secondary: var(--cffy-theme-primary-a50);
  --text-muted: var(--cffy-theme-surface-a50);

  --primary: var(--cffy-theme-primary-a30);
  --primary-subtle: rgba(64, 103, 200, 0.16);
  --accent: var(--cffy-theme-accent-a30);
  --accent-subtle: rgba(201, 100, 136, 0.16);
  --secondary: var(--cffy-theme-surface-a40);

  --success: var(--cffy-theme-success-a0);
  --success-subtle: rgba(125, 255, 149, 0.12);
  --danger: var(--cffy-theme-danger-a0);
  --danger-subtle: rgba(255, 128, 128, 0.12);
  --warning: var(--cffy-theme-warning-a0);
  --warning-subtle: rgba(255, 188, 94, 0.12);
  --info: var(--cffy-theme-info-a0);
  --info-subtle: rgba(135, 209, 255, 0.12);

  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 20px 40px -15px rgba(0, 0, 0, 0.7);
  --card-hover-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 30px 60px -15px rgba(0, 0, 0, 0.85), 0 0 20px rgba(64, 103, 200, 0.2);
  --hero-glow-bg: radial-gradient(circle at 50% 30%, rgba(64, 103, 200, 0.15) 0%, rgba(168, 7, 90, 0.06) 50%, transparent 70%);
  --gradient-text: linear-gradient(180deg, #ffffff 0%, #7393da 100%);
  --btn-secondary-bg: var(--cffy-theme-surface-a20);
  --btn-secondary-color: var(--cffy-theme-light-a0);
  --btn-secondary-border: var(--cffy-theme-surface-a30);
}

/* Global Bootstrap overrides for Dark Mode */
[data-theme="dark"] .bg-white {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .bg-light {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .text-dark {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .text-secondary {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .text-muted {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .table {
  --bs-table-bg: var(--bg-secondary) !important;
  --bs-table-striped-bg: var(--bg-primary) !important;
  --bs-table-hover-bg: var(--bg-primary) !important;
  --bs-table-border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .table th,
[data-theme="dark"] .table td {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .table thead th {
  background-color: var(--bg-primary) !important;
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .card {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .list-group-item {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .modal-content {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .dropdown-menu {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .form-floating>.form-control {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .form-select {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .nav-tabs {
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .nav-tabs .nav-link {
  color: var(--text-secondary) !important;
  background: transparent !important;
  border: none !important;
}

[data-theme="dark"] .nav-tabs .nav-link:hover {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .nav-tabs .nav-link.active {
  background-color: var(--bg-secondary) !important;
  color: var(--primary) !important;
  border-bottom: 2px solid var(--primary) !important;
}

/* Base resets and defaults */
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.015em;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Standard containers are centered; fluid layout applies within app-layout */
.app-layout .container {
  max-width: 98% !important;
  width: 98% !important;
}

/* App Header & Navigation Controls */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  min-height: 64px;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
}

.sidebar-toggle, .theme-toggle {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 8px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
  flex-shrink: 0;
  box-shadow: none;
  outline: none;
}

.sidebar-toggle:hover, .theme-toggle:hover {
  background-color: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  border-color: #2563eb;
}

.sidebar-toggle svg, .theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* Theme toggle icon switching */
[data-theme="dark"] .sun-icon {
  display: block !important;
}
[data-theme="dark"] .moon-icon {
  display: none !important;
}
[data-theme="light"] .sun-icon, :root:not([data-theme="dark"]) .sun-icon {
  display: none !important;
}
[data-theme="light"] .moon-icon, :root:not([data-theme="dark"]) .moon-icon {
  display: block !important;
}

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

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

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Unified Geometry and Tactile Feedback Tokens */
.glass-card,
.subject-table-wrapper,
.timetable-grid-wrapper,
.timetable-cell-card {
  border-radius: var(--radius-md);
}

.form-control,
.form-select,
.btn,
.btn-trackify-primary,
.btn-trackify-outline,
.btn-trackify-danger-subtle,
.btn-glow,
.subtab-link {
  border-radius: var(--radius-sm);
  transition: transform 140ms cubic-bezier(0.2, 0, 0, 1), background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.btn:active,
.btn-trackify-primary:active,
.btn-trackify-outline:active,
.btn-trackify-danger-subtle:active,
.btn-glow:active,
.quick-date-btn:active,
.mini-cal-btn:active,
.calendar-trigger-btn:active {
  transform: scale(0.97);
}

.modal-content {
  border-radius: var(--radius-lg);
}

.dropdown-menu {
  border-radius: var(--radius-md);
}

.alert,
.progress,
.progress-bar {
  border-radius: var(--radius-sm);
}

.profile-avatar-container,
.profile-avatar-container span {
  border-radius: var(--radius-pill);
}

/* Universal Pill Badges for Landing & App Pages */
.badge-pill-primary {
  background: rgba(37, 99, 235, 0.08) !important;
  color: #2563eb !important;
  border: 1px solid rgba(37, 99, 235, 0.2) !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  padding: 0.4rem 0.9rem !important;
  font-size: 0.72rem !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  letter-spacing: 0.03em !important;
}

[data-theme="dark"] .badge-pill-primary {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

.badge-pill-success {
  background: rgba(5, 150, 105, 0.08) !important;
  color: #059669 !important;
  border: 1px solid rgba(5, 150, 105, 0.2) !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  padding: 0.4rem 0.9rem !important;
  font-size: 0.72rem !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  letter-spacing: 0.03em !important;
}

[data-theme="dark"] .badge-pill-success {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

.badge-pill-purple {
  background: rgba(147, 51, 234, 0.08) !important;
  color: #7c3aed !important;
  border: 1px solid rgba(147, 51, 234, 0.2) !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  padding: 0.4rem 0.9rem !important;
  font-size: 0.72rem !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  letter-spacing: 0.03em !important;
}

[data-theme="dark"] .badge-pill-purple {
  background: rgba(168, 85, 247, 0.15) !important;
  color: #c084fc !important;
  border-color: rgba(168, 85, 247, 0.3) !important;
}

.badge-pill-muted {
  background: rgba(100, 116, 139, 0.08) !important;
  color: #475569 !important;
  border: 1px solid rgba(100, 116, 139, 0.2) !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  padding: 0.4rem 0.9rem !important;
  font-size: 0.72rem !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  letter-spacing: 0.03em !important;
}

[data-theme="dark"] .badge-pill-muted {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.glass-card,
.subject-table-wrapper,
.timetable-grid-wrapper,
.timetable-cell-card,
.dropdown-menu,
.btn-glow,
.btn-glass,
.app-sidebar,
.modal-content,
.shadow,
.shadow-sm,
.shadow-lg {
  box-shadow: none !important;
}

.glass-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  transition: border-color 80ms ease;
}

.glass-card:hover {
  border-color: var(--border-focus);
}

/* Minimalist Navbar */
.glass-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

/* Premium Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.gradient-text,
.gradient-accent-text {
  /* Remove gradients for an ultra-professional slate layout */
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  color: var(--text-primary);
}

/* Monospace font styling for statistics and metrics (Tabular) */
.mono-stat,
.percentage-val,
.credits,
.time,
.stats,
.num,
.attendance-val,
.timetable-table th,
.timetable-table td.day-cell,
.timetable-table td.break-cell,
.slot-code,
.slot-room,
.timetable-cell-card.empty-cell {
  font-family: 'IBM Plex Mono', monospace !important;
  font-variant-numeric: tabular-nums;
}

/* Minimalist Inputs */
.form-floating>.form-control {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: all 80ms ease-in-out;
}

.form-floating>.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-floating>label {
  color: var(--text-muted);
}

.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label {
  color: var(--primary);
}

.form-select {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.85rem 0.75rem;
}

.form-select:focus {
  border-color: var(--primary);
  outline: none;
}

/* Minimal Buttons with Snap Interaction */
.btn {
  transition: transform 30ms ease-out, background-color 80ms ease, border-color 80ms ease, color 80ms ease !important;
}

.btn:active {
  transform: scale(0.97) !important;
}

.btn-glow {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #ffffff;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  box-shadow: none;
}

.btn-glow::before {
  display: none;
}

.btn-glow:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.btn-glass {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  box-shadow: none;
}

.btn-glass:hover {
  background: var(--bg-primary);
  border-color: var(--border-focus);
  color: var(--text-primary);
}

/* Table Timetable Grid Layout (Spreadsheet style) */
.timetable-grid-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.timetable-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
}

.timetable-table th {
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  text-align: center;
  vertical-align: middle;
}

.timetable-table td {
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  vertical-align: middle;
  text-align: center;
  background: var(--bg-secondary);
  height: 105px;
}

.timetable-table td.day-cell {
  background: var(--bg-primary);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  width: 110px;
  border-right: 2px solid var(--border-color);
}

.timetable-table td.break-cell {
  background: var(--bg-primary);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  width: 32px;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  border-left: 2px solid var(--border-color);
  border-right: 2px solid var(--border-color);
  padding: 0;
  height: 105px;
}

/* Inner cell class block details card */
.timetable-cell-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem;
  height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  transition: all 0.15s ease;
}

.timetable-cell-card:hover {
  background: var(--bg-secondary);
  border-color: var(--border-focus);
}

.timetable-cell-card.empty-cell {
  background: transparent;
  border: 1px dashed var(--border-focus);
  justify-content: center;
  align-items: center;
  color: var(--text-muted);
  cursor: pointer;
}

.timetable-cell-card.empty-cell:hover {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

/* Badges */
.badge-present {
  background-color: var(--success-subtle);
  color: var(--success);
  border: 1px solid rgba(5, 150, 105, 0.15);
}

.badge-absent {
  background-color: var(--danger-subtle);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.15);
}

/* Alerts */
.alert {
  border-radius: 8px;
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
}

.alert-danger {
  border-left: 4px solid var(--danger) !important;
}

.alert-success {
  border-left: 4px solid var(--success) !important;
}

.alert-info {
  border-left: 4px solid var(--info) !important;
}

/* Animations */
.animate-fade-in-up {
  animation: fadeInUp 0.4s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enterprise Application Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  background-color: var(--bg-primary);
  position: relative;
}

.app-sidebar {
  width: 250px;
  background-color: var(--bg-secondary);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--border-color);
  height: 100vh;
  position: sticky;
  top: 0;
  transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  overflow: hidden;
}

@media (min-width: 769px) {
  .sidebar-collapsed .app-sidebar {
    width: 70px !important;
  }

  .sidebar-collapsed .sidebar-logo {
    padding: 1.5rem 0 !important;
    justify-content: center !important;
  }

  .sidebar-collapsed .sidebar-logo img {
    content: url("/assets/images/favicon.webp") !important;
    height: 28px !important;
  }

  .sidebar-collapsed .sidebar-link {
    justify-content: center !important;
    padding: 0.75rem 0 !important;
    gap: 0 !important;
  }

  .sidebar-collapsed .sidebar-link span {
    display: none !important;
  }
}

.sidebar-logo {
  padding: 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-menu {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex-grow: 1;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 80ms ease;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 80ms ease;
}

.profile-avatar-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-container span {
  border: 2px solid var(--border-color) !important;
  transition: all 80ms ease !important;
}

.app-header-profile:hover .profile-avatar-container span {
  transform: scale(1.05);
}

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

.sidebar-link.active {
  background-color: var(--primary-subtle) !important;
  color: var(--primary) !important;
  font-weight: 600;
}

.sidebar-link.logout-link {
  color: #ef4444;
  margin-top: auto;
}

.sidebar-link.logout-link:hover {
  background-color: #7f1d1d;
  color: #ffffff;
}

/* Horizontal Sub-tabs Navigation for Attendance Section */
.scrollable-subtabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  gap: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
}

.subtab-link {
  padding: 0.75rem 0.25rem;
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: all 80ms ease;
  font-size: 0.9rem;
  white-space: nowrap;
}

.subtab-link:hover {
  color: var(--text-primary);
}

.subtab-link.active {
  color: var(--primary) !important;
  border-bottom-color: var(--primary) !important;
}

/* Section Separator */
.section-separator {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.35rem;
  margin-bottom: 1.25rem;
  text-transform: none;
  letter-spacing: -0.01em;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.app-main-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-width: 0;
  min-height: 100vh;
  background-color: var(--bg-primary);
}

.app-header {
  height: 70px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  flex-shrink: 0;
}

.app-header-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.app-header-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-content {
  padding: 2rem;
  flex-grow: 1;
}

/* Adjust general cards inside app layout */
.app-content .glass-card {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Responsive Overrides for Mobile-Friendliness */
@media (max-width: 768px) {

  /* Switch app layout to stacked columns */
  .app-layout {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    width: 100%;
    overflow: visible;
  }

  /* Transform sidebar into a mobile bottom navigation bar (flat, non-floating) */
  .app-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100% !important;
    height: 60px !important;
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color) !important;
    border-right: none !important;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .sidebar-logo {
    display: none !important;
  }

  .sidebar-menu {
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
    height: 100%;
    overflow: visible !important;
  }

  .sidebar-link {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.25rem 0.25rem 0 0.25rem !important;
    font-size: 0.65rem !important;
    font-weight: 600 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--text-muted) !important;
    flex-grow: 1;
    height: 100%;
    gap: 0.15rem !important;
    border-top: 3px solid transparent !important;
    border-left: none !important;
    transition: all 80ms ease;
  }

  .sidebar-link.active {
    color: var(--primary) !important;
    background: transparent !important;
    border-top-color: var(--primary) !important;
  }

  .sidebar-link svg {
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor !important;
    stroke-width: 2px !important;
  }

  .sidebar-link.logout-link {
    display: none !important;
  }

  /* Adjust main wrapper to fill screen and accommodate bottom navbar */
  .app-main-wrapper {
    height: auto !important;
    min-height: 100vh;
    padding-bottom: 84px !important;
    width: 100%;
  }

  .app-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--bg-secondary-translucent) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: 60px !important;
    padding: 0 1.25rem !important;
    border-bottom: 1px solid var(--border-color) !important;
  }

  .app-header-title {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
  }

  .app-content {
    padding: 1.25rem 1rem !important;
  }

  /* Stack columns cleanly in content area */
  .row>* {
    margin-bottom: 1rem;
  }

  .row>*:last-child {
    margin-bottom: 0;
  }

  /* Scale charts correctly */
  canvas {
    max-width: 100% !important;
  }

  /* Fix tables on mobile view */
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Flat Apple-segmented subtabs navigation for mobile viewports */
  .scrollable-subtabs {
    background-color: var(--bg-primary);
    padding: 0.25rem;
    gap: 0.25rem !important;
    border-bottom: none !important;
    margin-bottom: 1.25rem;
    overflow-x: visible;
  }

  .subtab-link {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.25rem !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    border-bottom: none !important;
    color: var(--text-muted) !important;
    transition: all 80ms ease;
  }

  .subtab-link.active {
    background-color: var(--bg-secondary) !important;
    color: var(--primary) !important;
    font-weight: 800 !important;
    border-bottom-color: transparent !important;
  }

  /* History Logs Table Mobile Optimizations */
  .table th:nth-child(4),
  .table td:nth-child(4) {
    display: none !important; /* Hide Remarks on mobile */
  }

  .table th, .table td {
    padding: 0.75rem 0.5rem !important;
    font-size: 0.75rem !important;
  }

  .table td .btn {
    padding: 0.25rem 0.4rem !important;
    font-size: 0.65rem !important;
  }

  /* Attendance Card Mobile Container Containment */
  .glass-card {
    padding: 1rem 0.75rem !important;
    max-width: 100% !important;
  }

  .class-attendance-card {
    max-width: 100% !important;
  }
}

/* Compulsively normalize logo scaling between light/dark themes to account for native padding differences */
[data-theme="dark"] img[src*="logo_dark.webp"] {
  height: 38px !important;
  margin-top: -3px;
}

[data-theme="dark"] img.mobile-header-logo {
  height: 38px !important;
  margin-top: -3px;
}

/* Ensure the header profile avatar is a perfect circular symbol, overriding bootstrap badge styles */
.profile-avatar-container span {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Rolling Days Calendar Strip (Apple/Stripe Style Extended Sliding Track - Full Width Fluid Layout) */
.day-strip-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 4px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  width: 100%;
}

.day-strip-container::-webkit-scrollbar {
  display: none; /* Hide scrollbar for a clean Apple look */
}

.day-strip-card {
  flex: 1 0 58px;
  min-width: 58px;
  max-width: 95px;
  height: 76px;
  scroll-snap-align: center;
  border-radius: 14px !important;
  border: 1.5px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
  padding: 5px 4px 4px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
  position: relative;
}

.day-strip-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

/* Mild Status Tint Colors for Rolling Date Strip Cards */
.day-strip-card.strip-present {
  background-color: rgba(16, 185, 129, 0.09) !important;
  border-color: rgba(16, 185, 129, 0.38) !important;
}
.day-strip-card.strip-present .day-num-lbl {
  color: #059669;
}
[data-theme="dark"] .day-strip-card.strip-present .day-num-lbl {
  color: #34d399;
}

.day-strip-card.strip-pending {
  background-color: rgba(245, 158, 11, 0.09) !important;
  border-color: rgba(245, 158, 11, 0.38) !important;
}
.day-strip-card.strip-pending .day-num-lbl {
  color: #d97706;
}
[data-theme="dark"] .day-strip-card.strip-pending .day-num-lbl {
  color: #fbbf24;
}

.day-strip-card.strip-absent {
  background-color: rgba(239, 68, 68, 0.09) !important;
  border-color: rgba(239, 68, 68, 0.38) !important;
}
.day-strip-card.strip-absent .day-num-lbl {
  color: #dc2626;
}
[data-theme="dark"] .day-strip-card.strip-absent .day-num-lbl {
  color: #f87171;
}

.day-strip-card.strip-holiday {
  background-color: rgba(59, 130, 246, 0.11) !important;
  border-color: rgba(59, 130, 246, 0.40) !important;
}
.day-strip-card.strip-holiday .day-num-lbl {
  color: #2563eb;
}
[data-theme="dark"] .day-strip-card.strip-holiday .day-num-lbl {
  color: #60a5fa;
}

.day-strip-card.strip-od {
  background-color: rgba(168, 85, 247, 0.09) !important;
  border-color: rgba(168, 85, 247, 0.38) !important;
}
.day-strip-card.strip-od .day-num-lbl {
  color: #9333ea;
}
[data-theme="dark"] .day-strip-card.strip-od .day-num-lbl {
  color: #c084fc;
}

.day-strip-card.strip-mixed {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.10) 0%, rgba(239, 68, 68, 0.10) 100%) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
}
.day-strip-card.strip-mixed .day-num-lbl {
  color: var(--text-primary);
}

.day-strip-card.strip-weekend {
  background-color: rgba(148, 163, 184, 0.06) !important;
  border: 1.5px dashed rgba(148, 163, 184, 0.42) !important;
  opacity: 0.88;
}
.day-strip-card.strip-weekend:hover {
  border-color: var(--border-focus) !important;
  opacity: 1;
}
.day-strip-card.strip-weekend .day-num-lbl {
  color: var(--text-secondary);
}

.strip-off-label {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  opacity: 0.75;
  line-height: 1;
  margin-top: 3px;
}

/* Active / Selected Card State */
.day-strip-card.active-day-card {
  outline: 2.5px solid var(--primary) !important;
  outline-offset: 1.5px;
  transform: scale(1.05);
  box-shadow: 0 6px 18px -3px rgba(37, 99, 235, 0.25) !important;
}

.day-strip-card .day-month-lbl {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
  line-height: 1;
  margin-bottom: 2px;
}

.day-strip-card .day-name-lbl {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
  line-height: 1;
  margin-top: 2px;
}

.day-strip-card .day-num-lbl {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  font-family: 'Outfit', sans-serif;
}

/* Micro Status Indicator Dot inside Date Card */
.strip-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-top: 3px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.strip-status-dot.dot-green { background-color: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.5); }
.strip-status-dot.dot-yellow { background-color: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.5); }
.strip-status-dot.dot-red { background-color: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.5); }
.strip-status-dot.dot-blue { background-color: #3b82f6; box-shadow: 0 0 6px rgba(59, 130, 246, 0.5); }
.strip-status-dot.dot-purple { background-color: #a855f7; box-shadow: 0 0 6px rgba(168, 85, 247, 0.5); }
.strip-status-dot.dot-muted { background-color: #94a3b8; opacity: 0.55; }

/* Plain, Borderless Vacation & Holiday Presentation */
.holiday-lottie-container {
  width: clamp(240px, 28vw, 360px);
  height: clamp(180px, 21vw, 265px);
  max-width: 100%;
  margin: 0 auto 0.75rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.25s ease, height 0.25s ease;
}

.holiday-lottie-container svg {
  width: 100% !important;
  height: 100% !important;
  max-height: 100%;
  object-fit: contain;
}

.holiday-vacation-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 1.5rem 0.5rem !important;
  max-width: 580px;
  margin: 0 auto;
}

@media (max-width: 576px) {
  .holiday-lottie-container {
    width: 240px;
    height: 180px;
  }
  .holiday-vacation-card {
    padding: 1rem 0.25rem !important;
  }
}

/* Custom Calendar Icon Trigger */
.calendar-trigger-btn {
  width: 48px;
  height: 70px;
  border-radius: 12px !important;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
}

.calendar-trigger-btn:hover {
  border-color: var(--border-focus);
  background-color: var(--bg-primary);
}

.calendar-trigger-btn input[type="date"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

/* Toast Spring Animations (Apple / Stripe HUD Style) */
@keyframes toastSpringIn {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastSpringOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
  }
}

/* Apple-Style Segmented Pill Control with Distinct Visual Affordance */
.apple-segmented-pill {
  display: inline-flex;
  align-items: center;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 9999px !important;
  padding: 3px;
  gap: 1px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.segmented-item {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 9999px !important;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.32, 0.72, 0, 1);
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Visual Dot Indicators */
.seg-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.seg-dot-present {
  background-color: #10b981;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.seg-dot-absent {
  background-color: #ef4444;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.2);
}

.seg-dot-od {
  background-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

/* Distinct Hover Affordances */
.seg-item-present:hover {
  color: #059669 !important;
  background-color: rgba(16, 185, 129, 0.08) !important;
}

.seg-item-absent:hover {
  color: #dc2626 !important;
  background-color: rgba(239, 68, 68, 0.08) !important;
}

.seg-item-od:hover {
  color: #2563eb !important;
  background-color: rgba(37, 99, 235, 0.08) !important;
}

[data-theme="dark"] .seg-item-present:hover {
  color: #7dff95 !important;
  background-color: rgba(16, 185, 129, 0.15) !important;
}

[data-theme="dark"] .seg-item-absent:hover {
  color: #ff8080 !important;
  background-color: rgba(239, 68, 68, 0.15) !important;
}

[data-theme="dark"] .seg-item-od:hover {
  color: #87d1ff !important;
  background-color: rgba(37, 99, 235, 0.15) !important;
}

.segmented-item:active {
  transform: scale(0.96);
}

/* Active Highlight States */
.segmented-item.active-present {
  background-color: var(--success) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35) !important;
}

.segmented-item.active-present .seg-dot {
  background-color: #ffffff !important;
}

.segmented-item.active-absent {
  background-color: var(--danger) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35) !important;
}

.segmented-item.active-absent .seg-dot {
  background-color: #ffffff !important;
}

.segmented-item.active-od {
  background-color: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35) !important;
}

.segmented-item.active-od .seg-dot {
  background-color: #ffffff !important;
}

/* Edit Pencil Icon Button on Card */
.edit-pencil-btn {
  opacity: 0.6;
  transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
  cursor: pointer;
  background: transparent;
}

.edit-pencil-btn:hover {
  opacity: 1;
  color: var(--primary) !important;
  transform: scale(1.12);
}

/* ==========================================================================
   MULTI-PRODUCT STUDENT SUITE & PRODUCT DESCRIPTION STYLES
   ========================================================================== */

.student-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px !important;
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

/* Product Bento Grid Cards */
.product-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: 24px !important;
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.03) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

[data-theme="dark"] .product-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 20px 40px -12px rgba(37, 99, 235, 0.12), 0 4px 16px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="dark"] .product-card:hover {
  box-shadow: 0 20px 40px -12px rgba(59, 130, 246, 0.25), 0 4px 16px rgba(0, 0, 0, 0.6) !important;
}

.product-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.product-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 16px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.product-icon-trackify {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.product-icon-inks {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.18);
}

.product-icon-grades {
  background: rgba(245, 158, 11, 0.08);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.product-icon-admin {
  background: rgba(147, 51, 234, 0.08);
  color: #9333ea;
  border: 1px solid rgba(147, 51, 234, 0.18);
}

.product-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px !important;
  text-transform: uppercase;
}

.tag-live {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tag-beta {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.tag-preview {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Feature Checklist inside product cards */
.product-features {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 1.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

.product-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.product-features li svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  color: var(--primary);
}

/* Dual Card Action Buttons */
.product-card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
  align-items: center;
}

.btn-explore {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.65rem 1.25rem;
  border-radius: 9999px !important;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-explore:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.btn-launch-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.65rem 1.25rem;
  border-radius: 9999px !important;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-launch-sm:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

/* Product Description Page Styles */
.product-detail-hero {
  padding: 4.5rem 0 3rem 0;
  border-bottom: 1px solid var(--border-color);
  background: radial-gradient(circle at 50% 0%, var(--primary-subtle), transparent 70%);
}

.detail-feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px !important;
  padding: 1.75rem;
  height: 100%;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.detail-feature-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.workflow-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.step-number {
  width: 38px;
  height: 38px;
  border-radius: 50% !important;
  background: var(--primary);
  color: #ffffff;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Feature Spotlight Tabs */
.spotlight-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.65rem 1.35rem;
  border-radius: 9999px !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.spotlight-tab-btn.active {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .spotlight-tab-btn.active {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* ==========================================
   APPLE DESIGN SYSTEM & LANDING PAGE STYLES
   ========================================== */

/* Apple Typography & Optical Tracking */
.apple-display-title {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(2.75rem, 5.5vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--text-primary);
}

.apple-headline {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
}

.apple-subheadline {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-muted);
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.apple-gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.apple-blue-gradient-text {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #9333ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .apple-blue-gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.apple-emerald-gradient-text {
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Brand Logo Image Adaptivity */
.brand-logo-img {
  content: url('/assets/images/logo_light.webp');
}

[data-theme="dark"] .brand-logo-img {
  content: url('/assets/images/logo_dark.webp');
}

/* Apple Frosted Glass Header */
.apple-glass-nav {
  background: var(--bg-secondary-translucent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Apple Floating Cards & Glass Surfaces */
.apple-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

.apple-card:hover {
  transform: translateY(-6px) scale(1.005);
  box-shadow: var(--card-hover-shadow);
  border-color: rgba(59, 130, 246, 0.35);
}

/* Apple Buttons & Physical Press States */
.apple-btn-primary {
  background: #2563eb;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.25);
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}

.apple-btn-primary:hover {
  background: #1d4ed8;
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.apple-btn-primary:active {
  transform: scale(0.97);
  transition: transform 0.05s ease;
}

.apple-btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-color) !important;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  border: 1px solid var(--btn-secondary-border);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  backdrop-filter: blur(12px);
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease;
}

.apple-btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
  transform: scale(1.03);
}

.apple-btn-secondary:active {
  transform: scale(0.97);
  transition: transform 0.05s ease;
}

/* Apple Comparison Spec Table */
.apple-spec-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.apple-spec-table th, .apple-spec-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
  color: var(--text-primary);
}

.apple-spec-table th {
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
}

.apple-spec-table tr:last-child td {
  border-bottom: none;
}

/* Scroll Animation Helper */
.apple-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Liquid Glass Refraction (Inner 1px highlight shadow) */
.liquid-glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-glass);
  box-shadow: var(--card-shadow);
  border-radius: 28px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.liquid-glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--card-hover-shadow);
}

/* Tactile Active Press Animation */
.apple-btn-primary:active, .apple-btn-secondary:active {
  transform: scale(0.98) !important;
  transition: transform 0.05s ease !important;
}

/* Live Pulse Dot */
.pulse-dot {
  display: inline-block;
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
  animation: pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Mobile Overrides */
@media (max-width: 767.98px) {
  .apple-display-title {
    font-size: clamp(2.2rem, 8vw, 3rem);
    text-align: left !important;
  }
  .apple-subheadline {
    text-align: left !important;
  }
}

/* ==========================================================================
   TRACKIFY CALENDAR & ATTENDANCE STATUS SYSTEM
   ========================================================================== */

.calendar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Month Summary Bento Grid */
.calendar-summary-bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.calendar-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.calendar-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.08);
  border-color: var(--border-focus);
}

.calendar-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}

.calendar-stat-card.stat-present::before { background: #10b981; }
.calendar-stat-card.stat-medical::before { background: #f97316; }
.calendar-stat-card.stat-pending::before { background: #f59e0b; }
.calendar-stat-card.stat-absent::before { background: #ef4444; }
.calendar-stat-card.stat-holiday::before { background: #3b82f6; }
.calendar-stat-card.stat-rate::before { background: var(--primary); }

.segmented-item.active-ml {
  background: #f97316 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.35);
}

.ring-orange { border-color: rgba(249, 115, 22, 0.4) !important; }

.calendar-stat-val {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
}

.calendar-stat-lbl {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Calendar Card & Controls */
.calendar-main-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  overflow: hidden;
}

.calendar-header-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.calendar-month-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.calendar-month-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  min-width: 190px;
}

.cal-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cal-nav-btn:hover {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}

.cal-nav-btn:active {
  transform: scale(0.95);
}

/* Calendar Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

.calendar-day-head {
  padding: 0.5rem 0.25rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.calendar-day-head.weekend-head {
  color: #94a3b8;
}

.calendar-cell {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  min-height: 86px;
  padding: 0.6rem 0.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  user-select: none;
}

.calendar-cell:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 18px -4px rgba(37, 99, 235, 0.12);
  z-index: 2;
}

.calendar-cell.is-selected {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px var(--primary) !important;
}

.calendar-cell.is-today {
  background: var(--primary-subtle) !important;
  border-color: var(--primary) !important;
}

.calendar-cell.is-today .cell-date-num {
  background: var(--primary);
  color: #ffffff;
  border-radius: 8px;
  padding: 0.1rem 0.45rem;
  font-weight: 800;
}

.calendar-cell.is-empty {
  opacity: 0.35;
  background: transparent;
  border-color: transparent;
  cursor: default;
  pointer-events: none;
}

.calendar-cell.is-holiday {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.25);
}

.calendar-cell.is-weekend {
  opacity: 0.75;
}

/* Date Number and Indicators */
.cell-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.cell-date-num {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.cell-bottom-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
}

.dots-container {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* Color Status Dots & Rings */
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
}

.dot-green { background-color: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
.dot-yellow { background-color: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); }
.dot-red { background-color: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }
.dot-blue { background-color: #3b82f6; box-shadow: 0 0 8px rgba(59, 130, 246, 0.5); }
.dot-purple { background-color: #a855f7; box-shadow: 0 0 8px rgba(168, 85, 247, 0.5); }
.dot-orange { background-color: #f97316; box-shadow: 0 0 8px rgba(249, 115, 22, 0.5); }
.dot-future { background-color: #cbd5e1; box-shadow: none; }

/* Status Ring around Date Cells */
.ring-green { border-color: rgba(16, 185, 129, 0.4) !important; }
.ring-yellow { border-color: rgba(245, 158, 11, 0.5) !important; }
.ring-red { border-color: rgba(239, 68, 68, 0.4) !important; }
.ring-blue { border-color: rgba(59, 130, 246, 0.4) !important; }
.ring-mixed {
  border-color: rgba(245, 158, 11, 0.5) !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(239, 68, 68, 0.06) 100%) !important;
}

/* Status Pill / Chip inside Cell */
.cell-chip {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
  line-height: 1.2;
}

.chip-green { background: rgba(16, 185, 129, 0.12); color: #059669; }
.chip-yellow { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.chip-red { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.chip-blue { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.chip-purple { background: rgba(168, 85, 247, 0.12); color: #9333ea; }
.chip-orange { background: rgba(249, 115, 22, 0.12); color: #ea580c; }
.chip-muted { background: rgba(100, 116, 139, 0.12); color: #64748b; }

[data-theme="dark"] .chip-green { color: #34d399; }
[data-theme="dark"] .chip-yellow { color: #fbbf24; }
[data-theme="dark"] .chip-red { color: #f87171; }
[data-theme="dark"] .chip-blue { color: #60a5fa; }
[data-theme="dark"] .chip-purple { color: #c084fc; }
[data-theme="dark"] .chip-orange { color: #fb923c; }

/* Legend Bar */
.calendar-legend-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  margin-top: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ==========================================================================
   INTERACTIVE DAY DETAILS INSPECTOR DRAWER
   ========================================================================== */

.day-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.day-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.day-drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 440px;
  max-width: 92vw;
  height: 100vh;
  background: var(--bg-primary);
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.15);
  z-index: 1060;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.day-drawer-backdrop.is-open .day-drawer-panel {
  transform: translateX(0);
}

.day-drawer-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-secondary);
}

.day-drawer-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.day-drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Period Cards in Drawer */
.period-schedule-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.period-schedule-card:hover {
  border-color: var(--border-focus);
}

/* Mobile Layout Tweaks */
@media (max-width: 768px) {
  .calendar-cell {
    min-height: 68px;
    padding: 0.4rem 0.35rem;
    border-radius: 10px;
  }
  .cell-date-num {
    font-size: 0.78rem;
  }
  .cell-chip {
    display: none; /* Hide text chip on mobile to preserve grid cleanliness, show dots */
  }
  .status-dot {
    width: 7px;
    height: 7px;
  }
  .calendar-month-title {
    font-size: 1.15rem;
    min-width: 150px;
  }
  .calendar-legend-bar {
    gap: 0.75rem;
    padding: 0.75rem;
  }
  .legend-item {
    font-size: 0.7rem;
  }
}

/* ==========================================================================
   Apple-Style Custom Color-Coded Date Picker Popover
   ========================================================================== */
.custom-datepicker-wrapper {
  position: relative;
  display: inline-block;
}

.custom-datepicker-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--bg-secondary);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 1.15rem;
  z-index: 1050;
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  animation: popoverFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

.custom-datepicker-popover.is-open {
  display: flex;
}

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

.mini-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.mini-cal-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.mini-cal-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mini-cal-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.mini-cal-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: scale(1.05);
}

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

.mini-cal-day-head {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  padding: 4px 0;
}

.mini-cal-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  border: 1.5px solid transparent;
  user-select: none;
}

.mini-cal-cell:hover:not(.is-empty) {
  background: rgba(37, 99, 235, 0.08);
  transform: scale(1.08);
}

.mini-cal-cell.is-empty {
  cursor: default;
}

.mini-cell-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.mini-cal-cell.is-weekend .mini-cell-date {
  color: var(--text-secondary);
  opacity: 0.75;
}

.mini-cal-cell.is-today {
  border-color: var(--primary) !important;
  font-weight: 800;
}

.mini-cal-cell.is-today .mini-cell-date {
  color: var(--primary);
}

.mini-cal-cell.is-selected {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.mini-cal-cell.is-selected .mini-cell-date {
  color: #ffffff !important;
}

.mini-cal-cell.is-selected .mini-dot {
  background-color: #ffffff !important;
  box-shadow: none !important;
}

/* Status Rings for Mini Calendar */
.mini-cal-cell.ring-green:not(.is-selected) {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.06);
}
.mini-cal-cell.ring-yellow:not(.is-selected) {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.06);
}
.mini-cal-cell.ring-red:not(.is-selected) {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.06);
}
.mini-cal-cell.ring-blue:not(.is-selected) {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.08);
}
.mini-cal-cell.ring-purple:not(.is-selected) {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.06);
}
.mini-cal-cell.ring-mixed:not(.is-selected) {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(239, 68, 68, 0.08) 100%);
}

/* Mini Dots in Cell */
.mini-cell-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-top: 2px;
  min-height: 4px;
}

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

.mini-dot.dot-green { background-color: #10b981; }
.mini-dot.dot-yellow { background-color: #f59e0b; }
.mini-dot.dot-red { background-color: #ef4444; }
.mini-dot.dot-blue { background-color: #3b82f6; }
.mini-dot.dot-purple { background-color: #a855f7; }

/* Micro Legend */
.mini-cal-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-secondary);
  padding: 0.4rem 0.2rem 0;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
}

.mini-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mini-cal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.35rem;
}

/* =========================================================================
   Unified Component & Button Design System Tokens
   ========================================================================= */

/* 1. Primary Action Button */
.btn-trackify-primary {
  background-color: var(--primary, #2563eb);
  color: #ffffff !important;
  border: 1px solid var(--primary, #2563eb);
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.4rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  text-decoration: none;
  cursor: pointer;
}
.btn-trackify-primary:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff !important;
}

/* 2. Secondary / Outline Glass Button */
.btn-trackify-outline {
  background-color: var(--bg-card-subtle, rgba(255, 255, 255, 0.05));
  color: var(--text-secondary, #334155) !important;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.4rem 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  text-decoration: none;
  cursor: pointer;
}
.btn-trackify-outline:hover {
  border-color: var(--primary, #2563eb);
  color: var(--primary, #2563eb) !important;
  background-color: rgba(37, 99, 235, 0.04);
}

/* 3. Subtle Danger Button */
.btn-trackify-danger-subtle {
  background: transparent;
  color: var(--danger, #dc2626) !important;
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
  text-decoration: none;
  cursor: pointer;
}
.btn-trackify-danger-subtle:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: var(--danger, #dc2626);
}

/* 4. Ghost Action Button */
.btn-trackify-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: color 0.15s ease, background-color 0.15s ease;
  text-decoration: none;
  cursor: pointer;
}
.btn-trackify-ghost:hover {
  color: var(--text-primary, #0f172a);
  background: var(--bg-card-subtle, rgba(0, 0, 0, 0.04));
}

/* 5. Ghost Icon Button */
.btn-trackify-ghost-icon {
  background: transparent;
  border: none;
  padding: 6px;
  border-radius: 6px;
  color: var(--text-muted, #64748b);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background-color 0.15s ease;
  cursor: pointer;
}
.btn-trackify-ghost-icon:hover {
  color: var(--text-primary, #0f172a);
  background-color: var(--bg-card-subtle, rgba(0, 0, 0, 0.04));
}

/* Preview Color Chips */
.preview-chip-present { background: rgba(5, 150, 105, 0.1); color: #059669 !important; border: 1px solid rgba(5, 150, 105, 0.3); }
.preview-chip-pending { background: rgba(217, 119, 6, 0.1); color: #d97706 !important; border: 1px solid rgba(217, 119, 6, 0.3); }
.preview-chip-absent  { background: rgba(220, 38, 38, 0.1); color: #dc2626 !important; border: 1px solid rgba(220, 38, 38, 0.3); }
.preview-chip-holiday { background: rgba(37, 99, 235, 0.1); color: #2563eb !important; border: 1px solid rgba(37, 99, 235, 0.3); }
.preview-chip-od      { background: rgba(147, 51, 234, 0.1); color: #9333ea !important; border: 1px solid rgba(147, 51, 234, 0.3); }
.preview-chip-off     { background: rgba(148, 163, 184, 0.1); color: #64748b !important; border: 1px dashed rgba(148, 163, 184, 0.45); }

/* Staggered Card Reveal Animation */
@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-card-reveal {
  animation: cardReveal 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Accessibility: Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Universal Skeleton Shimmer Loading States */
.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-secondary, #f8fafc) 0%,
    var(--border-color, #e2e8f0) 50%,
    var(--bg-secondary, #f8fafc) 100%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite ease-in-out;
  border-radius: 6px;
}

[data-theme="dark"] .skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.09) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 200% 100%;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}