/* ==========================================================================
   ACPAS Event Management System - Official Theme & Styling
   Ananda College Photographic Art Society • Founded 1946 (80 Years)
   Design System: Whitish & Warm Ivory Editorial, Ananda Crimson, Champagne Gold
   Synchronized with: Oculus 2026 & ACPAS Online (acpasonline.com) Design Systems
   ========================================================================== */

:root {
  /* Proposal-Accurate Palette: Crisp White, Warm Ivory, Neutral Gray & Ananda Crimson */
  --bg-app: #FAF7F2;
  --bg-body: #FAF7F2;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F9FAFB;
  --bg-card-subtle: #F3F4F6;
  --bg-input: #FFFFFF;
  --bg-modal: #FFFFFF;

  /* Ananda Crimson Spectrum */
  --primary: #7A1523;
  --primary-dark: #580E17;
  --primary-light: #9B1C2E;
  --primary-tint: rgba(122, 21, 35, 0.05);
  --primary-glow: rgba(122, 21, 35, 0.14);

  /* Champagne Gold Accents */
  --gold: #C5A059;
  --gold-hover: #B89248;
  --gold-dark: #967425;
  --gold-soft: rgba(197, 160, 89, 0.12);
  --gold-glow: 0 4px 16px rgba(197, 160, 89, 0.18);

  /* Neutral Executive Grays */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Borders & Dividers */
  --border-subtle: #E5E7EB;
  --border-strong: #D1D5DB;
  --border-maroon: rgba(122, 21, 35, 0.22);
  --border-gold: rgba(197, 160, 89, 0.4);

  /* High Legibility Professional Typography */
  --text-main: #111827;
  --text-heading: #0F172A;
  --text-sub: #374151;
  --text-muted: #6B7280;
  --text-maroon: #7A1523;
  --text-gold: #967425;

  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Luxury Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 25px -3px rgba(122, 21, 35, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-luxury: 0 16px 40px -10px rgba(122, 21, 35, 0.08);

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(ellipse 85% 55% at 50% -12%, rgba(122, 21, 35, 0.09) 0%, transparent 65%),
    radial-gradient(circle 650px at 10% 20%, rgba(197, 160, 89, 0.08) 0%, transparent 55%),
    radial-gradient(circle 750px at 90% 42%, rgba(122, 21, 35, 0.06) 0%, transparent 60%);
  background-attachment: fixed;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--primary-light);
}

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

/* Layout Container */
.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Glassmorphic Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: background var(--transition-fast);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-block {
  display: flex;
  align-items: center;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.05));
}

/* Nav Menu */
.site-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}

.nav-item a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-sub);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.nav-item a:hover {
  color: var(--primary);
  background: rgba(122, 21, 35, 0.05);
}

.nav-item.active a {
  color: var(--primary);
  background: rgba(122, 21, 35, 0.08);
  font-weight: 700;
}

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

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 8px;
}

/* Buttons & Tactile UI Primitives */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition-fast);
  user-select: none;
  position: relative;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #901A2B 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(122, 21, 35, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(122, 21, 35, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #8E1727 0%, #A32034 100%);
  box-shadow: 0 6px 18px rgba(122, 21, 35, 0.32);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(1px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #D4AF37 100%);
  color: #111827;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(197, 160, 89, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(197, 160, 89, 0.4);
}
.btn-gold:hover {
  background: linear-gradient(135deg, #D4AF37 0%, #DEC065 100%);
  box-shadow: 0 6px 20px rgba(197, 160, 89, 0.35);
  transform: translateY(-1px);
}
.btn-gold:active {
  transform: translateY(1px);
}

.btn-outline {
  background: #FFFFFF;
  color: var(--text-sub);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover {
  background: #F9FAFB;
  color: var(--text-main);
  border-color: var(--gray-400);
}

.btn-danger {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FCA5A5;
}
.btn-danger:hover {
  background: #DC2626;
  color: #ffffff;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}
.btn-lg {
  padding: 13px 26px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

/* Hero Section */
.hero-section {
  padding: 48px 0 32px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  background: rgba(122, 21, 35, 0.06);
  border: 1px solid rgba(122, 21, 35, 0.2);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: #111827;
  max-width: 860px;
  margin: 0 auto 16px;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--primary) 0%, #C5A059 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* Quick Stats Bar */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 36px;
}

.stat-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.stat-card:hover {
  background: #FFFFFF;
  border-color: var(--border-maroon);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: rgba(122, 21, 35, 0.08);
  color: var(--primary);
  border: 1px solid rgba(122, 21, 35, 0.18);
}
.stat-icon.gold {
  background: rgba(197, 160, 89, 0.12);
  color: var(--gold-dark);
  border-color: rgba(197, 160, 89, 0.35);
}

.stat-info .stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text-heading);
  line-height: 1.1;
}
.stat-info .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

/* Main Bento Grid & Split Panes */
.app-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  margin-bottom: 60px;
  align-items: start;
  min-width: 0;
}

@media (max-width: 1024px) {
  .app-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Calendar Card */
.calendar-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  min-width: 0;
  max-width: 100%;
}

