/* ===========================================================================
   AutoLicencePermit.com — Design System
   Palette: Deep Navy / Champagne Gold / Emerald Signal
   Typefaces: Cinzel (Authority Display) · Plus Jakarta Sans (UI) · Inter (Body) · JetBrains Mono (Codes)
   =========================================================================== */

:root {
  /* Color Tokens */
  --navy-900:   #060B18;
  --navy-800:   #0B1324;
  --navy-700:   #111E36;
  --navy-600:   #1C2E50;
  --navy-500:   #2A3F6F;
  --gold-500:   #C9A84C;
  --gold-400:   #D4AF37;
  --gold-300:   #E8CF7A;
  --gold-100:   #F7EFD0;
  --emerald:    #00E599;
  --emerald-dim:#00A86B;
  --white:      #F8FAFC;
  --gray-200:   #CBD5E1;
  --gray-400:   #94A3B8;
  --gray-600:   #475569;
  --danger:     #EF4444;

  /* Surface Tokens */
  --surface-base:    var(--navy-800);
  --surface-card:    var(--navy-700);
  --surface-raised:  var(--navy-600);
  --border-subtle:   rgba(255,255,255,0.07);
  --border-gold:     rgba(212,175,55,0.35);

  /* Impeccable Color Strategy Tokens */
  --p-color-amount: 1;
  --glow-gold: 0 0 20px rgba(212, 175, 55, 0.25);
  --glow-emerald: 0 0 16px rgba(0, 229, 153, 0.3);
  --glow-accent: 0 12px 36px rgba(0, 0, 0, 0.4);

  /* Typography */
  --font-display: 'Cinzel', Georgia, serif;
  --font-ui:      'Plus Jakarta Sans', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Transitions */
  --t-fast:   0.18s cubic-bezier(0.4,0,0.2,1);
  --t-normal: 0.32s cubic-bezier(0.16,1,0.3,1);
  --t-slow:   0.55s cubic-bezier(0.16,1,0.3,1);

  /* Layout Spacing Rhythm Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--navy-900);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Tabular Numerics for Data Alignment */
.td-mono, .stat-value, .app-summary-row strong, .rf-item, #tas-order, #tas-exp {
  font-variant-numeric: tabular-nums lining-nums;
}
img { max-width: 100%; display: block; }
button, select, input, textarea { font-family: inherit; outline: none; }
a { color: inherit; text-decoration: none; }
input:-webkit-autofill { -webkit-box-shadow: 0 0 0px 1000px var(--surface-card) inset; -webkit-text-fill-color: var(--white); }

/* ── Ambient Background ─────────────────────────────────────── */
.ambient-background {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.glow-orb {
  position: absolute; border-radius: 50%; filter: blur(160px); opacity: 0.28;
}
.orb-gold {
  width: 700px; height: 700px;
  background: radial-gradient(circle, var(--gold-400) 0%, transparent 70%);
  top: -280px; right: -180px;
}
.orb-navy {
  width: 800px; height: 800px;
  background: radial-gradient(circle, #1a3a8f 0%, transparent 70%);
  bottom: -300px; left: -250px;
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
}

/* ── Hero Moving Marquee Ticker Banner (Right to Left) ─────── */
.hero-marquee-banner {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: auto;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(90deg, #D4AF37 0%, #F5E08C 35%, #D4AF37 70%, #AA820A 100%);
  color: #060B18;
  padding: 8px 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
  z-index: 10;
  border-top: 1px solid rgba(255,255,255,0.35);
  border-bottom: 1px solid rgba(0,0,0,0.3);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeRightToLeft 22s linear infinite;
}

.hero-marquee-banner:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-content {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-right: 20px;
  white-space: nowrap;
}

.marquee-badge {
  background: #060B18;
  color: #D4AF37;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.marquee-text {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #060B18;
}

.marquee-sep {
  color: rgba(6, 11, 24, 0.45);
  font-size: 0.85rem;
  margin: 0 4px;
}

@keyframes marqueeRightToLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ── Navigation ─────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6,11,24,0.82);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
}
.nav-container {
  max-width: 1320px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand-logo {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
}
.logo-emblem {
  width: 38px; height: 38px;
  border: 1.5px solid var(--gold-500);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-400);
  svg { width: 20px; height: 20px; }
}
.logo-text-group {
  display: flex; flex-direction: column; line-height: 1.1;
}
.logo-title {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700;
  letter-spacing: 0.1em; color: var(--gold-300);
}
.logo-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem; color: var(--gray-400);
  letter-spacing: 0.08em;
}

.nav-menu {
  display: flex; align-items: center; gap: 4px;
}
.nav-link {
  background: transparent; border: none;
  color: var(--gray-400); cursor: pointer;
  font-family: var(--font-ui); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.06em; padding: 8px 12px;
  border-radius: var(--r-sm); transition: color var(--t-fast), background var(--t-fast);
}
.nav-link:hover, .nav-link.active {
  color: var(--white); background: rgba(255,255,255,0.06);
}
.nav-link.highlight-dash {
  color: var(--gold-300); background: rgba(212,175,55,0.08);
  border: 1px solid var(--border-gold);
}
.nav-link.highlight-dash:hover {
  background: rgba(212,175,55,0.18); color: var(--gold-300);
}

.nav-right { display: flex; align-items: center; gap: 12px; }

.lang-selector-wrapper {
  position: relative;
}
.lang-dropdown {
  appearance: none; background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle); border-radius: var(--r-sm);
  color: var(--gray-200); font-size: 0.82rem; font-weight: 500;
  padding: 8px 14px; cursor: pointer; transition: border-color var(--t-fast);
}
.lang-dropdown:hover, .lang-dropdown:focus { border-color: var(--gold-500); }
.lang-dropdown option { background: var(--navy-800); color: var(--white); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-ui); font-weight: 700; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--r-md);
  padding: 12px 24px; font-size: 0.9rem; letter-spacing: 0.04em;
  transition: all var(--t-fast); white-space: nowrap;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-300) 100%);
  color: var(--navy-900);
  box-shadow: 0 4px 18px rgba(212,175,55,0.3);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212,175,55,0.45);
  filter: brightness(1.08);
}
.btn-glass {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.18); color: var(--white);
}
.btn-glass:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.35); }
.btn-outline {
  background: transparent; border-color: var(--border-gold);
  color: var(--gold-300);
}
.btn-outline:hover { background: rgba(212,175,55,0.1); }
.btn-hero { padding: 16px 32px; font-size: 1rem; border-radius: var(--r-lg); }
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.full-width { width: 100%; }
.btn-apply-nav {
  background: var(--gold-500); color: var(--navy-900);
  font-size: 0.8rem; padding: 9px 20px; border-radius: var(--r-md);
  box-shadow: 0 2px 12px rgba(212,175,55,0.35);
}
.btn-apply-nav:hover { background: var(--gold-300); transform: translateY(-1px); }

/* ── Page View SPA ───────────────────────────────────────────── */
#app-viewport { position: relative; z-index: 1; }
.page-view { display: none; min-height: 70vh; }
.page-view.active { display: block; }

