/* FCE Obudu Portal - Main Stylesheet */

/* === BASE === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* === GLASSMORPHISM === */
.glass-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.glass-dark {
  background: rgba(0, 30, 64, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* === NEUMORPHISM === */
.neumorphic-btn {
  box-shadow: 4px 4px 8px rgba(0,0,0,0.1), -2px -2px 6px rgba(255,255,255,0.8);
  transition: all 0.2s ease-in-out;
}
.neumorphic-btn:hover {
  box-shadow: 6px 6px 12px rgba(0,0,0,0.12), -3px -3px 8px rgba(255,255,255,0.9);
  transform: translateY(-1px);
}
.neumorphic-btn:active {
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1), inset -2px -2px 5px rgba(255,255,255,0.8);
  transform: scale(0.98);
}
.neumorphic-input {
  border-bottom: 1.5px solid #001e40;
  background: transparent;
  transition: all 0.3s ease;
}
.neumorphic-input:focus {
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.05);
  outline: none;
  border-bottom-width: 2px;
  border-bottom-color: #D4AF37;
}

/* === NAVIGATION (legacy — kept for any non-header usage) === */
.nav-link {
  @apply px-3 py-2 rounded-lg text-sm font-medium transition-all duration-150;
  color: rgba(255,255,255,0.78);
}
.nav-link:hover { color:#fff; background:rgba(255,255,255,0.1); }
.nav-link-active { @apply px-3 py-2 rounded-lg text-sm font-semibold; color:#fed65b; background:rgba(254,214,91,0.1); }
.nav-dropdown {
  @apply absolute top-full left-0 bg-surface-container-lowest shadow-2xl rounded-xl border border-outline-variant min-w-[210px] py-2 z-50
    opacity-0 invisible scale-95 group-hover:opacity-100 group-hover:visible group-hover:scale-100 transition-all duration-150;
}
.nav-dropdown-item { @apply block px-4 py-2.5 text-sm text-on-surface hover:bg-surface-container hover:text-primary transition-colors; }
.mobile-nav-link { @apply block px-4 py-2.5 rounded-lg text-sm font-medium transition-colors; color:rgba(255,255,255,0.78); }
.mobile-nav-link:hover { color:#fff; background:rgba(255,255,255,0.1); }

/* === SITE HEADER (3-tier design) === */
.hdr-topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.15s ease;
}
.hdr-topbar-link:hover { color: rgba(255,255,255,0.85); }

/* Nav links inside tier-3 strip */
.hdr-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 15px;
  height: 100%;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  white-space: nowrap;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease, background 0.15s ease;
}
.hdr-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15px;
  right: 15px;
  height: 3px;
  background: #fed65b;
  border-radius: 2px 2px 0 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}
.hdr-nav-link:hover { color: #fff; background: rgba(255,255,255,0.07); }
.hdr-nav-link:hover::after { transform: scaleX(1); }
.hdr-nav-active { color: #fed65b !important; background: rgba(254,214,91,0.08) !important; font-weight: 600; }
.hdr-nav-active::after { transform: scaleX(1) !important; }

/* Dropdown wrapper — hover triggers child dropdown */
.hdr-drop {
  position: relative;
  display: flex;
  align-items: stretch;
}
.hdr-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 220px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,20,60,0.18), 0 4px 14px rgba(0,20,60,0.09);
  border: 1px solid rgba(0,30,64,0.07);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 1000;
  pointer-events: none;
}
.hdr-dropdown::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 7px;
  background: #fff;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
.hdr-drop:hover .hdr-dropdown,
.hdr-drop:focus-within .hdr-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}
/* Right-aligned variant for user menu */
.hdr-dropdown-r {
  left: auto;
  right: 0;
  transform: translateY(-6px);
}
.hdr-dropdown-r::before { left: auto; right: 20px; transform: none; }
.hdr-drop:hover .hdr-dropdown-r,
.hdr-drop:focus-within .hdr-dropdown-r {
  transform: translateY(0);
}
.hdr-drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: #191c1d;
  text-decoration: none;
  border-radius: 9px;
  transition: background 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}
