/* ========================================================
   THEME: NAVY & GOLD  (aktif hanya jika <body class="theme-navy">)
   Halaman cetak tidak memakai class ini, sehingga tidak terpengaruh.
   ======================================================== */

body.theme-navy {
  --navy-950: #071a45;
  --navy-900: #0a2154;
  --navy-800: #0e2b6b;
  --navy-700: #12347f;
  --navy-600: #1a43a0;
  --navy-500: #2455c4;
  --gold: #f5c431;
  --gold-soft: #ffd75e;
  --gold-deep: #d9a712;
  --line: rgba(150, 182, 255, 0.18);

  --primary: #f5c431;
  --primary-hover: #ffd75e;
  --primary-light: rgba(245, 196, 49, 0.14);
  --primary-border: rgba(245, 196, 49, 0.45);
  --secondary: #a9bde6;
  --secondary-light: rgba(255, 255, 255, 0.08);
  --success: #34d399;
  --success-light: rgba(52, 211, 153, 0.14);
  --success-border: rgba(52, 211, 153, 0.4);
  --warning: #f5c431;
  --warning-light: rgba(245, 196, 49, 0.16);
  --warning-border: rgba(245, 196, 49, 0.45);
  --danger: #ff7b7b;
  --danger-light: rgba(255, 99, 99, 0.14);
  --danger-border: rgba(255, 99, 99, 0.4);
  --purple: #b79cff;
  --purple-light: rgba(183, 156, 255, 0.16);

  --bg-body: var(--navy-900);
  --bg-card: var(--navy-700);
  --bg-sidebar: var(--navy-950);
  --bg-sidebar-hover: rgba(255, 255, 255, 0.07);
  --border-color: var(--line);
  --text-main: #ffffff;
  --text-muted: #a9bde6;
  --text-light: #8aa4d8;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 10px rgba(3, 12, 40, 0.35);
  --shadow-md: 0 8px 22px rgba(3, 12, 40, 0.45);
  --shadow-lg: 0 14px 34px rgba(3, 12, 40, 0.5);

  background: radial-gradient(1200px 600px at 80% -10%, #16409a 0%, transparent 60%),
              linear-gradient(180deg, var(--navy-900), var(--navy-950));
  background-attachment: fixed;
  color: var(--text-main);
}

body.theme-navy ::selection { background: var(--gold); color: var(--navy-950); }

/* ---------- Sidebar ---------- */
body.theme-navy .app-sidebar {
  background: linear-gradient(180deg, #0a1f50 0%, #061641 100%);
  border-right: 1px solid var(--line);
  box-shadow: 6px 0 30px rgba(2, 8, 30, 0.45);
}
body.theme-navy .sidebar-brand { border-bottom: 1px solid var(--line); }
body.theme-navy .brand-text h2 { color: #fff; letter-spacing: 1.2px; font-size: 15px; }
body.theme-navy .brand-text h2::first-line { color: var(--gold); }
body.theme-navy .brand-text span { color: var(--text-muted); }
body.theme-navy .menu-section {
  color: var(--gold);
  opacity: 0.8;
  font-size: 10.5px;
  letter-spacing: 1.2px;
}
body.theme-navy .nav-link {
  color: #d8e3ff;
  border-radius: 10px;
  border: 1px solid transparent;
}
body.theme-navy .nav-link .icon {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gold);
}
body.theme-navy .nav-link .icon svg {
  width: 19px; height: 19px;
  stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
body.theme-navy .nav-link:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line);
  color: #fff;
}
body.theme-navy .nav-link.active {
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  color: var(--navy-950);
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(245, 196, 49, 0.28);
}
body.theme-navy .nav-link.active .icon { color: var(--navy-950); }
body.theme-navy .sidebar-footer { border-top: 1px solid var(--line); background: rgba(0, 0, 0, 0.2); }
body.theme-navy .user-avatar { background: var(--gold); color: var(--navy-950); border-color: rgba(255,255,255,.25); }
body.theme-navy .user-info .user-role { color: var(--text-muted); }
body.theme-navy .btn-logout { color: #ff9a9a; display: inline-flex; }
body.theme-navy .btn-logout svg,
body.theme-navy .tb-icon-btn svg {
  width: 18px; height: 18px; stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Topbar ---------- */
body.theme-navy .app-topbar {
  background: rgba(8, 26, 72, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
body.theme-navy .topbar-title h1 {
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 18px;
}
body.theme-navy .topbar-title h1 em { color: var(--gold); font-style: normal; }
body.theme-navy .topbar-title span { color: var(--text-muted); }
body.theme-navy .tb-status {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; border-radius: 999px;
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #6ee7b7; font-size: 12px; font-weight: 700;
}
body.theme-navy .tb-status::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: #34d399; box-shadow: 0 0 8px #34d399;
}
body.theme-navy .tb-icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 10px; font-size: 12.5px; font-weight: 600;
  color: #fff; border: 1px solid var(--line); background: rgba(255,255,255,.05);
  transition: all .2s ease;
}
body.theme-navy .tb-icon-btn:hover { border-color: var(--gold); color: var(--gold); }
body.theme-navy .tb-icon-btn.danger { color: #ff9a9a; border-color: rgba(255,120,120,.4); }
body.theme-navy .tb-icon-btn.danger:hover { background: rgba(255,99,99,.15); color: #fff; }
body.theme-navy .tb-date { font-size: 12.5px; color: var(--text-muted); }

/* ---------- Cards ---------- */
body.theme-navy .card {
  background: linear-gradient(180deg, rgba(26, 67, 160, 0.55), rgba(18, 52, 127, 0.75));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
body.theme-navy .card-header { border-bottom: 1px solid var(--line); }
body.theme-navy .card-title { color: #fff; }

/* ---------- Stat cards (dashboard) ---------- */
body.theme-navy .stat-card {
  background: linear-gradient(135deg, var(--navy-600), var(--navy-700));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: #fff;
}
body.theme-navy .stat-card:hover { border-color: rgba(245,196,49,.5); }
body.theme-navy .stat-icon { background: rgba(255,255,255,.12); color: #fff; }
body.theme-navy .stat-details h3 { color: #fff; }
body.theme-navy .stat-details p { color: #cfdcff; }

body.theme-navy .nv-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px; margin-bottom: 22px;
}
body.theme-navy .nv-stat {
  position: relative; overflow: hidden;
  display: block; color: #fff;
  background: linear-gradient(135deg, var(--navy-500), var(--navy-600));
  border: 1px solid rgba(150, 182, 255, 0.3);
  border-radius: 16px; padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
body.theme-navy .nv-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
body.theme-navy .nv-stat .lbl { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #e6eeff; }
body.theme-navy .nv-stat .lbl svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
body.theme-navy .nv-stat .val { font-size: 34px; font-weight: 800; line-height: 1.15; margin-top: 8px; letter-spacing: -0.5px; }
body.theme-navy .nv-stat .sub { font-size: 11.5px; color: #c4d4ff; margin-top: 2px; }
body.theme-navy .nv-stat.gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  border-color: rgba(255, 224, 120, .8); color: var(--navy-950);
  box-shadow: 0 10px 26px rgba(245, 196, 49, .28);
}
body.theme-navy .nv-stat.gold .lbl, body.theme-navy .nv-stat.gold .sub { color: #4b3a00; }
body.theme-navy .nv-ring-wrap { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
body.theme-navy .nv-ring { width: 54px; height: 54px; flex: none; }
body.theme-navy .nv-ring circle { fill: none; stroke-width: 6; }
body.theme-navy .nv-ring .bg { stroke: rgba(255,255,255,.18); }
body.theme-navy .nv-ring .fg { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
body.theme-navy .nv-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.18); margin-top: 6px; overflow: hidden; }
body.theme-navy .nv-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 6px; }

/* ========================================================
   ALUR PERJALANAN BERKAS (FULL-WIDTH & ENLARGED GRAPHICS)
   ======================================================== */
body.theme-navy .nv-flow-full {
  width: 100%;
  background: linear-gradient(180deg, rgba(26, 67, 160, 0.6), rgba(14, 43, 107, 0.85));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 30px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
body.theme-navy .nv-flow-full::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(245, 196, 49, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
body.theme-navy .nv-flow-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(150, 182, 255, 0.16);
}
body.theme-navy .nv-flow-header h3 {
  font-size: 17.5px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
body.theme-navy .nv-flow-header h3 svg {
  width: 22px;
  height: 22px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.theme-navy .nv-flow-header small {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13px;
  margin-left: 6px;
}

body.theme-navy .nv-flow-grid {
  display: grid;
  grid-template-columns: 1fr 50px 1fr 50px 1fr 50px 1fr 50px 1fr;
  align-items: center;
  gap: 6px;
}
body.theme-navy .nv-flow-step {
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 10px;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.25s ease;
}
body.theme-navy .nv-flow-step:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}
body.theme-navy .nv-flow-step .step-icon-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 12px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2054cd 0%, #103487 100%);
  border: 2px solid rgba(150, 182, 255, 0.4);
  color: var(--gold);
  box-shadow: 0 10px 24px rgba(2, 8, 30, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  transition: all 0.3s ease;
}
body.theme-navy .nv-flow-step:hover .step-icon-wrap {
  transform: translateY(-4px) scale(1.03);
  border-color: var(--gold);
  box-shadow: 0 14px 30px rgba(245, 196, 49, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.35);
}
body.theme-navy .nv-flow-step .step-icon-wrap svg {
  width: 42px;
  height: 42px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
body.theme-navy .nv-flow-step .step-number {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--navy-950);
  font-weight: 900;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  border: 2px solid #0e2b6b;
}
body.theme-navy .nv-flow-step .step-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 6px;
}
body.theme-navy .nv-flow-step .step-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: rgba(245, 196, 49, 0.16) !important;
  color: var(--gold) !important;
  border: 1px solid rgba(245, 196, 49, 0.45);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
body.theme-navy .nv-flow-step .step-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.35;
}

body.theme-navy .nv-flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 3px;
  background: linear-gradient(90deg, rgba(245, 196, 49, 0.3), var(--gold));
  margin-top: -50px; /* sejajar titik tengah ikon */
  border-radius: 2px;
}
body.theme-navy .nv-flow-arrow::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -5px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid var(--gold);
}

@media (max-width: 1024px) {
  body.theme-navy .nv-flow-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 14px;
  }
  body.theme-navy .nv-flow-arrow {
    display: none;
  }
}
@media (max-width: 640px) {
  body.theme-navy .nv-flow-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Backward compatibility */
body.theme-navy .nv-panel {
  background: linear-gradient(180deg, rgba(26, 67, 160, .5), rgba(14, 43, 107, .8));
  border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
body.theme-navy .nv-panel h3 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 14px; display: flex; justify-content: space-between; }
body.theme-navy .nv-panel h3 small { color: var(--text-muted); font-weight: 500; font-size: 11.5px; }

/* ---------- Tables ---------- */
body.theme-navy .table { color: #fff; }
body.theme-navy .table th {
  background: rgba(36, 85, 196, 0.55);
  color: #e6eeff;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
body.theme-navy .table td { border-bottom: 1px solid var(--line); }
body.theme-navy .table tr:hover td { background: rgba(255, 255, 255, 0.06); }
body.theme-navy .table a { color: var(--gold); }

/* ---------- Badges ---------- */
body.theme-navy .badge { border-radius: 999px; padding: 4px 12px; }
body.theme-navy .badge-success { background: rgba(52,211,153,.16); color: #6ee7b7; border-color: rgba(52,211,153,.45); }
body.theme-navy .badge-warning { background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: var(--navy-950); border-color: transparent; font-weight: 700; }
body.theme-navy .badge-danger { background: rgba(255,99,99,.16); color: #ffb0b0; border-color: rgba(255,99,99,.45); }
body.theme-navy .badge-info { background: #2f6bff; color: #fff; border-color: transparent; }
body.theme-navy .badge-purple { background: var(--purple-light); color: #d4c4ff; }
body.theme-navy .badge-secondary { background: rgba(255,255,255,.1); color: #dbe6ff; border: 1px solid var(--line); }
body.theme-navy .role-developer { background: rgba(192,38,211,.18); color: #f0abfc; border-color: rgba(240,171,252,.5); }
body.theme-navy .role-admin { background: rgba(255,99,99,.16); color: #ffb0b0; border-color: rgba(255,99,99,.45); }
body.theme-navy .role-petugas { background: rgba(245,196,49,.16); color: var(--gold); border-color: rgba(245,196,49,.5); }
body.theme-navy .role-viewer { background: rgba(183,156,255,.16); color: #d4c4ff; border-color: rgba(183,156,255,.45); }

/* ---------- Forms & buttons ---------- */
body.theme-navy .form-label { color: #dbe6ff; }
body.theme-navy .form-control,
body.theme-navy input[type="text"], body.theme-navy input[type="number"],
body.theme-navy input[type="password"], body.theme-navy input[type="date"],
body.theme-navy input[type="email"], body.theme-navy input[type="search"],
body.theme-navy select, body.theme-navy textarea {
  background-color: rgba(7, 26, 69, 0.55);
  border: 1.5px solid rgba(150, 182, 255, 0.3);
  color: #fff;
  color-scheme: dark;
}
body.theme-navy .form-control:focus,
body.theme-navy select:focus, body.theme-navy textarea:focus, body.theme-navy input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 196, 49, 0.2);
}
body.theme-navy ::placeholder { color: #7f98cf; opacity: 1; }
body.theme-navy select option { background: #0e2b6b; color: #fff; }
body.theme-navy input[type="file"] { color: #cfdcff; }
body.theme-navy input[type="file"]::file-selector-button {
  background: rgba(245,196,49,.16); color: var(--gold); border: 1px solid rgba(245,196,49,.5);
  border-radius: 8px; padding: 4px 10px; margin-right: 8px; font-weight: 600; cursor: pointer;
}
body.theme-navy input[type="checkbox"], body.theme-navy input[type="radio"] { accent-color: var(--gold); }
body.theme-navy .input-icon, body.theme-navy .toggle-password { color: var(--text-light); }

body.theme-navy .btn-primary {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--navy-950);
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(245, 196, 49, 0.28);
}
body.theme-navy .btn-primary:hover { background: linear-gradient(135deg, #ffe388, var(--gold-soft)); box-shadow: 0 8px 20px rgba(245,196,49,.4); }
body.theme-navy .btn-outline {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(150, 182, 255, 0.35);
  color: #fff;
}
body.theme-navy .btn-outline:hover { background: rgba(245, 196, 49, 0.14); border-color: var(--gold); color: var(--gold); }

body.theme-navy .alert-error { background: rgba(255,99,99,.14); color: #ffc2c2; border-color: rgba(255,99,99,.45); }
body.theme-navy .alert-success { background: rgba(52,211,153,.14); color: #a7f3d0; border-color: rgba(52,211,153,.45); }
body.theme-navy .alert-warning { background: rgba(245,196,49,.14); color: #ffe69a; border-color: rgba(245,196,49,.45); }

body.theme-navy .tipe-radio-item { color: #e6eeff; }
body.theme-navy .tipe-radio-item:hover { color: var(--gold); }
body.theme-navy .tipe-radio-item input[type="radio"] { accent-color: var(--gold); }

body.theme-navy .timeline::before { background: var(--line); }
body.theme-navy .timeline-dot { background: var(--navy-900); border-color: var(--gold); }
body.theme-navy .timeline-content { background: rgba(255,255,255,.06); border-color: var(--line); }
body.theme-navy .timeline-text { color: #fff; }

/* ========================================================
   OVERRIDE INLINE STYLE LAMA (halaman yang sudah ada)
   ======================================================== */
/* permukaan putih -> kartu navy */
body.theme-navy [style*="background:white"], body.theme-navy [style*="background: white"],
body.theme-navy [style*="background:#fff;"], body.theme-navy [style*="background: #fff;"],
body.theme-navy [style*="background:#ffffff"], body.theme-navy [style*="background: #ffffff"],
body.theme-navy [style*="background-color:white"], body.theme-navy [style*="background-color: white"] {
  background: var(--navy-700) !important;
  color: #fff;
  border-color: var(--line) !important;
}
/* permukaan abu-abu terang -> panel transparan */
body.theme-navy [style*="background:#f8fafc"], body.theme-navy [style*="background: #f8fafc"],
body.theme-navy [style*="background:#f1f5f9"], body.theme-navy [style*="background: #f1f5f9"],
body.theme-navy [style*="background:#f9fafb"], body.theme-navy [style*="background: #f9fafb"] {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: var(--line) !important;
  color: #fff;
}
/* teks gelap lama -> terang */
body.theme-navy [style*="color:#0f172a"], body.theme-navy [style*="color: #0f172a"],
body.theme-navy [style*="color:#1e293b"], body.theme-navy [style*="color: #1e293b"],
body.theme-navy [style*="color:#334155"], body.theme-navy [style*="color: #334155"],
body.theme-navy [style*="color:#111827"], body.theme-navy [style*="color:#000"],
body.theme-navy [style*="color:#1f2937"] {
  color: #fff !important;
}
body.theme-navy [style*="color:#475569"], body.theme-navy [style*="color: #475569"],
body.theme-navy [style*="color:#64748b"], body.theme-navy [style*="color: #64748b"],
body.theme-navy [style*="color:#94a3b8"] {
  color: #b7c8f0 !important;
}
/* chip berwarna terang tetap terbaca (teks gelap) */
body.theme-navy [style*="background:#f0fdf4"], body.theme-navy [style*="background:#eff6ff"],
body.theme-navy [style*="background:#fef2f2"], body.theme-navy [style*="background:#fffbeb"],
body.theme-navy [style*="background:#fef3c7"], body.theme-navy [style*="background:#ecfdf5"],
body.theme-navy [style*="background:#f5f3ff"], body.theme-navy [style*="background:#f0f9ff"],
body.theme-navy [style*="background:#fdf4ff"] {
  color: #0f172a;
}
body.theme-navy [style*="border:1px solid #e2e8f0"], body.theme-navy [style*="border: 1px solid #e2e8f0"],
body.theme-navy [style*="border:1px solid #cbd5e1"], body.theme-navy [style*="border-bottom:1px solid #e2e8f0"] {
  border-color: var(--line) !important;
}
body.theme-navy .card a:not(.btn):not(.badge) { color: var(--gold); }
body.theme-navy hr { border-color: var(--line); }
body.theme-navy code { background: rgba(255,255,255,.1); color: var(--gold-soft); padding: 1px 6px; border-radius: 5px; }
body.theme-navy small { color: var(--text-muted); }

/* scrollbar */
body.theme-navy ::-webkit-scrollbar { width: 10px; height: 10px; }
body.theme-navy ::-webkit-scrollbar-track { background: transparent; }
body.theme-navy ::-webkit-scrollbar-thumb { background: rgba(150,182,255,.3); border-radius: 8px; }
body.theme-navy ::-webkit-scrollbar-thumb:hover { background: rgba(245,196,49,.6); }

/* ---------- Login ---------- */
body.theme-navy .auth-wrapper {
  background: radial-gradient(900px 500px at 15% 10%, #1f4fc0 0%, transparent 60%),
              radial-gradient(700px 400px at 90% 90%, rgba(245,196,49,.18) 0%, transparent 60%),
              linear-gradient(180deg, var(--navy-900), var(--navy-950));
}
body.theme-navy .auth-wrapper::before { background: radial-gradient(circle, rgba(245,196,49,.2) 0%, transparent 70%); }
body.theme-navy .auth-wrapper::after { background: radial-gradient(circle, rgba(36,85,196,.45) 0%, transparent 70%); }
body.theme-navy .auth-card {
  background: linear-gradient(180deg, rgba(26,67,160,.75), rgba(10,33,84,.92));
  border: 1px solid rgba(150,182,255,.3);
  box-shadow: 0 30px 60px rgba(2, 8, 30, .6);
}
body.theme-navy .auth-header h1 { color: #fff; letter-spacing: 1px; }
body.theme-navy .auth-header h1::first-line { color: var(--gold); }
body.theme-navy .auth-header p { color: var(--text-muted); }

@media (max-width: 1100px) {
  body.theme-navy .nv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.theme-navy .nv-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body.theme-navy .nv-stats { grid-template-columns: 1fr; }
}

/* Guide / Panduan */
body.theme-navy .guide-card {
  background: linear-gradient(180deg, rgba(26, 67, 160, 0.55), rgba(18, 52, 127, 0.75)) !important;
  border-color: var(--line) !important;
  box-shadow: var(--shadow-sm);
}
body.theme-navy .guide-header {
  background: rgba(14, 43, 107, 0.6) !important;
  border-bottom: 1px solid var(--line) !important;
}
body.theme-navy .guide-header h3 {
  color: #fff !important;
}
body.theme-navy .step-badge {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold)) !important;
  color: var(--navy-950) !important;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(245, 196, 49, 0.3);
}
body.theme-navy .active-tag {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold)) !important;
  color: var(--navy-950) !important;
  border-color: var(--gold) !important;
  font-weight: 700;
}

/* ========================================================
   CARE, CHAT & RATING MODULE STYLES (NAVY & GOLD)
   ======================================================== */
.care-nav-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.care-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #cfdcff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}
.care-nav-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(245, 196, 49, 0.4);
}
.care-nav-tab.active {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--navy-950);
  border-color: var(--gold);
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(245, 196, 49, 0.35);
}

/* Chat Layout */
.chat-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  min-height: 650px;
  height: calc(100vh - 230px);
  background: rgba(10, 31, 80, 0.4);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.chat-sidebar {
  background: rgba(7, 26, 69, 0.7);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 43, 107, 0.5);
}

.chat-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  color: #fff;
  font-size: 13px;
  outline: none;
}
.chat-search-input:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.12);
}

.chat-user-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.chat-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  margin-bottom: 4px;
  text-decoration: none;
  color: #d8e3ff;
}
.chat-user-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line);
}
.chat-user-item.active {
  background: linear-gradient(90deg, rgba(245, 196, 49, 0.18), rgba(245, 196, 49, 0.05));
  border-color: var(--gold);
  color: #fff;
}

.chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy-500), var(--navy-600));
  border: 1px solid rgba(150, 182, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: var(--gold);
  position: relative;
  flex-shrink: 0;
}
.chat-avatar.lounge-avatar {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}
.chat-avatar .online-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid var(--navy-950);
}

.chat-user-info {
  flex: 1;
  min-width: 0;
}
.chat-user-name {
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}
.chat-user-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.chat-main {
  display: flex;
  flex-direction: column;
  background: rgba(10, 31, 80, 0.25);
  overflow: hidden;
}

.chat-main-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 43, 107, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages-body {
  flex: 1;
  padding: 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-msg-row {
  display: flex;
  gap: 12px;
  max-width: 78%;
}
.chat-msg-row.outgoing {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-msg-row.incoming {
  align-self: flex-start;
}

.chat-bubble {
  padding: 12px 18px;
  border-radius: 16px;
  position: relative;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}
.chat-msg-row.incoming .chat-bubble {
  background: rgba(22, 58, 142, 0.7);
  border: 1px solid var(--line);
  color: #f1f5f9;
  border-top-left-radius: 4px;
}
.chat-msg-row.outgoing .chat-bubble {
  background: linear-gradient(135deg, rgba(36, 85, 196, 0.95), rgba(26, 67, 160, 0.95));
  border: 1px solid rgba(245, 196, 49, 0.35);
  color: #fff;
  border-top-right-radius: 4px;
}
.chat-bubble-sender {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-bubble-meta {
  font-size: 10.5px;
  color: #a9bde6;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.chat-msg-row.outgoing .chat-bubble-meta {
  color: rgba(255, 255, 255, 0.75);
}

.chat-quick-templates {
  padding: 8px 20px;
  background: rgba(14, 43, 107, 0.3);
  border-top: 1px solid rgba(150, 182, 255, 0.1);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
}
.chat-quick-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: #cbd5e1;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.chat-quick-btn:hover {
  background: rgba(245, 196, 49, 0.15);
  color: var(--gold);
  border-color: var(--gold);
}

.chat-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: rgba(14, 43, 107, 0.6);
  position: relative;
}
.chat-input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  position: relative;
}
.chat-emoji-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.chat-emoji-btn:hover {
  background: rgba(245, 196, 49, 0.2);
  border-color: var(--gold);
  transform: scale(1.05);
}
.chat-textarea {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  color: #fff;
  font-size: 13.5px;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  outline: none;
  font-family: inherit;
}
.chat-textarea:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.12);
}

/* ========================================================
   WHATSAPP-STYLE EMOJI PICKER POPUP
   ======================================================== */
.wa-emoji-picker {
  position: absolute;
  bottom: 68px;
  left: 20px;
  width: 380px;
  max-width: calc(100vw - 40px);
  background: #091a42;
  border: 1px solid rgba(245, 196, 49, 0.45);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(2, 8, 30, 0.7);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: waEmojiPop 0.18s ease-out;
}
@keyframes waEmojiPop {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.wa-emoji-search-box {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 43, 107, 0.4);
}
.wa-emoji-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  color: #fff;
  font-size: 12.5px;
  outline: none;
}
.wa-emoji-search-input:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.12);
}
.wa-emoji-tabs {
  display: flex;
  background: rgba(7, 26, 69, 0.75);
  border-bottom: 1px solid var(--line);
  padding: 4px 8px;
  gap: 4px;
}
.wa-emoji-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: #a9bde6;
  font-size: 18px;
  padding: 6px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wa-emoji-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.wa-emoji-tab-btn.active {
  background: rgba(245, 196, 49, 0.18);
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
}
.wa-emoji-content {
  height: 230px;
  overflow-y: auto;
  padding: 10px;
}
.wa-emoji-category-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 6px 0 6px 4px;
}
.wa-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}
.wa-emoji-item {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  background: none;
  transition: transform 0.1s, background 0.1s;
}
.wa-emoji-item:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.25);
}

/* Delete single message (Egi only) */
.chat-msg-row .chat-msg-del-btn {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  background: rgba(255, 99, 99, 0.2);
  border: 1px solid rgba(255, 99, 99, 0.5);
  color: #ff7b7b;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
  cursor: pointer;
  margin-left: 6px;
  align-self: center;
}
.chat-msg-row:hover .chat-msg-del-btn {
  opacity: 1;
  visibility: visible;
}
.chat-msg-del-btn:hover {
  background: #ff4d4f;
  color: #fff;
}

/* Egi Monitor Mode Banner */
.monitor-banner {
  background: linear-gradient(90deg, rgba(183, 156, 255, 0.18), rgba(18, 52, 127, 0.45));
  border: 1px solid rgba(183, 156, 255, 0.35);
  border-radius: 12px;
  padding: 8px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #d8c8ff;
}


/* Star Rating Widget */
.star-rating-box {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 32px;
  cursor: pointer;
  margin: 10px 0 16px 0;
}
.star-rating-item {
  color: rgba(255, 255, 255, 0.25);
  transition: color 0.15s, transform 0.15s;
}
.star-rating-item:hover,
.star-rating-item.active {
  color: var(--gold);
  transform: scale(1.15);
}
.rating-label-desc {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  margin-left: 10px;
}

/* Rating Summary Header */
.rating-score-badge {
  font-size: 48px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.rating-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  margin-bottom: 8px;
  color: #cbd5e1;
}
.rating-bar-track {
  flex: 1;
  height: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.rating-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  border-radius: 8px;
  transition: width 0.5s ease;
}

/* Roadmap Grid */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.roadmap-card {
  background: linear-gradient(135deg, rgba(26, 67, 160, 0.45), rgba(18, 52, 127, 0.65));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, border-color 0.2s;
}
.roadmap-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 196, 49, 0.5);
}

@media (max-width: 860px) {
  .chat-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  .chat-sidebar {
    max-height: 250px;
  }
}

/* ========================================================
   MODERN PROFESSIONAL CENTERED CONFIRMATION POPUP (CARE)
   ======================================================== */
.care-confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 12, 40, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: careFadeIn 0.2s ease-out;
}
@keyframes careFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.care-confirm-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, #0e2b6b 0%, #071a45 100%);
  border: 1px solid rgba(245, 196, 49, 0.5);
  border-radius: 22px;
  padding: 32px 28px 26px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 30px rgba(245, 196, 49, 0.15);
  text-align: center;
  position: relative;
  animation: careScaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes careScaleUp {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.care-confirm-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25);
}
.care-confirm-icon-wrap.warning {
  background: rgba(245, 196, 49, 0.15);
  border-color: rgba(245, 196, 49, 0.4);
  color: var(--gold);
  box-shadow: 0 8px 20px rgba(245, 196, 49, 0.25);
}
.care-confirm-title {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 10px 0;
  letter-spacing: -0.2px;
}
.care-confirm-desc {
  font-size: 13.5px;
  color: #cfdcff;
  line-height: 1.55;
  margin: 0 0 24px 0;
}
.care-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.care-confirm-actions .btn {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Toast Notification (Floating Success/Alert) */
.care-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  background: linear-gradient(135deg, #0e2b6b, #071a45);
  border: 1px solid var(--gold);
  color: #fff;
  border-radius: 14px;
  padding: 12px 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  z-index: 1000000;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  animation: careToastSlide 0.25s ease-out;
}
@keyframes careToastSlide {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}



