﻿/* ==========================================================================
   MERIDIAN — Cosmic Glass Enterprise Design System
   Frosted Deep-Space Glassmorphism · Full-Screen Role Consoles · Mobile + Laptop Responsive
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Cosmic Frosted Glass Palette */
  --bg-page: #040b18;
  --bg-subtle: rgba(12, 25, 48, 0.56);
  --surface: rgba(8, 18, 36, 0.66);
  --surface-hover: rgba(14, 30, 58, 0.80);
  --border: rgba(148, 163, 184, 0.20);
  --border-strong: rgba(148, 163, 184, 0.32);
  --glass-blur: blur(22px) saturate(145%);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.09);

  /* High-Contrast Luminous Ink */
  --ink-1: #f8fafc;
  --ink-2: #cbd5e1;
  --ink-3: #94a3b8;
  --ink-4: #64748b;

  /* Luminous Cosmic Accents */
  --primary: #38bdf8;
  --primary-solid: #0284c7;
  --primary-hover: #0369a1;
  --primary-soft: rgba(56, 189, 248, 0.16);
  --primary-text: #7dd3fc;

  --ok: #10b981;
  --ok-solid: #059669;
  --ok-soft: rgba(16, 185, 129, 0.16);
  --ok-text: #6ee7b7;

  --warn: #f59e0b;
  --warn-solid: #d97706;
  --warn-soft: rgba(245, 158, 11, 0.16);
  --warn-text: #fcd34d;

  --danger: #f87171;
  --danger-solid: #dc2626;
  --danger-soft: rgba(239, 68, 68, 0.16);
  --danger-text: #fca5a5;

  --indigo: #818cf8;
  --indigo-solid: #4f46e5;
  --indigo-soft: rgba(99, 102, 241, 0.18);
  --indigo-text: #c7d2fe;

  --shadow-xs: 0 4px 14px rgba(0, 0, 0, 0.28);
  --shadow-sm: 0 12px 32px rgba(0, 0, 0, 0.42);
  --shadow-md: 0 18px 46px rgba(0, 0, 0, 0.52);
  --shadow-lg: 0 26px 68px rgba(0, 0, 0, 0.68);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at 50% 48%, #0a1f3f 0%, #040b18 55%, #02050e 100%);
  background-attachment: fixed;
  color: var(--ink-1);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  color-scheme: dark;
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(2, 6, 17, 0.45);
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.48);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

.muted-sm {
  font-size: 12.5px;
  color: var(--ink-3);
}

.text-link {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.text-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   SMOOTH SUBTLE ANIMATIONS
   ========================================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulseSoft {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.6; }
}

.anim-fade {
  animation: fadeUp 0.24s var(--ease);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  display: inline-block;
  animation: pulseSoft 2.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   BRAND & COMMON COMPONENTS (BUTTONS, INPUTS, BADGES, CARDS, TABLES)
   ========================================================================== */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #ffffff;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.brand-mark path { stroke: #38bdf8; }
.brand-mark circle[fill] { fill: #38bdf8; }

.brand-wordmark {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-divider {
  width: 1px;
  height: 18px;
  background: var(--border-strong);
}

.brand-sub {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 500;
}

.surface-card {
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-highlight), var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.2s ease, transform 0.2s var(--ease);
}

.card-pad {
  padding: 20px;
}

.card-hover:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: var(--glass-highlight), var(--shadow-md);
  transform: translateY(-2px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 12px 20px; font-size: 14.5px; }

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.30);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  border-color: rgba(56, 189, 248, 0.62);
}

.btn-soft-primary {
  background: rgba(56, 189, 248, 0.14);
  color: var(--primary-text);
  border-color: rgba(56, 189, 248, 0.34);
}
.btn-soft-primary:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.24);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.52);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-1);
  border-color: rgba(148, 163, 184, 0.26);
}
.btn-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.45);
}

.btn-ok {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border-color: rgba(52, 211, 153, 0.40);
}
.btn-ok:hover:not(:disabled) { background: #047857; }

.btn-warn {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  border-color: rgba(251, 191, 36, 0.40);
}
.btn-warn:hover:not(:disabled) { background: #b45309; }

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  border-color: rgba(248, 113, 113, 0.40);
}
.btn-danger:hover:not(:disabled) { background: #b91c1c; }

.btn-danger-soft {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger-text);
  border-color: rgba(248, 113, 113, 0.35);
}
.btn-danger-soft:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
}

