/* ===================================================
   NomorID - Professional Slate Design System
   Tenang, Rapi, Elegan, Modern & Responsive
   Zero Black Boxes, Uniform Navigation & Perfect Touch Controls
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

:root {
  /* Standard Design System Variables (Requirement 20) */
  --bg: #0a0f1d;
  --surface: #111827;
  --surface-2: #1a2337;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-subtle: rgba(37, 99, 235, 0.12);
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: #1e293b;
  --border-focus: #3b82f6;
  --success: #10b981;
  --success-subtle: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-subtle: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-subtle: rgba(239, 68, 68, 0.12);

  /* Semantic Aliases for backwards compatibility */
  --bg-main: var(--bg);
  --bg-card: var(--surface);
  --bg-card-subtle: var(--surface-2);
  --bg-elevated: #1f2a3f;
  --bg-input: #0c1222;
  --border-color: var(--border);
  --border-subtle: #172233;
  --text-main: var(--text);
  --text-dim: #64748b;
  --accent-blue: #3b82f6;
  --accent-blue-subtle: rgba(59, 130, 246, 0.12);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* RESET & TAP HIGHLIGHT ELIMINATION (No Blue Flashes on Android) */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none;
}

*:focus {
  outline: none !important;
}

html, body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

/* Micro-interaction & Tactile Spring Scale on Click/Tap */
button, 
a, 
.chip, 
.item-card, 
.server-card, 
.nid-menu-btn, 
.nid-nav-icon-btn,
.nid-sidebar-item, 
.nid-btn, 
.preset-btn, 
.tab-btn,
.metric-card,
.nid-cs-fab,
.action-card {
  -webkit-tap-highlight-color: transparent !important;
  touch-action: manipulation;
  transition: transform 0.14s cubic-bezier(0.2, 0.8, 0.4, 1), 
              background-color 0.15s ease, 
              border-color 0.15s ease, 
              color 0.15s ease, 
              box-shadow 0.15s ease;
}

button:active, 
a.nid-btn:active, 
.chip:active, 
.item-card:active, 
.server-card:active, 
.nid-menu-btn:active, 
.nid-nav-icon-btn:active,
.nid-sidebar-item:active, 
.nid-btn:active, 
.preset-btn:active, 
.tab-btn:active,
.nid-cs-fab:active,
.action-card:active {
  transform: scale(0.97) !important;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: var(--radius-full);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.text-gradient {
  color: var(--text-main);
}

.text-mono {
  font-family: var(--font-mono);
}

/* ===================================================
   SVG & ICON RULES (NO BLACK BOXES, CONTROLLED SIZING)
   =================================================== */
/* Universal rule for UI icon SVGs */
.nid-sidebar-item svg,
.nid-menu-btn svg,
.nid-nav-icon-btn svg,
.nid-drawer-close svg,
.nid-btn svg,
.action-icon-box svg,
.method-icon svg,
.item-icon-box svg,
.preset-btn svg,
.nid-icon-svg {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  flex-shrink: 0 !important;
  display: block;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

/* Ensure paths, lines, rects, polylines inside icon SVGs don't turn black */
.nid-sidebar-item svg path,
.nid-sidebar-item svg rect,
.nid-sidebar-item svg circle,
.nid-sidebar-item svg line,
.nid-sidebar-item svg polygon,
.nid-sidebar-item svg polyline,
.nid-btn svg path,
.nid-btn svg rect,
.nid-btn svg polygon,
.nid-btn svg line,
.action-icon-box svg path,
.action-icon-box svg rect,
.action-icon-box svg circle,
.action-icon-box svg polyline,
.action-icon-box svg polygon,
.method-icon svg path,
.method-icon svg rect,
.method-icon svg polygon,
.method-icon svg line {
  fill: none !important;
  stroke: currentColor !important;
}

/* Specific icon size refinements */
.nid-menu-btn svg {
  width: 20px !important;
  height: 20px !important;
  stroke-width: 2.2 !important;
}

.nid-nav-icon-btn svg {
  width: 18px !important;
  height: 18px !important;
  stroke-width: 2.2 !important;
}

.nid-btn svg {
  width: 17px !important;
  height: 17px !important;
  max-width: 17px !important;
  max-height: 17px !important;
  stroke-width: 2.2 !important;
}

.nid-btn-sm svg {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  stroke-width: 2 !important;
}

.nid-btn-lg svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  stroke-width: 2.2 !important;
}

.nid-sidebar-item svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  stroke: var(--text-muted) !important;
}

.nid-sidebar-item:hover svg,
.nid-sidebar-item.active svg {
  stroke: var(--accent-blue) !important;
}

.action-icon-box svg {
  width: 20px !important;
  height: 20px !important;
  stroke-width: 2.2 !important;
}

