@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&family=Inter:wght@300;400;500;600;700;800;900&display=swap");

/* ═══════════════════════════════════════════════════════════════ */
/* DESIGN TOKENS — MyHealth Dark Theme                            */
/* ═══════════════════════════════════════════════════════════════ */
:root {
  /* Figma-exact backgrounds */
  --bg: #0e121b;
  --bg2: #181c2b;
  --surface: #1e2433;
  --card: #181c2b;
  --card2: #2b303c;
  /* Figma-exact accent */
  --accent: #93d5e1;
  --accent2: #b8e8f0;
  --accent-bg: rgba(147, 213, 225, 0.12);
  --accent-glow: rgba(147, 213, 225, 0.25);
  /* Figma-exact text */
  --ink: #ffffff;
  --ink2: #cacfd8;
  --muted: #62656d;
  /* Figma-exact borders */
  --border: rgba(202, 207, 216, 0.08);
  --border2: rgba(202, 207, 216, 0.15);
  /* Status colors */
  --success: #82c43c;
  --success-bg: rgba(130, 196, 60, 0.12);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --link: #99cff9;
  --info: #63b3ed;
  --info-bg: rgba(99, 179, 237, 0.15);
  /* Figma nav bar */
  --nav-bg: #242b47;
  --nav-active-bg: #eff3ff;
  --nav-active-icon: #0f1322;
  --nav-inactive: #cacfd8;
  /* System */
  --font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 24px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --radius-pill: 100px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════════ */
/* LIGHT THEME — Figma Onboarding 11 tokens                        */
/* ═══════════════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg: #eff3ff;
  --bg2: #ffffff;
  --surface: #e4e8f4;
  --card: #ffffff;
  --card2: #d5dbeb;
  --accent: #000203;
  --accent2: #2b303c;
  --accent-bg: rgba(0, 2, 3, 0.06);
  --accent-glow: rgba(0, 2, 3, 0.12);
  --ink: #000203;
  --ink2: #3a3f4b;
  --muted: rgba(0, 2, 3, 0.5);
  --border: rgba(0, 2, 3, 0.08);
  --border2: rgba(0, 2, 3, 0.14);
  --success: #2e8b3a;
  --success-bg: rgba(46, 139, 58, 0.1);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.1);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.08);
  --link: #1565c0;
  --info: #2b6cb0;
  --info-bg: rgba(43, 108, 176, 0.1);
  --nav-bg: #d5dbeb;
  --nav-active-bg: #000203;
  --nav-active-icon: #ffffff;
  --nav-inactive: rgba(0, 2, 3, 0.4);
  --shadow: 0 4px 24px rgba(0, 2, 3, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 2, 3, 0.12);
}
/* Light theme accent overrides */
/* Dark mode: brighten logo so navy text becomes visible */
.topbar-logo-img,
.welcome-logo-img {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
[data-theme="light"] .topbar-logo-img,
[data-theme="light"] .welcome-logo-img {
  filter: none;
}
[data-theme="light"] .auth-submit {
  background: #000203;
  color: #fff;
}
[data-theme="light"] .submit-btn {
  background: #000203;
  color: #fff;
}
[data-theme="light"] .submit-btn svg {
  stroke: #fff;
}
[data-theme="light"] .modal-btn {
  background: #000203;
  color: #fff;
}
[data-theme="light"] .welcome-role-icon.agent-icon {
  background: #000203;
}
[data-theme="light"] .welcome-role-icon.customer-icon {
  background: #d5dbeb;
}
[data-theme="light"] .welcome-role-icon.customer-icon svg {
  stroke: #000203;
}
[data-theme="light"] .auth-icon.agent-icon {
  background: #000203;
}
[data-theme="light"] .auth-icon.customer-icon {
  background: #d5dbeb;
}
[data-theme="light"] .auth-tab.active {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .bk-filter.active {
  background: #000203;
  color: #fff;
  border-color: #000203;
}
[data-theme="light"] .guide-tab.active {
  background: #000203;
  color: #fff;
  border-color: #000203;
}
[data-theme="light"] .dmg-tab.active {
  background: #000203;
  color: #fff;
  border-color: #000203;
}
[data-theme="light"] .lang-btn.active {
  background: #000203;
  color: #fff;
  border-color: #000203;
}
[data-theme="light"] .action-btn.primary {
  background: #000203;
  color: #fff;
}
[data-theme="light"] .bk-action-btn.primary {
  background: #000203;
  color: #fff;
  border-color: #000203;
}
[data-theme="light"] .home-stat:first-child {
  background: #d5dbeb;
}
[data-theme="light"] .home-stat:first-child .home-stat-num {
  color: #000203;
}
[data-theme="light"] .home-stat:first-child .home-stat-label {
  color: rgba(0, 2, 3, 0.5);
}
[data-theme="light"] .cust-rental-header {
  background: #000203;
}
[data-theme="light"] .cust-rental-plate {
  color: #fff;
}
[data-theme="light"] .cust-rental-status {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
[data-theme="light"] .sos-btn {
  box-shadow: 0 6px 24px rgba(229, 57, 53, 0.2);
}
[data-theme="light"] .call-9233-btn {
  box-shadow: 0 4px 20px rgba(229, 57, 53, 0.2);
}
[data-theme="light"] #sigCanvas {
  background: #fff;
}
[data-theme="light"] .sig-hint {
  color: rgba(0, 2, 3, 0.3);
}
[data-theme="light"] .toast {
  background: #000203;
  color: #fff;
  border: none;
}

/* ═══════════════════════════════════════════════════════════════ */
/* RESET & BASE                                                    */
/* ═══════════════════════════════════════════════════════════════ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overscroll-behavior: none;
}

/* ── Layout ── */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 90px;
}
.screen.active {
  display: flex;
}

/* ═══════════════════════════════════════════════════════════════ */
/* TOP BAR                                                         */
/* ═══════════════════════════════════════════════════════════════ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.topbar-logo span {
  color: var(--accent);
}
.topbar-logo-img {
  height: 22px;
  width: auto;
  display: block;
}
.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.topbar-company {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lang-btn {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}
.lang-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* Language dropdown */
.lang-dropdown {
  position: relative;
}
.lang-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink2);
  cursor: pointer;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  transition: all var(--transition);
}
.lang-dropdown-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lang-dropdown-current {
  pointer-events: none;
}
.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 4px;
  min-width: 140px;
  z-index: 150;
  box-shadow: var(--shadow-lg);
}
.lang-dropdown.open .lang-dropdown-menu {
  display: block;
  animation: fadeSlideUp 0.2s ease both;
}
.lang-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius-xs);
  transition: background var(--transition);
}
.lang-dropdown-item:hover {
  background: var(--accent-bg);
  color: var(--ink);
}
.lang-dropdown-item.active {
  color: var(--accent);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════ */
/* WELCOME SCREEN                                                  */
/* ═══════════════════════════════════════════════════════════════ */
.welcome-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  min-height: 100vh;
}
#screen-welcome,
#screen-login-agent,
#screen-login-customer {
  padding-bottom: 0;
  background: url("/static/img/Bg-login-blck.png") no-repeat center center /
    cover;
}
[data-theme="light"] #screen-welcome,
[data-theme="light"] #screen-login-agent,
[data-theme="light"] #screen-login-customer {
  background: url("/static/img/Bg-login-white.png") no-repeat center center /
    cover;
}
.welcome-logo {
  margin-bottom: 4px;
}
.welcome-logo-img {
  height: 48px;
  width: auto;
  display: block;
}
.welcome-tagline {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 32px;
  letter-spacing: 0.5px;
}
.welcome-lang {
  display: flex;
  gap: 6px;
  margin-bottom: 36px;
}
.welcome-roles {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 340px;
  margin-bottom: 36px;
}
.welcome-role-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px;
  background: var(--card);
  border: 1.5px solid var(--border2);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
}
.welcome-role-card:active {
  transform: scale(0.97);
}
.welcome-role-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}
.welcome-role-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.welcome-role-icon svg {
  width: 26px;
  height: 26px;
  stroke: white;
}
.welcome-role-icon.agent-icon {
  background: var(--accent);
}
.welcome-role-icon.customer-icon {
  background: linear-gradient(135deg, var(--warning), #e8a020);
}
.welcome-role-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.welcome-role-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.4;
}
.welcome-footer {
  width: 100%;
  max-width: 340px;
}
.legal-disclaimer {
  text-align: center;
  padding: 12px 14px;
}
.legal-disclaimer span {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════════ */
/* AUTH SCREENS (Agent Login / Customer Login)                     */
/* ═══════════════════════════════════════════════════════════════ */
.auth-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px;
  position: relative;
  overflow-y: auto;
}
.auth-back {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--surface);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  color: var(--ink);
}
.auth-back svg {
  stroke: var(--ink);
}
.auth-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  margin-top: 20px;
}
.auth-icon svg {
  width: 30px;
  height: 30px;
  stroke: white;
}
.auth-icon.agent-icon {
  background: var(--accent);
}
.auth-icon.customer-icon {
  background: linear-gradient(135deg, var(--warning), #e8a020);
}
.auth-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
}
.auth-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}
.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--surface);
  border-radius: var(--radius-xs);
  padding: 3px;
  width: 100%;
  max-width: 340px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  transition: all var(--transition);
}
.auth-tab.active {
  background: var(--card2);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.auth-form-section {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-form-section input[type="text"],
.auth-form-section input[type="password"],
.auth-form-section input[type="email"],
.auth-form-section input[type="tel"] {
  padding: 14px 16px;
  font-size: 15px;
  background: var(--surface);
  border-color: var(--border2);
  color: var(--ink);
}
.auth-submit {
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 4px;
}
.auth-submit:active {
  transform: scale(0.98);
  opacity: 0.9;
}
.auth-submit.customer-submit {
  background: var(--warning);
  color: var(--bg);
}
.auth-error {
  font-size: 13px;
  color: var(--danger);
  min-height: 18px;
  text-align: center;
}
.auth-hint {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 340px;
  margin: 20px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border2);
}
.auth-divider span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.auth-guest-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 340px;
  padding: 14px;
  background: transparent;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink2);
  cursor: pointer;
  transition: all var(--transition);
}
.auth-guest-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.auth-guest-btn:active {
  transform: scale(0.98);
}