.hdr-drop-item:hover { background: #f0f4f9; color: #001e40; }
.hdr-drop-item.danger { color: #ba1a1a; }
.hdr-drop-item.danger:hover { background: #fff0ef; }
.hdr-drop-item.primary { color: #001e40; font-weight: 600; }
.hdr-drop-divider { height: 1px; background: #e1e3e4; margin: 5px 6px; }
.hdr-drop-header { padding: 12px 14px 10px; border-bottom: 1px solid #e1e3e4; margin-bottom: 4px; }

/* Icon action button in header */
.hdr-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: none;
  color: rgba(255,255,255,0.72);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
  flex-shrink: 0;
}
.hdr-icon-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* Mobile drawer */
.hdr-mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(320px, 88vw);
  height: 100%;
  height: 100dvh; /* dynamic viewport height for mobile browsers */
  background: #001e40;
  z-index: 9999;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  touch-action: pan-y;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 40px rgba(0,0,0,0.35);
  -webkit-overflow-scrolling: touch;
}
.hdr-mobile-drawer.open { right: 0; }
.hdr-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
  backdrop-filter: blur(2px);
}
.hdr-mobile-overlay.open { opacity: 1; visibility: visible; transition: opacity 0.3s ease; }
.hdr-mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}
.hdr-mobile-link:hover { background: rgba(255,255,255,0.09); color: #fff; }
.hdr-mobile-sub { padding: 8px 20px 8px 36px; font-size: 13px; color: rgba(255,255,255,0.62); }
.hdr-mobile-sub:hover { color: #fed65b; background: rgba(254,214,91,0.07); }

/* === CARDS === */
.card {
  @apply bg-surface-container-lowest rounded-xl shadow-sm border border-outline-variant overflow-hidden;
  box-shadow: 0 1px 2px rgba(0,30,64,0.04), 0 8px 26px rgba(0,30,64,0.04);
}
.card-hover {
  @apply transition-all duration-200 hover:shadow-md hover:-translate-y-0.5;
}

/* === BUTTONS === */
.btn-primary {
  @apply inline-flex items-center justify-center gap-2 bg-primary text-on-primary px-5 py-2.5 rounded-xl font-semibold text-sm transition-all duration-200 hover:bg-primary-container hover:shadow-lg hover:-translate-y-px active:translate-y-0 active:shadow-none;
  min-height: 42px;
  box-shadow: 0 8px 18px rgba(0,30,64,0.18);
}
.btn-secondary {
  @apply inline-flex items-center justify-center gap-2 bg-secondary-container text-on-secondary-container px-5 py-2.5 rounded-xl font-semibold text-sm transition-all duration-200 hover:opacity-90 hover:shadow-md;
  min-height: 42px;
}
.btn-outline {
  @apply inline-flex items-center justify-center gap-2 border-2 border-primary text-primary bg-white px-5 py-2.5 rounded-xl font-semibold text-sm transition-all duration-200 hover:bg-primary hover:text-on-primary hover:shadow-md;
  min-height: 42px;
}
.btn-ghost {
  @apply inline-flex items-center justify-center gap-2 text-primary px-5 py-2.5 rounded-xl font-semibold text-sm transition-all duration-200 hover:bg-primary/10;
  min-height: 42px;
}
.btn-danger {
  @apply inline-flex items-center justify-center gap-2 bg-error text-on-error px-5 py-2.5 rounded-xl font-semibold text-sm transition-all duration-200 hover:bg-error/90 hover:shadow-md hover:-translate-y-px active:translate-y-0;
  min-height: 42px;
}
button.badge {
  border: 0;
  min-height: 26px;
}

/* === GLOBAL SUBMIT BUTTON DEFAULT ===
   :where() has zero specificity — any class rule wins automatically.
   This styles every bare submit button without needing to touch each file. */
:where(button[type="submit"], input[type="submit"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #001e40;
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  min-height: 42px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,30,64,0.18);
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
  white-space: nowrap;
}
:where(button[type="submit"], input[type="submit"]):hover {
  background-color: #003366;
  box-shadow: 0 6px 20px rgba(0,30,64,0.28);
  transform: translateY(-1px);
}
:where(button[type="submit"], input[type="submit"]):active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0,30,64,0.15);
}
:where(button[type="submit"], input[type="submit"]):focus-visible {
  outline: 2px solid #fed65b;
  outline-offset: 2px;
}
:where(button[type="submit"], input[type="submit"]):disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Keep real submit actions visibly primary, even when older markup used white
   outline/ghost button classes. Compact icon, badge, and destructive buttons
   keep their own specialized styling. */
button[type="submit"]:not(.badge):not(.btn-danger):not(.admin-action-delete):not([class*="text-error"]):not([class*="text-red"]):not([class*="p-1"]):not([class*="p-2"]),
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #001e40;
  color: #ffffff;
  border: 1px solid #001e40;
  border-radius: 12px;
  padding: 10px 24px;
  min-height: 42px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 10px 22px rgba(0,30,64,0.18);
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}
button[type="submit"]:not(.badge):not(.btn-danger):not(.admin-action-delete):not([class*="text-error"]):not([class*="text-red"]):not([class*="p-1"]):not([class*="p-2"]):hover,
input[type="submit"]:hover {
  background: #003366;
  border-color: #003366;
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(0,30,64,0.24);
  transform: translateY(-1px);
}
button[type="submit"].w-full,
input[type="submit"].w-full {
  width: 100%;
}

/* === FORMS === */
.form-group { @apply mb-5; }
.form-label { @apply block text-sm font-semibold text-on-surface mb-1.5; }
.form-input {
  @apply w-full bg-surface-container-low border border-outline-variant rounded-lg px-4 py-2.5 text-sm text-on-surface
    focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-all;
  min-height: 42px;
}
.form-input:focus { border-color: transparent; }
.form-textarea {
  @apply w-full bg-surface-container-low border border-outline-variant rounded-lg px-4 py-2.5 text-sm text-on-surface
    focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-all resize-y min-h-[120px];
}
.form-select {
  @apply w-full bg-surface-container-low border border-outline-variant rounded-lg px-4 py-2.5 text-sm text-on-surface
    focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-all;
  min-height: 42px;
}
.form-error { @apply text-error text-xs mt-1; }
.form-hint { @apply text-on-surface-variant text-xs mt-1; }

/* === BADGES === */
.badge {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-semibold;
}
.badge-primary { @apply bg-primary text-on-primary; }
.badge-gold { @apply bg-secondary-container text-on-secondary-container; }
.badge-success { @apply bg-green-100 text-green-800; }
.badge-error { @apply bg-error-container text-on-error-container; }
.badge-outline { @apply border border-outline text-on-surface-variant; }

/* === SECTION HEADERS === */
.section-header {
  @apply flex items-center gap-3 mb-6;
}
.section-title {
  @apply font-serif font-bold text-xl text-on-surface;
}
.section-rule {
  @apply h-px flex-1 bg-gradient-to-r from-secondary-container to-transparent;
}

/* === AVATAR === */
.avatar { @apply rounded-full object-cover; }
.avatar-sm { @apply h-8 w-8; }
.avatar-md { @apply h-12 w-12; }
.avatar-lg { @apply h-20 w-20; }
.avatar-xl { @apply h-32 w-32; }

/* === HERO === */
.hero-gradient {
  background: linear-gradient(135deg, #001e40 0%, #003366 40%, #1f477b 100%);
}
.gold-rule {
  height: 3px;
  background: linear-gradient(90deg, #D4AF37, #fed65b, #D4AF37);
  border-radius: 2px;
}

/* === TABLES === */
.data-table { @apply w-full; min-width: 760px; }
.data-table th { @apply px-4 py-3 text-left text-xs font-bold text-on-surface-variant uppercase tracking-wider bg-surface-container border-b border-outline-variant whitespace-nowrap; }
.data-table td { @apply px-4 py-3 text-sm text-on-surface border-b border-outline-variant/50 align-middle; }
.data-table tr:last-child td { @apply border-0; }
.data-table tr:hover td { @apply bg-surface-container-low; }

/* === PAGINATION === */
.pagination,
.admin-pagination { @apply flex items-center justify-center gap-1.5 flex-wrap; }
.page-btn { @apply min-w-9 h-9 px-3 flex items-center justify-center rounded-xl text-sm font-semibold text-on-surface bg-white border border-outline-variant hover:border-primary hover:text-primary hover:bg-primary/5 transition-all; }
.page-btn .material-symbols-outlined { font-size: 18px; }
.page-btn-active { @apply bg-primary text-on-primary border-primary shadow-md; }
.page-btn.disabled { @apply pointer-events-none opacity-40; }
.page-ellipsis { @apply px-2 text-outline font-semibold; }

/* === PROFILE === */
.profile-cover {
  @apply h-48 md:h-64 bg-gradient-to-r from-primary to-primary-container relative rounded-t-2xl overflow-hidden;
}
.profile-avatar-wrapper {
  @apply absolute -bottom-12 left-6 z-10;
}

/* === SIDEBAR === */
.sidebar-widget {
  @apply card p-4 mb-4;
}

/* === ANNOUNCEMENT TICKER === */
.ticker-wrap {
  @apply bg-secondary-container py-2 overflow-hidden;
}
.ticker-content {
  @apply flex gap-12 whitespace-nowrap animate-ticker text-on-secondary-container text-sm font-medium;
}
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.animate-ticker { animation: ticker 25s linear infinite; }

/* === ANIMATIONS === */
@keyframes slide-in { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }
.animate-slide-in { animation: slide-in 0.3s ease-out; }
@keyframes fade-in { from { opacity:0; } to { opacity:1; } }
.animate-fade-in { animation: fade-in 0.4s ease-out; }
@keyframes slide-up { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.animate-slide-up { animation: slide-up 0.5s ease-out; }

/* === PROSE (article content) === */
.prose h1, .prose h2, .prose h3 { @apply font-serif font-bold text-on-surface; }
.prose h2 { @apply text-xl mb-3 mt-6; }
.prose h3 { @apply text-lg mb-2 mt-4; }
.prose p { @apply text-on-surface text-base leading-relaxed mb-4; }
.prose ul, .prose ol { @apply ml-5 mb-4 space-y-1; }
.prose li { @apply text-on-surface text-base; }
.prose ul li { @apply list-disc; }
.prose ol li { @apply list-decimal; }
.prose blockquote { @apply border-l-4 border-secondary-container pl-4 italic text-on-surface-variant my-4; }
.prose img { @apply rounded-xl my-6 w-full; }
.prose a { @apply text-primary underline hover:text-primary-container; }
.prose strong { @apply font-bold text-on-surface; }
.prose code { @apply bg-surface-container px-1.5 py-0.5 rounded text-sm font-mono; }

/* ================================================================
   ADMIN PORTAL — PROFESSIONAL SIDEBAR + LAYOUT
================================================================ */

/* Sidebar shell */
.admin-sidebar {
  position: fixed;
  left: 0; top: 0;
  width: 272px;
  height: 100vh;
  height: 100dvh;
  background:
    radial-gradient(circle at 18% 0%, rgba(254,214,91,0.18), transparent 30%),
    linear-gradient(180deg, #001e40 0%, #001938 48%, #001329 100%);
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  z-index: 40;
  overflow: hidden;
  box-shadow: 12px 0 35px rgba(0, 20, 48, 0.14);
}

/* Brand strip */
.admin-sidebar-brand {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  background: rgba(0,0,0,0.16);
  box-shadow: inset 0 -1px 0 rgba(254,214,91,0.06);
}
.admin-sidebar-logo img,
.admin-sidebar-logo-fallback {
  width: 32px; height: 32px;
  border-radius: 8px;
  object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.4));
  flex-shrink: 0;
}
.admin-sidebar-logo-fallback {
  display: none;
  background: #fed65b;
  align-items: center;
  justify-content: center;
  color: #001e40;
  font-weight: 800;
  font-size: 11px;
  font-family: 'Playfair Display', serif;
}
.admin-sidebar-brand-text { min-width: 0; }
.admin-sidebar-brand-name {
  display: block;
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.admin-sidebar-brand-sub {
  display: block;
  color: #fed65b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 1px;
}

/* Scrollable area */
.admin-sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.22) transparent;
}
.admin-sidebar-scroll::-webkit-scrollbar { width: 3px; }
.admin-sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }
.admin-sidebar-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* User card */
.admin-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 12px 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}
.admin-sidebar-user-avatar {
  width: 34px; height: 34px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.18);
  flex-shrink: 0;
}
.admin-sidebar-user-info { flex: 1; min-width: 0; }
.admin-sidebar-user-name {
  display: block;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-sidebar-user-role {
  display: block;
  color: #fed65b;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}
.admin-sidebar-user-edit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  background: rgba(255,255,255,0.07);
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.admin-sidebar-user-edit:hover { background: rgba(255,255,255,0.14); color: #fff; }

/* Nav */
.admin-sidebar-nav { padding: 2px 0 0; }

/* Section labels */
.admin-nav-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 14px 6px 18px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.36);
  user-select: none;
}
.admin-nav-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.07);
}

