/* ==========================================================================
   PT. FRAMAS INDONESIA - P2K3 MOTORCYCLE INSPECTION SYSTEM (MIS)
   PROFESSIONAL ENTERPRISE DESIGN SYSTEM v2.0
   ========================================================================== */

/* LIGHT THEME (CLEAN SHADCN/TAILWIND STYLE - DEFAULT) */
:root {
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-active: #10b981;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.1);
  --primary-glow: transparent;

  --accent-yellow: #f59e0b;
  --accent-yellow-light: rgba(245, 158, 11, 0.1);

  --accent-blue: #3b82f6;
  --accent-blue-light: rgba(59, 130, 246, 0.1);

  --accent-red: #ef4444;
  --accent-red-light: rgba(239, 68, 68, 0.1);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-card: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --transition: all 0.2s ease-in-out;
}

/* DARK THEME OVERRIDES (SHADCN DARK STYLE) */
body.theme-dark {
  --bg-dark: #020817;
  --bg-card: #0f172a;
  --bg-card-hover: #1e293b;
  --bg-input: #020817;
  --border-color: #1e293b;
  --border-active: #10b981;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.15);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
  --shadow-card: 0 1px 3px 0 rgb(0 0 0 / 0.5);
}

html {
  font-size: 14px;
}

@media (min-width: 992px) {
  html {
    font-size: 13px;
  }
}

@media (min-width: 1440px) {
  html {
    font-size: 13.5px;
  }
}
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s ease, color 0.25s ease;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--primary-hover);
}

/* NAVBAR */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 1rem;
  height: 56px;
  display: flex;
  align-items: center;
  width: 100%;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03);
}
.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-main);
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
  background: #111;
  padding: 3px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}
.navbar-brand-title {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.2px;
  line-height: 1.2;
  color: var(--text-main);
}
.navbar-brand-sub {
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  height: 100%;
}
.nav-item a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: var(--transition);
  white-space: nowrap;
  letter-spacing: -0.1px;
}
.nav-item a:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}
.nav-item a.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card-hover);
  padding: 0.25rem 0.55rem 0.25rem 0.3rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  max-width: 175px;
  transition: var(--transition);
}
.user-badge:hover {
  border-color: rgba(255,255,255,0.15);
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.7rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 2px 6px var(--primary-glow);
}
.user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.user-name {
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.user-role-tag {
  font-size: 0.52rem;
  color: var(--accent-yellow);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* THEME TOGGLE BUTTON */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.theme-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--primary);
  background: var(--primary-light);
}

/* MAIN LAYOUT */
.main-layout {
  max-width: 1200px;
  margin: 1.25rem auto;
  padding: 0 1rem;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* HERO EXECUTIVE BANNER */
.hero-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
  width: 100%;
}
.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, transparent 70%);
  opacity: 0.7;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(22, 163, 74, 0.2);
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  font-size: 0.675rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: var(--text-main);
  letter-spacing: -0.75px;
  line-height: 1.2;
  word-wrap: break-word;
}
.hero-subtitle {
  font-size: 0.875rem;
  color: var(--accent-yellow);
  font-weight: 700;
  margin-bottom: 0.85rem;
  letter-spacing: 0.1px;
}
.hero-description {
  color: var(--text-muted);
  max-width: 820px;
  font-size: 0.875rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* SIM NOTICE ALERT */
.sim-notice-card {
  background: var(--accent-yellow-light);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-left: 3px solid var(--accent-yellow);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}
.sim-notice-icon {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-yellow);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.sim-notice-content h4 {
  color: var(--accent-yellow);
  font-size: 0.825rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: 0.1px;
}
.sim-notice-content p {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

/* CARDS & CONTAINERS */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}
.form-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.65rem;
  letter-spacing: 0.1px;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* STEPS PROCESS GRID */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  width: 100%;
}
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  position: relative;
  transition: var(--transition);
}
.step-card:hover {
  border-color: var(--primary);
  transform: none;
  box-shadow: var(--shadow-md);
}
.step-number {
  width: 30px;
  height: 30px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  margin-bottom: 0.65rem;
  font-family: var(--font-mono);
}
.step-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-main);
  letter-spacing: 0.1px;
}
.step-desc {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  min-height: 38px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  user-select: none;
  box-sizing: border-box;
  letter-spacing: 0.1px;
}
.btn-primary {
  background: var(--primary);
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover, .btn-primary:active {
  background: var(--primary-hover);
  color: #ffffff !important;
  box-shadow: var(--shadow-sm);
  transform: none;
}
.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  color: var(--text-main);
  border-color: rgba(255,255,255,0.15);
  background: var(--bg-card-hover);
}
.btn-danger {
  background: var(--accent-red);
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(239,68,68,0.25);
}
.btn-warning {
  background: var(--accent-yellow);
  color: #1a0a00 !important;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(245,158,11,0.25);
}