.btn-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-sky { background: var(--primary-soft); color: var(--primary-text); border-color: rgba(56, 189, 248, 0.30); }
.badge-ok { background: var(--ok-soft); color: var(--ok-text); border-color: rgba(52, 211, 153, 0.30); }
.badge-warn { background: var(--warn-soft); color: var(--warn-text); border-color: rgba(245, 158, 11, 0.32); }
.badge-danger { background: var(--danger-soft); color: var(--danger-text); border-color: rgba(248, 113, 113, 0.32); }
.badge-indigo { background: var(--indigo-soft); color: var(--indigo-text); border-color: rgba(129, 140, 248, 0.32); }
.badge-neutral { background: rgba(148, 163, 184, 0.14); color: var(--ink-2); border-color: rgba(148, 163, 184, 0.24); }

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--ok-soft);
  color: var(--ok-text);
  border: 1px solid rgba(52, 211, 153, 0.32);
}

/* Form Controls */
.field {
  margin-bottom: 14px;
}
.field label, .field-label-strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 5px;
}
.req { color: var(--danger); }

.input, .select, .textarea {
  width: 100%;
  background: rgba(3, 9, 20, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--ink-1);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.input::placeholder, .textarea::placeholder {
  color: var(--ink-4);
}
.select option {
  background: #071124;
  color: #f8fafc;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.20);
}
.textarea { resize: vertical; min-height: 72px; }
.field-hint { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.alert-box {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid transparent;
}
.alert-danger { background: var(--danger-soft); color: var(--danger-text); border-color: rgba(248, 113, 113, 0.35); }
.alert-info { background: var(--primary-soft); color: var(--primary-text); border-color: rgba(56, 189, 248, 0.35); }
.alert-ok { background: var(--ok-soft); color: var(--ok-text); border-color: rgba(52, 211, 153, 0.35); }
.alert-warn { background: var(--warn-soft); color: var(--warn-text); border-color: rgba(245, 158, 11, 0.36); }

/* Tables */
.table-card { overflow: hidden; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.data-table th {
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  background: rgba(3, 9, 20, 0.56);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--ink-1);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(56, 189, 248, 0.06); }

/* Progress Bar */
.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  border-radius: 999px;
  transition: width 0.55s var(--ease);
}
.progress-fill.ok { background: linear-gradient(90deg, #059669, #34d399); }
.progress-fill.danger { background: linear-gradient(90deg, #dc2626, #f87171); }

/* PAGE 1: PUBLIC HOME PAGE -> see /assets/css/home-cosmic.css (Cosmic Glass Globe Landing, scoped to #page-home) */

/* ==========================================================================
   PAGE 2: COSMIC GLASS AUTH PAGE (LOGIN & REGISTER)
   Aligned with Cosmic Deep-Space Theme
   ========================================================================== */
/* Full-screen animated deep-space starfield (Shared for Home & Auth) */
#cosmic-starfield {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 48%, #0a1f3f 0%, #040b18 55%, #02050e 100%);
  background-attachment: fixed;
}

#page-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
  position: relative;
  z-index: 2;
  background: transparent;
  color: #f8fafc;
}
.auth-shell,
.auth-glass-shell {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(7, 16, 32, 0.64);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(148, 163, 184, 0.20);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 25px 70px rgba(0, 0, 0, 0.65);
}
.auth-left {
  padding: 36px 40px;
  background: rgba(7, 16, 32, 0.82);
}
.auth-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.auth-heading {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 13.5px;
  color: #94a3b8;
  margin-bottom: 20px;
  line-height: 1.55;
}
.seg-tabs,
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(2, 6, 17, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.seg-tab,
.auth-tab {
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: center;
}
.seg-tab.active,
.auth-tab.active {
  background: rgba(56, 189, 248, 0.18);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.42);
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.28);
}

#page-auth .field {
  margin-bottom: 14px;
}
#page-auth .field label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #cbd5e1;
  margin-bottom: 5px;
  display: block;
}
#page-auth .field label .req {
  color: #f87171;
}
#page-auth .field-label-strong {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}
#page-auth .input,
#page-auth .select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 13px;
  color: #f8fafc;
  background: rgba(3, 9, 20, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  box-sizing: border-box;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
#page-auth .input::placeholder {
  color: #64748b;
}
#page-auth .input:focus,
#page-auth .select:focus {
  border-color: #38bdf8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
}
#page-auth .input.mono {
  font-family: var(--font-mono);
}
#page-auth .alert-danger,
#page-auth .auth-alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  margin-bottom: 16px;
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.35);
}
#page-auth .alert-ok,
#page-auth .auth-success {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  margin-bottom: 16px;
  background: rgba(16, 185, 129, 0.14);
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.36);
}
#page-auth .field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
#page-auth .field-label-row label {
  margin-bottom: 0;
}
#page-auth .auth-inline-link {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: #38bdf8;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}
#page-auth .auth-inline-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}
#page-auth .auth-recovery-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}
#page-auth .auth-dev-preview {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.10);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #e0f2fe;
  font-size: 12px;
  line-height: 1.5;
}
#page-auth .auth-dev-preview .mono-token {
  display: block;
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(2, 6, 17, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-family: var(--font-mono);
  font-size: 11px;
  color: #7dd3fc;
  word-break: break-all;
}

