/* ============================================================
   KRITI Portal — Custom CSS
   IIT Kharagpur | KRITI Initiative
   ============================================================ */

/* ── DESIGN TOKENS (:root) — single source for .kui-* + Tailwind var() ─────
   Legacy rules below (.form-input, .btn-primary, html/body) unchanged. */

:root {
  --color-kriti-deep: #1e1b4b;
  --color-kriti: #2c296f;
  --color-kriti-light: #4338ca;
  --color-kriti-gold: #c9a84c;
  --color-kriti-muted: #64748b;

  --surface-page: #ffffff;
  --surface-muted: #f8fafc;
  --surface-card: #ffffff;
  --border-default: #e2e8f0;

  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono: 'DM Mono', ui-monospace, monospace;
  --text-body: 1rem;
  --text-label: 0.6875rem;

  --radius-input: 0;
  --radius-card: 0.375rem;
  --ring-focus: 0 0 0 3px rgba(44, 41, 111, 0.08);

  --space-section-y: 2rem;

  --kui-danger: #dc2626;
  --kui-success: #16a34a;
  --kui-warning: #d97706;
  --kui-info: #2563eb;
}

/* ── ANIMATIONS ─────────────────────────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes marquee {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

@keyframes pulse-ring {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(44, 41, 111, 0.4); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 10px rgba(44, 41, 111, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(44, 41, 111, 0); }
}

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

.animate-fade-up   { animation: fadeUp 0.7s ease forwards; }
.animate-fade-in   { animation: fadeIn 0.5s ease forwards; }
.animate-slide-in  { animation: slideIn 0.4s ease forwards; }
.animate-marquee   { animation: marquee 30s linear infinite; }

/* ── REVEAL ON SCROLL ────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── TYPOGRAPHY ────────────────────────────────────────────────
   Legacy: keep until pages adopt .kui-* / layout-scoped body classes. */

html, body {
  font-family: 'Inter', sans-serif !important;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #1f2937;
  letter-spacing: -0.01em;
}

.font-serif { font-family: 'Playfair Display', Georgia, serif; }
.font-sans  { font-family: 'Inter', sans-serif; }
.font-mono  { font-family: 'DM Mono', monospace; }

/* ── TICKER ──────────────────────────────────────────────────── */

.ticker-wrap { overflow: hidden; }
.ticker-content { display: inline-block; white-space: nowrap; }

/* ── NAVBAR SCROLL SHADOW ────────────────────────────────────── */

#navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }

/* Home hero: fill viewport below sticky nav (inner row h-20 + border-b) */
#hero {
  min-height: calc(100vh - 5rem - 1px);
  min-height: calc(100dvh - 5rem - 1px);
}

/* Home — Director's message (#director prefix: wins over Tailwind CDN + survives load order) */
#director.home-director-section {
  background-color: #f4f4f5;
  color: #1f2937;
}

#director .home-director-carousel {
  position: relative;
}

#director .home-director-carousel__viewport {
  overflow: hidden;
  width: 100%;
}

#director .home-director-carousel__track {
  display: flex;
  transition: transform 0.55s ease-out;
  will-change: transform;
}

#director .home-director-carousel__slide {
  box-sizing: border-box;
}

#director .home-director-carousel__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

#director .home-director-carousel__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  border: none;
  padding: 0;
  background: rgba(30, 27, 75, 0.22);
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

#director .home-director-carousel__dot:hover,
#director .home-director-carousel__dot:focus-visible {
  background: rgba(30, 27, 75, 0.45);
  outline: none;
  box-shadow: 0 0 0 2px var(--color-kriti-gold, #c9a84c);
}

#director .home-director-carousel__dot.is-active {
  background: var(--color-kriti-gold, #c9a84c);
  transform: scale(1.2);
}

@media (prefers-reduced-motion: reduce) {
  #director .home-director-carousel__track {
    transition: none;
  }

  #director .home-director-carousel__dot {
    transition: none;
  }
}

#director .home-director-row {
  display: grid;
  align-items: center;
  gap: 1.25rem 1.75rem;
}

@media (min-width: 1024px) {
  #director .home-director-row {
    /* minmax(0, 1fr) lets the text column consume all space after the photo */
    grid-template-columns: minmax(11rem, 13.5rem) minmax(0, 1fr);
    gap: 1.5rem 2rem;
  }

  #director .home-director-row--reverse {
    grid-template-columns: minmax(0, 1fr) minmax(11rem, 13.5rem);
  }
}

#director .home-director-copy {
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  padding-top: 0.5rem;
}