/* FORM INPUTS */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.15rem;
  width: 100%;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
}
.form-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-label span.req {
  color: var(--accent-red);
}
.form-input, .form-select, .form-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  min-height: 40px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* UPLOAD DROPZONE */
.upload-box {
  background: var(--bg-input);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.upload-box:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-preview {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
}
.upload-icon {
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}
.upload-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.upload-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* STATUS BADGES - HIGH CONTRAST & CLEAR */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: 6px;
  font-size: 0.675rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
  font-family: var(--font-mono);
}
.badge-approved {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}
.badge-pending {
  background: #fef3c7;
  color: #92400e;
  border: 1.5px solid #fcd34d;
}
.badge-rejected {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}
.badge-revision,
.badge-revision_requested {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

/* DARK THEME BADGE OVERRIDES */
body.theme-dark .badge-approved {
  background: rgba(22, 163, 74, 0.2);
  color: #4ade80;
  border: 1px solid rgba(22, 163, 74, 0.4);
}
body.theme-dark .badge-pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1.5px solid rgba(245, 158, 11, 0.5);
}
body.theme-dark .badge-rejected {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
body.theme-dark .badge-revision,
body.theme-dark .badge-revision_requested {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

/* TABLE STYLING FOR DESKTOP */
.desktop-table-view {
  display: block;
}
.mobile-cards-view {
  display: none;
}

.table-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-card);
}
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.825rem;
  min-width: 600px;
}
.table th {
  background: var(--bg-card-hover);
  color: var(--text-dim);
  font-weight: 700;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: var(--font-mono);
}
.table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-main);
  vertical-align: middle;
}
.table tr:hover td {
  background: var(--bg-card-hover);
}
.table tr:last-child td {
  border-bottom: none;
}

/* COMPLIANCE STICKER CARD */
.sticker-badge-container {
  background: #ffffff;
  border: 3px solid #16a34a;
  border-radius: 12px;
  padding: 1.15rem;
  max-width: 100%;
  width: 420px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  color: #0f172a;
  box-sizing: border-box;
}
.sticker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #16a34a;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}
.sticker-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #16a34a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sticker-body {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}
.sticker-qr {
  background: white;
  padding: 0.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sticker-details {
  flex: 1;
  min-width: 0;
}
.sticker-plate {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 1px;
  margin-bottom: 0.2rem;
}
.sticker-no {
  font-size: 0.675rem;
  font-family: var(--font-mono);
  color: #64748b;
  margin-bottom: 0.35rem;
}
.sticker-dates {
  font-size: 0.725rem;
  color: #334155;
  line-height: 1.4;
}

/* MOBILE BOTTOM NAVIGATION BAR */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(17, 24, 39, 0.97);
  border-top: 1px solid var(--border-color);
  padding: 0.25rem 0.5rem calc(0.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 1000;
  width: 100%;
  backdrop-filter: blur(16px);
}
.mobile-bottom-nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  color: var(--text-dim);
  font-size: 0.6rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
  flex: 1;
  text-align: center;
  transition: var(--transition);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.mobile-nav-item.active {
  color: var(--primary);
  background: var(--primary-light);
}
.mobile-nav-item:hover {
  color: var(--text-muted);
}
.mobile-nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
}