/* ═══════════════════════════════════════════════════════════════ */
/* AGENT HOME SCREEN                                               */
/* ═══════════════════════════════════════════════════════════════ */
.home-content {
  padding: 0 20px;
}
.hero {
  padding: 24px 0 20px;
}
.hero-greeting {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}
.hero-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
}

/* Stats bar — Figma schedule card style */
.home-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.home-stat {
  flex: 1;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.home-stat:first-child {
  background: var(--accent);
}
.home-stat:first-child .home-stat-num {
  color: var(--bg);
}
.home-stat:first-child .home-stat-label {
  color: rgba(14, 18, 27, 0.6);
}
.home-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
}
.home-stat-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 500;
}

/* Section titles */
.section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Action cards (Check-Out, Check-In, etc.) */
.action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  margin-bottom: 10px;
  transition: all var(--transition);
}
.action-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}
.action-card:active {
  transform: scale(0.98);
}
.action-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.action-card-icon svg {
  width: 22px;
  height: 22px;
}
.action-card-text {
  flex: 1;
  min-width: 0;
}
.action-card-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.action-card-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Emergency / SOS button */
.sos-btn {
  margin: 0 0 10px;
  background: linear-gradient(135deg, #e53935, #c62828);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(229, 57, 53, 0.3);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition);
}
.sos-btn:active {
  transform: scale(0.97);
}
.sos-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 60%
  );
}
.sos-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sos-icon svg {
  width: 26px;
  height: 26px;
  stroke: white;
}
.sos-text {
  text-align: left;
}
.sos-label {
  font-size: 18px;
  font-weight: 700;
  color: white;
  display: block;
}
.sos-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 2px;
  display: block;
}

