/* ─────────────────────────────────────────────
   Asset Tracker — Mobile-first stylesheet
   Navy: #0a2540  |  Bootstrap 5.3.3
───────────────────────────────────────────── */

/* ── Design tokens ── */
:root {
  --navy:         #0a2540;
  --navy-dark:    #061829;
  --navy-light:   #1a3a5c;
  --navy-ghost:   rgba(10,37,64,0.08);
  --navy-ring:    rgba(10,37,64,0.20);
  --success:      #00c853;
  --warning:      #ffab00;
  --danger:       #f5222d;
  --surface:      #ffffff;
  --surface-2:    #f4f6f9;
  --border:       #e8ecf0;
  --text-1:       #0d1b2a;
  --text-2:       #4a5568;
  --text-3:       #9aa5b4;
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --radius-xl:    20px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.07), 0 1px 6px rgba(0,0,0,.05);
  --shadow-md:    0 4px 16px rgba(0,0,0,.10);
  --shadow-up:    0 -2px 10px rgba(0,0,0,.07);
  --topbar-h:     56px;
  --bottom-nav-h: 60px;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-1);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════
   APP SHELL  —  document-flow layout
   No fixed scroll containers, no dvh.
   topbar=sticky, body scrolls, bottom-nav=fixed.
══════════════════════════════════════ */
.ev-shell {
  display: block;
}

/* Extra bottom padding so content never hides under the bottom nav */
.ev-main {
  padding-bottom: calc(var(--bottom-nav-h) + 16px);
  min-height: 60vh;
  background: var(--surface-2);
}

/* ── Top app bar ── */
.ev-topbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  background: var(--navy);
  z-index: 300;
  width: 100%;
}
.ev-topbar-inner {
  height: var(--topbar-h);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 0 8px 0 4px;
}
.ev-topbar-title {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  padding: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-menu-btn,
.ev-avatar-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.9);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  font-size: 1.5rem;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.ev-menu-btn:active,
.ev-avatar-btn:active { background: rgba(255,255,255,.12); }
.ev-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 1.5px solid rgba(255,255,255,.4);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

/* ── Drawer overlay ── */
.ev-drawer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.45);
  z-index: 399;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: opacity .25s;
  transition: opacity .25s;
}
.ev-drawer-overlay.show { opacity: 1; pointer-events: auto; }

/* ── Side drawer ── */
.ev-drawer {
  position: fixed;
  top: 0; left: 0;
  width: 85vw;
  max-width: 300px;
  height: 100%;
  background: var(--surface);
  z-index: 400;
  -webkit-transform: translateX(-100%);
  transform: translateX(-100%);
  -webkit-transition: -webkit-transform .28s ease;
  transition: transform .28s ease;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-shadow: var(--shadow-md);
  box-shadow: var(--shadow-md);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ev-drawer.open { -webkit-transform: translateX(0); transform: translateX(0); }
.ev-drawer-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--navy);
  -ms-flex-negative: 0;
  flex-shrink: 0;
}
.ev-drawer-brand {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.ev-drawer-brand i,
.ev-drawer-brand ion-icon { font-size: 1.4rem; }
.ev-drawer-user {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 12px;
}
.ev-drawer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-negative: 0;
  flex-shrink: 0;
}
.ev-drawer-name  { color: #fff; font-weight: 600; font-size: .9rem; }
.ev-drawer-email { color: rgba(255,255,255,.65); font-size: .75rem; }

.ev-nav {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
}
.ev-nav li + li { margin-top: 2px; }
.ev-nav-link {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  color: var(--text-2);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}
.ev-nav-link i,
.ev-nav-link ion-icon { font-size: 1.2rem; width: 22px; text-align: center; -ms-flex-negative: 0; flex-shrink: 0; }
.ev-nav-link:active { background: var(--navy-ghost); color: var(--navy); }
.ev-nav-link.active {
  color: var(--navy);
  font-weight: 700;
  background: var(--navy-ghost);
  border-left: 3px solid var(--navy);
}
.ev-drawer-footer {
  padding: 8px 0 16px;
  border-top: 1px solid var(--border);
  -ms-flex-negative: 0;
  flex-shrink: 0;
}
.ev-logout { color: var(--danger) !important; }

/* ── Bottom navigation ── */
.ev-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  z-index: 200;
  -webkit-box-shadow: var(--shadow-up);
  box-shadow: var(--shadow-up);
}
.ev-bottom-item {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-3);
  text-decoration: none;
  font-size: .7rem;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}