/* Password with Eye Visibility Toggle */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
#page-auth .password-input-wrap .input,
#page-auth .password-input-wrap input.input-with-toggle,
.password-input-wrap .input,
.password-input-wrap input.input-with-toggle {
  width: 100%;
  padding-right: 42px;
}
.input-with-toggle::-ms-reveal,
.input-with-toggle::-ms-clear {
  display: none;
}
.btn-password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: pointer;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.16s ease, background-color 0.16s ease;
  z-index: 3;
}
.btn-password-toggle:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
}
.btn-password-toggle.is-visible {
  color: #38bdf8;
}
.btn-password-toggle:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 1px;
}
.btn-password-toggle svg {
  display: block;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* Registration Role Selector (Pengirim / Shipper vs Pembeli / Buyer - Cosmic Glass Theme) */
.role-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.role-choice-card {
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  background: rgba(4, 11, 24, 0.65);
  border: 1.5px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 14px 15px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #cbd5e1;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}
.role-choice-card:hover {
  background: rgba(8, 20, 42, 0.85);
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
}
.role-choice-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3);
}
.role-choice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.role-choice-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.role-choice-icon.role-icon-shipper {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.role-choice-icon.role-icon-buyer {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #34d399;
}
.role-choice-check {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.24);
  transition: all 0.16s ease;
}
.role-choice-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}
.role-choice-tag {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}
.role-choice-desc {
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.45;
}
.role-choice-card.selected-shipper {
  background: rgba(245, 158, 11, 0.12);
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22), 0 8px 24px rgba(245, 158, 11, 0.14);
}
.role-choice-card.selected-shipper .role-choice-check {
  background: #f59e0b;
  color: #1e1b4b;
  border-color: #f59e0b;
}
.role-choice-card.selected-buyer {
  background: rgba(16, 185, 129, 0.12);
  border-color: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.22), 0 8px 24px rgba(16, 185, 129, 0.14);
}
.role-choice-card.selected-buyer .role-choice-check {
  background: #34d399;
  color: #022c22;
  border-color: #34d399;
}
.role-choice-grid.needs-choice .role-choice-card {
  border-color: #f87171;
  background: rgba(239, 68, 68, 0.08);
}
.role-choice-hint {
  margin-top: 10px;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
}
.role-choice-hint strong {
  color: #ffffff;
}
.role-choice-hint.is-shipper {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.38);
  color: #fde68a;
}
.role-choice-hint.is-buyer {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.38);
  color: #a7f3d0;
}
.role-choice-hint.is-error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(248, 113, 113, 0.38);
  color: #fca5a5;
}

