/* ==========================================================
   Nex Lucky Draw – Professional Abstract Theme
   Design Principles:
   - Deep Sapphire Ambient Frame (Background Abstract & Navbar/Sidebar)
   - Luminous Crisp White Glass Cards for Data Sections (High Contrast & Readability)
   - Sharp High-Legibility Typography (#0f172a) on Bright Data Canvas
   ========================================================== */

:root {
  --nx-navy-950: #020817;
  --nx-navy-900: #050e26;
  --nx-navy-800: #0a1840;
  --nx-navy-700: #0f2260;
  --nx-sapphire: #2563eb;
  --nx-sky: #7dd3fc;
  --nx-cyan: #38bdf8;
  --nx-gold: #facc15;
  --nx-gold-glow: rgba(250, 204, 21, 0.4);
  --nx-text: #f8fafc;
  --nx-text-muted: #64748b;
  --nx-border: rgba(125, 211, 252, 0.25);
  --nx-border-glow: rgba(56, 189, 248, 0.45);
  --nx-card-bg: rgba(255, 255, 255, 0.96);
  --nx-card-shadow: 0 12px 32px -4px rgba(2, 6, 23, 0.35), 0 0 15px rgba(56, 189, 248, 0.08);
  --nx-radius: 16px;
}

/* Base Body untuk halaman ber-tema (Admin, Buku Tamu, Login, Remote) */
body.app-pro {
  background-color: transparent !important;
  color: var(--nx-text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  position: relative;
}

body.app-pro .layout,
body.app-pro .container-fluid,
body.app-pro .navbar,
body.app-pro .card-login,
body.app-pro .remote-container {
  position: relative;
  z-index: 1;
}

/* ---------- Top Navbar (Deep Sapphire Glass) ---------- */
body.app-pro .top-navbar,
body.app-pro .navbar {
  background: linear-gradient(90deg, rgba(5, 14, 38, 0.94), rgba(15, 34, 96, 0.88)) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nx-border) !important;
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.6);
}
body.app-pro .top-navbar { height: 58px; }
body.app-pro .navbar { position: sticky; top: 0; z-index: 1030; }

body.app-pro .navbar-brand,
body.app-pro .top-navbar .navbar-brand {
  background: linear-gradient(90deg, #ffffff, var(--nx-sky));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: 0.5px;
}

body.app-pro .btn-outline-light {
  border-color: rgba(125, 211, 252, 0.35);
  color: #e0f2fe;
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  transition: all 0.2s ease;
}
body.app-pro .btn-outline-light:hover {
  background: rgba(125, 211, 252, 0.18);
  border-color: var(--nx-sky);
  color: #fff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

/* ---------- Sidebar (Admin) ---------- */
body.app-pro .sidebar {
  background: linear-gradient(180deg, rgba(5, 14, 38, 0.96), rgba(10, 24, 64, 0.94)) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--nx-border) !important;
}

body.app-pro .sidebar .sidebar-brand {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--nx-border) !important;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.3), transparent);
}

body.app-pro .sidebar-nav .nav-section {
  color: rgba(125, 211, 252, 0.65);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

body.app-pro .sidebar-nav .nav-link {
  color: #cbd5e1;
  border-left: 0;
  border-radius: 12px;
  margin: 3px 0.6rem;
  padding: 0.65rem 0.9rem;
  transition: all 0.2s ease;
}
body.app-pro .sidebar-nav .nav-link:hover {
  background: rgba(56, 189, 248, 0.12);
  color: #ffffff;
  transform: translateX(3px);
}
body.app-pro .sidebar-nav .nav-link.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.65), rgba(56, 189, 248, 0.25));
  box-shadow: inset 3.5px 0 0 var(--nx-gold), 0 6px 18px -6px rgba(37, 99, 235, 0.85);
  font-weight: 600;
}
body.app-pro .sidebar-nav .nav-link.active i {
  color: var(--nx-gold);
}

