/* ============================================================
   CBT Premium Theme — Maroon Elegant v2
   Updated: 2026-05-25
   ============================================================ */

:root {
  --color-brand-50: #fdf2f4;
  --color-brand-100: #f5d0d6;
  --color-brand-200: #e8a3b0;
  --color-brand-300: #d47285;
  --color-brand-400: #b84459;
  --color-brand-500: #7a1023;
  --color-brand-600: #7a1023;
  --color-brand-700: #5b0f1a;
  --color-blue-50: #fdf2f4;
  --color-blue-100: #f5d0d6;
  --color-blue-200: #e8a3b0;
  --color-blue-300: #d47285;
  --color-blue-400: #b84459;
  --color-blue-500: #7a1023;
  --color-blue-600: #7a1023;
  --color-blue-700: #5b0f1a;
  --color-blue-800: #3d0a12;
  --color-indigo-500: #7a1023;
}

/* ============================================================
   1. SIDEBAR — Gradasi Merah Marun Elegan
   ============================================================ */

aside.bg-slate-900 {
  background: linear-gradient(180deg, #5b0f1a 0%, #7a1023 50%, #8f1d2c 100%) !important;
  border-right: none !important;
  box-shadow: 4px 0 24px rgba(91, 15, 26, 0.3) !important;
}

/* Menu items — text & icon putih */
aside.bg-slate-900 nav button {
  border-radius: 12px !important;
  color: rgba(255, 255, 255, 0.85) !important;
  transition: all 0.2s ease !important;
}

aside.bg-slate-900 nav button svg {
  color: rgba(255, 255, 255, 0.85) !important;
}

aside.bg-slate-900 nav button span {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Hover menu — merah marun lebih gelap + glow halus */
aside.bg-slate-900 nav button:hover {
  background: rgba(0, 0, 0, 0.2) !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
}

aside.bg-slate-900 nav button:hover svg,
aside.bg-slate-900 nav button:hover span {
  color: #ffffff !important;
}

/* Menu aktif — background transparan putih + border-radius besar */
aside.bg-slate-900 nav button.bg-brand-600 {
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
  border-radius: 14px !important;
  color: #ffffff !important;
}

aside.bg-slate-900 nav button.bg-brand-600 svg,
aside.bg-slate-900 nav button.bg-brand-600 span {
  color: #ffffff !important;
}

/* Submenu items */
aside.bg-slate-900 nav .border-l-2 {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

aside.bg-slate-900 nav .border-l-2 button {
  color: rgba(255, 255, 255, 0.7) !important;
}

aside.bg-slate-900 nav .border-l-2 button svg {
  color: rgba(255, 255, 255, 0.7) !important;
}

aside.bg-slate-900 nav .border-l-2 button:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
}

aside.bg-slate-900 nav .border-l-2 button:hover svg {
  color: #ffffff !important;
}

/* Active submenu */
aside.bg-slate-900 nav .border-l-2 button.bg-white\/10 {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

aside.bg-slate-900 nav .border-l-2 button.bg-white\/10 svg {
  color: #ffffff !important;
}

/* Superadmin special buttons */
aside.bg-slate-900 .bg-white\/5 {
  background: rgba(255, 255, 255, 0.06) !important;
}

aside.bg-slate-900 .bg-white\/5:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================================
   2. HEADER LOGO — Background putih polos + shadow
   ============================================================ */

aside.bg-slate-900 > div:first-child,
aside.bg-slate-900 .h-24 {
  background: #ffffff !important;
  border-bottom: none !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
  padding: 1.5rem 2rem !important;
}

/* Logo text override to dark for white background */
aside.bg-slate-900 > div:first-child h1,
aside.bg-slate-900 .h-24 h1 {
  color: #1e293b !important;
}

aside.bg-slate-900 > div:first-child .text-brand-500,
aside.bg-slate-900 .h-24 .text-brand-500 {
  color: #7a1023 !important;
}

aside.bg-slate-900 > div:first-child .bg-brand-600,
aside.bg-slate-900 .h-24 .bg-brand-600 {
  background: #7a1023 !important;
}

/* Close button on mobile */
aside.bg-slate-900 > div:first-child button,
aside.bg-slate-900 .h-24 button.lg\:hidden {
  color: #64748b !important;
}

/* ============================================================
   3. CARD PROFILE ADMINISTRATOR — Navy dark
   ============================================================ */

aside.bg-slate-900 .border-t.border-white\/10 {
  background: #071426 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

aside.bg-slate-900 .border-t.border-white\/10 .bg-brand-600 {
  background: #7a1023 !important;
}

aside.bg-slate-900 .border-t.border-white\/10 p {
  color: rgba(255, 255, 255, 0.9) !important;
}

aside.bg-slate-900 .border-t.border-white\/10 .text-slate-400 {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Tombol logout tetap merah terang */
aside.bg-slate-900 .border-t.border-white\/10 .text-red-400 {
  color: #ef4444 !important;
}

aside.bg-slate-900 .border-t.border-white\/10 .text-red-400:hover {
  color: #f87171 !important;
}

/* ============================================================
   4. SEMUA TOMBOL — Dark Elegant
   ============================================================ */

.btn-premium-primary,
button.bg-brand-600,
a.bg-brand-600 {
  background: #111827 !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.25) !important;
  color: #ffffff !important;
  transition: all 0.2s ease !important;
}

.btn-premium-primary:hover,
button.bg-brand-600:hover,
a.bg-brand-600:hover {
  background: #1f2937 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(17, 24, 39, 0.3) !important;
}

/* Tombol di dalam sidebar TIDAK pakai dark — tetap transparan */
aside.bg-slate-900 button.bg-brand-600 {
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
}

aside.bg-slate-900 button.bg-brand-600:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  transform: none !important;
}

/* ============================================================
   5. SEMUA ELEMEN AKSEN — Marun Premium #7a1023
   ============================================================ */

.bg-blue-500,
.bg-blue-600,
.bg-blue-700,
.from-blue-500,
.from-blue-600,
.to-blue-500,
.to-blue-600 {
  background-color: #7a1023 !important;
}

.bg-gradient-to-r.from-brand-600.to-blue-500,
.bg-gradient-to-r.from-blue-600,
.bg-gradient-to-r.to-blue-500 {
  background-image: linear-gradient(135deg, #7a1023 0%, #5b0f1a 100%) !important;
}

.text-blue-500,
.text-blue-600,
.text-blue-700,
.hover\:text-blue-700:hover {
  color: #7a1023 !important;
}

.text-brand-400,
.text-brand-500 {
  color: #7a1023 !important;
}

.border-blue-100,
.border-blue-200,
.border-blue-300,
.border-blue-500,
.border-blue-600 {
  border-color: #e8a3b0 !important;
}

.bg-blue-50 {
  background-color: #fdf2f4 !important;
}

.focus\:ring-blue-500:focus,
.focus\:border-blue-500:focus,
.focus\:border-blue-600:focus {
  border-color: #7a1023 !important;
  --tw-ring-color: #7a1023 !important;
}

/* ============================================================
   6. DASHBOARD UTAMA — Clean Modern Premium
   ============================================================ */

html {
  background: #f1f5f9;
}

body {
  color: #0f172a;
  background: #f1f5f9;
}

.min-h-screen.bg-\[\#F8FAFC\] {
  background: #f8fafc !important;
}

/* Cards — putih dengan shadow lembut */
.premium-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06) !important;
}

.premium-card > .bg-white,
.premium-card .bg-white {
  background-color: #ffffff !important;
}

/* Header sticky */
header.sticky.bg-white {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  backdrop-filter: blur(12px) !important;
}

/* Table header */
table thead.bg-slate-700 {
  background: #111827 !important;
}

tbody tr:hover {
  background-color: #fdf2f4 !important;
}

/* Inputs */
.btn-premium-outline,
.input-premium,
input,
select,
textarea {
  border-radius: 8px !important;
}

.input-premium:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: #7a1023 !important;
  box-shadow: 0 0 0 3px rgba(122, 16, 35, 0.1) !important;
}

/* Border radius */
.rounded-2xl,
.rounded-xl {
  border-radius: 12px !important;
}

/* Shadows */
.shadow-2xl,
.shadow-xl,
.shadow-lg {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
}

/* Login page icon */
.min-h-screen.bg-\[\#F1F5F9\] .text-center.mb-10 > .bg-brand-600.w-20.h-20 {
  background: #ffffff !important;
  border: 1px solid #f5d0d6 !important;
  box-shadow: 0 12px 32px rgba(122, 16, 35, 0.12) !important;
}

.min-h-screen.bg-\[\#F1F5F9\] .text-center.mb-10 > .bg-brand-600.w-20.h-20 svg {
  color: #7a1023 !important;
}

.min-h-screen.bg-\[\#F1F5F9\] .text-center.mb-10 > p {
  color: #7a1023 !important;
}

/* Mobile header */
header.lg\:hidden.bg-slate-900 {
  background: linear-gradient(90deg, #5b0f1a 0%, #7a1023 100%) !important;
}

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

@media (max-width: 640px) {
  table {
    font-size: 13px;
  }

  .premium-card {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06) !important;
  }
}


/* ============================================================
   EXAM CONFIRM MODAL — Elegant & Centered
   ============================================================ */

/* Generic modal backdrop centering */
.fixed.inset-0.bg-black\/70,
.fixed.inset-0.bg-black\/60,
.fixed.inset-0.bg-slate-950\/80 {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem !important;
  background: rgba(7, 20, 38, 0.72) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

/* Modal cards inside backdrops — center & elegant */
.fixed.inset-0.bg-black\/70 > div:not([class*="absolute"]),
.fixed.inset-0.bg-black\/60 > div:not([class*="absolute"]),
.fixed.inset-0.bg-slate-950\/80 > div:not([class*="absolute"]) {
  margin: auto !important;
  border-radius: 18px !important;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  overflow: hidden !important;
  animation: cbtModalFadeIn 0.25s ease-out !important;
}

@keyframes cbtModalFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal headers — premium gradient */
.fixed.inset-0 .bg-brand-600.text-white,
.fixed.inset-0 .bg-amber-50,
.fixed.inset-0 .bg-red-50 {
  padding: 1.5rem 2rem !important;
}

.fixed.inset-0 .bg-brand-600 {
  background: linear-gradient(135deg, #5b0f1a 0%, #7a1023 100%) !important;
}

/* Modal action buttons — elegant pills */
.fixed.inset-0 button {
  border-radius: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  transition: all 0.18s ease !important;
  padding: 0.7rem 1.4rem !important;
}

/* Cancel/secondary button */
.fixed.inset-0 button.border.border-slate-200,
.fixed.inset-0 button.border-slate-200 {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #475569 !important;
}

.fixed.inset-0 button.border.border-slate-200:hover,
.fixed.inset-0 button.border-slate-200:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
  transform: translateY(-1px) !important;
}

/* Primary action button inside modals (Yes/Confirm) */
.fixed.inset-0 button.bg-brand-600,
.fixed.inset-0 button.bg-red-600 {
  background: linear-gradient(135deg, #7a1023 0%, #5b0f1a 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(122, 16, 35, 0.28) !important;
}

.fixed.inset-0 button.bg-brand-600:hover,
.fixed.inset-0 button.bg-red-600:hover {
  filter: brightness(1.05) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 12px 28px rgba(122, 16, 35, 0.35) !important;
}

/* Modal body padding */
.fixed.inset-0 .px-6,
.fixed.inset-0 .px-8 {
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

/* Fullscreen safety — hide scrollbars when in fullscreen */
:fullscreen,
:-webkit-full-screen {
  overflow: auto !important;
  background: #f8fafc !important;
}

:fullscreen body,
:-webkit-full-screen body {
  overflow: auto !important;
}