/* Calendar Header Controls */
.cal-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

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

.cal-month-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-heading);
  min-width: 220px;
  margin: 0;
  line-height: 1;
}

.cal-nav-btn {
  background: #F9FAFB;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.cal-nav-btn:hover {
  background: #F3F4F6;
  border-color: var(--border-strong);
}

.view-mode-tabs {
  display: flex;
  background: #F3F4F6;
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.view-tab {
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}
.view-tab.active {
  background: #FFFFFF;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  font-weight: 700;
}

/* Filter Tags Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  flex: 1;
  min-width: 280px;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  background: #F9FAFB;
  border: 1px solid var(--border-subtle);
  color: var(--text-sub);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.filter-pill:hover, .filter-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.search-input-wrap {
  position: relative;
  min-width: 250px;
  flex-shrink: 0;
}
.search-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 36px;
  padding: 0 14px 0 36px;
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  transition: border var(--transition-fast), box-shadow var(--transition-fast);
}
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122, 21, 35, 0.1);
}

/* Calendar Grid */
.cal-grid-header {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

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

.cal-day-cell {
  min-height: 110px;
  background: #FFFFFF;
  border: 1px solid #F1F5F9;
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.02);
}
.cal-day-cell:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}
.cal-day-cell.other-month {
  opacity: 0.35;
  background: #F9FAFB;
}
.cal-day-cell.today {
  border: 2px solid var(--primary);
  background: rgba(122, 21, 35, 0.02);
}
.cal-day-cell.today .day-number {
  color: var(--primary);
  font-weight: 800;
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.day-number {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-sub);
}
.day-event-count {
  font-size: 0.68rem;
  background: #F3F4F6;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-weight: 700;
}

.day-events-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.cal-event-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: rgba(122, 21, 35, 0.06);
  color: var(--primary);
  border: 1px solid rgba(122, 21, 35, 0.2);
  border-left: 3px solid var(--primary);
  display: block;
}
.cal-event-pill:hover {
  background: rgba(122, 21, 35, 0.12);
  border-color: var(--primary);
  transform: translateX(2px);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-scheduled { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }
.status-assigned { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
.status-in-progress { background: #FFF7ED; color: #C2410C; border: 1px solid #FED7AA; }
.status-covered { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.status-editing { background: #FAF5FF; color: #6D28D9; border: 1px solid #E9D5FF; }
.status-published { background: #ECFDF5; color: #065F46; border: 1px solid #34D399; font-weight: 800; }

/* Agenda / List View */
.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agenda-item {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
}
.agenda-item:hover {
  background: #F9FAFB;
  border-color: var(--border-strong);
  transform: translateX(3px);
}

.agenda-date-box {
  text-align: center;
  background: #F8F9FA;
  border: 1px solid var(--border-subtle);
  padding: 8px;
  border-radius: var(--radius-md);
}
.agenda-day {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--primary);
  line-height: 1;
}
.agenda-month {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.agenda-details h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 4px;
}
.agenda-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.agenda-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Sidebar: Letter Scanner & OCR Tool */
.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.scanner-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.scanner-header {
  margin-bottom: 16px;
}
.scanner-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
}
.scanner-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Magnetic Dropzone */
.dropzone {
  border: 2px dashed rgba(122, 21, 35, 0.35);
  background: #FAF7F2;
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: rgba(122, 21, 35, 0.04);
  box-shadow: 0 4px 16px rgba(122, 21, 35, 0.1);
}

.dropzone-icon {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 10px;
}
.dropzone-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.dropzone-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.file-input-hidden {
  display: none;
}

/* Scanner Tabs: Upload vs Paste */
.scanner-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.scanner-tab-btn {
  flex: 1;
  padding: 7px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #F9FAFB;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.scanner-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.paste-box {
  width: 100%;
  height: 110px;
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.82rem;
  resize: vertical;
  outline: none;
}
.paste-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122, 21, 35, 0.1);
}

/* OCR Loading Spinner */
.ocr-loading {
  display: none;
  text-align: center;
  padding: 24px 0;
}
.ocr-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(122, 21, 35, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 10px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Multi-Event Review Staging Queue */
.ocr-multi-container {
  display: none;
  margin-top: 18px;
  background: #FAF7F2;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.ocr-staging-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.ocr-staging-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 2px;
}

.ocr-event-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
  position: relative;
}

.ocr-event-card.rejected {
  opacity: 0.45;
  background: #FFF1F2;
  border-color: #FECDD3;
  transform: scale(0.98);
}

.ocr-event-card.committed {
  background: #ECFDF5;
  border-color: #6EE7B7;
}

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

.ocr-card-num {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(122, 21, 35, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.ocr-card-field {
  margin-bottom: 8px;
}

.ocr-card-field label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 3px;
}

.ocr-card-input {
  width: 100%;
  padding: 6px 10px;
  font-size: 0.82rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast);
  box-sizing: border-box;
}

.ocr-card-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(122, 21, 35, 0.1);
}

.ocr-card-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ocr-card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
}

.btn-reject {
  background: #FFF1F2;
  color: #BE123C;
  border: 1px solid #FECDD3;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
}