/* ---------- Section Data / Kartu (Luminous Crisp White Glass) ---------- */
body.app-pro .card {
  background: var(--nx-card-bg) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: var(--nx-radius) !important;
  box-shadow: var(--nx-card-shadow) !important;
  color: #0f172a !important;
  overflow: hidden;
}

body.app-pro .card-header,
body.app-pro .card-header.bg-white {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  font-weight: 700;
  padding: 0.95rem 1.25rem;
}
body.app-pro .card-header i.bi {
  color: #2563eb !important;
}

/* Stat Cards dengan Aksen Neon & Angka Tajam */
body.app-pro .stat-card {
  position: relative;
  background: rgba(255, 255, 255, 0.96) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
body.app-pro .stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -6px rgba(2, 6, 23, 0.4), 0 0 20px rgba(56, 189, 248, 0.15) !important;
}
body.app-pro .stat-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; right: 0;
  height: 3.5px;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
}
body.app-pro .stat-card .fs-4 {
  font-size: 2rem !important;
  font-weight: 800;
  letter-spacing: -0.5px;
}
body.app-pro .stat-card .text-muted {
  color: #64748b !important;
  font-weight: 600;
}
body.app-pro #statTotal { color: #0284c7 !important; }
body.app-pro #statHadir { color: #16a34a !important; }
body.app-pro #statBelum { color: #64748b !important; }
body.app-pro #statMenang { color: #d97706 !important; }
body.app-pro #statTotalHadiah { color: #7c3aed !important; }
body.app-pro #statSisaHadiah { color: #dc2626 !important; }

/* ---------- Tabel Data (Super Crisp, High-Contrast & Jelas) ---------- */
body.app-pro .table,
body.app-pro .table-guest,
body.app-pro .table.bg-white,
body.app-pro .table-guest.bg-white,
body.app-pro .table-responsive {
  background: transparent !important;
  background-color: transparent !important;
  --bs-table-bg: transparent !important;
  --bs-table-accent-bg: transparent !important;
  --bs-table-striped-bg: transparent !important;
  --bs-table-active-bg: transparent !important;
  --bs-table-hover-bg: rgba(224, 242, 254, 0.6) !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}

body.app-pro .table thead,
body.app-pro .table thead tr,
body.app-pro .table > thead.table-light > tr > *,
body.app-pro .table-guest thead th,
body.app-pro .table thead th {
  background: #f1f5f9 !important;
  color: #0369a1 !important;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  border-bottom: 2px solid #cbd5e1 !important;
  border-top: none !important;
  padding: 0.85rem 0.75rem;
}

body.app-pro .table-hover > tbody > tr,
body.app-pro .table > tbody > tr {
  background-color: transparent !important;
  transition: background-color 0.15s ease;
}

body.app-pro .table-hover > tbody > tr > *,
body.app-pro .table > tbody > tr > *,
body.app-pro .table-guest tbody td {
  background-color: transparent !important;
  color: #0f172a !important;
  border-bottom: 1px solid #e2e8f0 !important;
  vertical-align: middle;
}

body.app-pro .table-hover > tbody > tr:hover > *,
body.app-pro .table-guest tbody tr:hover td {
  background-color: rgba(224, 242, 254, 0.6) !important;
}

body.app-pro .table td.text-muted,
body.app-pro .table-guest td.text-muted,
body.app-pro .table .text-muted,
body.app-pro .card .text-muted {
  color: #64748b !important;
}

body.app-pro .th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
body.app-pro .th-sort:hover {
  color: #0284c7 !important;
}