/* SIM C MILESTONE PROGRESS CARD */
.sim-milestone-card {
  background: var(--bg-card);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-top: 3px solid var(--accent-yellow);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
  width: 100%;
  box-sizing: border-box;
}
.sim-milestone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.sim-milestone-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-yellow);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.sim-milestone-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-yellow);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  white-space: nowrap;
  font-family: var(--font-mono);
}
.sim-milestone-stat {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
  line-height: 1.3;
}
.sim-milestone-pct {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent-yellow);
  font-family: var(--font-mono);
  margin-left: 0.25rem;
}
.sim-milestone-sublabel {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1.1rem;
  font-weight: 500;
}
.sim-progress-track {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  height: 22px;
  overflow: hidden;
  margin-bottom: 0.6rem;
  position: relative;
}
.sim-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b 0%, #10b981 100%);
  border-radius: 20px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 3rem;
  position: relative;
}
.sim-progress-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #0a0a0a;
  font-family: var(--font-mono);
  padding-right: 0.6rem;
  white-space: nowrap;
}
.sim-timeline-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 500;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* DASHBOARD SINGLE-LINE FILTER BAR */
.dashboard-filter-bar {
  display: flex;
  gap: 0.35rem;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.dashboard-filter-bar::-webkit-scrollbar {
  display: none;
}
.dashboard-filter-btn {
  font-size: 0.75rem !important;
  min-height: 32px !important;
  padding: 0.3rem 0.5rem !important;
  white-space: nowrap !important;
  flex: 1 0 auto;
  text-align: center;
}

/* GATE SEARCH FORM */
.gate-search-form {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  align-items: center;
}
.gate-search-input {
  flex: 1;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.05rem;
  text-transform: uppercase;
  min-height: 44px;
}
.gate-search-input::placeholder {
  font-family: var(--font-sans) !important;
  font-weight: 500 !important;
  text-transform: none !important;
  font-size: 0.85rem !important;
  color: var(--text-dim) !important;
  opacity: 0.75;
}
.gate-search-btn {
  font-size: 0.875rem;
  padding: 0.6rem 1.25rem;
  min-height: 44px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* GATE PAGE WRAPPER */
.gate-page-wrapper {
  max-width: 1200px;
  margin: 0 auto 3rem;
  width: 100%;
}

/* GATE PAGE HEADER */
.gate-page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.gate-header-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--accent-blue) 0%, #1d4ed8 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}
.gate-page-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
  line-height: 1.2;
  margin-bottom: 0.2rem;
}
.gate-page-sub {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* SEARCH CARD */
.gate-search-card {
  margin-bottom: 1.5rem;
}

/* QUICK LINKS */
.gate-quick-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.875rem;
  flex-wrap: wrap;
}
.gate-quick-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 500;
  white-space: nowrap;
}
.gate-quick-btn {
  font-size: 0.72rem !important;
  padding: 0.2rem 0.55rem !important;
  min-height: 28px !important;
  font-family: var(--font-mono) !important;
  letter-spacing: 0.5px;
}

/* RESULT CARDS */
.gate-result-card {
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  border: 2px solid transparent;
  box-shadow: var(--shadow-card);
}
.gate-result-passed {
  background: linear-gradient(160deg, rgba(22,163,74,0.1) 0%, var(--bg-card) 60%);
  border-color: rgba(22,163,74,0.4);
  border-top: 3px solid var(--primary);
}
.gate-result-pending {
  background: linear-gradient(160deg, rgba(245,158,11,0.1) 0%, var(--bg-card) 60%);
  border-color: rgba(245,158,11,0.35);
  border-top: 3px solid var(--accent-yellow);
}
.gate-result-rejected {
  background: linear-gradient(160deg, rgba(239,68,68,0.1) 0%, var(--bg-card) 60%);
  border-color: rgba(239,68,68,0.35);
  border-top: 3px solid var(--accent-red);
}
.gate-result-notfound {
  background: var(--bg-card);
  border: 2px dashed var(--border-color);
}