/* Emergency Contact */
.emergency-contact-btn {
  width: 100%;
  background: var(--card);
  border: 1.5px solid rgba(74, 222, 128, 0.3);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 10px;
}
.emergency-contact-btn:active {
  background: var(--success-bg);
  transform: scale(0.98);
}
.emergency-contact-icon {
  width: 42px;
  height: 42px;
  background: var(--success-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.emergency-contact-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--success);
}
.emergency-contact-text {
  text-align: left;
  flex: 1;
}
.emergency-contact-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  display: block;
}
.emergency-contact-sub {
  font-size: 12px;
  color: var(--success);
  margin-top: 1px;
  font-weight: 500;
}
.emergency-setup-btn {
  width: 100%;
  background: transparent;
  border: 1.5px dashed var(--border2);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color var(--transition);
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 14px;
}
.emergency-setup-btn:hover {
  border-color: var(--success);
  color: var(--success);
}

/* Role cards (grid) */
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.role-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 100px;
}
.role-card:active {
  border-color: var(--accent);
  transform: scale(0.97);
}
.role-card.selected {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.role-card.selected .role-name {
  color: var(--accent);
}
.role-card.selected .role-icon-wrap {
  background: var(--accent-bg);
}
.role-card.selected .role-icon-wrap svg {
  stroke: var(--accent);
}
.role-icon-wrap {
  width: 36px;
  height: 36px;
  background: var(--surface);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.role-icon-wrap svg {
  width: 18px;
  height: 18px;
  stroke: var(--ink2);
}
.role-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  margin-top: auto;
}

/* Recent reports */
.reports-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.report-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.report-id {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.report-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.report-status {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--success-bg);
  color: var(--success);
}

/* ═══════════════════════════════════════════════════════════════ */
/* FORM SCREEN                                                     */
/* ═══════════════════════════════════════════════════════════════ */
.form-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.back-btn {
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: none;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.back-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--ink);
}
.form-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  flex: 1;
}
.progress-bar {
  height: 3px;
  background: var(--surface);
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
  border-radius: 0 2px 2px 0;
}

.form-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.section-icon {
  width: 34px;
  height: 34px;
  background: var(--surface);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.section-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
}
.section-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  flex: 1;
}
.req-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-bg);
  color: var(--accent);
}
.section-fields {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Fields */
.field-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.field-label .req {
  color: var(--accent);
}
input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition);
  appearance: none;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea {
  resize: vertical;
  min-height: 80px;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.radio-opt {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
  transition: all var(--transition);
}
.radio-opt input {
  display: none;
}
.radio-opt.checked {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
}

/* GPS */
.gps-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  color: var(--ink2);
  font-family: var(--font);
  width: 100%;
  transition: border-color var(--transition);
}
.gps-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
}
.gps-btn.found {
  border-color: var(--success);
  color: var(--success);
}
.gps-value {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  font-family: monospace;
}

/* Photo capture */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.photo-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius-xs);
  overflow: hidden;
  position: relative;
  background: var(--surface);
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-add {
  aspect-ratio: 1;
  border: 2px dashed var(--border2);
  border-radius: var(--radius-xs);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 4px;
  background: transparent;
}
.photo-add svg {
  width: 22px;
  height: 22px;
  stroke: var(--muted);
}
.photo-add span {
  font-size: 11px;
  color: var(--muted);
}
.photo-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}
.photo-delete svg {
  width: 12px;
  height: 12px;
  stroke: white;
}
#photoInput {
  display: none;
}

/* Signature */
.sig-canvas-wrap {
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background: var(--surface);
}
#sigCanvas {
  display: block;
  width: 100%;
  height: 140px;
  touch-action: none;
  cursor: crosshair;
}
.sig-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}
.sig-clear {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
}

/* Submit */
.form-footer {
  padding: 16px 20px 100px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.submit-btn {
  width: 100%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
}
.submit-btn:active {
  opacity: 0.9;
  transform: scale(0.98);
}
.submit-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--bg);
}