/* ── Container ───────────────────────────────────────────────── */
.container {
  max-width: 1260px; margin: 0 auto; padding: 80px 24px;
}
.section-block { padding: 80px 0; position: relative; z-index: 1; }
.section-block.dark-bg {
  background: rgba(6,11,24,0.7);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* ── Section Titles ──────────────────────────────────────────── */
.section-title-center { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; color: var(--gold-400);
  margin-bottom: 12px; text-transform: uppercase;
}
.section-heading {
  font-family: var(--font-display); font-size: 2.4rem; font-weight: 700;
  line-height: 1.18; letter-spacing: 0.01em;
  margin-bottom: 14px; max-width: 720px; margin-left: auto; margin-right: auto;
}
.section-desc {
  color: var(--gray-400); font-size: 1rem; max-width: 560px;
  margin: 0 auto; line-height: 1.7;
}

/* ── Hero Section ────────────────────────────────────────────── */
#view-home { background: transparent; }
#view-home.active {
  height: calc(100vh - 75px);
  max-height: calc(100vh - 75px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hero-section {
  position: relative; z-index: 1;
  padding: 12px 24px 0;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  overflow: hidden;
}
.hero-container {
  max-width: 1320px; width: 100%; margin: auto auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center;
}
.hero-text-block { max-width: 580px; }

.un-compliance-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(212,175,55,0.1);
  border: 1px solid var(--border-gold);
  border-radius: 30px; padding: 4px 14px;
  font-size: 0.75rem; font-weight: 600; color: var(--gold-300);
  margin-bottom: 12px;
}
.un-seal { font-size: 0.95rem; }

.hero-headline {
  font-family: var(--font-display);
  font-size: 2.85rem; font-weight: 700; line-height: 1.12;
  letter-spacing: -0.01em; margin-bottom: 12px;
  background: linear-gradient(160deg, var(--white) 50%, var(--gold-300) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  color: var(--gray-400); font-size: 0.98rem; line-height: 1.65;
  margin-bottom: 20px;
}
.hero-actions { display: flex; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }

.trust-bar {
  display: flex; align-items: center; gap: 24px;
  padding-top: 18px; border-top: 1px solid var(--border-subtle);
}
.trust-item { display: flex; flex-direction: column; }
.trust-number {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  color: var(--gold-400);
}
.trust-label { font-size: 0.7rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em; }
.trust-divider { width: 1px; height: 32px; background: var(--border-subtle); }

/* ── FLIP CARD — 360° Rotating Display Stand & Floating Shadow ───────── */
.hero-visual {
  perspective: 1400px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin-top: 0px;
  position: relative;
}
.flip-card-scene {
  width: 500px; max-width: 100%;
  position: relative;
}
.flip-card {
  width: 100%; height: 335px;
  position: relative; transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 50px rgba(180,0,0,0.25);
  border-radius: 10px;
  animation: stand360Rotate 12s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.flip-card:hover {
  animation-play-state: paused;
}
.flip-card.is-flipped {
  animation: none !important;
  transform: rotateY(180deg);
}

@keyframes stand360Rotate {
  0% {
    transform: translateY(0px) rotateY(0deg);
  }
  30% {
    transform: translateY(-14px) rotateY(0deg);
  }
  48% {
    transform: translateY(-6px) rotateY(180deg);
  }
  80% {
    transform: translateY(-14px) rotateY(180deg);
  }
  98% {
    transform: translateY(0px) rotateY(360deg);
  }
  100% {
    transform: translateY(0px) rotateY(360deg);
  }
}

/* Floating Display Stand Shadow — Deep Luminous Floor Shadow */
.hero-stand-shadow {
  width: 440px;
  max-width: 92%;
  height: 28px;
  margin-top: 14px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.98) 0%, rgba(10,18,36,0.95) 30%, rgba(212,175,55,0.4) 55%, transparent 75%);
  border-radius: 50%;
  filter: blur(5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.95), 0 0 25px rgba(212,175,55,0.25);
  animation: floatShadow 12s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes floatShadow {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  30%, 80% {
    transform: scale(0.85);
    opacity: 0.7;
  }
  48% {
    transform: scale(0.94);
    opacity: 0.9;
  }
}

.flip-card-front,
.flip-card-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column;
  border: 2px solid rgba(180,0,0,0.6);
}
.flip-card-back { transform: rotateY(180deg); }

/* ── FRONT ── */
.idd-header {
  background: #8B0000;
  padding: 6px 10px 0; flex-shrink: 0;
}
.idd-header-inner {
  display: flex; align-items: center; gap: 10px; margin-bottom: 3px;
}
.idd-globe-seal { flex-shrink: 0; }
.globe-ring {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.12);
  font-size: 1.4rem; line-height: 1;
}
.idd-titles { flex: 1; }
.idd-t1 {
  font-family: Arial, Helvetica, sans-serif; font-size: 0.82rem; font-weight: 900;
  color: #fff; letter-spacing: 0.03em; line-height: 1.2;
}
.idd-t2 {
  font-family: Arial, Helvetica, sans-serif; font-size: 0.63rem; font-weight: 700;
  color: rgba(255,255,255,0.92); line-height: 1.25;
}
.idd-t3 {
  font-family: Arial, Helvetica, sans-serif; font-size: 0.63rem; font-weight: 700;
  color: rgba(255,255,255,0.92); line-height: 1.25;
}
.idd-t4 {
  font-family: Arial, Helvetica, sans-serif; font-size: 0.52rem;
  color: rgba(255,255,255,0.85); line-height: 1.3; margin-top: 2px;
}
.idd-flags-row {
  display: flex; flex-wrap: nowrap; gap: 2px;
  padding: 3px 6px 2px;
  border-top: 1px solid rgba(255,255,255,0.2);
  overflow: hidden;
}
.flag-box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 14px;
  border-radius: 1px; overflow: hidden; flex-shrink: 0;
  outline: 1px solid rgba(255,255,255,0.2);
  cursor: default; font-size: 0px; /* hide text fallback */
}
.flag-img {
  width: 18px !important; height: 12px !important;
  border-radius: 1px; object-fit: cover; display: inline-block;
  flex-shrink: 0; border: 1px solid rgba(255,255,255,0.3);
}
.idd-subtitle-bar {
  background: #5c0000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.52rem; font-weight: 700; letter-spacing: 0.1em;
  color: #fff; text-align: center; padding: 3px 8px;
}

.idd-body {
  background: #fff; flex: 1;
  display: flex; gap: 12px; padding: 8px 12px 6px;
  overflow: hidden; min-height: 0;
}
.idd-photo-col { flex-shrink: 0; }
.idd-photo {
  width: 115px; height: 145px; overflow: hidden;
  border: 1px solid #aaa; border-radius: 2px;
  background: #c8d4e0; box-shadow: inset 0 0 4px rgba(0,0,0,0.1);
}
.idd-photo svg { display: block; width: 115px; height: 145px; }

