:root {
  --color-indigo-deep: #312e81;
  --color-midnight: #0a0f1a;
  --color-charcoal: #111827;
  --color-electric-blue: #3b82f6;
  --color-electric-cyan: #06b6d4;
  --color-violet: #8b5cf6;
  --header-height: 4.5rem;
  --section-max: 80rem;

  --bg-page: #f8fafc;
  --bg-header: rgba(248, 250, 252, 0.92);
  --bg-footer: #f1f5f9;
  --text-primary: #0f172a;
  --text-muted: #475569;
  --border-subtle: rgba(15, 23, 42, 0.12);
  --glass-bg: #ffffff;
  --glass-border: #cbd5e1;
  --card-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --section-band-a: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  --section-band-b: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  --section-band-c: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  --hero-mesh-opacity: 0.15;
}

.dark {
  --bg-page: #0a0f1a;
  --bg-header: rgba(10, 15, 26, 0.92);
  --bg-footer: #111827;
  --text-primary: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --section-band-a: #0a0f1a;
  --section-band-b: linear-gradient(180deg, #0f172a 0%, #0a0f1a 50%, #0f172a 100%);
  --section-band-c: linear-gradient(180deg, #0f172a 0%, #0a0f1a 50%, #0f172a 100%);
  --hero-mesh-opacity: 1;
}

html {
  color-scheme: light;
}

html.dark {
  color-scheme: dark;
}

.section-light {
  background: var(--section-band-b);
  color: var(--text-primary);
}

.section-dark {
  background: var(--section-band-a);
  color: var(--text-primary);
}

.section-alt {
  background: var(--section-band-c);
  color: var(--text-primary);
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 0.75rem;
  background: var(--glass-bg);
  border: 1px solid var(--border-subtle);
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.1);
}

.theme-toggle-btn.theme-toggle-active {
  color: #1e40af;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.dark .theme-toggle-btn.theme-toggle-active {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.25);
  border-color: transparent;
}

/* Legal / policy prose — maps legacy text-white utilities to theme tokens */
.legal-content h1,
.legal-content h2,
.legal-content h3,
.legal-content h4,
.legal-content h5,
.legal-content .text-white {
  color: var(--text-primary) !important;
}

.legal-content p,
.legal-content li,
.legal-content .text-white\/80,
.legal-content .text-white\/70 {
  color: var(--text-muted);
}

/* Site-wide light mode — legacy dark-theme utilities */
html:not(.dark) .text-white {
  color: var(--text-primary);
}

html:not(.dark) .text-white\/90,
html:not(.dark) .text-white\/80,
html:not(.dark) .text-white\/70,
html:not(.dark) .text-white\/60,
html:not(.dark) .text-white\/50 {
  color: var(--text-muted);
}

html:not(.dark) .text-purple-300 {
  color: #5b21b6;
}

html:not(.dark) .text-purple-400 {
  color: #7c3aed;
}

html:not(.dark) .border-white\/10,
html:not(.dark) .border-white\/20 {
  border-color: var(--border-subtle);
}

html:not(.dark) .bg-navy-900,
html:not(.dark) .bg-navy-800,
html:not(.dark) .bg-navy-800\/50,
html:not(.dark) .bg-navy-800\/70,
html:not(.dark) .bg-navy-800\/90,
html:not(.dark) .bg-navy-700\/50,
html:not(.dark) .bg-navy-700\/30,
html:not(.dark) .bg-navy-600\/50 {
  background-color: var(--glass-bg) !important;
}

html:not(.dark) .bg-navy-700\/50 th,
html:not(.dark) tr.bg-navy-700\/50 {
  background-color: #f1f5f9 !important;
}

html:not(.dark) [class*='bg-gradient-to-br'][class*='from-navy'],
html:not(.dark) [class*='bg-gradient-to-br'][class*='to-navy'] {
  background: var(--glass-bg) !important;
  background-image: none !important;
  box-shadow: var(--card-shadow);
}

/* Keep white text on colored buttons and gradient surfaces */
html:not(.dark) .btn-primary,
html:not(.dark) .btn-primary *,
html:not(.dark) button.bg-purple-500,
html:not(.dark) button.bg-purple-600,
html:not(.dark) a.bg-purple-600,
html:not(.dark) .bg-purple-500.text-white,
html:not(.dark) .bg-purple-600.text-white,
html:not(.dark) .workshops-focus-btn.bg-purple-500,
html:not(.dark) .workshops-content-type-btn.bg-purple-500,
/* Solid gradient CTAs only (same element has gradient + text-white) */
html:not(.dark) [class*='bg-gradient-to-r'].text-white,
html:not(.dark) button[class*='from-purple-5'].text-white,
html:not(.dark) button[class*='from-orange-5'].text-white {
  color: #ffffff !important;
}

html:not(.dark) input.bg-navy-700\/50,
html:not(.dark) input[class*='bg-navy'] {
  background-color: #ffffff !important;
  color: var(--text-primary) !important;
  border-color: var(--border-subtle) !important;
}

html:not(.dark) input::placeholder,
html:not(.dark) input.placeholder-white\/50::placeholder {
  color: var(--text-muted) !important;
}

/* Secondary pages — same overrides (page-shell alias) */
.page-shell .text-white {
  color: var(--text-primary);
}

.page-shell .text-white\/90,
.page-shell .text-white\/80,
.page-shell .text-white\/70,
.page-shell .text-white\/60,
.page-shell .text-white\/50 {
  color: var(--text-muted);
}

.page-shell .border-white\/10,
.page-shell .border-white\/20 {
  border-color: var(--border-subtle);
}

.page-shell .bg-navy-800\/50,
.page-shell .bg-navy-700\/50 {
  background: var(--glass-bg);
}

.page-shell .bg-navy-700\/50 th,
.page-shell tr.bg-navy-700\/50 {
  background: #f1f5f9;
}

@keyframes iqacBlinkBorder {
  0%,
  33.33%,
  66.67%,
  100% {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
  }
  16.67%,
  50%,
  83.33% {
    border-color: rgba(168, 85, 247, 0.8);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.3);
  }
}