/* Nav items */
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px 10px 14px;
  margin: 3px 10px;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  position: relative;
  white-space: nowrap;
  isolation: isolate;
}
.admin-nav-item::before {
  content: '';
  position: absolute;
  inset: 6px auto 6px 0;
  width: 3px;
  border-radius: 999px;
  background: #fed65b;
  opacity: 0;
  transform: scaleY(0.4);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.admin-nav-item > span:last-of-type {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-nav-item .material-symbols-outlined {
  width: 22px;
  font-size: 19px;
  flex-shrink: 0;
  color: rgba(255,255,255,0.52);
  font-variation-settings: 'FILL' 0, 'wght' 400;
  transition: color 0.18s ease, font-variation-settings 0.2s ease, transform 0.18s ease;
}
.admin-nav-item:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.08);
  color: #fff;
  transform: translateX(3px);
}
.admin-nav-item:hover .material-symbols-outlined {
  color: #fff;
  transform: scale(1.04);
}
.admin-nav-item.active {
  background: linear-gradient(90deg, rgba(254,214,91,0.2), rgba(255,255,255,0.07));
  border-color: rgba(254,214,91,0.25);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.08);
  transform: none;
}
.admin-nav-item.active::before {
  opacity: 1;
  transform: scaleY(1);
}
.admin-nav-item.active .material-symbols-outlined {
  color: #fed65b;
  font-variation-settings: 'FILL' 1, 'wght' 500;
}