.idd-right-col {
  flex: 1; display: flex; flex-direction: column; justify-content: space-between;
}
.idd-fields { display: flex; flex-direction: column; gap: 2px; }
.idd-field-label-blue {
  font-family: Arial, Helvetica, sans-serif; font-size: 0.58rem; font-weight: 700;
  color: #003399; letter-spacing: 0.04em; margin-bottom: 1px;
}
.idd-field-name {
  font-family: Arial, Helvetica, sans-serif; font-size: 1.02rem; font-weight: 900;
  color: #000; letter-spacing: 0.02em; line-height: 1.15;
}
.idd-field-addr {
  font-family: Arial, Helvetica, sans-serif; font-size: 0.64rem;
  color: #111; line-height: 1.35; margin-top: 2px; margin-bottom: 2px;
}
.idd-field-row {
  font-family: Arial, Helvetica, sans-serif; font-size: 0.64rem; color: #111; line-height: 1.35;
}
.idd-lbl { font-weight: 700; color: #003399; }
.idd-val { color: #111; font-weight: 700; }

.idd-barcode-row-inline {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-top: 3px; padding-top: 3px; border-top: 1px dashed #d0d0d0; width: 100%;
}
.idd-barcode-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.idd-barcode {
  width: 145px; height: 26px;
  background: repeating-linear-gradient(
    90deg,
    #000 0px,   #000 1.5px,  transparent 1.5px, transparent 3px,
    #000 3px,   #000 4.5px,  transparent 4.5px, transparent 6px,
    #000 6px,   #000 7px,    transparent 7px,   transparent 8.5px,
    #000 8.5px, #000 11px,   transparent 11px,  transparent 12.5px,
    #000 12.5px,#000 14px,   transparent 14px,  transparent 15.5px,
    #000 15.5px,#000 16.5px, transparent 16.5px,transparent 18px,
    #000 18px,  #000 20px,   transparent 20px,  transparent 21.5px
  );
}
.idd-barcode-num {
  font-family: 'JetBrains Mono', monospace; font-size: 0.5rem; color: #333;
  letter-spacing: 0.05em; font-weight: 600;
}
.idd-signature {
  font-family: 'Brush Script MT', 'Segoe Script', cursive; font-size: 1.15rem;
  color: #111; margin-right: 6px; font-weight: 600;
}
.idd-footer {
  background: #8B0000; flex-shrink: 0;
  display: flex; justify-content: space-between; padding: 5px 12px;
  font-family: Arial, Helvetica, sans-serif; font-size: 0.6rem;
  font-weight: 700; color: #fff; letter-spacing: 0.04em;
}

/* ── BACK ── */
.flip-card-back { background: #b8a888; }
.idd-back-header {
  background: #8B0000; flex-shrink: 0;
  color: #fff; font-family: Arial, Helvetica, sans-serif;
  font-size: 0.64rem; font-weight: 900; letter-spacing: 0.1em;
  padding: 7px 12px; text-align: center;
}
.idd-back-black-stripe {
  height: 16px; background: #111; flex-shrink: 0;
  border-top: 1px solid #333; border-bottom: 1px solid #000;
}
.idd-back-body {
  flex: 1; display: flex;
  background: linear-gradient(140deg, #c2b090 0%, #b09870 50%, #c2b090 100%);
  position: relative; overflow: hidden;
}
.idd-back-worldmap {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 220'%3E%3Cellipse cx='200' cy='110' rx='180' ry='100' fill='none' stroke='%23000' stroke-width='1' opacity='0.07'/%3E%3Cellipse cx='200' cy='110' rx='130' ry='100' fill='none' stroke='%23000' stroke-width='1' opacity='0.07'/%3E%3Cellipse cx='200' cy='110' rx='80' ry='100' fill='none' stroke='%23000' stroke-width='1' opacity='0.07'/%3E%3Cline x1='20' y1='110' x2='380' y2='110' stroke='%23000' stroke-width='1' opacity='0.07'/%3E%3Cline x1='200' y1='10' x2='200' y2='210' stroke='%23000' stroke-width='1' opacity='0.07'/%3E%3Cellipse cx='200' cy='110' rx='180' ry='40' fill='none' stroke='%23000' stroke-width='0.8' opacity='0.05'/%3E%3Cellipse cx='200' cy='110' rx='180' ry='70' fill='none' stroke='%23000' stroke-width='0.8' opacity='0.05'/%3E%3C/svg%3E");
  background-size: cover; background-position: center;
  pointer-events: none;
}
.idd-back-left {
  flex: 1.1; padding: 10px 12px;
  border-right: 1px solid rgba(0,0,0,0.18); position: relative; z-index: 1;
  display: flex; flex-direction: column;
}
.idd-back-right {
  flex: 0.9; padding: 10px 10px; position: relative; z-index: 1;
  display: flex; flex-direction: column;
}
.idd-back-issuer {
  margin-bottom: 8px;
  p {
    font-family: Arial, Helvetica, sans-serif; font-size: 0.54rem;
    color: #111; line-height: 1.5; margin: 0; font-weight: 600;
  }
}
.idd-cats-title {
  font-family: Arial, Helvetica, sans-serif; font-size: 0.58rem;
  font-weight: 900; color: #000; margin-bottom: 5px;
}
.idd-cats-table {
  width: 100%; border-collapse: collapse;
  tr { border-bottom: 1px solid rgba(0,0,0,0.1); }
  tr:last-child { border: none; }
  td {
    font-family: Arial, Helvetica, sans-serif; font-size: 0.5rem;
    color: #111; padding: 3px 4px; vertical-align: top; line-height: 1.35;
  }
}
.cat-letter { font-weight: 900; width: 14px; color: #5c0000; }

.idd-back-permit-label {
  font-family: Arial, Helvetica, sans-serif; font-size: 0.54rem;
  font-weight: 700; color: #111; line-height: 1.4; margin-bottom: 3px;
}
.idd-back-permit-num {
  font-family: Arial, Helvetica, sans-serif; font-size: 0.95rem;
  font-weight: 900; color: #8B0000; letter-spacing: 0.01em;
  margin-bottom: 2px; line-height: 1.1;
}
.idd-back-country {
  font-family: Arial, Helvetica, sans-serif; font-size: 0.7rem;
  font-weight: 900; color: #000; margin-bottom: 6px;
}
.idd-back-qr-box {
  width: 68px; height: 68px; background: #fff;
  padding: 3px; border-radius: 3px; margin-bottom: 4px;
  cursor: pointer; transition: transform var(--t-fast);
}
.idd-back-qr-box:hover { transform: scale(1.04); }
.idd-back-qr-box div { width: 100%; height: 100%; }
.idd-back-qr-text {
  font-family: Arial, Helvetica, sans-serif; font-size: 0.42rem;
  color: #333; line-height: 1.4; max-width: 100px;
}

.idd-back-footer {
  background: #8B0000; flex-shrink: 0;
  color: #fff; font-family: Arial, Helvetica, sans-serif;
  font-size: 0.4rem; font-weight: 700; letter-spacing: 0.04em;
  text-align: center; padding: 5px 10px; line-height: 1.4;
}

/* Flip hint */
.flip-hint {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 14px;
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--gray-400); letter-spacing: 0.06em;
}
.flip-hint-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-400);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

/* Legacy selectors kept for other uses */
.qr-code-img {
  width: 64px; height: 64px; background: #fff; padding: 4px; border-radius: 6px;
  background-image: radial-gradient(#000 40%, transparent 40%);
  background-size: 8px 8px; transition: transform var(--t-fast);
}
.card-qr-box:hover .qr-code-img { transform: scale(1.05); }
.qr-scan-hint {
  font-family: var(--font-mono); font-size: 0.45rem; color: var(--gold-400);
  letter-spacing: 0.06em;
}

/* ── Features Grid (3-col) ──────────────────────────────────── */
.features-grid-3 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature-box {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle); border-radius: var(--r-lg);
  padding: 32px 24px; transition: all var(--t-normal);
}
.feature-box:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.f-icon { font-size: 2rem; margin-bottom: 16px; }
.feature-box h3 {
  font-family: var(--font-ui); font-size: 1.05rem; font-weight: 700;
  margin-bottom: 10px; color: var(--white);
}
.feature-box p { color: var(--gray-400); font-size: 0.9rem; line-height: 1.65; }

/* ── Country Chips ───────────────────────────────────────────── */
.country-chips-grid {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.country-chip {
  font-size: 0.78rem; font-family: var(--font-body); font-weight: 500;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 20px; padding: 5px 13px; color: var(--gray-200);
  transition: all var(--t-fast);
}
.country-chip:hover { border-color: var(--border-gold); color: var(--gold-300); }

/* ── Sample Page ─────────────────────────────────────────────── */
.sample-display-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
}
.sample-card-item {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl); padding: 32px; position: relative;
}
.sample-badge {
  position: absolute; top: 20px; right: 20px;
  background: var(--gold-500); color: var(--navy-900);
  font-size: 0.65rem; font-weight: 800; padding: 4px 10px; border-radius: 4px;
  font-family: var(--font-mono); letter-spacing: 0.06em;
}
.sample-card-item h3 {
  font-family: var(--font-display); font-size: 1.2rem; margin: 20px 0 10px;
}
.sample-card-item p { color: var(--gray-400); font-size: 0.9rem; line-height: 1.65; }
.sample-image-placeholder {
  border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--border-subtle); min-height: 220px;
  display: flex; align-items: center; justify-content: center;
}
.booklet-mock {
  background: linear-gradient(145deg, #1e3a6e, #0d2044);
  width: 100%;
}
.booklet-cover {
  padding: 32px 24px; text-align: center; width: 100%;
  h3 { font-family: var(--font-display); font-size: 0.9rem; color: var(--gold-300); margin-bottom: 6px; }
  h4 { font-family: var(--font-display); font-size: 0.75rem; color: var(--white); margin-bottom: 4px; }
  p  { font-family: var(--font-mono); font-size: 0.6rem; color: var(--gray-400); }
}
.gold-seal-logo {
  font-family: var(--font-display); color: var(--gold-400); font-size: 1.3rem; margin-bottom: 12px;
}
.booklet-pages-stack {
  margin-top: 16px; font-family: var(--font-mono); font-size: 0.6rem;
  color: var(--emerald); background: rgba(0,229,153,0.1);
  padding: 4px 10px; border-radius: 4px; display: inline-block;
}
.card-mock {
  background: linear-gradient(135deg, #1C2541, #0a1628);
  border: 1px solid var(--border-gold); min-height: 200px;
}
.digital-card-preview-inner {
  padding: 28px; text-align: center;
  .chip-bar { font-family: var(--font-mono); font-size: 0.65rem; color: var(--gold-400); margin-bottom: 14px; }
  .card-details-mini { margin-bottom: 14px; strong { font-family: var(--font-mono); font-size: 0.8rem; color: var(--white); display: block; } span { font-size: 0.6rem; color: var(--emerald); } }
}
.qr-mock-sample {
  width: 60px; height: 60px; background: white; margin: 0 auto;
  padding: 4px; border-radius: 5px;
  background-image: radial-gradient(#000 40%, transparent 40%);
  background-size: 7px 7px;
}

/* ── Pricing Section — Fit to 1st Screen Viewport ─────────────────────────────────── */
#view-price.active {
  min-height: calc(100vh - 75px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}
#view-price .container {
  padding-top: 16px;
  padding-bottom: 16px;
  max-width: 1240px;
  margin: auto auto;
}
#view-price .section-title-center {
  margin-bottom: 22px;
}
#view-price .section-tag {
  margin-bottom: 4px;
}
#view-price .section-heading {
  font-size: 2.15rem;
  margin-bottom: 6px;
}
#view-price .section-desc {
  font-size: 0.92rem;
}
.pricing-table-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch;
}
.price-box {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); padding: 22px 24px; position: relative;
  display: flex; flex-direction: column; gap: 0;
  transition: all var(--t-normal);
}
.price-box:hover { transform: translateY(-3px); border-color: var(--border-gold); box-shadow: 0 16px 40px rgba(0,0,0,0.5); }
.price-box.featured {
  border-color: var(--gold-500);
  background: linear-gradient(165deg, #1e3060 0%, #0d1a38 100%);
  box-shadow: 0 0 50px rgba(212,175,55,0.2);
}
.featured-ribbon {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  color: var(--navy-900); font-family: var(--font-mono); font-size: 0.62rem;
  font-weight: 800; padding: 3px 12px; border-radius: 20px; white-space: nowrap;
}
.p-header { margin-bottom: 16px; text-align: center; }
.p-tier {
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700;
  color: var(--gold-400); letter-spacing: 0.1em;
  display: block; margin-bottom: 6px;
}
.p-amount {
  font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--white);
  line-height: 1; margin-bottom: 4px;
}
.cur { font-size: 1.3rem; vertical-align: super; color: var(--gold-400); }
.p-validity { font-size: 0.75rem; color: var(--gray-400); }
.p-features {
  list-style: none; margin-bottom: 18px; flex: 1;
}
.p-features li {
  font-size: 0.82rem; color: var(--gray-200); padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.p-features li:last-child { border: none; }

/* ── Checkout / Payment — Fit to 1st Screen Viewport ──────────────── */
#view-payment.active {
  min-height: calc(100vh - 75px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}
#view-payment .container {
  padding-top: 10px;
  padding-bottom: 10px;
  max-width: 900px;
  margin: auto auto;
}
.payment-checkout-card {
  max-width: 860px; margin: 0 auto;
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); padding: 18px 26px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.checkout-header {
  text-align: center; margin-bottom: 12px;
}
.checkout-header h2 {
  font-family: var(--font-display); font-size: 1.45rem; margin-bottom: 2px; color: var(--white);
}
.checkout-header p {
  color: var(--gray-400); font-size: 0.8rem;
}
.checkout-stepper {
  display: flex; gap: 4px; margin-bottom: 12px;
  background: rgba(255,255,255,0.04); border-radius: var(--r-md);
  padding: 4px; border: 1px solid var(--border-subtle);
}
.c-step {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 6px 8px; border-radius: 6px;
  transition: all var(--t-fast); cursor: default;
}
.c-step .num {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: var(--gray-400);
  flex-shrink: 0;
}
.c-step .lbl { font-size: 0.75rem; font-weight: 600; color: var(--gray-400); }
.c-step.active {
  background: rgba(212,175,55,0.12);
}
.c-step.active .num { background: var(--gold-500); color: var(--navy-900); }
.c-step.active .lbl { color: var(--gold-300); }
.c-step.done .num { background: var(--emerald); color: var(--navy-900); }
.c-step.done .lbl { color: var(--gray-200); }