/* RESULT ICON */
.gate-result-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.gate-icon-passed  { background: var(--primary); box-shadow: 0 6px 20px rgba(22,163,74,0.4); }
.gate-icon-pending { background: var(--accent-yellow); box-shadow: 0 6px 20px rgba(245,158,11,0.35); }
.gate-icon-rejected{ background: var(--accent-red); box-shadow: 0 6px 20px rgba(239,68,68,0.35); }
.gate-icon-notfound{ background: var(--bg-card-hover); color: var(--text-dim); border: 2px solid var(--border-color); }

/* RESULT TEXT */
.gate-result-status {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.2;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}
.gate-result-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.1rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}
.gate-result-note {
  font-size: 0.825rem;
  color: var(--text-main);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 360px;
  text-align: left;
  line-height: 1.4;
}
.gate-result-note strong {
  color: var(--text-main);
  font-weight: 700;
}
.gate-result-note-dept {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
  font-weight: 500;
}
.gate-result-reason {
  font-size: 0.82rem;
  color: var(--text-main);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-red);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
  text-align: left;
}

/* INFO CARD (PASSED state) */
.gate-info-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  max-width: 420px;
  margin: 0 auto;
  text-align: left;
}
.gate-info-plate {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-yellow);
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
}
.gate-info-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem 0;
}
.gate-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.35rem 0;
}
.gate-info-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 1px;
}
.gate-info-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: right;
  line-height: 1.4;
}
.gate-info-nip {
  display: block;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-weight: 400;
}
.gate-info-mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* FOOTER SYSTEM */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 0.4rem 0.75rem 4.5rem 0.75rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: auto;
  width: 100%;
}
.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
}
.footer-brand-section, .footer-meta-section, .footer-policy-section {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.footer-company {
  font-weight: 800;
  color: var(--text-main);
  font-size: 0.975rem;
  letter-spacing: 0.3px;
}
.footer-org {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 500;
}
.footer-title {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.825rem;
}
.footer-version {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  color: var(--primary);
  font-weight: 700;
}
.footer-policy-section {
  font-size: 0.725rem;
  color: var(--text-dim);
  line-height: 1.4;
  text-align: right;
}

/* 100% PERFECT MOBILE RESPONSIVE MEDIA QUERIES */
@media (max-width: 991px) {
  /* Table Mobile Cards View Switch for tablets & phones */
  .desktop-table-view {
    display: none !important;
  }
  .mobile-cards-view {
    display: flex !important;
    flex-direction: column;
    gap: 0.85rem;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
  }
  
  .navbar-container {
    padding: 0;
    gap: 0.25rem;
  }
  .navbar-brand-sub {
    display: none;
  }
  .navbar-brand-title {
    font-size: 0.775rem;
  }
  .nav-links {
    display: none;
  }
  .mobile-bottom-nav {
    display: block;
  }
  
  /* Mobile Header Navbar Right Side Fix */
  .navbar-right {
    gap: 0.25rem;
    flex-shrink: 0;
  }
  .user-badge {
    padding: 0.15rem 0.35rem;
    max-width: 100px;
  }
  .user-name {
    font-size: 0.675rem;
  }
  .user-role-tag {
    display: none;
  }
  .btn-switch-role {
    font-size: 0.7rem !important;
    padding: 0.25rem 0.4rem !important;
    min-height: 28px !important;
    white-space: nowrap;
  }
  .theme-toggle-btn {
    width: 28px;
    height: 28px;
  }

  /* Gate Search Form Mobile Column Stack */
  .gate-search-form {
    flex-direction: column !important;
    width: 100%;
  }
  .gate-search-input {
    width: 100% !important;
    flex: none !important;
    font-size: 0.9rem !important;
  }
  .gate-search-btn {
    width: 100% !important;
    justify-content: center;
  }

  /* Footer Responsive Stack */
  .footer-container {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.85rem;
  }
  .footer-brand-section, .footer-meta-section, .footer-policy-section {
    width: 100%;
    align-items: center !important;
    text-align: center !important;
  }

  .main-layout {
    padding: 0 0.75rem;
    margin: 0.75rem auto 4.5rem;
  }
  
  .hero-banner {
    padding: 1rem;
    border-radius: var(--radius-md);
  }
  .hero-title {
    font-size: 1.25rem;
  }
  .hero-subtitle {
    font-size: 0.85rem;
  }
  .hero-description {
    font-size: 0.8rem;
  }
  
  .hero-banner div[style*="display: flex"] {
    flex-direction: column !important;
    width: 100%;
  }
  .hero-banner .btn {
    width: 100% !important;
    margin-bottom: 0.4rem;
  }

  .form-card {
    padding: 1rem;
    border-radius: var(--radius-md);
  }
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }
  
  .steps-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem;
  }

  .sticker-badge-container {
    width: 100%;
    padding: 0.85rem;
  }
  .sticker-body {
    flex-direction: column;
    text-align: center;
  }
  .sticker-qr {
    margin: 0 auto;
  }
  .sticker-plate {
    font-size: 1.1rem;
  }

  .footer {
    padding-bottom: 5.5rem;
  }
}