/* Badge counts */
.admin-nav-badge {
  font-style: normal;
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1.6;
  flex-shrink: 0;
  text-align: center;
  box-shadow: 0 5px 14px rgba(0,0,0,0.18);
}
.admin-nav-badge-error { background: #ef4444; color: #fff; }
.admin-nav-badge-gold  { background: #fed65b; color: #001e40; }

/* Sidebar footer */
.admin-sidebar-footer {
  display: flex;
  gap: 4px;
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,0.07);
  background: rgba(0,0,0,0.12);
  flex-shrink: 0;
}
.admin-sidebar-footer-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  color: rgba(255,255,255,0.62);
  font-size: 11.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.admin-sidebar-footer-link .material-symbols-outlined { font-size: 16px; flex-shrink: 0; }
.admin-sidebar-footer-link:hover { background: rgba(255,255,255,0.09); color: #fff; }
.admin-sidebar-footer-logout { color: rgba(239,68,68,0.65); }
.admin-sidebar-footer-logout:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

/* Main content area */
.admin-main  { margin-left: 272px; min-height: 100vh; background: #f1f4f8; }
.admin-topbar { margin-left: 272px; }
.admin-main form .btn-primary,
.admin-main form .dashboard-btn-primary,
.admin-main button[type="submit"].btn-primary,
.admin-main button[type="submit"].dashboard-btn-primary {
  background: #001e40;
  color: #fff;
  border: 1px solid #001e40;
  border-radius: 12px;
  min-height: 42px;
  padding: 10px 20px;
  margin-top: 4px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(0,30,64,0.18);
}
.admin-main form .btn-primary:hover,
.admin-main form .dashboard-btn-primary:hover,
.admin-main button[type="submit"].btn-primary:hover,
.admin-main button[type="submit"].dashboard-btn-primary:hover {
  background: #003366;
  border-color: #003366;
  box-shadow: 0 14px 28px rgba(0,30,64,0.24);
}
.admin-main form .btn-outline,
.admin-main a.btn-outline {
  border-radius: 12px;
  min-height: 42px;
  padding: 10px 20px;
  margin-top: 4px;
  background: #fff;
}
.admin-main .card form > button[type="submit"]:not(.badge):not(.btn-danger):not(.dashboard-btn-danger):not([class*="text-error"]):not([class*="text-green"]):not([class*="p-1"]):not([class*="p-2"]) {
  background: #001e40;
  color: #fff;
  border: 1px solid #001e40;
  border-radius: 12px;
  min-height: 42px;
  padding: 10px 20px;
  margin-top: 4px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(0,30,64,0.18);
}
.admin-main .card form > button[type="submit"]:not(.badge):not(.btn-danger):not(.dashboard-btn-danger):not([class*="text-error"]):not([class*="text-green"]):not([class*="p-1"]):not([class*="p-2"]):hover {
  background: #003366;
  border-color: #003366;
}
.admin-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.admin-action-edit {
  background: rgba(0,30,64,0.06);
  color: #001e40;
  border-color: rgba(0,30,64,0.12);
}
.admin-action-edit:hover {
  background: #001e40;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0,30,64,0.18);
}
.admin-action-delete {
  background: #fff4f3;
  color: #ba1a1a;
  border-color: #ffdad6;
}
.admin-action-delete:hover {
  background: #ba1a1a;
  border-color: #ba1a1a;
  color: #fff;
  box-shadow: 0 8px 18px rgba(186,26,26,0.16);
}
.admin-main form button[type="submit"].btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #001e40;
  color: #fff;
  border: 1px solid #001e40;
  border-radius: 12px;
  min-height: 44px;
  padding: 11px 22px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(0,30,64,0.18);
}
.admin-main form button[type="submit"].btn-primary:hover {
  background: #003366;
  border-color: #003366;
  box-shadow: 0 14px 28px rgba(0,30,64,0.24);
}
.admin-main form button[type="submit"].btn-primary.w-full {
  width: 100%;
}
.admin-footer {
  margin-left: 272px;
  background: #fff;
  border-top: 1px solid #e1e4ea;
  color: #64748b;
}
.admin-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  font-size: 12px;
}
.admin-footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-footer-links a {
  color: #001e40;
  font-weight: 600;
  text-decoration: none;
}
.admin-footer-links a:hover { text-decoration: underline; }

/* === ADMIN CARDS (professional) === */
.admin-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8eaed;
  box-shadow: 0 1px 3px rgba(0,30,64,0.05), 0 1px 2px rgba(0,30,64,0.03);
  overflow: hidden;
}
.admin-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Stat card */
.admin-stat-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8eaed;
  box-shadow: 0 1px 3px rgba(0,30,64,0.05);
  padding: 20px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  overflow: hidden;
  position: relative;
}
.admin-stat-card:hover {
  box-shadow: 0 4px 16px rgba(0,30,64,0.1);
  transform: translateY(-1px);
}