.form-step-panel { display: none; }
.form-step-panel.active { display: block; }
.form-section-title {
  font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 2px; color: var(--gold-300);
}
.form-section-subtitle { color: var(--gray-400); font-size: 0.78rem; margin-bottom: 10px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.cat-checkbox-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border-subtle);
  padding: 10px 12px; border-radius: var(--r-sm); margin-top: 4px;
}
.cat-cb-label {
  display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--gray-200);
  cursor: pointer; user-select: none;
}
.cat-cb-label input[type="checkbox"] { accent-color: var(--gold-500); width: 14px; height: 14px; }

.signature-pad-container {
  background: #ffffff; border: 1px solid var(--border-gold);
  border-radius: var(--r-sm); padding: 6px; margin-top: 4px;
}
#signature-canvas {
  width: 100%; height: 75px; background: #fff; cursor: crosshair; touch-action: none;
  display: block; border-radius: 4px;
}
.sig-actions {
  display: flex; justify-content: flex-end; margin-top: 4px;
}

.form-group {
  display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px;
}
.form-group label { font-size: 0.76rem; font-weight: 600; color: var(--gray-200); }
.form-group input, .form-group select, .form-group textarea {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm); padding: 7px 11px;
  color: var(--white); font-size: 0.84rem; transition: border-color var(--t-fast);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--gold-500); }