.ev-bottom-item i,
.ev-bottom-item ion-icon { font-size: 1.35rem; line-height: 1; }
.ev-bottom-item.active,
.ev-bottom-item.active i,
.ev-bottom-item.active ion-icon { color: var(--navy); }

/* ── Flash messages ── */
.ev-flash {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 12px 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: .875rem;
  font-weight: 500;
}
.ev-flash i,
.ev-flash ion-icon { -ms-flex-negative: 0; flex-shrink: 0; font-size: 1rem; margin-top: 1px; }
.ev-flash-error   { background: #fff2f0; color: #a8071a; border: 1px solid #ffccc7; }
.ev-flash-success { background: #f6ffed; color: #237804; border: 1px solid #b7eb8f; }
.ev-flash-close {
  background: none; border: none; font-size: 1.1rem; line-height: 1;
  padding: 0; color: inherit; opacity: .5; cursor: pointer; margin-left: auto;
}

/* ══════════════════════════════════════
   HOME PAGE
══════════════════════════════════════ */
.ev-hero {
  background: var(--navy);
  background: -webkit-linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 28px 20px 36px;
  color: #fff;
}
.ev-hero-greeting { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.ev-hero-sub      { font-size: .875rem; opacity: .75; }

.ev-stats-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 12px;
  padding: 0 16px;
  margin-top: -20px;
}
.ev-stat-card {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  -webkit-box-shadow: var(--shadow-md);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.ev-stat-num       { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.ev-stat-label     { font-size: .75rem; color: var(--text-2); margin-top: 4px; font-weight: 500; }
.ev-stat-num.navy    { color: var(--navy); }
.ev-stat-num.success { color: #1a9e4a; }

.ev-section { padding: 20px 16px 0; }
.ev-section-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  margin-bottom: 10px;
}

.ev-cta-btn {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 12px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  text-decoration: none;
  -webkit-box-shadow: 0 4px 16px rgba(10,37,64,.25);
  box-shadow: 0 4px 16px rgba(10,37,64,.25);
  -webkit-tap-highlight-color: transparent;
  margin-bottom: 10px;
}
.ev-cta-btn:hover  { color: #fff; }
.ev-cta-btn:active { opacity: .9; color: #fff; }
.ev-cta-btn i,
.ev-cta-btn ion-icon { font-size: 1.4rem; -ms-flex-negative: 0; flex-shrink: 0; }
.ev-cta-btn-sub    { font-size: .75rem; opacity: .75; font-weight: 400; display: block; margin-top: 2px; }

.ev-cta-outline {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  color: var(--navy);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  font-size: .95rem;
  font-weight: 600;
  width: 100%;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.ev-cta-outline:active { background: var(--navy-ghost); color: var(--navy); }
.ev-cta-outline i,
.ev-cta-outline ion-icon { font-size: 1.2rem; -ms-flex-negative: 0; flex-shrink: 0; }

.ev-draft-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 10px;
  -webkit-box-shadow: var(--shadow-sm);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.ev-draft-card:active { color: inherit; }
.ev-draft-card > a { min-width: 0; }
.ev-draft-card > [data-delete-draft] { flex-shrink: 0; }
.ev-draft-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--navy-ghost);
  color: var(--navy);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  font-size: 1.1rem;
  -ms-flex-negative: 0;
  flex-shrink: 0;
}
.ev-draft-info  { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; min-width: 0; }
.ev-draft-code  { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-draft-name  { font-size: .8rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-draft-meta  { text-align: right; -ms-flex-negative: 0; flex-shrink: 0; }
.ev-draft-date  { font-size: .72rem; color: var(--text-3); margin-top: 4px; }

/* ══════════════════════════════════════
   STATUS PAGE
══════════════════════════════════════ */
.ev-search-bar {
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}
.ev-search-input {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  background: var(--surface-2);
  border-radius: 100px;
  padding: 0 16px;
  gap: 8px;
  border: 1.5px solid var(--border);
}
.ev-search-input i,
.ev-search-input ion-icon { color: var(--text-3); font-size: 1rem; -ms-flex-negative: 0; flex-shrink: 0; }
.ev-search-input input {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  border: none;
  background: none;
  padding: 10px 0;
  font-size: .95rem;
  color: var(--text-1);
  outline: none;
  -webkit-appearance: none;
}
.ev-search-input button {
  background: none;
  border: none;
  color: var(--navy);
  font-size: .85rem;
  font-weight: 600;
  padding: 8px 0;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  cursor: pointer;
}

.ev-eval-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  margin: 0 16px 10px;
  padding: 14px 16px;
  -webkit-box-shadow: var(--shadow-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.ev-eval-card [data-delete-draft] { flex-shrink: 0; }
.ev-eval-header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  gap: 8px;
}
.ev-eval-info { min-width: 0; flex: 1 1 auto; }
.ev-eval-code,
.ev-eval-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-eval-code { font-weight: 700; font-size: .95rem; }
.ev-eval-name { font-size: .8rem; color: var(--text-2); margin-top: 2px; }
.ev-eval-loc  { font-size: .8rem; color: var(--text-2); margin-top: 6px; min-width: 0; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 4px; }
.ev-eval-loc i,
.ev-eval-loc ion-icon { color: var(--navy); flex-shrink: 0; }
.ev-eval-loc span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ev-continue-btn {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 6px;
  background: var(--navy-ghost);
  color: var(--navy);
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: .875rem;
  font-weight: 600;
  width: 100%;
  text-decoration: none;
  margin-top: 12px;
  -webkit-tap-highlight-color: transparent;
}
.ev-continue-btn:active { background: rgba(10,37,64,.16); color: var(--navy); }

/* Square icon-only action button that sits next to .ev-continue-btn in a
   row (e.g. Copy/Delete beside Continue) — a bare Bootstrap .btn there
   renders taller than .ev-continue-btn (the un-sized ion-icon inflates it)
   and lacks its 12px margin-top, so the two visibly misalign. */
.ev-icon-btn {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 44px;
  padding: 10px 0;
  margin-top: 12px;
  flex-shrink: 0;
  box-sizing: border-box;
}
.ev-icon-btn ion-icon { font-size: 1.1rem; line-height: 1; }

.ev-empty-state { padding: 60px 24px; text-align: center; }
.ev-empty-state i,
.ev-empty-state ion-icon { font-size: 3rem; color: var(--text-3); }
.ev-empty-state p { color: var(--text-2); margin: 12px 0; }

/* ══════════════════════════════════════
   WIZARD / FORM
══════════════════════════════════════ */

/* Progress bar — sticky at top of ev-main (below topbar which is also sticky) */
.wiz-progress {
  position: -webkit-sticky;
  position: sticky;
  top: var(--topbar-h);
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  -webkit-box-shadow: 0 2px 8px rgba(0,0,0,.04);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.wiz-progress-track {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}
.wiz-dot {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-3);
  font-size: .75rem;
  font-weight: 700;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-transition: background .25s, color .25s;
  transition: background .25s, color .25s;
}
.wiz-dot.done    { background: var(--navy); color: #fff; }
.wiz-dot.current {
  background: var(--navy);
  color: #fff;
  -webkit-box-shadow: 0 0 0 4px rgba(10,37,64,.18);
  box-shadow: 0 0 0 4px rgba(10,37,64,.18);
}
.wiz-line {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  -webkit-transition: background .25s;
  transition: background .25s;
}
.wiz-line.done { background: var(--navy); }
.wiz-meta {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}
.wiz-label { font-size: .78rem; font-weight: 600; color: var(--navy); }
.wiz-count { font-size: .78rem; color: var(--text-3); }

/* Step content */
.wiz-step-wrap { padding: 20px 16px 16px; }
.wiz-step-header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.wiz-step-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--navy-ghost);
  color: var(--navy);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  font-size: 1.2rem;
  -ms-flex-negative: 0;
  flex-shrink: 0;
}
.wiz-step-title { font-size: 1.05rem; font-weight: 700; color: var(--text-1); }
.wiz-step-sub   { font-size: .78rem; color: var(--text-2); margin-top: 1px; }

/* Form fields */
.form-label { font-size: .875rem; font-weight: 600; color: var(--text-1); margin-bottom: 6px; }
.form-control,
.form-select {
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  font-size: .95rem;
  padding: 11px 14px;
  color: var(--text-1);
  background: var(--surface);
  width: 100%;
  -webkit-transition: border-color .15s;
  transition: border-color .15s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--navy);
  outline: none;
  -webkit-box-shadow: 0 0 0 3px rgba(10,37,64,.15);
  box-shadow: 0 0 0 3px rgba(10,37,64,.15);
}
.form-control::-webkit-input-placeholder { color: var(--text-3); }
.form-control::-moz-placeholder          { color: var(--text-3); }
.form-control-lg,
.form-select-lg { padding: 13px 16px; font-size: 1rem; }

/* Textarea */
textarea.form-control { resize: vertical; }

/* Input group */
.input-group { display: -webkit-box; display: -ms-flexbox; display: flex; }
.input-group-text {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: .95rem;
  white-space: nowrap;
}
.input-group .form-control,
.input-group .form-select {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.input-group-lg .input-group-text { padding: 13px 16px; font-size: 1rem; }

/* Chip radios */
.ev-chip-group {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.ev-chip {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background: var(--surface);
}
.ev-chip input[type=radio] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.ev-chip.checked {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* Asset detail card */
.ev-asset-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--navy);
  padding: 14px 16px;
  margin-top: 4px;
  overflow: hidden;
}
.ev-asset-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}
.ev-asset-row > div {
  width: 50%;
  min-width: 0;
  padding: 4px 8px 8px 0;
}
.ev-asset-field-label { font-size: .72rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ev-asset-field-value {
  font-size: .9rem; font-weight: 700; color: var(--text-1); margin-top: 2px;
  overflow-wrap: break-word; word-break: break-word;
}

/* Condition slider */
.wiz-slider-wrap { padding: 8px 0 4px; }
.wiz-slider-row  {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 10px;
}
.wiz-slider-row span { font-size: .75rem; color: var(--text-3); font-weight: 600; -ms-flex-negative: 0; flex-shrink: 0; }
input[type=range] {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  cursor: pointer;
  outline: none;
  accent-color: var(--navy);
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--navy);
  -webkit-box-shadow: 0 2px 8px rgba(10,37,64,.3);
  box-shadow: 0 2px 8px rgba(10,37,64,.3);
  cursor: pointer;
}
input[type=range]::-moz-range-thumb {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--navy);
  border: none;
  -webkit-box-shadow: 0 2px 8px rgba(10,37,64,.3);
  box-shadow: 0 2px 8px rgba(10,37,64,.3);
}
.wiz-rating-display {
  text-align: center;
  margin-top: 12px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 10px;
}
.wiz-rating-num { font-size: 2.8rem; font-weight: 800; color: var(--navy); line-height: 1; }

/* Photo grid */
.wiz-photo-grid {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.wiz-photo-thumb {
  position: relative;
  width: calc(33.333% - 6px);
  padding-top: calc(33.333% - 6px);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
}
.wiz-photo-thumb img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.wiz-photo-del {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  border: none;
  color: #fff;
  font-size: .7rem;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Clear ("×") button inside text inputs / textareas */
.ev-clear-wrap { display: block; position: relative; }
.ev-has-clear { padding-right: 36px; }
.ev-input-clear {
  position: absolute;
  top: 50%; right: 8px;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  width: 22px; height: 22px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--text-3);
  font-size: .85rem;
  line-height: 1;
  display: none;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ev-input-clear.visible { display: -webkit-box; display: -ms-flexbox; display: flex; }
.ev-input-clear:active { background: var(--border); color: var(--text-1); }
.ev-input-clear.ev-clear-textarea { top: 10px; -webkit-transform: none; transform: none; }

.wiz-photo-upload {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 6px;
  border: 2px dashed var(--navy-light);
  border-radius: var(--radius-lg);
  padding: 28px 16px;
  color: var(--navy);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  background: var(--navy-ghost);
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  text-align: center;
}
.wiz-photo-upload i,
.wiz-photo-upload ion-icon { font-size: 2rem; }
.wiz-photo-upload small { color: var(--text-2); font-weight: 400; font-size: .78rem; }

/* Info block */
.ev-info-block {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #e8f4ff;
  border-radius: var(--radius-md);
  font-size: .83rem;
  color: #0c4a8e;
  margin-bottom: 16px;
  border: 1px solid #b3d9ff;
}
.ev-info-block i,
.ev-info-block ion-icon { -ms-flex-negative: 0; flex-shrink: 0; margin-top: 1px; font-size: .95rem; }

/* Classification box */
.ev-change-box {
  background: #fff8e1;
  border: 1.5px solid #ffe082;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 8px;
}
.ev-sap-current {
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.ev-sap-current small { font-size: .72rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; display: block; margin-bottom: 4px; }

/* Wizard action bar */
.wiz-actions {
  position: -webkit-sticky;
  position: sticky;
  /* Sticks just above the fixed bottom nav instead of behind it —
     bottom:0 would land exactly where .ev-bottom-nav (z-index 200) sits
     and get visually covered by it. */
  bottom: var(--bottom-nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 10px;
  z-index: 150;
  -webkit-box-shadow: var(--shadow-up);
  box-shadow: var(--shadow-up);
  margin-bottom: 0;
}
.wiz-save-status {
  text-align: center;
  font-size: .75rem;
  color: var(--text-3);
  padding: 4px 16px;
  background: var(--surface);
  display: none;
}

/* ── Buttons ── */
.btn-navy {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 6px;
  background: var(--navy);
  border: 1.5px solid var(--navy);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 13px 20px;
  font-size: .95rem;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-navy:hover  { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }
.btn-navy:active { opacity: .85; color: #fff; }
.btn-navy:disabled,
.btn-navy[disabled] { opacity: .55; pointer-events: none; }

.btn-ghost {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text-2);
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 13px 20px;
  font-size: .95rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-ghost:active { background: var(--border); }

/* flex-fill utility (Bootstrap has it but let's be safe) */
.flex-fill { -webkit-box-flex: 1; -ms-flex: 1 1 auto; flex: 1 1 auto; }

/* ── Bootstrap badge overrides ── */
.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  border-radius: 6px;
  padding: 4px 8px;
  line-height: 1;
  white-space: nowrap;
}
.bg-warning { background-color: #f0a500 !important; color: #000 !important; }
.bg-success { background-color: #1a9e4a !important; color: #fff !important; }
.bg-danger  { background-color: var(--danger) !important; color: #fff !important; }
.bg-primary { background-color: var(--navy) !important; color: #fff !important; }
.bg-info    { background-color: var(--navy-light) !important; color: #fff !important; }

.form-check-input:checked { background-color: var(--navy); border-color: var(--navy); }

/* Pager */
.page-item.active .page-link { background-color: var(--navy); border-color: var(--navy); }
.page-link { color: var(--navy); }

/* Asset search dropdown */
#assetDropdown {
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  -webkit-box-shadow: var(--shadow-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  background: var(--surface);
}
#assetDropdown .list-group-item { font-size: .875rem; padding: 11px 14px; border: none; border-bottom: 1px solid var(--border); }
#assetDropdown .list-group-item:last-child { border-bottom: none; }

/* ── Auth page ── */
.auth-body {
  min-height: 100vh;
  background: #dce8f9;
  background: -webkit-linear-gradient(135deg, #dce8f9 0%, #f4f6f9 100%);
  background: linear-gradient(135deg, #dce8f9 0%, #f4f6f9 100%);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  padding: 24px 16px;
}
.auth-body .card {
  border: none;
  border-radius: var(--radius-xl);
  -webkit-box-shadow: var(--shadow-md);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 420px;
}
.captcha-box { border: 2px dashed var(--border) !important; }
.captcha-box:focus-within { border-color: var(--navy) !important; background: #eef3fb !important; }
.captcha-question { min-width: 110px; }
#captcha_answer::-webkit-inner-spin-button,
#captcha_answer::-webkit-outer-spin-button { -webkit-appearance: none; }
#captcha_answer { -moz-appearance: textfield; }

/* ── Misc ── */
altcha-widget { display: block; width: 100%; }

/* ── Fixed asset header bar (shows after asset selected, persists across steps) ── */
.ev-asset-header-bar {
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--topbar-h) + 60px); /* below topbar + progress bar */
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  -webkit-box-shadow: 0 2px 6px rgba(0,0,0,.04);
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.ev-asset-header-bar .ev-asset-card {
  margin-top: 0;
  border-radius: var(--radius-md);
}

/* ── Dot navigation — done dots are clickable ── */
.wiz-dot.done { cursor: pointer; }
.wiz-dot.done:hover {
  -webkit-box-shadow: 0 0 0 3px rgba(10,37,64,.22);
  box-shadow: 0 0 0 3px rgba(10,37,64,.22);
}
.wiz-dot.current { cursor: default; }

/* ── Photo block labels ── */
.wiz-photo-block-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Preview modal ── */
.prev-swal-popup {
  border-radius: var(--radius-xl) !important;
  overflow: hidden !important;
  max-height: 92dvh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
}

/* Navy header bar — matches .ev-topbar */
.prev-swal-title {
  padding: 0 !important;
  text-align: left !important;
  background: var(--navy) !important;
  flex-shrink: 0 !important;
}
.prev-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 18px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.01em;
}
.prev-modal-title::before {
  content: '';
  display: block;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.15);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px;
  flex-shrink: 0;
}
.prev-swal-body {
  flex: 1 1 auto !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

.wiz-preview-wrap {
  height: 72dvh;
  overflow-y: auto;
  padding: 16px 16px 0;
  -webkit-overflow-scrolling: touch;
}

/* sections — header row matches .wiz-step-header */
.prev-section { margin-bottom: 16px; }
.prev-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.prev-section-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--navy-ghost);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.prev-section-label {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -.01em;
}
.prev-edit-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--navy-ghost);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.prev-edit-btn:active { opacity: .8; transform: scale(.96); }

/* card — matches .ev-asset-card accent style */
.prev-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 2px 14px 2px;
  border: 1.5px solid var(--border);
  border-left: 3px solid var(--navy);
  box-shadow: var(--shadow-sm);
}
.prev-photos-card { padding: 10px 14px; }

/* rows */
.prev-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: .84rem;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.prev-row:last-child { border-bottom: none; }
.prev-row span:first-child { color: var(--text-2); flex-shrink: 0; }
.prev-row span:last-child  { color: var(--text-1); font-weight: 600; text-align: right; }

/* block row (long text wraps below label) */
.prev-row-block { flex-direction: column; align-items: flex-start; gap: 4px; }
.prev-row-block span:first-child { font-size: .75rem; }
.prev-row-block span:last-child  { text-align: left; font-weight: 400; color: var(--text-1); word-break: break-word; }

/* badges */
.prev-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.prev-badge-success { background: rgba(0,200,83,.13); color: #007a35; }
.prev-badge-warning { background: rgba(255,171,0,.15); color: #8a6400; }
.prev-badge-danger  { background: rgba(245,34,45,.12); color: #b5000b; }
.prev-badge-muted   { background: var(--border); color: var(--text-3); }

/* condition bar */
.prev-condition-bar {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin: 4px 0 8px;
}
.prev-condition-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .4s ease;
}

/* photo thumbnails */
.prev-photo-group { margin-bottom: 10px; }
.prev-photo-group:last-child { margin-bottom: 0; }
.prev-photo-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.prev-photo-count {
  background: var(--navy-ghost);
  color: var(--navy);
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
}
.prev-no-photo { font-size: .8rem; color: var(--text-3); }
.prev-thumb-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.prev-thumb {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .15s, border-color .15s;
}
.prev-thumb:active { transform: scale(.94); border-color: var(--navy); }

/* action bar — elevated, matches .wiz-actions */
.prev-action-bar {
  display: flex;
  gap: 10px;
  padding: 12px 16px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-up);
  position: sticky;
  bottom: 0;
}
.prev-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 14px 10px;
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .1s, box-shadow .15s;
  letter-spacing: -.01em;
}
.prev-btn:active { transform: scale(.97); opacity: .88; }
.prev-btn-submit {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 4px 14px rgba(10,37,64,.30);
}
.prev-btn-review {
  background: rgba(255,171,0,.12);
  color: #8a6400;
  border: 1.5px solid rgba(255,171,0,.4);
  box-shadow: 0 2px 8px rgba(255,171,0,.12);
}

/* image viewer (slide-up sheet) */
.prev-img-viewer {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.prev-img-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
}
.prev-img-viewer-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 12px 16px 28px;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.32,1,.23,1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.prev-img-viewer-sheet--open { transform: translateY(0); }
.prev-img-viewer-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  margin-bottom: 4px;
}
.prev-img-viewer-caption {
  font-size: .8rem;
  color: var(--text-2);
  text-align: center;
  word-break: break-all;
}
#prevImgFull {
  width: 100%;
  max-height: 55dvh;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.prev-img-viewer-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: var(--surface-2);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-2);
  cursor: pointer;
}