@media (max-width: 480px) {
  .user-info {
    display: none !important; /* Hide user name text on narrow screens, keep avatar dot */
  }
  .user-badge {
    padding: 0.15rem;
    border: none;
    background: transparent;
  }
  .btn-role-label {
    display: none !important; /* Hide text label, keep icon for switch role button */
  }
  .btn-switch-role {
    padding: 0.3rem !important;
  }
}

/* removed hardcoded light overrides */

/* ==========================================================================
   REVIEW INSPECTION PAGE LAYOUT
   ========================================================================== */

.review-page-wrapper {
  max-width: 1200px;
  margin: 0 auto 3rem;
  width: 100%;
}

/* PAGE HEADER */
.review-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.review-page-title-block {
  flex: 1;
  min-width: 0;
}
.review-page-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}
.review-page-h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.review-page-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}
.review-back-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* MAIN 2-COLUMN LAYOUT */
.review-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  align-items: start;
  width: 100%;
}
.review-col-left,
.review-col-right {
  min-width: 0;
  width: 100%;
}

/* VEHICLE PHOTO GRID — 2x2 */
.review-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  width: 100%;
}
.review-photo-item {
  min-width: 0;
}
.review-photo-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
  font-family: var(--font-mono);
}
.review-photo-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: block;
}

/* DOCUMENT GRID — 2 equal cols */
.review-doc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  width: 100%;
}
.review-doc-item {
  min-width: 0;
}
.review-doc-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}
.review-doc-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  word-break: break-all;
}
.review-doc-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: block;
}
.review-doc-empty {
  height: 150px;
  background: var(--bg-input);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.75rem;
  text-align: center;
  padding: 0.75rem;
  line-height: 1.4;
}

/* INFO TABLE — key/value rows */
.review-info-table {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.review-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-color);
}
.review-info-row:last-child {
  border-bottom: none;
}
.review-info-sep {
  padding-top: 0.65rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border-color);
}
.review-info-label {
  font-size: 0.775rem;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}
.review-info-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: right;
  word-break: break-word;
}

/* DECISION FORM — accent border */
.review-decision-form {
  border: 1px solid rgba(22, 163, 74, 0.35) !important;
  border-top: 3px solid var(--primary) !important;
}