.form-group input::placeholder, .form-group select::placeholder, .form-group textarea::placeholder { color: var(--gray-600); }
.form-group select option { background: var(--navy-800); }

.form-actions-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; border-top: 1px solid var(--border-subtle); margin-top: 6px;
}

/* Upload Dropzones */
.upload-dropzones-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 12px; }
.dropzone-box {
  background: rgba(255,255,255,0.03); border: 2px dashed rgba(255,255,255,0.12);
  border-radius: var(--r-md); padding: 18px 14px; text-align: center;
  transition: all var(--t-fast);
}
.dropzone-box:hover { border-color: var(--border-gold); }
.dropzone-box .dz-icon { font-size: 1.8rem; margin-bottom: 6px; }
.dropzone-box h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 4px; }
.dropzone-box p  { font-size: 0.74rem; color: var(--gray-400); margin-bottom: 10px; }

.file-input-hidden { display: none; }
.dz-preview {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--gray-600); margin-top: 6px;
}

/* Package Selector in Checkout */
.pkg-selector-radio-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.radio-pkg-card {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-subtle);
  border-radius: var(--r-md); padding: 10px 14px;
  transition: all var(--t-fast);
}
.radio-pkg-card input[type="radio"] { accent-color: var(--gold-500); width: 15px; height: 15px; flex-shrink: 0; }
.radio-pkg-card .r-details { flex: 1; }
.radio-pkg-card .r-details strong { display: block; font-size: 0.85rem; margin-bottom: 1px; }
.radio-pkg-card .r-details span { font-size: 0.74rem; color: var(--gray-400); }
.radio-pkg-card .r-price { font-family: var(--font-display); font-size: 1.1rem; color: var(--gold-400); font-weight: 700; }
.radio-pkg-card.active, .radio-pkg-card:has(input:checked) { border-color: var(--gold-500); background: rgba(212,175,55,0.08); }

.payment-methods-box {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border-subtle);
  border-radius: var(--r-md); padding: 24px; margin-bottom: 8px;
}
.payment-methods-box h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 16px; color: var(--gold-300); }

/* ── FAQ ─────────────────────────────────────────────────────── */
#view-faq .container { max-width: 820px; }
.faq-accordion-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-md); overflow: hidden; transition: border-color var(--t-fast);
}
.faq-item.open { border-color: var(--border-gold); }
.faq-question {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; color: var(--white);
  font-family: var(--font-ui); font-size: 0.95rem; font-weight: 600; text-align: left; gap: 14px;
}
.faq-toggle-icon {
  font-size: 1.5rem; color: var(--gold-400); line-height: 1;
  transition: transform var(--t-fast); flex-shrink: 0;
}
.faq-item.open .faq-toggle-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.38s cubic-bezier(0.4,0,0.2,1), padding 0.3s;
  padding: 0 24px;
  p { color: var(--gray-400); font-size: 0.9rem; line-height: 1.7; }
}
.faq-item.open .faq-answer { max-height: 200px; padding: 0 24px 20px; }

/* ── Status Tracker ──────────────────────────────────────────── */
#view-status .container { max-width: 860px; }
.status-lookup-card {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl); padding: 48px;
}
.status-search-bar {
  display: flex; gap: 12px; margin-bottom: 40px;
}
.status-search-bar input {
  flex: 1; background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle); border-radius: var(--r-md);
  padding: 14px 18px; color: var(--white); font-size: 0.95rem;
}
.status-search-bar input:focus { border-color: var(--gold-500); outline: none; }
.status-results-box {
  border-top: 1px solid var(--border-subtle); padding-top: 32px;
}
.order-info-header {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px;
  .lbl { font-family: var(--font-mono); font-size: 0.65rem; color: var(--gray-400); letter-spacing: 0.1em; }
  h3 { font-family: var(--font-mono); font-size: 1.4rem; color: var(--gold-400); }
}
.status-badge-active {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700;
  background: rgba(0,229,153,0.12); color: var(--emerald);
  border: 1px solid rgba(0,229,153,0.3); padding: 6px 12px; border-radius: 6px;
}
.timeline-tracker {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 32px;
}
.t-step {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border-subtle);
  border-radius: var(--r-md); padding: 18px 12px; text-align: center;
}
.t-step .dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.08); display: flex; align-items: center;
  justify-content: center; font-size: 0.75rem; color: var(--gray-400);
  margin: 0 auto 8px; font-weight: 700;
}
.t-step .t-lbl { font-size: 0.72rem; color: var(--gray-400); font-weight: 600; }
.t-step.done {
  border-color: rgba(0,229,153,0.4); background: rgba(0,229,153,0.07);
}
.t-step.done .dot { background: var(--emerald); color: var(--navy-900); }
.t-step.done .t-lbl { color: var(--white); }
.status-action-row { text-align: center; }

/* ── Contact ─────────────────────────────────────────────────── */
#view-contact .container { padding-top: 80px; padding-bottom: 80px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact-info-col h2 { font-family: var(--font-display); font-size: 2rem; margin: 16px 0 12px; }
.contact-info-col p  { color: var(--gray-400); font-size: 0.95rem; line-height: 1.7; margin-bottom: 28px; }
.c-info-list { display: flex; flex-direction: column; gap: 18px; }
.c-info-item {
  display: flex; gap: 16px; align-items: flex-start;
}
.c-info-item .c-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.c-info-item strong { font-size: 0.9rem; display: block; margin-bottom: 4px; color: var(--gold-300); }
.c-info-item p { font-size: 0.85rem; color: var(--gray-400); margin: 0; }
.card-surface-form {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl); padding: 36px;
}
.card-surface-form h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 24px; color: var(--gold-300); }
.card-surface-form textarea { resize: vertical; min-height: 120px; }

/* ── Dashboard ────────────────────────────────────────────────── */
#view-dashboard {
  padding: 0;
  min-height: 100vh;
  background: var(--navy-900);
}
#view-dashboard.active { display: flex; }
.dashboard-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar */
.dashboard-sidebar {
  background: var(--navy-800);
  border-right: 1px solid var(--border-subtle);
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.dash-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}
.dash-brand-logo { font-size: 1.4rem; }
.dash-brand-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-300);
  line-height: 1.1;
}
.dash-brand-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--gray-400);
  letter-spacing: 0.06em;
}
.dash-user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--r-md);
  margin-bottom: 20px;
}
.u-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-300));
  color: var(--navy-900); font-weight: 800; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.u-name-group strong { display: block; font-size: 0.82rem; color: var(--white); line-height: 1.3; }
.u-badge {
  font-family: var(--font-mono); font-size: 0.55rem;
  padding: 2px 6px; border-radius: 3px; letter-spacing: 0.05em;
  margin-top: 2px; display: inline-block;
}
.dash-menu-section-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--gray-600);
  letter-spacing: 0.12em;
  padding: 4px 12px 8px;
}
.dash-menu { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.d-menu-item {
  background: transparent; border: none; cursor: pointer;
  color: var(--gray-400); font-size: 0.82rem; font-weight: 600;
  font-family: var(--font-ui); padding: 10px 12px; border-radius: var(--r-sm);
  text-align: left; transition: all var(--t-fast);
  display: flex; align-items: center; gap: 8px;
}
.d-menu-item:hover { background: rgba(255,255,255,0.05); color: var(--white); }
.d-menu-item.active { background: rgba(212,175,55,0.12); color: var(--gold-300); }
.d-icon { font-size: 1rem; width: 20px; text-align: center; }
.d-badge {
  margin-left: auto;
  background: var(--gold-400);
  color: var(--navy-900);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}
.dash-sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--gray-600);
  text-align: center;
  letter-spacing: 0.04em;
}