/* ═══════════════════════════════════════════════════════════════ */
/* DASHBOARD / REPORTS SCREEN                                      */
/* ═══════════════════════════════════════════════════════════════ */
.dash-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.stat-num {
  font-size: 36px;
  font-weight: 800;
  color: var(--ink);
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════ */
/* BOTTOM NAVIGATION — Figma floating pill bar                     */
/* ═══════════════════════════════════════════════════════════════ */
.bottom-nav {
  display: flex;
  background: var(--nav-bg);
  border-radius: 35px;
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 16px;
  right: 16px;
  z-index: 100;
  padding: 10px 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--nav-inactive);
  border: none;
  background: transparent;
  position: relative;
  border-radius: 25px;
}
.nav-item.active {
  color: var(--nav-active-icon);
  background: var(--nav-active-bg);
}
.nav-item.active::before {
  display: none;
}
.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}
.nav-item span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════════════ */
/* MODALS                                                          */
/* ═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  display: none;
  align-items: flex-end;
  backdrop-filter: blur(4px);
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--card2);
  border-radius: 30px 30px 0 0;
  padding: 24px 20px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--ink);
}
.modal-input {
  width: 100%;
  margin-bottom: 12px;
}
.modal-btn {
  width: 100%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all var(--transition);
}
.modal-btn.cancel {
  background: var(--surface);
  color: var(--ink2);
}

/* ═══════════════════════════════════════════════════════════════ */
/* OFFLINE BANNER                                                  */
/* ═══════════════════════════════════════════════════════════════ */
.offline-banner {
  background: var(--warning);
  color: var(--bg);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 8px;
  display: none;
}
.offline-banner.show {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════ */
/* TOAST                                                           */
/* ═══════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--card2);
  color: var(--ink);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s;
  z-index: 300;
  white-space: nowrap;
  pointer-events: none;
  border: 1px solid var(--border2);
  box-shadow: var(--shadow);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════════════ */
/* SUCCESS SCREEN                                                  */
/* ═══════════════════════════════════════════════════════════════ */
.success-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}
.success-icon {
  width: 80px;
  height: 80px;
  background: var(--success-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.success-icon svg {
  width: 40px;
  height: 40px;
  stroke: var(--success);
}
.success-id {
  font-size: 40px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}
.success-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
}
.action-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.action-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
}
.action-btn.primary {
  background: var(--accent);
  color: var(--bg);
  border: none;
}
.action-btn.secondary {
  background: transparent;
  color: var(--ink2);
  border: 1.5px solid var(--border2);
}
.action-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

/* ═══════════════════════════════════════════════════════════════ */
/* ROLE PICKER SCREEN                                              */
/* ═══════════════════════════════════════════════════════════════ */
.role-pick-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  position: relative;
}
.role-pick-back {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--surface);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.role-pick-back svg {
  stroke: var(--ink);
}
.role-pick-icon {
  width: 72px;
  height: 72px;
  background: var(--accent-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.role-pick-icon svg {
  stroke: var(--accent);
}
.role-pick-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}
.role-pick-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 280px;
}
.role-pick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 360px;
}
.role-pick-grid .role-card {
  min-height: 110px;
  transition: all var(--transition);
}
.role-pick-grid .role-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

/* ═══════════════════════════════════════════════════════════════ */
/* CALL 9233 BUTTON                                                */
/* ═══════════════════════════════════════════════════════════════ */
.call-9233-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(135deg, #e53935, #c62828);
  color: white;
  border-radius: var(--radius);
  margin-bottom: 10px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(229, 57, 53, 0.3);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition);
}
.call-9233-btn:active {
  transform: scale(0.97);
}
.call-9233-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 60%
  );
}
.call-9233-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.call-9233-icon svg {
  width: 22px;
  height: 22px;
  stroke: white;
}
.call-9233-text {
  text-align: left;
  flex: 1;
}
.call-9233-label {
  font-size: 16px;
  font-weight: 700;
  display: block;
  color: white;
}
.call-9233-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 2px;
  display: block;
}

/* ═══════════════════════════════════════════════════════════════ */
/* FORENSYS REMINDER (Role Picker)                                 */
/* ═══════════════════════════════════════════════════════════════ */
.forensys-reminder {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px;
  background: var(--warning-bg);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  max-width: 360px;
  text-align: left;
}
.forensys-reminder span {
  font-size: 12px;
  color: var(--ink2);
  line-height: 1.5;
}
.forensys-reminder strong {
  color: var(--danger);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════ */
/* TOURIST / RENTAL BADGE                                          */
/* ═══════════════════════════════════════════════════════════════ */
.tourist-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-bg);
  color: var(--accent);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════ */
/* CONSENT MODAL                                                   */
/* ═══════════════════════════════════════════════════════════════ */
.consent-body {
  margin-bottom: 16px;
}
.consent-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}
.consent-list li {
  font-size: 12px;
  color: var(--ink2);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.consent-list li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  font-size: 13px;
}
.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border2);
  transition: border-color var(--transition);
}
.consent-check:has(input:checked) {
  border-color: var(--success);
  background: var(--success-bg);
}
.consent-check input {
  margin-top: 2px;
  accent-color: var(--success);
}
.consent-check span {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
}
#consent-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════ */
/* DOCUMENTATION TIMER                                             */
/* ═══════════════════════════════════════════════════════════════ */
.doc-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--success-bg);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.doc-timer-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
.doc-timer-text {
  font-size: 12px;
  color: var(--ink2);
  font-weight: 500;
}
.doc-timer-time {
  font-family: "Inter", monospace;
  font-size: 13px;
  color: var(--success);
  font-weight: 700;
  margin-left: auto;
}

/* ═══════════════════════════════════════════════════════════════ */
/* DAMAGE MAP                                                      */
/* ═══════════════════════════════════════════════════════════════ */
.dmg-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.dmg-tab {
  font-size: 11px;
  font-weight: 600;
  padding: 7px 12px;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}