/* EXCEPTION: Brand Logo preserves its inline colored paths and styles */
.nid-brand-icon svg {
  width: 28px !important;
  height: 28px !important;
  fill: initial !important;
  stroke: initial !important;
}
.nid-brand-icon svg * {
  fill: initial;
  stroke: initial;
}

/* ===================================================
   NAVBAR - CLEAN, TIDY & UNIFORM ACROSS ALL PAGES
   =================================================== */
.nid-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(12, 16, 23, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  width: 100%;
  height: 58px;
  min-height: 58px;
  box-sizing: border-box;
}

.nav-left-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-right-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Hamburger button - Consistent 3-line SVG icon */
.nid-menu-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.nid-menu-btn:hover {
  background: var(--bg-card-subtle);
  border-color: var(--border-focus);
}

/* Navbar Icon Buttons (e.g. Bell Notification) */
.nid-nav-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  padding: 0;
}

.nid-nav-icon-btn:hover {
  background: var(--bg-card-subtle);
  border-color: var(--border-focus);
  color: var(--accent-blue);
}

.nid-notif-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background-color: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--bg-card);
  display: none;
}

.nid-notif-dot.active {
  display: block;
}

/* Unified Brand Logo & Typography */
.nid-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
  height: 38px;
}

.nid-brand-logo {
  height: 32px;
  max-height: 34px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  transition: opacity var(--transition), transform var(--transition);
}

.nid-brand:hover .nid-brand-logo {
  opacity: 0.92;
  transform: scale(1.02);
}

.nid-brand-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nid-brand-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 18px;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}

.nid-brand-blue {
  color: var(--accent-blue);
  font-weight: 900;
}

/* Landing Page Navigation Links */
.nid-nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.nid-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.nid-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 860px) {
  .nid-nav-links .nid-nav-link {
    display: none;
  }
}

@media (max-width: 480px) {
  .nid-brand-logo {
    height: 28px;
    max-height: 30px;
    max-width: 115px;
  }
}

/* Utility visibility classes */
@media (min-width: 861px) {
  .hide-on-desktop {
    display: none !important;
  }
}

@media (max-width: 860px) {
  .hide-on-mobile {
    display: none !important;
  }
}

/* Balance Pill in Navbar */
.nid-balance-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
  padding: 0 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #34d399;
  flex-shrink: 0;
  letter-spacing: 0.2px;
}

.nid-balance-pill:hover {
  border-color: var(--border-focus);
  background: var(--bg-card-subtle);
}

/* Hide extra action buttons in header so mobile stays clean */
.hide-on-mobile {
  display: none !important;
}

/* ===================================================
   SIDEBAR DRAWER - UNIFORM ACROSS ALL PAGES
   =================================================== */
.nid-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.nid-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.nid-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 82vw;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.nid-drawer.active {
  transform: translateX(0);
}

.nid-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  min-height: 58px;
}

.nid-drawer-close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}

.nid-drawer-close:hover {
  background: var(--bg-elevated);
  border-color: var(--border-color);
  color: var(--text-main);
}

/* Drawer Profile Card (Requirement 4) */
.nid-drawer-profile,
.nid-user-mini-card {
  margin: 12px 14px 8px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
}

.nid-drawer-avatar,
.nid-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(59, 130, 246, 0.15));
  border: 1.5px solid rgba(59, 130, 246, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.nid-drawer-user-info,
.nid-user-meta {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nid-drawer-name,
.nid-user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nid-drawer-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nid-drawer-username {
  font-size: 11.5px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.nid-drawer-balance-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.nid-drawer-bal-label {
  font-size: 11px;
  color: var(--muted);
}

.nid-drawer-bal-val,
.nid-user-bal {
  font-size: 12.5px;
  font-family: var(--font-mono);
  color: #34d399;
  font-weight: 700;
}

.nid-sidebar-nav {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.nid-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s ease;
  position: relative;
  border: 1px solid transparent;
}

.nid-sidebar-item:hover {
  background: var(--bg-card-subtle);
  color: var(--text-main);
}

.nid-sidebar-item.active {
  background: rgba(37, 99, 235, 0.12);
  color: #ffffff;
  font-weight: 600;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.nid-sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background-color: var(--primary);
}

.nid-drawer-footer {
  padding: 12px 14px 16px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

/* ===================================================
   RESPONSIVE GRIDS
   =================================================== */
.nid-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.nid-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.nid-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .nid-grid-3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .nid-grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .nid-grid-2 {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .nid-grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* ===================================================
   MENU LAYANAN (ACTION CARDS)
   =================================================== */
.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.18s ease;
  min-height: 104px;
  justify-content: flex-start;
}

.action-card:hover {
  border-color: var(--accent-blue);
  background: var(--bg-card-subtle);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.action-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}

/* Distinct themed icon boxes (Clean, professional, not black) */
.action-icon-blue {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #3b82f6;
}

.action-icon-green {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
}

.action-icon-amber {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #f59e0b;
}

.action-icon-purple {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #a78bfa;
}

.action-card strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
  line-height: 1.3;
}

.action-card span {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ===================================================
   BUTTONS & FORM CONTROLS
   =================================================== */
.nid-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  min-height: 42px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  line-height: 1.2;
  white-space: nowrap;
}

.nid-btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.nid-btn-primary:hover {
  background: var(--primary-hover);
}

.nid-btn-secondary {
  background: var(--bg-card-subtle);
  border-color: var(--border-color);
  color: var(--text-main);
}

.nid-btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-focus);
}

.nid-btn-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.nid-btn-danger:hover {
  background: #ef4444;
  color: #ffffff;
}

.nid-btn-sm {
  min-height: 34px;
  padding: 6px 14px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
  gap: 6px;
}

.nid-btn-lg {
  min-height: 46px;
  padding: 12px 20px;
  font-size: 14.5px;
  border-radius: var(--radius-md);
  gap: 8px;
}

.nid-input {
  width: 100%;
  height: 44px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-main);
  font-family: var(--font-sans);
  transition: border-color 0.15s ease;
}