/* Main Panel */
.dashboard-main-panel {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--navy-900);
  overflow: hidden;
}

/* Top Bar */
.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: var(--navy-800);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 16px;
}
.dash-topbar-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}
.dash-topbar-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Panels */
.dash-panel { display: none; padding: 18px 24px; flex: 1; }
.dash-panel.active { display: block; animation: panelFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) both; }

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

/* Stats Grid */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 4px;
}
.dash-stat-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.dash-stat-card:hover { border-color: var(--border-gold); transform: translateY(-2px); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--gray-400);
  margin-top: 4px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Section Cards */
.dash-section-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.dash-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.dash-section-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}

/* Tables */
.dash-table-wrapper {
  overflow-x: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
}
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 0.83rem;
    padding: 12px 16px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--gray-400);
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-subtle);
  }
  td {
    padding: 13px 16px;
    color: var(--gray-200);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
  }
.dash-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.dash-table tbody tr:last-child td { border-bottom: none; }
.td-mono { font-family: var(--font-mono); font-size: 0.78rem; color: var(--gold-400); }
.dash-table-empty {
  text-align: center;
  padding: 40px 20px !important;
  color: var(--gray-600);
  font-size: 0.85rem;
}

/* Search / Filter */
.dash-search-input {
  padding: 9px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.82rem;
  outline: none;
  min-width: 240px;
  transition: border-color var(--t-fast);
}
.dash-search-input:focus { border-color: var(--gold-400); }
.dash-search-input::placeholder { color: var(--gray-600); }

.dash-filter-select {
  appearance: none;
  padding: 9px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
  transition: border-color var(--t-fast);
}
.dash-filter-select:focus { border-color: var(--gold-400); }
.dash-filter-select option { background: var(--navy-800); }

/* Two-column layout in translation panel */
.dash-two-col-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 1024px) {
  .dash-two-col-layout {
    grid-template-columns: 1fr;
  }
}

.dash-field-group { margin-bottom: 14px; }
.dash-field-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gray-400);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

/* Application summary box */
.dash-app-summary {
  background: rgba(212,175,55,0.06);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-top: 12px;
  margin-bottom: 16px;
}
.app-summary-row:last-child { border: none; }
.app-summary-row span { color: var(--gray-400); }
.app-summary-row strong { color: var(--white); text-align: right; max-width: 60%; }

/* Translation history */
.trans-history-list { display: flex; flex-direction: column; gap: 4px; }
.trans-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--gray-200);
  transition: all var(--t-fast);
}
.trans-history-item:hover { background: rgba(212,175,55,0.08); border-color: var(--border-gold); color: var(--gold-300); }

/* Settings */
.dash-settings-group {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.dash-settings-group:last-child { border: none; }
.dash-input-field {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  color: var(--gray-400);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-top: 8px;
  box-sizing: border-box;
  outline: none;
}

/* Application Detail Modal */
#app-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6,11,24,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: overlayFadeIn 0.25s ease both;
}
.app-detail-card {
  background: var(--navy-700);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-lg);
  width: 96vw;
  max-width: 960px;
  max-height: 94vh;
  overflow: hidden;
  margin: 10px;
  padding: 16px 20px;
  animation: cardSlideUp 0.3s cubic-bezier(0.16,1,0.3,1) both;
  box-shadow: 0 30px 90px rgba(0,0,0,0.8);
}
.app-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--navy-700);
  z-index: 1;
}
.modal-close-x {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  color: var(--gray-400);
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.modal-close-x:hover { background: rgba(239,68,68,0.15); color: #F87171; border-color: rgba(239,68,68,0.3); }
.app-detail-body { padding: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.d-field-edit {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.d-field-edit label {
  font-size: 0.63rem;
  color: var(--gray-400);
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.dash-edit-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--gold-300);
  padding: 3px 6px;
  font-size: 0.78rem;
  font-family: var(--font-body);
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dash-edit-input:focus {
  border-color: var(--gold-400);
  background: rgba(212, 175, 55, 0.08);
}
.detail-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.detail-col {}
.detail-section-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gold-400);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-gold);
}
.d-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.d-field:last-child { border: none; }
.d-field span { font-size: 0.72rem; color: var(--gray-400); font-family: var(--font-ui); }
.d-field strong { font-size: 0.85rem; color: var(--white); font-weight: 600; }

/* Translation control bar (kept for backward compat) */
.translation-control-bar {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border-subtle);
  border-radius: var(--r-md); padding: 14px 18px; margin-bottom: 28px;
}
.translation-control-bar label { font-size: 0.85rem; font-weight: 600; color: var(--gray-200); white-space: nowrap; }

.dash-lang-dropdown {
  flex: 1; appearance: none; background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-gold); border-radius: var(--r-sm);
  color: var(--white); font-size: 0.88rem; padding: 10px 14px; cursor: pointer;
}
.dash-lang-dropdown:focus { outline: none; border-color: var(--gold-400); }
.dash-lang-dropdown option { background: var(--navy-800); }