.dmg-tab.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.dmg-view {
  display: none;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px 8px;
  margin-bottom: 10px;
}
.dmg-view.active {
  display: block;
}
.dmg-svg {
  width: 100%;
  height: auto;
}
.dmg-dot {
  fill: var(--border2);
  stroke: var(--bg2);
  stroke-width: 2;
  cursor: pointer;
  transition:
    fill 0.2s,
    transform 0.15s;
}
.dmg-dot:hover {
  transform: scale(1.3);
}
.dmg-dot.active {
  fill: var(--accent);
  stroke: var(--bg2);
  stroke-width: 2;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}
.dmg-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  padding: 8px 0;
}
.dmg-count {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}

/* Blueprint dots */
.dmg-blueprint-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}
.dmg-blueprint {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}
.dmg-blueprint-fit {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.dmg-dot-html {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--muted);
  border: 2.5px solid var(--bg2);
  cursor: pointer;
  z-index: 2;
  transform: translate(-50%, -50%);
  transition: all 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.dmg-dot-html:hover {
  transform: translate(-50%, -50%) scale(1.25);
  background: var(--ink2);
}
.dmg-dot-html:active {
  transform: translate(-50%, -50%) scale(0.9);
}
.dmg-dot-html.active {
  background: var(--accent);
  border-color: var(--bg2);
  box-shadow:
    0 0 0 3px var(--accent-glow),
    0 2px 8px rgba(126, 200, 216, 0.4);
}
.dmg-dot-html.active:hover {
  transform: translate(-50%, -50%) scale(1.25);
}
.dmg-dot-html::after {
  content: attr(title);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card2);
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.dmg-dot-html:hover::after {
  opacity: 1;
}
.dmg-role-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.agent-only {
  display: block;
}
.client-readonly .dmg-dot-html {
  pointer-events: none;
  cursor: default;
  opacity: 0.6;
}
.client-readonly .agent-only {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════ */
/* VEHICLE SCANNER BUTTON (Home)                                   */
/* ═══════════════════════════════════════════════════════════════ */
.scan-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all var(--transition);
}
.scan-btn:active {
  border-color: var(--accent);
  transform: scale(0.98);
}
.scan-btn-icon {
  width: 40px;
  height: 40px;
  background: var(--surface);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.scan-btn-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--ink2);
}
.scan-btn-text {
  text-align: left;
  flex: 1;
}
.scan-btn-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  display: block;
}
.scan-btn-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}

/* 4-Angle scanner */
.scan-angles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.scan-angle {
  background: var(--surface);
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.scan-angle:active {
  transform: scale(0.97);
}
.scan-angle.captured {
  border-style: solid;
  border-color: var(--success);
  background: var(--success-bg);
}
.scan-angle.captured .scan-angle-icon svg {
  stroke: var(--success);
}
.scan-angle-icon svg {
  stroke: var(--muted);
}
.scan-angle-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.scan-angle-status {
  font-size: 11px;
  color: var(--success);
  font-weight: 500;
}
.scan-angle-preview {
  position: absolute;
  inset: 0;
}
.scan-angle-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}

/* ═══════════════════════════════════════════════════════════════ */
/* QR ACTIONS (Success Screen)                                     */
/* ═══════════════════════════════════════════════════════════════ */
.qr-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}
.qr-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
}
.qr-action-card:active {
  border-color: var(--accent);
  transform: scale(0.98);
}
.qr-action-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.qr-action-icon svg {
  width: 20px;
  height: 20px;
}
.qr-action-text {
  text-align: left;
}
.qr-action-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.qr-action-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}

/* ═══════════════════════════════════════════════════════════════ */
/* FIELD ROW & CHECKOUT FIELDS                                     */
/* ═══════════════════════════════════════════════════════════════ */
.field-row {
  display: flex;
  gap: 10px;
}
.field-row .field-wrap {
  margin-bottom: 12px;
}
.checkout-only {
  display: block;
}
input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition);
  appearance: textfield;
}
input[type="number"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ═══════════════════════════════════════════════════════════════ */
/* OVERDUE & FLEET ALERTS                                          */
/* ═══════════════════════════════════════════════════════════════ */
.overdue-alert {
  background: var(--danger-bg);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--danger);
  margin-bottom: 12px;
  text-align: center;
}
.fleet-alert-section {
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}
.fleet-alert-section.overdue {
  background: var(--danger-bg);
  border: 1px solid rgba(248, 113, 113, 0.2);
}
.fleet-alert-section.due-today {
  background: var(--warning-bg);
  border: 1px solid rgba(251, 191, 36, 0.2);
}
.fleet-alert-title {
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
}
.fleet-alert-section.overdue .fleet-alert-title {
  color: var(--danger);
}
.fleet-alert-section.due-today .fleet-alert-title {
  color: var(--warning);
}
.fleet-alert-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--ink2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ═══════════════════════════════════════════════════════════════ */
/* TOURIST GUIDE                                                   */
/* ═══════════════════════════════════════════════════════════════ */
.guide-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 2px;
}
.guide-tab {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  padding: 8px 6px;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transition: all var(--transition);
}
.guide-tab.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.guide-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition);
}
.guide-card:active {
  transform: scale(0.98);
  border-color: var(--accent);
}
.guide-card-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  border-radius: 10px;
}
.guide-card-icon svg {
  width: 20px;
  height: 20px;
}
.guide-card-body {
  flex: 1;
  min-width: 0;
}
.guide-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}
.guide-card-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.guide-card-tip {
  font-size: 11px;
  color: var(--ink2);
  margin-top: 4px;
  padding: 6px 10px;
  background: var(--warning-bg);
  border-radius: 6px;
  line-height: 1.4;
}

