/**
 * Fallback layout + tema gelap jika file CSS utama Next.js (Tailwind) gagal dimuat.
 * Dimuat dari /critical.css (statis) — pastikan Nginx/proxy tidak memblokir.
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: linear-gradient(135deg, #060d1f 0%, #0a1128 30%, #111c36 60%, #0a1128 100%);
  color: #e2e8f0;
  min-height: 100vh;
  overflow-x: hidden;
}

.network-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ── Shell dashboard ── */
.kencana-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  z-index: 10;
  box-sizing: border-box;
}

/* Desktop sidebar */
.kencana-sidebar-desktop {
  display: none;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 15rem;
  max-width: 100vw;
  z-index: 50;
  overflow-x: hidden;
  background: linear-gradient(180deg, #0d1b35 0%, #0f2040 50%, #0a1628 100%);
  border-right: 1px solid rgba(59, 130, 246, 0.12);
  box-sizing: border-box;
}

/* Mobile drawer */
.kencana-sidebar-mobile {
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 16rem;
  max-width: 100vw;
  z-index: 70;
  overflow-x: hidden;
  background: linear-gradient(180deg, #0d1b35 0%, #0f2040 50%, #0a1628 100%);
  border-right: 1px solid rgba(59, 130, 246, 0.12);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-sizing: border-box;
}

.kencana-sidebar-mobile.kencana-sidebar-open {
  transform: translateX(0);
}

.kencana-sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

/* Main column */
.kencana-main {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  color: #e2e8f0;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .kencana-sidebar-desktop {
    display: flex !important;
  }
  .kencana-sidebar-mobile {
    display: none !important;
  }
  .kencana-main {
    margin-left: 15rem;
  }
}

@media (max-width: 1023px) {
  .kencana-sidebar-desktop {
    display: none !important;
  }
}

/* Top bar */
.kencana-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  box-sizing: border-box;
  background: rgba(10, 17, 40, 0.95);
  border-bottom: 1px solid rgba(59, 130, 246, 0.12);
}

@media (min-width: 1024px) {
  .kencana-header {
    justify-content: flex-end;
  }
  .kencana-hamburger {
    display: none !important;
  }
}

.kencana-header-tools {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Avatar / gambar profil — cegah lingkaran hitam besar */
.kencana-header img {
  width: 2rem !important;
  height: 2rem !important;
  max-width: 2rem !important;
  max-height: 2rem !important;
  object-fit: cover;
  border-radius: 9999px;
  box-sizing: border-box;
}

.kencana-avatar-fallback {
  width: 2rem !important;
  height: 2rem !important;
  max-width: 2rem !important;
  max-height: 2rem !important;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  flex-shrink: 0;
  box-sizing: border-box;
}

.kencana-page {
  padding: 1rem 1.5rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  color: #e2e8f0;
  box-sizing: border-box;
}

/* Kartu & form (settings) */
.glass-card {
  background: linear-gradient(135deg, rgba(26, 39, 68, 0.85) 0%, rgba(15, 43, 118, 0.35) 100%);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.input-field {
  background: rgba(10, 17, 40, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  color: #e2e8f0;
  width: 100%;
  max-width: 100%;
  font-size: 14px;
  box-sizing: border-box;
}

.btn-primary {
  background: linear-gradient(135deg, #2d4fa8 0%, #3b82f6 100%);
  color: white;
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

h1, h2, h3, h4 {
  color: #dbeafe;
}

/* Video Face ID */
.face-webcam-video {
  max-width: 100%;
  max-height: min(55vh, 420px);
}

/* Overlay mobile */
.kencana-mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.5);
}

@media (min-width: 1024px) {
  .kencana-mobile-overlay {
    display: none !important;
  }
}