.page-shell .blink-dropdown-border {
  animation: iqacBlinkBorder 4.5s ease-in-out;
}

/* IQAC page — browser-style tabs, cards, badges */
.page-shell .iqac-hero-title {
  background-image: linear-gradient(90deg, #5b21b6 0%, #1d4ed8 55%, #6d28d9 100%);
}

.dark .page-shell .iqac-hero-title {
  background-image: linear-gradient(90deg, #c4b5fd 0%, #93c5fd 55%, #a78bfa 100%);
}

.page-shell .iqac-tabs-bar {
  -webkit-overflow-scrolling: touch;
  overflow-y: hidden;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.45) rgba(15, 23, 42, 0.08);
}

.page-shell .iqac-tabs-bar::-webkit-scrollbar {
  height: 6px;
}

.page-shell .iqac-tabs-bar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.06);
  border-radius: 3px;
}

.page-shell .iqac-tabs-bar::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.4);
  border-radius: 3px;
}

.page-shell .iqac-tabs-bar::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.6);
}

.dark .page-shell .iqac-tabs-bar {
  scrollbar-color: rgba(167, 139, 250, 0.55) rgba(255, 255, 255, 0.08);
}

.dark .page-shell .iqac-tabs-bar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
}

.dark .page-shell .iqac-tabs-bar::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 250, 0.45);
}

.dark .page-shell .iqac-tabs-bar::-webkit-scrollbar-thumb:hover {
  background: rgba(167, 139, 250, 0.65);
}

.page-shell .iqac-tab {
  position: relative;
  margin-bottom: -1px;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
  color: var(--text-muted);
  background: transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.page-shell .iqac-tab:hover {
  color: var(--text-primary);
  background: rgba(15, 23, 42, 0.04);
}

.page-shell .iqac-tab-active {
  color: #5b21b6;
  background: var(--bg-page);
  border-color: var(--border-subtle);
  border-bottom-color: var(--bg-page);
  box-shadow: 0 -1px 0 var(--bg-page);
}

.page-shell .iqac-tab-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #7c3aed;
}

.page-shell .iqac-tab-inactive {
  color: var(--text-muted);
}