#page-auth #btn-login-submit,
#page-auth #btn-register-submit,
#page-auth #btn-forgot-submit,
#page-auth #btn-reset-submit,
#page-auth .auth-submit-btn {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.42);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
  cursor: pointer;
  transition: all 0.18s ease;
}
#page-auth #btn-login-submit:hover:not(:disabled),
#page-auth #btn-register-submit:hover:not(:disabled),
#page-auth #btn-forgot-submit:hover:not(:disabled),
#page-auth #btn-reset-submit:hover:not(:disabled),
#page-auth .auth-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
  transform: translateY(-1px);
}
#page-auth .field-hint {
  font-size: 11px;
  color: #64748b;
  line-height: 1.5;
}

.auth-right {
  padding: 38px 36px;
  background: radial-gradient(circle at 75% 25%, rgba(14, 42, 82, 0.78) 0%, rgba(4, 11, 24, 0.92) 85%);
  border-left: 1px solid rgba(148, 163, 184, 0.16);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}
.auth-right-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.auth-right-desc {
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.65;
  margin-bottom: 20px;
}
.auth-feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-feature-item {
  background: rgba(7, 16, 32, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.auth-feature-item:hover {
  border-color: rgba(56, 189, 248, 0.38);
  transform: translateY(-1px);
}
.auth-feature-item strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 3px;
}
.auth-feature-item span {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}
.auth-right-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #64748b;
}

/* ==========================================================================
   PAGE 3: FULL-SCREEN COSMIC GLASS CONSOLE (ADMIN / OPERATOR / SHIPPER / BUYER)
   ========================================================================== */
#page-workspace {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  background: transparent;
}

.app-console {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  background: transparent;
}

/* Left Sidebar (Desktop >= 960px) */
.console-sidebar {
  width: 256px;
  flex-shrink: 0;
  background: rgba(5, 12, 26, 0.72);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  border-right: 1px solid var(--border);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
}

.sidebar-top {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.sidebar-role-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--primary-soft);
  color: var(--primary-text);
}
.role-pill.role-admin { background: var(--indigo-soft); color: var(--indigo-text); }
.role-pill.role-operator { background: var(--primary-soft); color: var(--primary-text); }
.role-pill.role-shipper { background: var(--warn-soft); color: var(--warn-text); }
.role-pill.role-buyer { background: var(--ok-soft); color: var(--ok-text); }

.branch-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-page);
  color: var(--ink-2);
  border: 1px solid var(--border);
}

.sidebar-nav {
  flex: 1;
  padding: 14px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}
.nav-item.active {
  background: rgba(56, 189, 248, 0.16);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.36);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.22);
  font-weight: 700;
}
.nav-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink-2);
}
.nav-item.active .nav-count {
  background: var(--primary-solid);
  color: #ffffff;
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Main Console Area (100% Remaining Width) */
.console-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.console-header {
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(5, 12, 26, 0.70);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.console-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.mobile-brand-only { display: none; flex-shrink: 0; }

.header-titles {
  min-width: 0;
  overflow: hidden;
}

.header-page-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-1);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-page-sub {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.console-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--ink-1);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
}
.user-chip:hover { border-color: var(--primary); }
.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-solid);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.user-chip-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-dot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary-solid);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
}

.console-main {
  position: relative;
  z-index: 3;
  flex: 1;
  padding: 24px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  animation: fadeUp 0.22s var(--ease);
}

/* Keep Original Full Proportions When 3D Globe Is Active Above — Just Lowered Slightly */
.console-main.has-globe-above {
  padding-top: 48px;
}