.btn-reject:hover {
  background: #BE123C;
  color: #FFFFFF;
}

.btn-card-add {
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
}

.btn-card-add:hover {
  background: var(--primary-dark);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-luxury);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: #FFFFFF;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-heading);
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.modal-close-btn:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  background: #FFFFFF;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: #F9FAFB;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Form Groups */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-fast);
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122, 21, 35, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Crew Badges & Tag Selector */
.crew-selector-box {
  background: #F9FAFB;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crew-tag-checkbox {
  display: none;
}
.crew-tag-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-sub);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.crew-tag-checkbox:checked + .crew-tag-label {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Footer (Whitish Glassmorphic with Maroon Accents - inspired by Oculus & ACPAS Online) */
.site-footer {
  border-top: 2px solid var(--primary);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  padding: 32px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.02);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  height: 38px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .container {
    padding: 0 12px;
  }
  .header-inner {
    height: 56px;
    padding: 0 4px;
  }
  .brand-block {
    flex: 1;
    min-width: 0;
  }
  .brand-logo {
    height: 28px;
    max-width: 165px;
    object-fit: contain;
    flex-shrink: 0;
  }
  .nav-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .nav-actions .btn-outline {
    display: none !important; /* Hide Export .ICS button on header on mobile */
  }
  .nav-actions .btn-primary {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
  .mobile-nav-toggle {
    padding: 4px;
    font-size: 1.25rem;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.active {
    display: flex;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .hero-section {
    padding: 24px 0 16px;
  }
  .hero-title {
    font-size: 1.65rem;
    line-height: 1.15;
  }
  .hero-subtitle {
    font-size: 0.82rem;
    margin-bottom: 20px;
  }
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 20px;
  }
  .stat-card {
    min-width: 0;
    padding: 10px 8px;
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }
  .stat-icon {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }
  .stat-info .stat-value {
    font-size: 1.15rem;
  }
  .stat-info .stat-label {
    font-size: 0.65rem;
  }
  .app-workspace {
    gap: 16px;
    margin-bottom: 36px;
  }
  .calendar-card {
    padding: 14px 10px;
    border-radius: var(--radius-lg);
  }
  .cal-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
  }
  .cal-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 6px;
  }
  .cal-month-title {
    min-width: 0;
    font-size: 1.05rem;
    text-align: center;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cal-nav-btn {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }
  #todayBtn {
    padding: 4px 8px;
    font-size: 0.72rem;
    flex-shrink: 0;
  }
  .view-mode-tabs {
    width: 100%;
    display: flex;
  }
  .view-tab {
    flex: 1;
    text-align: center;
    padding: 6px 10px;
    font-size: 0.75rem;
  }
  .search-input-wrap {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .search-input {
    height: 34px;
    font-size: 0.8rem;
    width: 100%;
  }
  .cal-grid-header {
    font-size: 0.65rem;
    padding-bottom: 6px;
    margin-bottom: 4px;
  }
  .cal-grid-body {
    gap: 3px;
  }
  .cal-day-cell {
    min-height: 58px;
    padding: 3px 2px;
    border-radius: var(--radius-sm);
  }
  .day-header {
    margin-bottom: 2px;
  }
  .day-number {
    font-size: 0.68rem;
    font-weight: 700;
  }
  .day-events-count {
    font-size: 0.52rem;
    padding: 1px 3px;
    border-radius: 4px;
  }
  .cal-event-pill {
    font-size: 0.55rem;
    padding: 1px 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .agenda-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }
  .scanner-card {
    padding: 16px 12px;
  }
  .dropzone {
    padding: 18px 10px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .footer-inner > div {
    max-width: 100%;
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   Interactive Micro-Interactions & Motion Dynamics
   1. Apple-Style Spring Damped Cursor Tracking
   2. Bidirectional Scroll Loading & Fading (Viewport In / Out)
   ========================================================================== */

.custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, transform 0.08s ease-out;
  opacity: 0;
  box-shadow: 0 0 6px rgba(122, 21, 35, 0.45);
}

.custom-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(122, 21, 35, 0.38);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.22s ease,
              background-color 0.22s ease,
              opacity 0.2s ease;
  opacity: 0;
}

.custom-cursor-ring.is-hovering {
  width: 48px;
  height: 48px;
  background-color: rgba(122, 21, 35, 0.07);
  border-color: var(--primary);
}

.custom-cursor-ring.is-clicking {
  transform: translate(-50%, -50%) scale(0.85);
  background-color: rgba(122, 21, 35, 0.16);
}

@media (hover: none) or (pointer: coarse) {
  .custom-cursor-dot, .custom-cursor-ring {
    display: none !important;
  }
}

/* Bidirectional Scroll Animations (Site loads when scrolling, fades when scrolling back) */
.scroll-reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.99);
  filter: blur(2px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* Sibling Stagger Delays */
.delay-1 { transition-delay: 0.06s; }
.delay-2 { transition-delay: 0.12s; }
.delay-3 { transition-delay: 0.18s; }
.delay-4 { transition-delay: 0.24s; }