#director .home-director-quote-text {
  display: block;
  width: 100%;
  max-width: none !important;
  box-sizing: border-box;
  font-size: 1rem !important;
  line-height: 1.45 !important;
  font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 500 !important;
  color: var(--color-kriti-deep) !important;
}

#director .home-director-quote-text .home-director-quote-kriti {
  font-weight: 700 !important;
}

@media (min-width: 640px) {
  #director .home-director-quote-text {
    font-size: 1.0625rem !important;
  }
}

@media (min-width: 1024px) {
  #director .home-director-quote-text {
    font-size: 1.125rem !important;
  }
}

#director .home-director-attribution {
  margin-top: 1.25rem;
  text-align: left;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 45, 86, 0.08);
}

#director .home-director-attribution-name {
  font-size: 0.8125rem;
  line-height: 1.35;
}

#director .home-director-attribution-role {
  margin-top: 0.2rem;
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

@media (min-width: 640px) {
  #director .home-director-attribution-name {
    font-size: 0.875rem;
  }

  #director .home-director-attribution-role {
    font-size: 0.6875rem;
  }
}

#director .home-director-photo {
  display: flex;
  border-radius: 1rem;
  border: 2px solid var(--color-kriti-gold, #c9a84c);
  padding: 5px;
  box-sizing: border-box;
  box-shadow:
    0 14px 36px -12px rgba(0, 45, 86, 0.12),
    0 4px 14px rgba(0, 0, 0, 0.06);
  background: #fffef9;
  aspect-ratio: 4 / 5;
  max-height: 15rem;
  overflow: hidden;
}

@media (min-width: 1024px) {
  #director .home-director-photo {
    max-height: 14.5rem;
  }
}

#director .home-director-photo-crop {
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  border-radius: calc(1rem - 5px);
  overflow: hidden;
}

#director .home-director-photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

#director .home-director-quote-mark {
  position: absolute;
  left: -0.1rem;
  top: -1.35rem;
  font-size: clamp(2.75rem, 9vw, 4.25rem);
  line-height: 0.85;
  color: rgba(201, 168, 76, 0.55);
  font-weight: 600;
  font-family: 'Playfair Display', Georgia, serif !important;
}

@media (min-width: 1024px) {
  #director .home-director-quote-mark {
    left: -0.2rem;
    top: -1.6rem;
  }
}

/* ── FORM STYLES ─────────────────────────────────────────────── */