/* Unbounded (Borderless / Edge-to-Edge) 3D Earth Floating Directly in Cosmic Space */
.ws-inline-globe-wrap {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 24px 0;
  background: transparent;
  pointer-events: none;
}
.ws-inline-globe-card {
  position: relative;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  pointer-events: none;
}
.ws-globe-floating-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 2px 6px;
  position: relative;
  z-index: 5;
  pointer-events: none;
}
.ws-inline-globe-kicker,
.ws-inline-globe-actions {
  pointer-events: auto;
}
.ws-inline-globe-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #7dd3fc;
  opacity: 0.9;
}
.ws-globe-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.85);
}
.ws-inline-globe-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.btn-dark-glass {
  background: rgba(8, 18, 36, 0.58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.24);
}
.btn-dark-glass:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(56, 189, 248, 0.48);
}
.btn-dark-accent {
  background: rgba(2, 132, 199, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.52);
}
.btn-dark-accent:hover {
  background: #0369a1;
}
.ws-globe-split {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 475px;
  padding: 8px 0 12px;
  pointer-events: none;
}
.ws-inline-globe-stage {
  position: fixed;
  top: 0;
  left: 256px;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: auto;
  height: auto;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  border: none;
  pointer-events: auto;
}
.ws-inline-globe-canvas,
.ws-inline-globe-canvas .maplibregl-canvas-container,
.ws-inline-globe-canvas canvas.maplibregl-canvas {
  width: 100%;
  height: 100%;
  background: transparent !important;
  outline: none;
}
.ws-globe-side-panel {
  width: min(410px, 100%);
  max-width: 420px;
  margin-left: auto;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
  animation: fadeUp 0.22s var(--ease);
}
.ws-transit-scroll {
  max-height: 215px;
  overflow-y: auto;
  padding-right: 4px;
}
.ws-route-stepper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 16px;
  margin-left: 6px;
  border-left: 2px dashed rgba(56, 189, 248, 0.36);
}
.ws-route-step {
  position: relative;
  padding: 5px 8px;
  border-radius: 8px;
  transition: background 0.14s ease;
}
.ws-route-step.is-clickable {
  cursor: pointer;
}
.ws-route-step.is-clickable:hover {
  background: rgba(56, 189, 248, 0.10);
}
.ws-route-step.step-current {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.38);
}
.ws-route-step::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #64748b;
  border: 2px solid #040b18;
  box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.4);
}
.ws-route-step.step-origin::before {
  background: #fb923c;
  box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.45);
}
.ws-route-step.step-transit::before {
  background: #fbbf24;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.42);
}
.ws-route-step.step-done::before {
  background: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.45);
}
.ws-route-step.step-current::before {
  background: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.55);
}
.ws-route-step.step-dest::before {
  background: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.45);
}
.ws-timetravel-box {
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(14, 42, 82, 0.45);
  border: 1px solid rgba(56, 189, 248, 0.32);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ws-timetravel-arrows {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ws-arrow-btn {
  width: 34px;
  height: 32px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.ws-day-pill {
  min-width: 74px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: #e2e8f0;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(4, 11, 24, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.24);
}
.ws-route-legend {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
  color: var(--ink-2);
}
.ws-route-legend-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.ws-route-legend-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.shipment-row-clickable {
  cursor: pointer;
  transition: background 0.15s ease;
}
.shipment-row-active {
  background: rgba(56, 189, 248, 0.12) !important;
}
.maplibregl-ctrl-group {
  background: rgba(6, 14, 29, 0.78) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  box-shadow: var(--shadow-xs) !important;
}
.maplibregl-ctrl-group button {
  filter: invert(1) brightness(1.8);
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.kpi-card {
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--glass-highlight), var(--shadow-sm);
  transition: border-color 0.18s ease, transform 0.18s var(--ease);
}
.kpi-card:hover {
  border-color: rgba(56, 189, 248, 0.42);
  transform: translateY(-2px);
}
.kpi-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.kpi-val {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  color: var(--ink-1);
  line-height: 1.15;
}
.kpi-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 5px;
}

/* Section Headers & Filter Bars */
.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-1);
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(8, 18, 36, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip-btn:hover {
  border-color: rgba(56, 189, 248, 0.45);
  color: #ffffff;
}
.chip-btn.active {
  background: rgba(56, 189, 248, 0.22);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 2px 12px rgba(2, 132, 199, 0.28);
}

/* Nusantara Coffee Directory Grid (Non-Marketplace, No Price) */
.coffee-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.coffee-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.coffee-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ink-1);
  margin-top: 6px;
}
.coffee-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
}
.coffee-shipper-strip {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12.5px;
}

/* Verification Checklist Box */
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-1);
  cursor: pointer;
}
.check-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--ok);
}