/* ---------- Form Controls (Terang & Mudah Diisi) ---------- */
body.app-pro .form-control,
body.app-pro .form-select {
  background-color: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
  border-radius: 10px;
}
body.app-pro .form-control::placeholder {
  color: #94a3b8 !important;
}
body.app-pro .form-control:focus,
body.app-pro .form-select:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15) !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
}
body.app-pro option {
  background: #ffffff !important;
  color: #0f172a !important;
}
body.app-pro .input-group-text {
  background-color: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #475569 !important;
}
body.app-pro .form-check-input {
  background-color: #e2e8f0;
  border-color: #cbd5e1;
}
body.app-pro .form-check-input:checked {
  background-color: #22c55e !important;
  border-color: #22c55e !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

/* ---------- Tombol Kontras Tinggi ---------- */
body.app-pro .btn {
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
}
body.app-pro .btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  border: 0;
  box-shadow: 0 4px 14px -2px rgba(37, 99, 235, 0.5);
  color: #ffffff !important;
}
body.app-pro .btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  box-shadow: 0 6px 18px -2px rgba(37, 99, 235, 0.6);
  transform: translateY(-1px);
}
body.app-pro .btn-outline-secondary {
  color: #475569 !important;
  border-color: #cbd5e1 !important;
}
body.app-pro .btn-outline-secondary:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
body.app-pro .btn-outline-primary {
  color: #2563eb !important;
  border-color: #93c5fd !important;
}
body.app-pro .btn-outline-primary:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}
body.app-pro .btn-outline-success {
  color: #16a34a !important;
  border-color: #86efac !important;
}
body.app-pro .btn-outline-success:hover {
  background: #16a34a !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
  transform: translateY(-1px);
}
body.app-pro .btn-outline-warning {
  color: #b45309 !important;
  border-color: #fde68a !important;
}
body.app-pro .btn-outline-warning:hover {
  background: #d97706 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
  transform: translateY(-1px);
}
body.app-pro .btn-outline-danger {
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
}
body.app-pro .btn-outline-danger:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  transform: translateY(-1px);
}

/* ---------- Modal & Alert ---------- */
body.app-pro .modal-content {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 60px -15px rgba(2, 6, 23, 0.5) !important;
  color: #0f172a !important;
}
body.app-pro .modal-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}
body.app-pro .modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
}
body.app-pro .modal-body label {
  color: #334155 !important;
  font-weight: 600;
}
body.app-pro .modal-body .text-muted {
  color: #64748b !important;
}
body.app-pro .btn-close {
  filter: none !important;
}
body.app-pro .alert {
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 12px !important;
}

/* ---------- Typography & Utility ---------- */
body.app-pro .text-muted {
  color: var(--nx-text-muted) !important;
}
body.app-pro .page-hero h4 {
  color: #ffffff;
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 20px rgba(56, 189, 248, 0.45);
}
body.app-pro .page-hero p {
  color: var(--nx-sky) !important;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.75rem !important;
  font-weight: 600;
}
body.app-pro .hero-logo {
  background: rgba(255, 255, 255, 0.95);
  padding: 6px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Card Login */
body.app-pro.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
}
body.app-pro .card-login {
  max-width: 420px;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 24px !important;
  box-shadow: 0 35px 80px -15px rgba(2, 6, 23, 0.6) !important;
  color: #0f172a !important;
}
body.app-pro .card-login .brand {
  background: linear-gradient(90deg, #0f172a, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* Remote Container */
body.app-pro .remote-container {
  position: relative;
  z-index: 1;
}
body.app-pro .judul-acara {
  color: #ffffff;
  font-weight: 800;
  text-shadow: 0 2px 20px rgba(56, 189, 248, 0.6);
}
body.app-pro .status-koneksi {
  color: #bae6fd;
}
body.app-pro #tombolKonek {
  border-color: rgba(125, 211, 252, 0.55);
  background: rgba(56, 189, 248, 0.12);
  color: #ffffff;
}
body.app-pro #tombolKonek:hover {
  background: rgba(56, 189, 248, 0.25);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

/* Scrollbar */
body.app-pro ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
body.app-pro ::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.35);
  border-radius: 8px;
}
body.app-pro ::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.6);
}