.guide-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-left: 6px;
  vertical-align: middle;
}
.guide-badge.free {
  background: var(--success-bg);
  color: var(--success);
}
.guide-badge.paid {
  background: var(--warning-bg);
  color: var(--warning);
}

.guide-info-bar {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  text-align: center;
}

.guide-emergency {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.guide-emer-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  color: white;
  transition: transform var(--transition);
}
.guide-emer-btn:active {
  transform: scale(0.95);
}
.guide-emer-btn.red {
  background: linear-gradient(135deg, #e53935, #c62828);
}
.guide-emer-btn.orange {
  background: linear-gradient(135deg, #f57c00, #e65100);
}
.guide-emer-btn.blue {
  background: linear-gradient(135deg, #1565c0, #0d47a1);
}
.guide-emer-num {
  font-size: 28px;
  font-weight: 800;
}
.guide-emer-label {
  font-size: 11px;
  margin-top: 4px;
  opacity: 0.85;
}

/* ═══════════════════════════════════════════════════════════════ */
/* CUSTOMER RENTAL CARD                                            */
/* ═══════════════════════════════════════════════════════════════ */
.cust-rental-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.cust-rental-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--accent);
}
.cust-rental-plate {
  font-size: 22px;
  font-weight: 800;
  color: var(--bg);
  letter-spacing: 1px;
}
.cust-rental-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.2);
  color: white;
}
.cust-rental-details {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cust-rental-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.cust-rental-label {
  color: var(--muted);
}
.cust-rental-row span:last-child {
  color: var(--ink);
  font-weight: 500;
}
.cust-return-date {
  color: var(--accent) !important;
  font-weight: 600 !important;
}
.cust-rental-countdown {
  padding: 12px 16px;
  background: var(--warning-bg);
  border-top: 1px solid rgba(251, 191, 36, 0.2);
  font-size: 13px;
  color: var(--warning);
  text-align: center;
  font-weight: 500;
}
.cust-rental-countdown.overdue {
  background: var(--danger-bg);
  border-top-color: rgba(248, 113, 113, 0.2);
  color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════ */
/* BOOKINGS (v4.2)                                                 */
/* ═══════════════════════════════════════════════════════════════ */
.bk-filter-tabs {
  display: flex;
  gap: 4px;
  padding: 0 0 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.bk-filter {
  padding: 7px 14px;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-pill);
  background: transparent;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}
.bk-filter.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.bk-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition);
  overflow: hidden;
}
.bk-card:active {
  box-shadow: var(--shadow);
}
.bk-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}
.bk-card-left {
  flex: 1;
  min-width: 0;
}
.bk-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.bk-card-meta {
  font-size: 11px;
  color: var(--muted);
}
.bk-card-plate {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.bk-status {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.bk-upcoming {
  background: var(--accent-bg);
  color: var(--accent);
}
.bk-ready {
  background: var(--warning-bg);
  color: var(--warning);
}
.bk-confirmed {
  background: var(--success-bg);
  color: var(--success);
}
.bk-completed {
  background: var(--surface);
  color: var(--muted);
}
.bk-cancelled {
  background: var(--danger-bg);
  color: var(--danger);
}
.bk-card-detail {
  padding: 0 16px 14px;
  border-top: 1px solid var(--border);
}
.bk-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 12px;
  font-size: 12px;
}
.bk-detail-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bk-detail-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.bk-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.bk-action-btn {
  padding: 8px 14px;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-xs);
  background: transparent;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink2);
  cursor: pointer;
  transition: all var(--transition);
}
.bk-action-btn:active {
  transform: scale(0.97);
}
.bk-action-btn.primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.bk-action-btn.danger {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.3);
}
.bk-action-btn.danger:hover {
  background: var(--danger-bg);
}
.bk-widget-card {
  margin-bottom: 12px;
}

/* CSV Dropzone */
.csv-dropzone {
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.csv-dropzone:hover,
.csv-dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-bg);
}

/* ═══════════════════════════════════════════════════════════════ */
/* SETTINGS SCREEN                                                 */
/* ═══════════════════════════════════════════════════════════════ */
.settings-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.settings-header {
  padding: 24px 0 20px;
}
.settings-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
}
.settings-sub {
  font-size: 13px;
  color: var(--muted);
}

.settings-section {
  margin-bottom: 24px;
}
.settings-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-left: 4px;
}
.settings-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.settings-item:last-child {
  border-bottom: none;
}
.settings-item:active {
  background: var(--accent-bg);
}
.settings-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.settings-item-icon svg {
  width: 20px;
  height: 20px;
}
.settings-item-text {
  flex: 1;
  min-width: 0;
}
.settings-item-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  display: block;
}
.settings-item-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  display: block;
}
.settings-item-value {
  font-size: 13px;
  color: var(--muted);
  flex-shrink: 0;
}
.settings-item-arrow {
  color: var(--muted);
  flex-shrink: 0;
}
.settings-item-arrow svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

/* Theme toggle switch */
.theme-switch {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}
.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.theme-switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--card2);
  border: 1.5px solid var(--border2);
  border-radius: 28px;
  transition: all var(--transition);
}
.theme-switch .slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--ink);
  border-radius: 50%;
  transition: all var(--transition);
}
.theme-switch input:checked + .slider {
  background: var(--accent);
  border-color: var(--accent);
}
.theme-switch input:checked + .slider::before {
  transform: translateY(-50%) translateX(24px);
  background: var(--bg);
}