/* Chat Split Console (Buyer <-> Shipper <-> Operator) */
.chat-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 16px;
  min-height: 540px;
}
.chat-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 620px;
}
.chat-list {
  flex: 1;
  overflow-y: auto;
}
.chat-peer-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.14s ease;
}
.chat-peer-row:hover { background: var(--bg-subtle); }
.chat-peer-row.active { background: var(--primary-soft); }

.chat-window {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 620px;
}
.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-subtle);
}
.chat-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  animation: fadeUp 0.18s var(--ease);
}
.chat-bubble.mine {
  align-self: flex-end;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.36);
  border-bottom-right-radius: 4px;
}
.chat-bubble.theirs {
  align-self: flex-start;
  background: rgba(8, 18, 36, 0.78);
  color: var(--ink-1);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.chat-bubble-meta {
  font-size: 11px;
  opacity: 0.78;
  margin-top: 4px;
}
.chat-compose {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: rgba(5, 12, 26, 0.72);
  display: flex;
  gap: 8px;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 2px solid var(--border-strong);
  margin-left: 8px;
  padding-left: 16px;
}
.timeline-item {
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -23px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #040b18;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.45);
}

/* Empty State */
.empty-box {
  padding: 36px 20px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-1);
  margin-bottom: 6px;
}
.empty-desc {
  font-size: 13px;
  color: var(--ink-3);
  max-width: 480px;
  margin: 0 auto 16px;
}

/* ==========================================================================
   RIGHT UTILITY DRAWER (NOTIFIKASI & DOMPET REKENING JAMINAN)
   ========================================================================== */
.utility-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100vw);
  background: rgba(6, 14, 29, 0.86);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border-left: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.22s var(--ease);
}
.drawer-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
}
.notif-item {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  cursor: pointer;
  background: rgba(8, 18, 36, 0.62);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.notif-item:hover {
  border-color: rgba(56, 189, 248, 0.42);
}
.notif-item.unread {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.45);
}