.dark .page-shell .iqac-tab:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dark .page-shell .iqac-tab-active {
  color: #c4b5fd;
  background: var(--bg-page);
  border-color: rgba(255, 255, 255, 0.12);
  border-bottom-color: var(--bg-page);
}

.dark .page-shell .iqac-tab-active::after {
  background: #a78bfa;
}

.dark .page-shell .iqac-tab-inactive {
  color: rgba(255, 255, 255, 0.55);
}

.dark .page-shell .iqac-tab-inactive:hover {
  color: rgba(255, 255, 255, 0.9);
}

.page-shell .iqac-info-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.dark .page-shell .iqac-info-box {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(96, 165, 250, 0.3);
}

.page-shell .iqac-lecture-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.page-shell .iqac-lecture-card:hover {
  border-color: rgba(124, 58, 237, 0.45);
}

.dark .page-shell .iqac-lecture-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.55) 0%, rgba(30, 41, 59, 0.45) 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.dark .page-shell .iqac-lecture-card:hover {
  border-color: rgba(167, 139, 250, 0.5);
}

.page-shell .iqac-card-glow {
  display: none;
}

.dark .page-shell .iqac-card-glow {
  display: block;
}

.page-shell .iqac-card-title {
  color: var(--text-primary);
}

.dark .page-shell .iqac-card-title {
  color: #ffffff;
}

.page-shell .iqac-card-meta {
  color: var(--text-muted);
}

.dark .page-shell .iqac-card-meta {
  color: rgba(255, 255, 255, 0.7);
}

.page-shell .iqac-card-badge {
  background: rgba(124, 58, 237, 0.1);
  color: #5b21b6;
  border: 1px solid rgba(124, 58, 237, 0.35);
}

.dark .page-shell .iqac-card-badge {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.35);
}

.page-shell .iqac-card-badge-naac-tag {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.35);
}

.dark .page-shell .iqac-card-badge-naac-tag {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.35);
}

.page-shell .iqac-card-badge-naac {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.35);
}

.dark .page-shell .iqac-card-badge-naac {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.35);
}

.page-shell .iqac-card-pso-box {
  background: rgba(15, 23, 42, 0.04);
}

.dark .page-shell .iqac-card-pso-box {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.page-shell .iqac-tab [data-lucide] {
  opacity: 0.75;
}

.page-shell .iqac-tab-active [data-lucide] {
  color: #7c3aed;
  opacity: 1;
}

.dark .page-shell .iqac-tab-active [data-lucide] {
  color: #c4b5fd;
}

.page-shell .iqac-card-btn {
  background: rgba(124, 58, 237, 0.1);
  color: #5b21b6;
  border: 1px solid rgba(124, 58, 237, 0.35);
}

.page-shell .iqac-card-btn:hover {
  background: rgba(124, 58, 237, 0.18);
}

.dark .page-shell .iqac-card-btn {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.35);
}

.dark .page-shell .iqac-card-btn:hover {
  background: rgba(139, 92, 246, 0.3);
}

.page-shell .iqac-card-expanded {
  background: #f8fafc;
  color: var(--text-primary);
  border-top: 1px solid var(--border-subtle);
}

.dark .page-shell .iqac-card-expanded {
  background: #ffffff;
  color: #0f172a;
  border-top-color: rgba(255, 255, 255, 0.12);
}

.page-shell .iqac-hero-link {
  color: #6d28d9;
}

.page-shell .iqac-hero-link:hover {
  color: #5b21b6;
}

.dark .page-shell .iqac-hero-link {
  color: #a78bfa;
}

.dark .page-shell .iqac-hero-link:hover {
  color: #c4b5fd;
}

.page-shell #iqac-tabs.blink-dropdown-border {
  animation: iqacBlinkBorderLight 4.5s ease-in-out;
}

.dark .page-shell #iqac-tabs.blink-dropdown-border {
  animation: iqacBlinkBorder 4.5s ease-in-out;
}

@keyframes iqacBlinkBorderLight {
  0%,
  33.33%,
  66.67%,
  100% {
    border-color: var(--border-subtle);
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0);
  }
  16.67%,
  50%,
  83.33% {
    border-color: rgba(124, 58, 237, 0.7);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
  }
}