/* Digital Translation Render Card */
.digital-translation-card {
  border: 1px solid var(--border-gold);
  border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(165deg, #12244a 0%, #0b1729 100%);
  box-shadow: 0 0 50px rgba(212,175,55,0.1);
}
.permit-render-header {
  background: linear-gradient(90deg, rgba(212,175,55,0.15), rgba(212,175,55,0.03));
  border-bottom: 1px solid var(--border-gold);
  padding: 20px 28px; display: flex; align-items: center; gap: 16px;
}
.render-flag { font-size: 2rem; }
.render-title-group { flex: 1; }
#dl-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--gold-300); letter-spacing: 0.04em; }
#dl-subtitle { font-family: var(--font-mono); font-size: 0.6rem; color: var(--gray-400); letter-spacing: 0.06em; display: block; margin-top: 2px; }
.render-qr {
  display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
}
.render-qr:hover .qr-mock-mini { transform: scale(1.06); }
.permit-render-header {
  background: linear-gradient(90deg, rgba(212,175,55,0.15), rgba(212,175,55,0.03));
  border-bottom: 1px solid var(--border-gold);
  padding: 20px 28px; display: flex; align-items: center; gap: 16px;
}
.render-flag { font-size: 2rem; }
.render-title-group { flex: 1; }
#dl-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--gold-300); letter-spacing: 0.04em; }
#dl-subtitle { font-family: var(--font-mono); font-size: 0.6rem; color: var(--gray-400); letter-spacing: 0.06em; display: block; margin-top: 2px; }
.render-qr {
  display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
}
.render-qr:hover .qr-mock-mini { transform: scale(1.06); }
.render-qr span { font-family: var(--font-mono); font-size: 0.5rem; color: var(--gold-400); }
.qr-mock-mini {
  width: 52px; height: 52px; background: #fff; padding: 3px; border-radius: 4px;
  background-image: radial-gradient(#000 40%, transparent 40%);
  background-size: 6px 6px; transition: transform var(--t-fast);
}
.permit-render-body {
  padding: 24px 28px; display: grid;
  grid-template-columns: 80px 1fr; gap: 24px; align-items: start;
}
.render-user-photo img {
  width: 80px; height: 96px; object-fit: cover;
  border-radius: 6px; border: 2px solid var(--border-gold);
}
.render-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rf-item { display: flex; flex-direction: column; gap: 3px; }
.rf-lbl {
  font-family: var(--font-mono); font-size: 0.55rem;
  color: var(--gray-600); letter-spacing: 0.05em;
}
.rf-val {
  font-family: var(--font-ui); font-size: 0.88rem; font-weight: 700; color: var(--white);
  &.gold { color: var(--gold-400); }
  &.mono { font-family: var(--font-mono); }
}
.permit-render-footer {
  background: rgba(0,0,0,0.25); border-top: 1px solid var(--border-gold);
  padding: 16px 28px; display: flex; justify-content: space-between; align-items: center;
}
.un-convention-note { font-family: var(--font-mono); font-size: 0.6rem; color: var(--gray-600); max-width: 480px; line-height: 1.5; }

/* ── Verify QR Page ──────────────────────────────────────────── */
#view-verify .container { max-width: 800px; }
.verify-page-card {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl); overflow: hidden;
}
.verify-header-status {
  background: linear-gradient(135deg, rgba(0,229,153,0.12), rgba(0,229,153,0.04));
  border-bottom: 1px solid rgba(0,229,153,0.25);
  padding: 36px 40px; display: flex; align-items: center; gap: 24px;
}
.verify-shield-icon { font-size: 3rem; }
.verify-status-text .v-tag { font-family: var(--font-mono); font-size: 0.65rem; color: var(--emerald); letter-spacing: 0.1em; display: block; margin-bottom: 6px; }
.verify-status-text h2 { font-family: var(--font-display); font-size: 1.4rem; color: var(--emerald); margin-bottom: 4px; }
.verify-status-text p  { font-size: 0.8rem; color: var(--gray-400); }

.verify-body-content { padding: 36px 40px; }
.verify-driver-badge {
  display: flex; align-items: center; gap: 20px; margin-bottom: 28px;
  padding-bottom: 24px; border-bottom: 1px solid var(--border-subtle);
}
.verify-driver-badge .v-photo { width: 70px; height: 85px; object-fit: cover; border-radius: 8px; border: 2px solid var(--border-gold); }
.verify-driver-badge h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 6px; }

.verify-table { margin-bottom: 28px; }
.verify-table .v-row {
  display: flex; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.verify-table .v-row span { font-size: 0.85rem; color: var(--gray-400); }
.verify-table .v-row strong { font-size: 0.85rem; color: var(--white); }
.verify-actions { text-align: center; }

/* Custom Language Selector with Real Flag Images */
.custom-lang-select {
  position: relative;
  display: inline-block;
  font-family: var(--font-body);
}

.custom-lang-trigger {
  background: #1e406d;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.custom-lang-trigger:hover {
  background: #254d82;
  border-color: rgba(255,255,255,0.4);
}

.custom-lang-flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.custom-lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 190px;
  max-height: 320px;
  overflow-y: auto;
  background: #162b48;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  z-index: 9999;
  display: none;
  padding: 4px 0;
}

.custom-lang-dropdown-menu.open {
  display: block;
}

.custom-lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.custom-lang-option:hover {
  background: #254d82;
  color: #ffffff;
}

.custom-lang-option.selected {
  background: #0056b3;
  color: #ffffff;
  font-weight: 700;
}

/* Verify Page (Online Digital Translation Verification) - Tight Fit & No Space Above */
#view-verify {
  display: none;
}
#view-verify.active {
  background: #eef1f6;
  min-height: 100vh;
  padding: 6px 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
}
.verify-container-inner {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  transform-origin: top center;
  transition: transform 0.2s ease;
}

@media (max-height: 900px) {
  .verify-container-inner {
    transform: scale(0.92);
    margin-bottom: -35px;
  }
}
@media (max-height: 800px) {
  .verify-container-inner {
    transform: scale(0.84);
    margin-bottom: -75px;
  }
}
@media (max-height: 700px) {
  .verify-container-inner {
    transform: scale(0.74);
    margin-bottom: -120px;
  }
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border-subtle);
  background: rgba(6,11,24,0.9);
  padding: 64px 0 0;
}
.footer-container {
  max-width: 1260px; margin: 0 auto; padding: 0 24px 48px;
  display: grid; grid-template-columns: 340px 1fr; gap: 64px;
  border-bottom: 1px solid var(--border-subtle);
}
.footer-brand {
  .logo-title { font-family: var(--font-display); font-size: 1rem; color: var(--gold-300); letter-spacing: 0.12em; display: block; }
  .logo-sub { font-family: var(--font-mono); font-size: 0.6rem; color: var(--gray-400); letter-spacing: 0.08em; }
  p { color: var(--gray-400); font-size: 0.85rem; margin: 14px 0 16px; line-height: 1.7; }
}
.social-links { font-size: 0.8rem; color: var(--gray-600); }
.footer-cols-wrapper { display: flex; gap: 48px; }
.f-col {
  display: flex; flex-direction: column; gap: 10px;
}
.f-col h4 { font-size: 0.75rem; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.f-col a { font-size: 0.85rem; color: var(--gray-400); transition: color var(--t-fast); }
.f-col a:hover { color: var(--gold-300); }
.footer-bottom {
  text-align: center; padding: 18px 24px;
  p { font-size: 0.78rem; color: var(--gray-600); }
}

/* ── Mobile Menu Button & Navigation Drawer ─────────────────── */
.mobile-menu-toggle {
  display: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-sm);
  width: 38px;
  height: 38px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--t-fast);
  padding: 0;
  flex-shrink: 0;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: rgba(212,175,55,0.2);
  border-color: var(--gold-400);
}
.hamburger-bar {
  width: 18px;
  height: 2px;
  background: var(--gold-400);
  border-radius: 2px;
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(6, 11, 24, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  justify-content: flex-end;
  animation: overlayFadeIn 0.25s ease both;
}
.mobile-nav-drawer {
  width: 290px;
  max-width: 85vw;
  height: 100%;
  background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
  border-left: 1px solid var(--border-gold);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0,0,0,0.6);
  animation: drawerSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  overflow-y: auto;
}
@keyframes drawerSlideIn {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}
.mobile-nav-close {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-subtle);
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
}
.mobile-nav-close:hover {
  background: rgba(239,68,68,0.2);
  color: var(--danger);
  border-color: rgba(239,68,68,0.4);
}
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.m-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  color: var(--gray-200);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all var(--t-fast);
}
.m-nav-link:hover, .m-nav-link.active {
  background: rgba(212,175,55,0.12);
  border-color: var(--border-gold);
  color: var(--gold-300);
}
.m-nav-link.highlight-dash {
  background: rgba(212,175,55,0.18);
  border-color: var(--gold-400);
  color: var(--gold-300);
}
.m-icon { font-size: 1.1rem; }

/* ── Responsive Architecture (Mobile, Tablet, Laptop, Desktop) ───── */