/* ---- MOBILE RESPONSIVE ---- */
@media (max-width: 767px) {
  /* Stack to single column */
  .review-layout {
    grid-template-columns: 1fr;
  }

  /* Swap order: right (info+form) shows FIRST on mobile */
  .review-col-right {
    order: -1;
  }

  .review-page-h1 {
    font-size: 1.25rem;
  }

  /* Full-width back button on very small screens */
  .review-page-header {
    align-items: flex-start;
  }

  /* Photo grid stays 2 cols but shorter images */
  .review-photo-img {
    height: 130px;
  }
  .review-doc-img {
    height: 120px;
  }

  /* Info table value can wrap freely */
  .review-info-value {
    text-align: right;
  }
}

@media (max-width: 400px) {
  .review-photo-grid {
    grid-template-columns: 1fr;
  }
  .review-doc-grid {
    grid-template-columns: 1fr;
  }
  .review-photo-img {
    height: 200px;
  }
  .review-doc-img {
    height: 180px;
  }
}

/* ==========================================
   AUTOCOMPLETE DROPDOWN STYLES
   ========================================== */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  max-height: 240px;
  overflow-y: auto;
}
.autocomplete-item {
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}
.autocomplete-item:last-child {
  border-bottom: none;
}
.autocomplete-item:hover, .autocomplete-item.active {
  background: var(--bg-card-hover);
}
.autocomplete-plate-text {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
}
.autocomplete-name-text {
  font-size: 0.78rem;
  color: var(--text-main);
  font-weight: 500;
}
.autocomplete-meta-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
}

/* ==========================================
   QR CAMERA SCANNER MODAL & RETICLE
   ========================================== */
.gate-scan-camera-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: white !important;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  border: none !important;
}
.gate-scan-camera-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.qr-scanner-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.qr-scanner-content {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}
.qr-scanner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.qr-live-badge {
  background: #ef4444;
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  animation: pulseBadge 1.5s infinite;
}
@keyframes pulseBadge {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}
@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); opacity: 0.6; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.5rem;
}
.btn-close-modal:hover {
  color: var(--accent-red);
}

.qr-viewfinder-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}
#qrReader {
  width: 100%;
  height: 100%;
}
#qrReader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.qr-overlay-reticle {
  position: absolute;
  top: 15%;
  left: 15%;
  right: 15%;
  bottom: 15%;
  pointer-events: none;
  z-index: 5;
}
.reticle-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: #10b981;
  border-style: solid;
}
.reticle-tl { top: 0; left: 0; border-width: 3px 0 0 3px; }
.reticle-tr { top: 0; right: 0; border-width: 3px 3px 0 0; }
.reticle-bl { bottom: 0; left: 0; border-width: 0 0 3px 3px; }
.reticle-br { bottom: 0; right: 0; border-width: 0 3px 3px 0; }

.reticle-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #10b981, transparent);
  box-shadow: 0 0 8px #10b981;
  animation: scanAnim 2s linear infinite;
}
@keyframes scanAnim {
  0% { top: 0; }
  50% { top: 100%; }
  100% { top: 0; }
}

/* Scanner Mode Tabs & OCR Reticle */
.scanner-mode-tabs {
  display: flex;
  background: var(--bg-card-hover);
  border-radius: var(--radius-md);
  padding: 0.25rem;
  margin-bottom: 0.85rem;
  gap: 0.25rem;
}
.scanner-tab-btn {
  flex: 1;
  padding: 0.45rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.scanner-tab-btn.active {
  background: var(--primary);
  color: white;
}
.ocr-reticle {
  top: 28% !important;
  bottom: 28% !important;
  left: 8% !important;
  right: 8% !important;
}
.ocr-status-box {
  background: rgba(16, 185, 129, 0.12);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--text-main);
  text-align: center;
}