/* Settings profile card */
.settings-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.settings-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--bg);
}
.settings-profile-info {
  flex: 1;
}
.settings-profile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.settings-profile-role {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.settings-profile-company {
  font-size: 12px;
  color: var(--accent);
  margin-top: 2px;
  font-weight: 600;
}

/* Settings logout */
.settings-logout {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 1.5px solid var(--danger);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  color: var(--danger);
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 12px;
}
.settings-logout:active {
  background: var(--danger-bg);
  transform: scale(0.98);
}

/* App version */
.settings-version {
  text-align: center;
  padding: 20px 0;
  font-size: 12px;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════ */
/* MASCOT MODAL                                                     */
/* ═══════════════════════════════════════════════════════════════ */
.mascot-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(14, 18, 27, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.mascot-overlay.open {
  display: flex;
  animation: mascotFadeIn 0.3s ease;
}
.mascot-dialog {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 28px;
  padding: 36px 28px 28px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  position: relative;
  animation: mascotBounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.4),
    0 0 0 1px var(--border);
}
.mascot-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: var(--bg2);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.mascot-close:hover {
  background: var(--danger-bg);
  color: var(--danger);
}
.mascot-img {
  width: 140px;
  height: auto;
  margin: 0 auto 16px;
  display: block;
  animation: mascotFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.15));
}
.mascot-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.mascot-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 20px;
}
.mascot-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.mascot-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.mascot-btn:active {
  transform: translateY(0);
}
/* Password form inside mascot dialog */
.password-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  margin-top: 4px;
}
.pw-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition);
}
.pw-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.pw-error {
  font-size: 12px;
  color: var(--danger);
  min-height: 16px;
  text-align: center;
}
/* Not-found inline mascot */
.empty-mascot {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  text-align: center;
}
.empty-mascot img {
  width: 120px;
  height: auto;
  margin-bottom: 14px;
  opacity: 0.85;
  animation: mascotFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.12));
}
.empty-mascot .empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.empty-mascot .empty-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
@keyframes mascotFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes mascotBounceIn {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(30px);
  }
  60% {
    transform: scale(1.03) translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes mascotFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* ═══════════════════════════════════════════════════════════════ */
/* ANIMATIONS & MICRO-INTERACTIONS                                 */
/* ═══════════════════════════════════════════════════════════════ */

/* ── Screen fade-in ── */
@keyframes screenFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.screen.active {
  animation: screenFadeIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

/* ── Staggered card entrances ── */
@keyframes cardSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.screen.active .action-card,
.screen.active .guide-card,
.screen.active .bk-card,
.screen.active .settings-item,
.screen.active .stat-card,
.screen.active .report-card,
.screen.active .qr-action-card {
  animation: cardSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.screen.active *:nth-child(1) {
  animation-delay: 0.04s;
}
.screen.active *:nth-child(2) {
  animation-delay: 0.08s;
}
.screen.active *:nth-child(3) {
  animation-delay: 0.12s;
}
.screen.active *:nth-child(4) {
  animation-delay: 0.16s;
}
.screen.active *:nth-child(5) {
  animation-delay: 0.2s;
}
.screen.active *:nth-child(6) {
  animation-delay: 0.24s;
}
.screen.active *:nth-child(7) {
  animation-delay: 0.28s;
}
.screen.active *:nth-child(8) {
  animation-delay: 0.32s;
}

/* ── Welcome screen entrances ── */
@keyframes logoFloat {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.screen.active .welcome-logo-img {
  animation: logoFloat 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.screen.active .welcome-tagline {
  animation: fadeSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}
.screen.active .welcome-lang {
  animation: fadeSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}
.screen.active .welcome-role-card:first-child {
  animation: cardSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}
.screen.active .welcome-role-card:last-child {
  animation: cardSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}
.screen.active .legal-disclaimer {
  animation: fadeSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
}

/* ── Auth screen entrances ── */
.screen.active .auth-icon {
  animation: logoFloat 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.screen.active .auth-title {
  animation: fadeSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
.screen.active .auth-sub {
  animation: fadeSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}
.screen.active .auth-tabs {
  animation: fadeSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}
.screen.active .auth-form-section {
  animation: fadeSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}
.screen.active .auth-submit {
  animation: fadeSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

/* ── Hero stats counter pop ── */
@keyframes statPop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  60% {
    transform: scale(1.08);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.screen.active .home-stat:nth-child(1) {
  animation: statPop 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}
.screen.active .home-stat:nth-child(2) {
  animation: statPop 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}
.screen.active .home-stat:nth-child(3) {
  animation: statPop 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.29s both;
}

/* ── Success screen celebration ── */
@keyframes successBounce {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.12);
  }
  70% {
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes successSlide {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.screen.active .success-icon {
  animation: successBounce 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.screen.active .success-id {
  animation: successSlide 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}
.screen.active .success-sub {
  animation: successSlide 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
}
.screen.active .action-btns {
  animation: successSlide 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

/* ── Settings profile entrance ── */
@keyframes profileSlide {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.screen.active .settings-profile {
  animation: profileSlide 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.screen.active .settings-avatar {
  animation: statPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

/* ── Button hover glow (non-touch) ── */
@media (hover: hover) {
  .auth-submit:hover,
  .submit-btn:hover,
  .modal-btn:hover:not(.cancel),
  .action-btn.primary:hover {
    box-shadow:
      0 0 20px var(--accent-glow),
      0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
  }
  .welcome-role-card:hover {
    transform: translateY(-2px);
  }
  .action-card:hover {
    transform: translateY(-1px);
  }
  .guide-card:hover {
    transform: translateY(-1px);
  }
  .bk-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
  }
  .settings-item:hover {
    background: var(--accent-bg);
  }
  .settings-logout:hover {
    background: var(--danger-bg);
    transform: translateY(-1px);
  }
  .nav-item:hover:not(.active) {
    color: var(--ink);
  }
}

/* ── Active press spring ── */
.welcome-role-card:active,
.action-card:active,
.guide-card:active,
.bk-card:active,
.settings-item:active {
  transition-duration: 0.08s;
}

/* ── Nav bar entrance ── */
@keyframes navSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.bottom-nav {
  animation: navSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

/* ── Nav active pill transition ── */
.nav-item {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-item.active {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Modal slide-up ── */
@keyframes modalSlideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.modal-overlay.open {
  animation: modalFadeIn 0.25s ease both;
}
.modal-overlay.open .modal {
  animation: modalSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Input focus glow pulse ── */
@keyframes focusPulse {
  0% {
    box-shadow: 0 0 0 3px var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 0 5px var(--accent-glow);
  }
  100% {
    box-shadow: 0 0 0 3px var(--accent-glow);
  }
}
input:focus,
textarea:focus,
select:focus {
  animation: focusPulse 2s ease-in-out infinite;
}

/* ── Progress bar shimmer ── */
@keyframes progressShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}
.progress-fill {
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--accent2) 50%,
    var(--accent) 100%
  );
  background-size: 200% 100%;
  animation: progressShimmer 2s linear infinite;
}

/* ── Toast entrance ── */
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}
.toast.show {
  animation: toastIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── SOS button pulse ── */
@keyframes sosPulse {
  0%,
  100% {
    box-shadow: 0 6px 24px rgba(229, 57, 53, 0.3);
  }
  50% {
    box-shadow: 0 6px 32px rgba(229, 57, 53, 0.5);
  }
}
.sos-btn {
  animation: sosPulse 2.5s ease-in-out infinite;
}

/* ── Emergency number pulse ── */
.guide-emer-btn {
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}
.guide-emer-btn:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ── Theme transition (smooth color changes) ── */
body,
.topbar,
.bottom-nav,
.screen,
.action-card,
.guide-card,
.bk-card,
.settings-card,
.settings-profile,
.home-stat,
.stat-card,
.section-card,
.modal,
input,
textarea,
select {
  transition:
    background-color 0.4s ease,
    color 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

/* ── Reduce motion for accessibility ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════ */
/* RESPONSIVE                                                      */
/* ═══════════════════════════════════════════════════════════════ */
@media (min-width: 480px) {
  .home-content {
    max-width: 480px;
    margin: 0 auto;
  }
  .welcome-roles {
    flex-direction: row;
    max-width: 480px;
  }
  .dash-content {
    max-width: 480px;
    margin: 0 auto;
  }
}

/* Customer login — hide hero panel on mobile, show form only */
@media (max-width: 768px) {
  #screen-login-customer {
    flex-direction: column !important;
  }
  #screen-login-customer .cust-hero-panel {
    display: none !important;
  }
  #screen-login-customer .cust-form-panel {
    width: 100% !important;
    min-height: 100dvh;
    border-left: none !important;
  }
}

/* ── Modal legal text ── */
.modal-legal-text {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.7;
  margin-bottom: 16px;
}
.modal-legal-text h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 14px 0 6px;
  color: var(--ink);
}
.modal-legal-text p {
  margin-bottom: 8px;
}
.modal-legal-text p:last-child {
  margin-bottom: 0;
}
.modal-legal-text .agreement-block {
  padding: 12px 0;
}
.modal-legal-text .agreement-block + .agreement-block {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
}
.modal-legal-text .agreement-block h4 {
  margin: 0 0 6px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}

/* ── Modal button variants ── */
.modal-btn.primary {
  background: var(--accent);
  color: #fff;
}
.modal-btn.success {
  background: var(--success);
  color: #fff;
}

/* ── Agreement accept label ── */
.agreement-accept-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 16px;
  transition: background 0.2s;
}
.agreement-accept-label:hover {
  background: var(--border2);
}
.agreement-accept-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--success);
  flex-shrink: 0;
}
.agreement-accept-label span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

/* ── Minimal scrollbar ── */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}
html::-webkit-scrollbar,
.modal::-webkit-scrollbar,
.auth-container::-webkit-scrollbar,
.form-body::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
html::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track,
.auth-container::-webkit-scrollbar-track,
.form-body::-webkit-scrollbar-track {
  background: transparent;
}
html::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb,
.auth-container::-webkit-scrollbar-thumb,
.form-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
html::-webkit-scrollbar-thumb:hover,
.modal::-webkit-scrollbar-thumb:hover,
.auth-container::-webkit-scrollbar-thumb:hover,
.form-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}
[data-theme="light"] html {
  scrollbar-color: rgba(0, 0, 0, 0.12) transparent;
}
[data-theme="light"] html::-webkit-scrollbar-thumb,
[data-theme="light"] .modal::-webkit-scrollbar-thumb,
[data-theme="light"] .auth-container::-webkit-scrollbar-thumb,
[data-theme="light"] .form-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] html::-webkit-scrollbar-thumb:hover,
[data-theme="light"] .modal::-webkit-scrollbar-thumb:hover,
[data-theme="light"] .auth-container::-webkit-scrollbar-thumb:hover,
[data-theme="light"] .form-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.22);
}