@media (max-width: 900px) {
  html { font-size: 13.5px; }
  /* Navbar Header Layout on Mobile */
  .nav-container { padding: 0 12px; gap: 8px; flex-wrap: nowrap; justify-content: space-between; }
  .nav-menu { display: none !important; }
  .btn-apply-nav { display: none !important; }
  .mobile-menu-toggle { display: flex !important; }
  .lang-dropdown { padding: 5px 8px; font-size: 0.75rem; max-width: 100px; }

  /* Hero Section Mobile */
  #view-home.active {
    height: auto;
    min-height: calc(100vh - 75px);
    max-height: none;
    overflow-y: auto;
  }
  .hero-section {
    height: auto;
    max-height: none;
    padding: 16px 12px 24px;
    overflow: hidden;
  }
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 18px;
    padding: 0 4px;
    max-width: 100%;
    box-sizing: border-box;
  }
  .hero-text-block { max-width: 100%; margin: 0 auto; }
  .hero-headline {
    font-size: 1.65rem;
    line-height: 1.22;
    margin-bottom: 10px;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .hero-subtitle {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 16px;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .un-compliance-pill { font-size: 0.68rem; padding: 3px 10px; }
  .hero-actions { flex-direction: column; width: 100%; gap: 8px; justify-content: center; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .trust-bar { justify-content: center; gap: 14px; padding-top: 12px; }
  .trust-number { font-size: 1.25rem; }

  /* Hero Visual & Shadow */
  .hero-visual { margin-top: 6px; }
  .hero-stand-card { max-width: 270px; margin: 0 auto; zoom: 0.82; -webkit-zoom: 0.82; }
  .hero-stand-shadow { width: 220px; height: 14px; margin-top: 6px; }
  .hero-marquee-banner { width: 100%; left: 0; right: 0; margin-left: 0; margin-right: 0; margin-top: 18px; }

  /* Other Grids & Cards */
  .features-grid-3 { grid-template-columns: 1fr; gap: 12px; }
  .pricing-table-grid { grid-template-columns: 1fr; max-width: 100%; margin: 0 auto; }
  .sample-display-grid { grid-template-columns: 1fr; gap: 14px; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; gap: 8px; }
  .upload-dropzones-grid { grid-template-columns: 1fr; }
  .card-content-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .timeline-tracker { grid-template-columns: 1fr 1fr; gap: 8px; }

  /* Dashboard Panel Mobile Architecture */
  #view-dashboard.active { display: block !important; }
  .dashboard-shell {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-height: auto !important;
    overflow-x: hidden !important;
  }
  .dashboard-sidebar {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }
  .dash-brand {
    padding: 0 0 8px !important;
    margin-bottom: 8px !important;
  }
  .dash-user-profile {
    padding: 6px 10px !important;
    margin-bottom: 10px !important;
  }
  .dash-menu {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 4px 0 !important;
    gap: 6px !important;
    width: 100% !important;
    scrollbar-width: none !important;
  }
  .dash-menu::-webkit-scrollbar { display: none; }
  .dash-menu-section-label, .dash-sidebar-footer, .dashboard-sidebar hr {
    display: none !important;
  }
  .d-menu-item {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
    border-radius: 20px !important;
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--gray-200) !important;
  }
  .d-menu-item.active {
    background: rgba(212,175,55,0.2) !important;
    border-color: var(--border-gold) !important;
    color: var(--gold-300) !important;
  }
  .d-badge {
    margin-left: 6px !important;
  }
  .dashboard-main-panel {
    width: 100% !important;
    min-height: auto !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .dash-topbar { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
  .dash-topbar-actions { width: 100%; justify-content: space-between; }
  .dash-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .dash-stat-card { padding: 10px 12px; }
  .dash-stat-value { font-size: 1.3rem; }
  .dash-stat-label { font-size: 0.68rem; }

  /* Table Horizontal Scrolling on Mobile */
  .dash-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: block;
    border-radius: var(--r-sm);
  }
  .dash-table { min-width: 600px; width: 100%; }

  /* Digital Permit Card Output Zoom on Mobile */
  #digital-permit-output {
    width: 100% !important;
    max-width: 100% !important;
    zoom: 0.7 !important;
    -webkit-zoom: 0.7 !important;
  }

  .footer-container { grid-template-columns: 1fr; }
  .footer-cols-wrapper { flex-wrap: wrap; gap: 24px; }

  /* Modal Cards on Mobile */
  #app-detail-modal .modal-card {
    width: 95vw !important;
    max-width: 95vw !important;
    padding: 14px !important;
    max-height: 94vh !important;
    overflow-y: auto !important;
  }
  .dash-edit-input { font-size: 0.78rem; padding: 5px 8px; }
}

@media (max-width: 480px) {
  html { font-size: 12.8px; }
  .nav-brand-sub { display: none; }
  .hero-headline { font-size: 1.45rem; }
  .dash-stats-grid { grid-template-columns: 1fr; }
  .admin-login-card { margin: 12px; padding: 24px 16px; width: 94vw; }
}

/* ══════════════════════════════════════════════════════════════════
   ADMIN LOGIN MODAL
   ══════════════════════════════════════════════════════════════════ */
#admin-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 11, 24, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: overlayFadeIn 0.35s var(--t-normal) both;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.admin-login-card {
  background: linear-gradient(145deg, var(--navy-700), var(--navy-800));
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  padding: 44px 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow:
    0 0 0 1px rgba(212,175,55,0.12),
    0 30px 80px rgba(0,0,0,0.6),
    0 0 60px rgba(201,168,76,0.06);
  animation: cardSlideUp 0.4s cubic-bezier(0.16,1,0.3,1) both;
  text-align: center;
}

@keyframes cardSlideUp {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.admin-login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
  border-radius: 16px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(212,175,55,0.3);
}

.admin-login-logo svg {
  color: var(--navy-900);
}

.admin-login-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--gold-400);
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 20px;
  padding: 3px 12px;
  margin-bottom: 14px;
}

.admin-login-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}

.admin-login-sub {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--gray-400);
  margin: 0 0 28px;
}

.admin-login-form {
  text-align: left;
}

.admin-login-form .form-group {
  margin-bottom: 18px;
}

.admin-login-form .form-group label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-200);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-login-form .form-group input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  box-sizing: border-box;
}

.admin-login-form .form-group input:focus {
  border-color: var(--gold-400);
  background: rgba(212,175,55,0.06);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}

.admin-login-form .form-group input::placeholder {
  color: var(--gray-600);
  font-size: 0.85rem;
}

.pw-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.55;
  transition: opacity var(--t-fast);
  line-height: 1;
  padding: 4px;
  margin-top: 12px; /* offset for label */
}

.pw-toggle-btn:hover { opacity: 1; }

.admin-login-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: #FCA5A5;
  margin-bottom: 12px;
  animation: shakeError 0.4s ease both;
}

@keyframes shakeError {
  0%,100% { transform: translateX(0); }
  20%  { transform: translateX(-6px); }
  40%  { transform: translateX(6px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
}

.admin-login-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gray-600);
  letter-spacing: 0.04em;
  text-align: center;
}

/* Session indicator in nav */
#admin-session-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(0,229,153,0.1);
  border: 1px solid rgba(0,229,153,0.3);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--emerald);
  letter-spacing: 0.06em;
}

@media (max-width: 480px) {
  .admin-login-card {
    margin: 16px;
    padding: 32px 24px 28px;
  }
}

/* ══════════════════════════════════════════════════════════════════
   DASHBOARD PERMIT CARD PREVIEW STYLES
   ══════════════════════════════════════════════════════════════════ */
#digital-permit-output {
  width: 500px;
  max-width: 100%;
  margin: 0 auto;
  zoom: 0.84;
  -webkit-zoom: 0.84;
  transform-origin: top center;
}

#digital-permit-output .idp-trans-card {
  margin: 0 auto;
}

#digital-permit-output .idp-trans-back {
  margin-top: 14px;
}