/* FOOTER POLICY EXPANDABLE ACCORDION */
.footer-policy-section {
  width: 100%;
}
.footer-policy-accordion {
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.25);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.75rem;
  margin-top: 0.35rem;
  transition: var(--transition);
}
.footer-policy-accordion[open] {
  background: rgba(22, 163, 74, 0.14);
}
.footer-policy-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  user-select: none;
  list-style: none;
}
.footer-policy-summary::-webkit-details-marker {
  display: none;
}
.footer-policy-summary .chevron-icon {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.footer-policy-accordion[open] .chevron-icon {
  transform: rotate(180deg);
}
.footer-policy-details {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(22, 163, 74, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
  text-align: left;
}
.policy-detail-item {
  position: relative;
}

/* FOOTER INFO SYSTEM TRIGGER BUTTON */
.footer-info-trigger-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}
.btn-info-trigger {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}
.btn-info-trigger:hover {
  background: var(--bg-card-hover);
  color: var(--primary);
  border-color: var(--primary);
}

/* WIZARD STEP INDICATOR - MODERN PILL BAR */
.wizard-progress-wrapper {
  position: relative;
  margin-bottom: 1.75rem;
  width: 100%;
}
.wizard-progress-bar-bg {
  height: 4px;
  background: var(--border-color);
  border-radius: 4px;
  position: absolute;
  top: 15px;
  left: 12.5%;
  right: 12.5%;
  z-index: 1;
}
.wizard-progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none;
}
.wizard-steps-container {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  gap: 0.35rem;
}
.wizard-step-pill {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  user-select: none;
  position: relative;
  z-index: 2;
}
.step-badge-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.825rem;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
  z-index: 3;
}
.step-badge-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  transition: var(--transition);
  white-space: nowrap;
}
.wizard-step-pill.active .step-badge-num {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px var(--primary-light);
  transform: scale(1.08);
}
.wizard-step-pill.active .step-badge-title {
  color: var(--primary);
  font-weight: 800;
}
.wizard-step-pill.completed .step-badge-num {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}
.wizard-step-pill.completed .step-badge-title {
  color: #10b981;
  font-weight: 700;
}