/* Services page — theme-aware timeline */
.page-shell .services-timeline {
  background: transparent;
}

.page-shell .services-timeline-heading {
  color: var(--text-primary);
}

.page-shell .services-timeline-dot {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.dark .page-shell .services-timeline-dot {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.page-shell .services-timeline-rail {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(15, 23, 42, 0.15) 50%,
    transparent 99%
  );
}

.dark .page-shell .services-timeline-rail {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 99%
  );
}

.page-shell .services-card-btn {
  background: linear-gradient(to right, rgba(124, 58, 237, 0.12), rgba(59, 130, 246, 0.12));
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: #5b21b6;
}

.page-shell .services-card-btn:hover {
  background: linear-gradient(to right, rgba(124, 58, 237, 0.2), rgba(59, 130, 246, 0.2));
  border-color: rgba(124, 58, 237, 0.5);
}

.dark .page-shell .services-card-btn {
  background: linear-gradient(to right, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2));
  border-color: rgba(167, 139, 250, 0.35);
  color: #c4b5fd;
}

.dark .page-shell .services-card-btn:hover {
  background: linear-gradient(to right, rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.3));
  border-color: rgba(167, 139, 250, 0.5);
}

/* Services — section header icons on pale gradient tiles (light mode) */
html:not(.dark) .services-section-icon {
  color: #6d28d9;
}

html:not(.dark) [class*='from-green'] .services-section-icon {
  color: #15803d;
}

html:not(.dark) [class*='from-orange'] .services-section-icon,
html:not(.dark) [class*='from-yellow'] .services-section-icon {
  color: #c2410c;
}

html:not(.dark) [class*='from-blue']:not([class*='from-green']) .services-section-icon {
  color: #1d4ed8;
}

.dark .services-section-icon {
  color: #ffffff;
}

/* Services — Contact Now CTA */
html:not(.dark) .services-card-btn-contact {
  background: linear-gradient(to right, #ea580c, #dc2626) !important;
  border: 1px solid #c2410c !important;
  color: #ffffff !important;
}

html:not(.dark) .services-card-btn-contact:hover {
  background: linear-gradient(to right, #f97316, #ef4444) !important;
  border-color: #9a3412 !important;
}

.dark .services-card-btn-contact {
  background: linear-gradient(to right, rgba(249, 115, 22, 0.25), rgba(239, 68, 68, 0.25)) !important;
  border: 1px solid rgba(251, 146, 60, 0.4) !important;
  color: #fdba74 !important;
}

.dark .services-card-btn-contact:hover {
  background: linear-gradient(to right, rgba(249, 115, 22, 0.35), rgba(239, 68, 68, 0.35)) !important;
  border-color: rgba(251, 146, 60, 0.55) !important;
}

/* Workshops — retired catalog overlay */
.workshops-catalog-section {
  min-height: 22rem;
}

.workshops-catalog-section.workshops-retired .workshops-list-section #workshops-list-root,
.workshops-catalog-section.workshops-retired .workshops-filters-section .surface-card,
.workshops-list-section.workshops-retired #workshops-list-root,
.workshops-filters-section.workshops-retired .surface-card {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
  opacity: 0.55;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.workshops-retirement-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  pointer-events: none;
}

.workshops-retirement-message {
  max-width: 42rem;
  width: 100%;
  padding: 2rem 2.25rem;
  text-align: center;
  border-radius: 1.5rem;
  pointer-events: auto;
  box-shadow:
    0 25px 50px -12px rgba(15, 23, 42, 0.25),
    0 0 0 1px rgba(139, 92, 246, 0.15);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.dark .workshops-retirement-message {
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(139, 92, 246, 0.12);
}

.workshops-retirement-logo {
  display: block;
  width: 5rem;
  height: auto;
  margin: 0 auto 1.25rem;
}

.workshops-retirement-text {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.workshops-retirement-launch {
  margin: 1.5rem 0 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html:not(.dark) .workshops-retirement-launch {
  background: linear-gradient(90deg, #6d28d9, #2563eb, #0891b2);
  -webkit-background-clip: text;
  background-clip: text;
}