.form-input {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: #0d0d0d;
  transition: border-color 0.2s, box-shadow 0.2s;
  border-radius: 0;
  outline: none;
}
.form-input:focus {
  border-color: #2c296f;
  box-shadow: 0 0 0 3px rgba(44, 41, 111, 0.08);
}
.form-input.error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}
.form-input.success {
  border-color: #16a34a;
}
.form-input::placeholder { color: #94a3b8; }

.form-label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.375rem;
}
.form-label .req { color: #dc2626; margin-left: 2px; }

.form-error {
  font-size: 0.75rem;
  color: #dc2626;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #2c296f;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
  border-radius: 0;
}
.btn-primary:hover  { background: #1e1b4b; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: #2c296f;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border: 1.5px solid #2c296f;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border-radius: 0;
}
.btn-secondary:hover { background: #2c296f; color: #fff; }

.btn-danger {
  background: #dc2626;
  color: #fff;
  border: none;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 0;
}
.btn-danger:hover { background: #b91c1c; }

/* Loading spinner on button */
.btn-loading { position: relative; color: transparent !important; }
.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── PROGRESS BAR (Application Form) ────────────────────────── */

.progress-steps {
  display: flex;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.progress-steps::-webkit-scrollbar { display: none; }

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 80px;
  cursor: pointer;
  position: relative;
}
.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(50% + 14px);
  right: calc(-50% + 14px);
  height: 2px;
  background: #e2e8f0;
  z-index: 0;
}
.progress-step.completed:not(:last-child)::after { background: #2c296f; }

.step-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  border: 2px solid #e2e8f0;
  background: #fff;
  color: #94a3b8;
  position: relative;
  z-index: 1;
  transition: all 0.3s;
}
.progress-step.active   .step-circle { border-color: #2c296f; background: #2c296f; color: #fff; }
.progress-step.completed .step-circle { border-color: #2c296f; background: #2c296f; color: #fff; }
.progress-step.completed .step-circle::after {
  content: '✓';
  font-size: 12px;
}

.step-label {
  font-size: 9px;
  font-family: 'DM Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  text-align: center;
  white-space: nowrap;
}
.progress-step.active    .step-label { color: #2c296f; font-weight: 600; }
.progress-step.completed .step-label { color: #2c296f; }

/* ── WORD COUNTER ────────────────────────────────────────────── */

.word-counter {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: #94a3b8;
  text-align: right;
  margin-top: 4px;
  transition: color 0.2s;
}
.word-counter.warning { color: #d97706; }
.word-counter.error   { color: #dc2626; font-weight: 600; }

/* ── UPLOAD BOX ──────────────────────────────────────────────── */

.upload-box {
  border: 2px dashed #e2e8f0;
  background: #fafafa;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.upload-box:hover,
.upload-box.dragover {
  border-color: #2c296f;
  background: rgba(44, 41, 111, 0.03);
}
.upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-box.has-file {
  border-color: #16a34a;
  background: rgba(22, 163, 74, 0.03);
}

/* ── AUTOSAVE INDICATOR ──────────────────────────────────────── */

#autosave-indicator {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.3s;
}
#autosave-indicator.saving { color: #d97706; }
#autosave-indicator.saved  { color: #16a34a; }
#autosave-indicator.error  { color: #dc2626; }

/* ── TOAST NOTIFICATIONS ─────────────────────────────────────── */

.toast {
  position: fixed;
  top: 80px;
  right: 16px;
  z-index: 9999;
  min-width: 280px;
  max-width: 400px;
  padding: 12px 16px;
  border-left: 4px solid;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: slideIn 0.3s ease;
  font-size: 14px;
}
.toast.success { border-color: #16a34a; }
.toast.error   { border-color: #dc2626; }
.toast.info    { border-color: #2c296f; }
.toast.warning { border-color: #d97706; }

/* ── ADMIN SIDEBAR ───────────────────────────────────────────── */

.admin-sidebar {
  width: 240px;
  min-height: 100vh;
  background: #1e1b4b;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s;
}
.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.admin-sidebar-link:hover,
.admin-sidebar-link.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-left-color: #c9a84c;
}
.admin-content { margin-left: 240px; min-height: 100vh; background: #f8f9fa; }

@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-content { margin-left: 0; }
}

/* ── STATUS BADGES ───────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0;
}
.badge-draft        { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.badge-submitted    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-under_review { background: #fefce8; color: #854d0e; border: 1px solid #fde68a; }
.badge-shortlisted  { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.badge-selected     { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }
.badge-waitlisted   { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.badge-rejected     { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-interview    { background: #faf5ff; color: #7e22ce; border: 1px solid #e9d5ff; }

/* ── RECOMMENDATION STATUS ───────────────────────────────────── */

.rec-status-invited   { color: #d97706; }
.rec-status-opened    { color: #2563eb; }
.rec-status-submitted { color: #16a34a; }
.rec-status-expired   { color: #dc2626; }

/* ── CARD HOVER EFFECTS ──────────────────────────────────────── */

.card-hover {
  transition: transform 0.2s, box-shadow 0.2s;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

/* ── LINE CLAMP ──────────────────────────────────────────────── */

.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── SCROLLBAR ───────────────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── PRINT ───────────────────────────────────────────────────── */

@media print {
  .no-print { display: none !important; }
  .admin-sidebar { display: none !important; }
  .admin-content { margin-left: 0 !important; }
}

/* ── RESPONSIVE UTILITIES ────────────────────────────────────── */

@media (max-width: 640px) {
  .form-input { font-size: 16px; } /* Prevent iOS zoom */
  .btn-primary, .btn-secondary, .btn-danger { width: 100%; justify-content: center; }
  /* LMS nav: keep Messages / Announcements / Blog etc. inline on small screens */
  .lms-inline-actions .btn-primary,
  .lms-inline-actions .btn-secondary {
    width: auto;
    flex: 0 1 auto;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    white-space: nowrap;
  }
  /* Blog My posts: equal-width actions on one row (mobile + desktop) */
  .lms-post-card-actions {
    width: 100%;
  }
  .lms-post-card-actions > a.btn-secondary,
  .lms-post-card-actions > form {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
  }
  .lms-post-card-actions .btn-secondary,
  .lms-post-card-actions .btn-danger {
    width: 100%;
    justify-content: center;
  }
  .lms-post-card-actions form {
    display: flex;
  }
}

/* ── Blog post image lightbox ───────────────────────────────── */

.blog-gallery-trigger:hover img {
  opacity: 0.92;
}

.blog-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-lightbox.hidden {
  display: none !important;
}

.blog-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  cursor: zoom-out;
}

.blog-lightbox-inner {
  position: relative;
  z-index: 1;
  width: min(96vw, 1100px);
  max-height: 96vh;
  padding: 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.blog-lightbox-inner > * {
  pointer-events: auto;
}

.blog-lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: calc(96vh - 6rem);
  width: 100%;
}

.blog-lightbox-img {
  max-width: 100%;
  max-height: calc(96vh - 6rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.blog-lightbox-caption {
  margin-top: 1rem;
  color: #e2e8f0;
  font-size: 0.875rem;
  text-align: center;
  max-width: 40rem;
}

.blog-lightbox-counter {
  margin-top: 0.5rem;
  color: #94a3b8;
  font-size: 0.75rem;
  font-family: ui-monospace, monospace;
}

.blog-lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  border-radius: 9999px;
  cursor: pointer;
}

.blog-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.blog-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  border-radius: 9999px;
  cursor: pointer;
}

.blog-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.blog-lightbox-prev {
  left: 0.25rem;
}

.blog-lightbox-next {
  right: 0.25rem;
}

@media (max-width: 640px) {
  .blog-lightbox-inner {
    padding: 2.5rem 0.5rem 1rem;
  }

  .blog-lightbox-nav {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.5rem;
  }
}

/* ── SECTION DIVIDER ─────────────────────────────────────────── */

.section-divider {
  width: 48px;
  height: 3px;
  background: linear-gradient(to right, #2c296f, #c9a84c);
  margin: 0 auto 1.5rem;
}

/* ── DOSSIER VIEW (Reviewer) ─────────────────────────────────── */

.dossier-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #2c296f;
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.dossier-section h3 {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  margin-bottom: 1rem;
}

/* ── RATING STARS ────────────────────────────────────────────── */

.rating-stars { display: flex; gap: 4px; }
.rating-star {
  width: 20px; height: 20px;
  cursor: pointer;
  color: #e2e8f0;
  transition: color 0.1s;
}
.rating-star.active,
.rating-star:hover,
.rating-star:hover ~ .rating-star { color: #c9a84c; }

/* ── SKELETON LOADER ─────────────────────────────────────────── */

.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 2px;
}

/* ── OPTIONAL: new pages only — defaults that respect tokens ─── */

body.kui-body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  color: #1f2937;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── ADMIN AUTH SHELL (admin/login) — scoped to avoid clashing with applicant auth_styles */

body.admin-auth-page *,
body.admin-auth-page *::before,
body.admin-auth-page *::after {
  box-sizing: border-box;
}

body.admin-auth-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  font-family: var(--font-sans);
  background: var(--color-kriti-deep);
}

body.admin-auth-page .admin-left {
  display: none;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  width: 42%;
  flex-shrink: 0;
  background: linear-gradient(160deg, var(--color-kriti-deep) 0%, var(--color-kriti) 55%, #1a1840 100%);
}

@media (min-width: 1024px) {
  body.admin-auth-page .admin-left { display: flex; }
}

body.admin-auth-page .al-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}

body.admin-auth-page .al-glow1 {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

body.admin-auth-page .al-glow2 {
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.12);
}

body.admin-auth-page .al-glow3 {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(67, 56, 202, 0.2) 0%, transparent 70%);
}

body.admin-auth-page .al-inner {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2.5rem;
}

body.admin-auth-page .al-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.8125rem;
}

body.admin-auth-page .al-feature-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.admin-auth-page .admin-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

body.admin-auth-page .admin-right-inner {
  width: 100%;
  max-width: 400px;
}

body.admin-auth-page .auth-field { position: relative; }

body.admin-auth-page .auth-field-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

body.admin-auth-page .auth-field:focus-within .auth-field-icon {
  color: var(--color-kriti);
}

body.admin-auth-page .auth-input {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1.5px solid var(--border-default);
  background: #fff;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: #0d0d0d;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  border-radius: var(--radius-input);
  box-sizing: border-box;
  -webkit-appearance: none;
}

body.admin-auth-page .auth-input::placeholder { color: #a0aec0; }

body.admin-auth-page .auth-input:focus {
  border-color: var(--color-kriti);
  box-shadow: var(--ring-focus);
}

body.admin-auth-page .auth-input.is-error {
  border-color: var(--kui-danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.06);
}

body.admin-auth-page .auth-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-kriti-muted);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

body.admin-auth-page .auth-err {
  color: var(--kui-danger);
  font-size: 0.73rem;
  margin-top: 0.3rem;
  display: none;
  font-family: var(--font-sans);
  align-items: center;
  gap: 4px;
}

body.admin-auth-page .auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--color-kriti);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  border-radius: var(--radius-input);
}

body.admin-auth-page .auth-btn:hover:not(:disabled) {
  background: var(--color-kriti-deep);
}

body.admin-auth-page .auth-btn:active:not(:disabled) { transform: scale(0.99); }

body.admin-auth-page .auth-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body.admin-auth-page .auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
  border-left: 3px solid;
  font-size: 0.8125rem;
  font-family: var(--font-sans);
}

body.admin-auth-page .auth-alert-error {
  background: #fef2f2;
  border-color: var(--kui-danger);
  color: #991b1b;
}

body.admin-auth-page .auth-alert-success {
  background: #f0fdf4;
  border-color: var(--kui-success);
  color: #166534;
}

body.admin-auth-page .auth-alert-warning {
  background: #fffbeb;
  border-color: var(--kui-warning);
  color: #92400e;
}

body.admin-auth-page .auth-alert-info {
  background: #eff6ff;
  border-color: var(--color-kriti);
  color: #1e3a8a;
}

body.admin-auth-page .admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.3);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-kriti-gold);
  margin-bottom: 1rem;
}

body.admin-auth-page .auth-input--with-toggle {
  padding-right: 44px;
}

/* ── KUI namespaced components (optional adoption) ───────────── */

.kui-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  margin-bottom: 1rem;
  border-left: 3px solid;
  font-size: 0.8125rem;
  font-family: var(--font-sans);
}

.kui-alert__icon { flex-shrink: 0; margin-top: 2px; }

.kui-alert--success {
  background: #f0fdf4;
  border-color: var(--kui-success);
  color: #166534;
}

.kui-alert--error {
  background: #fef2f2;
  border-color: var(--kui-danger);
  color: #991b1b;
}

.kui-alert--warning {
  background: #fffbeb;
  border-color: var(--kui-warning);
  color: #92400e;
}

.kui-alert--info {
  background: #eff6ff;
  border-color: var(--color-kriti);
  color: #1e3a8a;
}

.kui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  border-radius: var(--radius-input);
  transition: background 0.2s, color 0.2s, transform 0.1s;
}

.kui-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.kui-btn--primary {
  background: var(--color-kriti);
  color: #fff;
}

.kui-btn--primary:hover:not(:disabled) {
  background: var(--color-kriti-deep);
}

.kui-btn--secondary {
  background: var(--surface-muted);
  color: var(--color-kriti-deep);
  border: 1px solid var(--border-default);
}

.kui-btn--secondary:hover:not(:disabled) {
  background: #f1f5f9;
}

.kui-btn--ghost {
  background: transparent;
  color: var(--color-kriti);
}

.kui-btn--ghost:hover:not(:disabled) {
  background: rgba(44, 41, 111, 0.06);
}

.kui-field { margin-bottom: 1rem; }

.kui-field__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-kriti-muted);
  margin-bottom: 0.375rem;
}

.kui-field__hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.kui-field__error {
  font-size: 0.75rem;
  color: var(--kui-danger);
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kui-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--border-default);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  background: var(--surface-card);
  color: #0d0d0d;
  border-radius: var(--radius-input);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.kui-input:focus {
  border-color: var(--color-kriti);
  box-shadow: var(--ring-focus);
}

.kui-input--error {
  border-color: var(--kui-danger);
}

.kui-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.kui-card__body > :first-child { margin-top: 0; }
.kui-card__body > :last-child { margin-bottom: 0; }

.kui-page-header {
  margin-bottom: 1.5rem;
}

.kui-page-header__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-kriti-deep);
  line-height: 1.2;
  margin: 0 0 0.25rem 0;
}

.kui-page-header__sub {
  font-size: 0.875rem;
  color: var(--color-kriti-muted);
  margin: 0;
}

.kui-page-header__actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.kui-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  font-family: var(--font-sans);
}

.kui-badge--neutral { background: #f1f5f9; color: #64748b; }
.kui-badge--success { background: #dcfce7; color: #166534; }
.kui-badge--warning { background: #fef9c3; color: #854d0e; }
.kui-badge--danger { background: #fee2e2; color: #991b1b; }
.kui-badge--info { background: #dbeafe; color: #1d4ed8; }
.kui-badge--accent { background: #ede9fe; color: #5b21b6; }

/* ── Home: Admission / application process timeline ─────────── */

.kriti-process {
  position: relative;
}

.kriti-process__track {
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 1.25rem;
  width: 0;
  border-left: 2px dashed var(--border-default);
  pointer-events: none;
}

@media (min-width: 1024px) {
  .kriti-process__track {
    left: 50%;
    transform: translateX(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .kriti-process__track {
    border-left-style: solid;
  }
}