@media (max-width: 600px) {
  .step-badge-title {
    font-size: 0.65rem;
    white-space: normal;
    line-height: 1.2;
  }
  .step-badge-num {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  .wizard-progress-bar-bg {
    top: 12px;
  }
}

.review-photo-empty, .review-doc-empty {
  width: 100%;
  height: 140px;
  background: var(--bg-input);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* FORM VALIDATION ERROR HIGHLIGHT */
.input-error {
  border-color: #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.08) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}
.upload-box.input-error {
  border: 2px dashed #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.08) !important;
}

/* SUBMISSION LOADER OVERLAY */
.submit-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1.5rem;
  animation: fadeIn 0.25s ease;
}
.submit-loading-overlay.active {
  display: flex;
}
.submit-loading-card {
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.submit-spinner-ring {
  width: 52px;
  height: 52px;
  margin: 0 auto 1.25rem;
  border: 4px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.submit-loading-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}
.submit-loading-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}
.submit-loading-progress {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: left;
  background: var(--bg-card-hover);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.submit-progress-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.submit-progress-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulseDot 1s infinite alternate;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulseDot {
  from { opacity: 0.4; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.2); }
}

/* ==========================================================================
   DESKTOP COMPACT & REFINED ENTERPRISE STYLING (min-width: 992px)
   Balances typography, reduces oversized desktop font sizes, and improves comfort
   ========================================================================== */
@media (min-width: 992px) {
  body {
    line-height: 1.48;
  }

  /* Top Navigation Bar */
  .navbar {
    height: 48px;
    padding: 0 1.25rem;
  }
  .navbar-container {
    max-width: 1320px;
  }
  .navbar-brand {
    gap: 0.5rem;
  }
  .navbar-brand-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    padding: 2px;
  }
  .navbar-brand-title {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.15;
  }
  .navbar-brand-sub {
    font-size: 0.52rem;
    letter-spacing: 0.6px;
  }
  .nav-links {
    gap: 0.15rem;
  }
  .nav-item a {
    font-size: 0.76rem;
    padding: 0.28rem 0.55rem;
    gap: 0.3rem;
    border-radius: 5px;
  }
  .nav-item a svg {
    width: 14px;
    height: 14px;
  }
  .navbar-right {
    gap: 0.4rem;
  }
  .user-badge {
    padding: 0.18rem 0.45rem 0.18rem 0.25rem;
    max-width: 180px;
    gap: 0.35rem;
  }
  .user-avatar {
    width: 24px;
    height: 24px;
    font-size: 0.65rem;
  }
  .user-name {
    font-size: 0.72rem;
  }
  .user-role-tag {
    font-size: 0.5rem;
  }
  .theme-toggle-btn {
    width: 28px;
    height: 28px;
  }
  .theme-toggle-btn svg {
    width: 14px;
    height: 14px;
  }

  /* Main Layout */
  .main-layout {
    max-width: 1320px;
    margin: 1rem auto 2rem;
    padding: 0 1.25rem;
  }

  /* Hero Banner */
  .hero-banner {
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.15rem;
  }
  .hero-badge {
    font-size: 0.62rem;
    padding: 0.15rem 0.55rem;
    margin-bottom: 0.5rem;
  }
  .hero-title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin-bottom: 0.25rem;
    line-height: 1.2;
  }
  .hero-subtitle {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.55rem;
  }
  .hero-description {
    font-size: 0.8rem;
    line-height: 1.55;
    max-width: 860px;
    margin-bottom: 1rem;
  }

  /* Alert Card */
  .sim-notice-card {
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    margin-bottom: 1.15rem;
    gap: 0.65rem;
  }
  .sim-notice-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }
  .sim-notice-icon svg {
    width: 16px;
    height: 16px;
  }
  .sim-notice-content h4 {
    font-size: 0.78rem;
    margin-bottom: 0.15rem;
  }
  .sim-notice-content p {
    font-size: 0.76rem;
    line-height: 1.45;
  }

  /* Steps & Process Grid */
  .steps-grid {
    gap: 0.65rem;
    margin-bottom: 1.25rem;
  }
  .step-card {
    padding: 0.85rem;
    border-radius: 8px;
  }
  .step-number {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
    margin-bottom: 0.45rem;
    border-radius: 6px;
  }
  .step-title {
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
  }
  .step-desc {
    font-size: 0.72rem;
    line-height: 1.4;
  }

  /* Buttons */
  .btn {
    min-height: 32px;
    padding: 0.32rem 0.72rem;
    font-size: 0.76rem;
    border-radius: 6px;
    gap: 0.35rem;
  }
  .btn svg {
    width: 14px;
    height: 14px;
  }

  /* Forms & Inputs */
  .form-card {
    padding: 1rem 1.25rem;
    border-radius: 10px;
  }
  .form-section-title {
    font-size: 0.72rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.45rem;
  }
  .form-grid {
    gap: 0.75rem;
    margin-bottom: 0.85rem;
  }
  .form-label {
    font-size: 0.72rem;
    margin-bottom: 0.25rem;
  }
  .form-input, .form-select, .form-textarea {
    min-height: 32px;
    padding: 0.32rem 0.65rem;
    font-size: 0.78rem;
    border-radius: 6px;
  }

  /* Tables */
  .table {
    font-size: 0.76rem;
  }
  .table th {
    padding: 0.45rem 0.65rem;
    font-size: 0.62rem;
    letter-spacing: 0.5px;
  }
  .table td {
    padding: 0.45rem 0.65rem;
    font-size: 0.76rem;
    line-height: 1.35;
  }

  /* Badges & Status */
  .status-badge {
    font-size: 0.66rem;
    padding: 0.18rem 0.5rem;
  }
}