.nid-input:focus {
  border-color: var(--border-focus);
}

.nid-input::placeholder {
  color: var(--text-dim);
}

.nid-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.nid-input-group {
  margin-bottom: 16px;
}

/* ===================================================
   CARDS & CONTAINERS
   =================================================== */
.nid-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

/* Safe bottom clearance for pages with Customer Service FAB */
.dash-container,
.deposit-container,
.beli-container,
.riwayat-container,
.profile-container,
.ticket-container,
.wd-container,
.live-container,
.docs-container {
  padding-bottom: 90px !important;
}

.nid-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
}

.nid-badge-primary,
.nid-badge-blue {
  background: var(--accent-blue-subtle);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.nid-badge-success {
  background: var(--success-subtle);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.nid-badge-warning {
  background: var(--warning-subtle);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.nid-badge-danger {
  background: var(--danger-subtle);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.nid-badge-muted {
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Tables */
.nid-table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.nid-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.nid-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

/* ===================================================
   NOTIFICATIONS DROPDOWN MODAL
   =================================================== */
.nid-notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 14px;
  width: 320px;
  max-width: calc(100vw - 28px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: none;
  overflow: hidden;
  animation: nidFadeIn 0.16s ease-out;
}

.nid-notif-dropdown.active {
  display: block;
}

.nid-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
}

.nid-notif-header h4 {
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nid-notif-body {
  max-height: 360px;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nid-notif-item {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nid-notif-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nid-notif-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.nid-notif-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  white-space: pre-wrap;
}

.nid-notif-time {
  font-size: 10.5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.nid-notif-empty {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-dim);
  font-size: 12.5px;
}

/* ===================================================
   CUSTOMER SERVICE FLOATING WIDGET (PROPORTIONAL 52px)
   =================================================== */
.nid-cs-fab {
  position: fixed;
  bottom: 20px;
  right: 18px;
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12);
  border: none;
  cursor: pointer;
  z-index: 990;
  padding: 0;
}

.nid-cs-fab:hover {
  background: var(--primary-hover);
  transform: scale(1.04);
}

.nid-cs-fab:active {
  transform: scale(0.95);
}

.nid-cs-fab svg {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  stroke: #ffffff !important;
  fill: none !important;
  stroke-width: 2.2 !important;
  display: block;
}

.nid-cs-popup {
  position: fixed;
  bottom: 82px;
  right: 18px;
  width: 300px;
  max-width: calc(100vw - 32px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 991;
  display: none;
  overflow: hidden;
  animation: nidSlideUp 0.18s ease-out;
}

.nid-cs-popup.active {
  display: block;
}

.nid-cs-popup-header {
  padding: 12px 14px;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nid-cs-popup-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nid-cs-channel-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nid-cs-channel-btn:hover:not(.disabled) {
  background: var(--bg-elevated);
  border-color: var(--border-focus);
}

.nid-cs-channel-btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.nid-cs-channel-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nid-cs-icon-box {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nid-cs-channel-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.nid-cs-channel-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* ===================================================
   TABS & SCROLLABLE TAB CONTAINER (Requirement 9)
   =================================================== */
.nid-tab-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  margin-bottom: 20px;
  scrollbar-width: none;
}
.nid-tab-container::-webkit-scrollbar {
  display: none;
}
.nid-tab-container .nid-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===================================================
   EMPTY STATES (Requirement 9)
   =================================================== */
.nid-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 44px 20px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  margin: 16px 0;
}
.nid-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.nid-empty-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.nid-empty-desc {
  font-size: 13px;
  color: var(--muted);
  max-width: 320px;
  line-height: 1.5;
  margin-bottom: 18px;
}

/* Responsive code and pre */
.code-container {
  background: #050914;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 14px 0;
  overflow: hidden;
  max-width: 100%;
}
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #090e1a;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  box-sizing: border-box;
}
pre code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  color: #cbd5e1;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
}

/* Responsive Table Container */
.nid-table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  margin: 14px 0;
}

/* ===================================================
   ANIMATIONS & KEYFRAMES
   =================================================== */
@keyframes nidFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes nidSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================================================
   FLOATING TOAST NOTIFICATION (Fixed Position Top Center)
   =================================================== */
.nid-toast {
  position: fixed !important;
  top: 24px !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(-20px) !important;
  z-index: 999999 !important;
  max-width: 90% !important;
  width: auto !important;
  min-width: 280px !important;
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 12px 18px !important;
  border-radius: var(--radius-md) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.nid-toast.show {
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
  pointer-events: auto !important;
}

.nid-toast.toast-success {
  border-color: rgba(16, 185, 129, 0.4) !important;
  background: #0f2421 !important;
  color: #34d399 !important;
}

.nid-toast.toast-error,
.nid-toast.toast-danger {
  border-color: rgba(239, 68, 68, 0.4) !important;
  background: #271418 !important;
  color: #f87171 !important;
}

.nid-toast.toast-info {
  border-color: rgba(59, 130, 246, 0.4) !important;
  background: #0f1c33 !important;
  color: #60a5fa !important;
}

/* ===================================================
   MODAL POPUP SUKSES MODERN (DARK MODE & SMOOTH ANIMATION)
   =================================================== */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.auth-modal-card {
  background: #111827;
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 20px;
  padding: 36px 28px 28px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7),
              0 0 35px rgba(37, 99, 235, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: scale(0.8) translateY(16px);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.28s ease-out;
}

.auth-modal-overlay.active .auth-modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.auth-modal-overlay.closing .auth-modal-card {
  transform: scale(0.85) translateY(-8px);
  opacity: 0;
  transition: transform 0.24s cubic-bezier(0.4, 0, 1, 1),
              opacity 0.22s ease-in;
}

.auth-modal-overlay.closing {
  opacity: 0;
  transition: opacity 0.25s ease-in;
}

/* Ambient glowing effect inside modal */
.auth-modal-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22) 0%, rgba(37, 99, 235, 0.12) 60%, transparent 100%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(20px);
}

/* Icon Container & SVG Checklist */
.auth-modal-icon-box {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.25);
  transform: scale(0.6) rotate(-15deg);
  opacity: 0;
}

.auth-modal-overlay.active .auth-modal-icon-box {
  animation: authIconBounce 0.55s 0.1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes authIconBounce {
  0% { transform: scale(0.6) rotate(-15deg); opacity: 0; }
  60% { transform: scale(1.12) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.auth-checkmark-svg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: block;
}

.auth-checkmark-circle {
  stroke: rgba(16, 185, 129, 0.3);
  stroke-width: 2.5;
  stroke-miterlimit: 10;
}

.auth-checkmark-check {
  transform-origin: 50% 50%;
  stroke: #10b981;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
}

.auth-modal-overlay.active .auth-checkmark-check {
  animation: authStrokeDraw 0.45s 0.3s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

@keyframes authStrokeDraw {
  100% { stroke-dashoffset: 0; }
}

/* Typography */
.auth-modal-title {
  font-size: 21px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
  font-family: var(--font-sans, -apple-system, sans-serif);
}

.auth-modal-sub {
  font-size: 13.5px;
  color: #94a3b8;
  margin: 0 0 26px;
  line-height: 1.45;
}

/* Progress Loading Bar */
.auth-modal-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.auth-modal-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #10b981);
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.auth-modal-overlay.active .auth-modal-progress-bar {
  animation: authProgressFill 2.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes authProgressFill {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* Responsive adjustments for mobile smartphones */
@media (max-width: 640px) {
  .nid-navbar {
    padding: 0 12px;
    height: 56px;
    min-height: 56px;
  }
  .nav-left-box {
    gap: 8px;
  }
  .nav-right-box {
    gap: 6px;
  }
  .nid-brand-title {
    font-size: 17px;
  }
  .nid-menu-btn,
  .nid-nav-icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }
  .nid-balance-pill {
    height: 36px;
    min-height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }
  .nid-card {
    padding: 14px;
  }
}