/* Responsive — mobile sidebar */
@media (max-width: 1023px) {
  .admin-sidebar  {
    width: min(300px, 88vw);
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  }
  .admin-sidebar.open { transform: translateX(0); box-shadow: 8px 0 40px rgba(0,0,0,0.28); }
  .admin-main   { margin-left: 0 !important; }
  .admin-topbar { margin-left: 0 !important; }
  .admin-footer { margin-left: 0 !important; }
  .admin-footer-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }
}

@media (max-width: 420px) {
  .admin-sidebar-footer { flex-direction: column; }
  .admin-sidebar-footer-link { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-sidebar,
  .admin-nav-item,
  .admin-nav-item::before,
  .admin-nav-item .material-symbols-outlined {
    transition: none;
  }
}

/* === DASHBOARD STATS === */
.stat-card {
  @apply glass-card rounded-xl p-5 flex items-center gap-4;
}
.stat-icon {
  @apply h-12 w-12 rounded-xl flex items-center justify-center text-on-primary flex-shrink-0;
}

/* === LINE CLAMP === */
.line-clamp-1 { display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.line-clamp-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.line-clamp-3 { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c3c6d1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #737780; }

/* === MODAL === */
.modal-overlay {
  @apply fixed inset-0 bg-black/50 backdrop-blur-sm z-[100] flex items-center justify-center p-4;
}
.modal-box {
  @apply bg-surface-container-lowest rounded-2xl shadow-2xl max-w-lg w-full max-h-[90vh] overflow-y-auto animate-slide-up;
}

/* === RICH TEXT EDITOR === */
.ql-container { font-family: Inter, sans-serif !important; font-size: 16px !important; }
.ql-editor { min-height: 200px; }

/* === TIPTAP === */
.tiptap-editor { @apply border border-outline-variant rounded-lg overflow-hidden; }
.tiptap-toolbar { @apply flex flex-wrap gap-1 p-2 bg-surface-container border-b border-outline-variant; }
.tiptap-toolbar button { @apply p-1.5 rounded hover:bg-surface-container-high transition-colors; }
.tiptap-content { @apply p-4 min-h-[200px] focus:outline-none prose max-w-none; }

/* Gold accent line */
.gold-accent-left { border-left: 3px solid #D4AF37; }
.gold-accent-top { border-top: 3px solid #D4AF37; }

/* === ADMIN DASHBOARD BUTTONS === */
.dashboard-btn-primary {
  @apply flex items-center justify-center gap-2 w-full bg-primary text-white px-5 py-3 rounded-xl font-semibold text-sm
    transition-all duration-200 hover:bg-primary-container hover:shadow-lg hover:-translate-y-px active:translate-y-0 active:shadow-none;
}
.dashboard-btn-outline {
  @apply flex items-center justify-center gap-2 w-full border-2 border-outline-variant text-on-surface-variant px-5 py-3 rounded-xl font-semibold text-sm
    transition-all duration-200 hover:border-primary hover:text-primary hover:bg-primary/5;
}
.dashboard-btn-danger {
  @apply flex items-center justify-center gap-2 bg-error text-white px-5 py-3 rounded-xl font-semibold text-sm
    transition-all duration-200 hover:bg-error/90 hover:shadow-md active:shadow-none;
}

/* === ADMIN TEXTAREA === */
.admin-textarea {
  @apply w-full bg-surface-container-low border border-outline-variant rounded-xl px-4 py-3 text-sm text-on-surface
    focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary transition-all resize-y min-h-[120px]
    leading-relaxed placeholder:text-outline;
}
/* Override Quill theme to match design */
.ql-toolbar { @apply rounded-t-lg border-outline-variant !important; background: #edeeef; }
.ql-container { @apply rounded-b-lg text-on-surface !important; font-size: 14px !important; }
.ql-editor { min-height: 160px; }
.ql-editor.ql-blank::before { color: #737780; font-style: normal; }
.ql-toolbar.ql-snow { border-color: #c3c6d1 !important; }
.ql-container.ql-snow { border-color: #c3c6d1 !important; }

/* === RESPONSIVE UTILITIES === */

/* Tab system */
.tab-btn { @apply px-4 py-2 text-sm font-medium text-on-surface-variant border-b-2 border-transparent hover:text-primary hover:border-primary transition-all; }
.tab-btn.active { @apply text-primary border-primary font-semibold; }
.tab-content { @apply hidden; }
.tab-content.active { @apply block; }

/* Rating stars */
.star-rating { @apply flex gap-0.5; }
.star-full { @apply text-secondary-container; }
.star-empty { @apply text-outline-variant; }

/* ============================================================
   RESPONSIVE HEADER — breakpoint overrides
   ============================================================ */

/* Default: short name hidden (full name shown on md+) */
#hdr-name-short { display: none; }

/* ── Phone: < 480px ── */
@media (max-width: 479px) {
  /* Hide top info bar entirely */
  #hdr-topbar { display: none !important; }

  /* Compact brand bar */
  #hdr-brand-inner { padding: 10px 12px !important; gap: 8px !important; }
  #hdr-logo-link   { gap: 10px !important; }

  /* Smaller crest */
  #hdr-crest-ring  { width: 46px !important; height: 46px !important; }
  #hdr-crest-img   { width: 36px !important; height: 36px !important; }

  /* Show short name, hide full name */
  #hdr-name-full   { display: none !important; }
  #hdr-name-short  { display: block !important; }

  /* Right actions: tighter, hide Sign In */
  #hdr-actions     { gap: 2px !important; }
  .hdr-btn-signin  { display: none !important; }

  /* Join Free: icon only */
  .hdr-btn-join    { padding: 0 10px !important; height: 34px !important; gap: 0 !important; }
  .hdr-join-label  { display: none !important; }

  /* User pill: hide name, keep avatar */
  #hdr-actions .hidden { display: none !important; }
}

/* ── Small phone: 480px – 639px ── */
@media (min-width: 480px) and (max-width: 639px) {
  #hdr-topbar      { display: none !important; }
  #hdr-brand-inner { padding: 10px 16px !important; gap: 10px !important; }
  #hdr-logo-link   { gap: 12px !important; }

  #hdr-crest-ring  { width: 52px !important; height: 52px !important; }
  #hdr-crest-img   { width: 42px !important; height: 42px !important; }

  #hdr-name-full   { display: none !important; }
  #hdr-name-short  { display: block !important; }

  .hdr-btn-signin  { display: none !important; }

  /* Join Free: icon only on small phone */
  .hdr-btn-join    { padding: 0 12px !important; height: 36px !important; gap: 0 !important; }
  .hdr-join-label  { display: none !important; }
}

/* ── Large phone / Small tablet: 640px – 767px ── */
@media (min-width: 640px) and (max-width: 767px) {
  #hdr-topbar      { display: none !important; }
  #hdr-brand-inner { padding: 12px 20px !important; gap: 12px !important; }
  #hdr-logo-link   { gap: 14px !important; }

  #hdr-crest-ring  { width: 58px !important; height: 58px !important; }
  #hdr-crest-img   { width: 46px !important; height: 46px !important; }

  #hdr-name-full   { display: none !important; }
  #hdr-name-short  { display: block !important; }

  /* Sign In visible but smaller */
  .hdr-btn-signin  { padding: 0 12px !important; font-size: 12px !important; }
}

/* ── Tablet: 768px – 1023px ── */
@media (min-width: 768px) and (max-width: 1023px) {
  #hdr-brand-inner { padding: 14px 20px !important; }
  #hdr-logo-link   { gap: 14px !important; }

  #hdr-crest-ring  { width: 62px !important; height: 62px !important; }
  #hdr-crest-img   { width: 50px !important; height: 50px !important; }

  /* Full name at slightly smaller font */
  .hdr-name-text   { font-size: 17px !important; }

  /* Sign In: show but compact */
  .hdr-btn-signin  { padding: 0 12px !important; }
}

/* ── Small desktop: 1024px – 1199px — compact nav link padding ── */
@media (min-width: 1024px) and (max-width: 1199px) {
  .hdr-nav-link    { padding: 0 10px !important; font-size: 13px !important; }
  .hdr-nav-link::after { left: 10px !important; right: 10px !important; }
  #hdr-brand-inner { padding: 14px 20px !important; }
}

/* ── Touch: ensure tap targets are large enough ── */
@media (hover: none) {
  .hdr-icon-btn    { min-width: 44px; min-height: 44px; }
  .hdr-btn-join    { min-height: 44px; }
  .hdr-mobile-link { min-height: 48px; }
}