/* ==========================================================================
   MODALS (PETA 3D MULTIMODA + BANTUAN ADMIN + PROFIL + SURAT RILIS DIGITAL)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 17, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.dialog-card {
  width: min(680px, 100%);
  max-height: 90vh;
  background: rgba(7, 16, 32, 0.88);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-highlight), var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeUp 0.2s var(--ease);
}
.dialog-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(3, 9, 20, 0.55);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dialog-body {
  padding: 20px;
  overflow-y: auto;
}
.modal-title { font-size: 16px; font-weight: 800; color: var(--ink-1); }
.modal-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* Full-Screen 3D Multimodal Map Modal */
.map-modal-shell {
  width: min(1240px, 100%);
  height: min(86vh, 780px);
  background: rgba(6, 14, 29, 0.88);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-highlight), var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeUp 0.22s var(--ease);
}
.map-modal-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(3, 9, 20, 0.65);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.map-modal-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.map-modal-body {
  position: relative;
  flex: 1;
  min-height: 0;
  background: radial-gradient(circle at 50% 50%, #0d2b57 0%, #040c1a 72%, #02050d 100%);
}
.map-canvas-full {
  width: 100%;
  height: 100%;
}
.map-modal-hud {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  z-index: 10;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.map-hud-card {
  pointer-events: auto;
  background: rgba(6, 14, 29, 0.84);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--glass-highlight), var(--shadow-md);
  max-width: 520px;
}

/* Custom Animated Vehicle Markers (Truck / Ship / Plane) */
.vehicle-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
}
.vehicle-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.28);
  border: 2.5px solid #ffffff;
  transition: transform 0.25s ease;
}
.vehicle-badge.mode-land { background: #ea580c; }
.vehicle-badge.mode-sea { background: #0284c7; }
.vehicle-badge.mode-air { background: #4f46e5; }
.vehicle-badge.mode-delayed { background: #dc2626; }
.vehicle-badge.mode-done { background: #059669; }
.vehicle-label {
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

/* MapLibre Popup Cosmic Glass Style */
.maplibregl-popup-content {
  background: rgba(6, 14, 29, 0.92) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  color: var(--ink-1) !important;
  border: 1px solid rgba(56, 189, 248, 0.36) !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  box-shadow: var(--shadow-md) !important;
  font-family: var(--font-sans) !important;
}
.maplibregl-popup-close-button {
  color: var(--ink-3) !important;
}
.maplibregl-popup-tip {
  border-top-color: rgba(6, 14, 29, 0.92) !important;
  border-bottom-color: rgba(6, 14, 29, 0.92) !important;
}
.gl-pop-kicker { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; color: var(--primary); }
.gl-pop-title { font-size: 13.5px; font-weight: 700; color: var(--ink-1); }
.gl-pop-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* Printable Digital Release Document */
.release-doc-sheet {
  border: 1.5px solid rgba(56, 189, 248, 0.42);
  border-radius: var(--radius-sm);
  padding: 20px;
  background: rgba(6, 15, 32, 0.72);
  color: var(--ink-1);
}
@media print {
  body * { visibility: hidden; }
  .release-doc-sheet, .release-doc-sheet * { visibility: visible; color: #0f172a !important; }
  .release-doc-sheet { position: fixed; inset: 16px; border: 2px solid #000 !important; background: #ffffff !important; }
}

/* Toast */
.toast-container {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast-item {
  background: rgba(6, 14, 29, 0.90);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong);
  color: #ffffff;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: fadeUp 0.2s var(--ease);
}
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: #38bdf8; }
.toast-item.toast-ok .toast-dot { background: #34d399; }
.toast-item.toast-err .toast-dot { background: #f87171; }

/* Mobile Bottom Nav (Hidden on Desktop >= 960px) */
.mobile-bottom-nav {
  display: none;
}

/* ==========================================================================
   RESPONSIVE: TABLET & MOBILE / HP (< 960px & < 640px)
   Touch-Friendly 44px Targets · Bottom Nav · 1-Column Forms · Zero Overflow
   ========================================================================== */
@media (max-width: 1120px) {
  .coffee-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .pub-nav-links, .brand-sub, .brand-divider { display: none; }
  .auth-shell, .auth-glass-shell { grid-template-columns: 1fr; }
  .auth-right { display: none; }

  /* Full Mobile Console Layout */
  .console-sidebar { display: none; }
  .mobile-brand-only { display: inline-flex; }
  .header-titles { display: none; }
  .console-header { padding: 10px 14px; }
  .ws-inline-globe-wrap { padding: 12px 14px 0; }
  .ws-globe-split { flex-direction: column; justify-content: flex-end; min-height: 360px; gap: 12px; }
  .ws-inline-globe-stage { left: 0; width: auto; height: auto; }
  .ws-globe-side-panel { width: 100%; max-width: 100%; }
  .console-main, .console-main.has-globe-above { padding: 16px 14px 90px; max-width: 100%; }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: rgba(5, 12, 26, 0.86);
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
    border-top: 1px solid var(--border);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
    gap: 2px;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);
  }
  .mob-nav-btn {
    flex: 1;
    min-height: 44px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-3);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 2px;
  }
  .mob-nav-btn.active {
    background: var(--primary-soft);
    color: var(--primary-text);
  }

  .chat-layout { grid-template-columns: 1fr; min-height: auto; }
  .chat-sidebar { max-height: 220px; }
  .chat-window { min-height: 360px; max-height: 460px; }
}

@media (max-width: 640px) {
  .coffee-grid, .form-grid-2, .form-grid-3, .form-grid-4, .checklist-grid, .role-choice-grid {
    grid-template-columns: 1fr;
  }
  .btn, .input, .select { min-height: 42px; }
  .btn-sm { min-height: 34px; padding: 5px 9px; font-size: 11.5px; }
  .auth-left { padding: 22px 18px; }
  .console-header { padding: 9px 12px; gap: 6px; }
  .console-header-right { gap: 5px; }
  .console-header .brand-mark { width: 22px; height: 22px; }
  .console-header .brand-wordmark { font-size: 12px; letter-spacing: 0.08em; }
  .console-header .user-chip { padding: 3px; }
  .user-chip-name { display: none; }
  .hide-xs { display: none; }
  #ws-btn-help-top { display: none; }
  #ws-btn-wallet { display: none; }
  .map-modal-shell { height: 92vh; }
}
