/* ═══════════════════════════════════════════════════════════════
   REDAVI DESIGN SYSTEM — Bootstrap Override Layer
   Bootstrap provides the grid, utilities, base components.
   This file overrides Bootstrap defaults and adds custom components.
   ═══════════════════════════════════════════════════════════════ */

/* ─── DESIGN TOKENS ─── */
:root {
  /* Surface & Background */
  --bg-base: #F6F5F1;
  --bg-surface: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-nav: rgba(255, 255, 255, 0.82);
  --bg-nav-blur: saturate(180%) blur(20px);

  /* Text */
  --text-primary: #1A1A1A;
  --text-secondary: #6B6B6B;
  --text-tertiary: #9E9E9E;
  --text-inverse: #FFFFFF;

  /* Borders & Dividers */
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-medium: rgba(0, 0, 0, 0.10);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.05), 0 8px 32px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);

  /* Status Colors */
  --color-stock: #3D5AFE;
  --color-stock-soft: rgba(61, 90, 254, 0.08);
  --color-stock-mid: rgba(61, 90, 254, 0.15);

  --color-service: #F5850A;
  --color-service-soft: rgba(245, 133, 10, 0.08);
  --color-service-mid: rgba(245, 133, 10, 0.15);

  --color-sold: #0DAA6D;
  --color-sold-soft: rgba(13, 170, 109, 0.08);
  --color-sold-mid: rgba(13, 170, 109, 0.15);

  --color-disposed: #E8453C;
  --color-disposed-soft: rgba(232, 69, 60, 0.08);
  --color-disposed-mid: rgba(232, 69, 60, 0.15);

  /* Accent */
  --color-accent: #1A1A1A;
  --color-accent-hover: #333333;

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ─── Bootstrap Overrides ─── */
  --bs-body-font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --bs-body-font-size: 14px;
  --bs-body-color: #1A1A1A;
  --bs-body-bg: #F6F5F1;
  --bs-border-radius: 10px;
  --bs-border-radius-lg: 20px;
  --bs-border-radius-sm: 8px;
  --bs-border-color: rgba(0, 0, 0, 0.06);
  --bs-primary: #1A1A1A;
  --bs-primary-rgb: 26, 26, 26;
  --bs-link-color: #1A1A1A;
  --bs-link-hover-color: #333333;
}


/* ─── BASE OVERRIDES ─── */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

/* Subtle grain texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.3;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}


/* ─── TYPOGRAPHY ─── */
.font-display,
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
}

h1 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
}

h2 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.text-muted {
  color: var(--text-secondary) !important;
}

.text-tertiary {
  color: var(--text-tertiary);
}

small, .small {
  color: var(--text-tertiary);
}


/* ─── NAVBAR OVERRIDE ─── */
.navbar {
  background: var(--bg-nav);
  backdrop-filter: var(--bg-nav-blur);
  -webkit-backdrop-filter: var(--bg-nav-blur);
  border-bottom: 1px solid var(--border-subtle);
  padding-top: 0;
  padding-bottom: 0;
  min-height: 64px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  padding: 0;
}

.navbar-brand:hover {
  opacity: 0.85;
}

.navbar-logo {
  height: 32px;
  width: auto;
}

.auth-logo {
  height: 40px;
  width: auto;
}

.auth-heading {
  font-size: 28px;
}

.navbar-nav .nav-link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 450;
  padding: 7px 14px;
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.navbar-nav .nav-link.active {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.06);
  font-weight: 500;
}

.navbar-toggler {
  border: none;
  padding: 6px;
  box-shadow: none;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Avatar button in navbar */
.avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 5px 5px 14px;
  border: 1px solid var(--border-medium);
  border-radius: 9999px;
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.avatar-btn:hover {
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: var(--shadow-sm);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
}


/* ─── BUTTON OVERRIDES ─── */
.btn {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  border-radius: 9999px;
  transition: all 0.3s var(--ease-out-expo);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.5;
}

.btn-dark {
  background: var(--color-accent);
  border-color: var(--color-accent);
  padding: 10px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-dark:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.btn-outline-dark {
  padding: 10px 20px;
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.btn-outline-dark:hover {
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-danger {
  box-shadow: 0 2px 8px rgba(232, 69, 60, 0.2);
}

.btn-danger:hover {
  box-shadow: 0 4px 16px rgba(232, 69, 60, 0.3);
  transform: translateY(-1px);
}

.btn-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
}

.btn-link:hover {
  color: var(--text-primary);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}


/* ─── CARD OVERRIDES ─── */
.card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: none;
}

.card-elevated {
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.card-body {
  padding: 24px;
}


/* ─── FORM OVERRIDES ─── */
.form-control {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: all 0.2s ease;
}

.form-control:hover {
  border-color: rgba(0, 0, 0, 0.18);
}

.form-control:focus {
  border-color: var(--color-stock);
  box-shadow: 0 0 0 3px var(--color-stock-soft);
  color: var(--text-primary);
}

.form-control::placeholder {
  color: var(--text-tertiary);
}

.form-control-lg {
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 12px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-text {
  font-size: 12px;
  color: var(--text-tertiary);
}

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

.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.12);
  border-color: var(--color-accent);
}

.form-check-label {
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* Floating labels override */
.form-floating > .form-control {
  padding: 20px 14px 8px;
  height: auto;
  min-height: 52px;
}

.form-floating > label {
  padding: 14px 14px;
  color: var(--text-tertiary);
  font-size: 14px;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--text-secondary);
  transform: scale(0.8) translateY(-0.6rem) translateX(0.15rem);
}


/* ─── DROPDOWN OVERRIDES ─── */
.dropdown-menu {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  font-size: 14px;
}

.dropdown-item {
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--text-primary);
  transition: background 0.15s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

.dropdown-divider {
  border-color: var(--border-subtle);
  margin: 4px 0;
}


/* ─── LIST GROUP OVERRIDES ─── */
.list-group-item {
  border-color: var(--border-subtle);
  padding: 16px 24px;
  color: var(--text-primary);
  font-size: 14px;
  transition: background 0.2s ease;
}

.list-group-item:hover,
.list-group-item-action:hover {
  background: rgba(0, 0, 0, 0.015);
}

.list-group-flush > .list-group-item:last-child {
  border-bottom: 0;
}


/* ─── MODAL OVERRIDES ─── */
.modal-content {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08);
}

.modal-header {
  border-bottom: 1px solid var(--border-subtle);
  padding: 20px 24px;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 17px;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 16px 24px;
}

.modal-backdrop.show {
  opacity: 0.3;
}


/* ─── ALERT OVERRIDES ─── */
.alert {
  border-radius: var(--radius-md);
  border: none;
  font-size: 14px;
}


/* ─── TABLE OVERRIDES ─── */
.table {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 0;
}

.table > thead > tr > th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-medium);
  padding: 12px 16px;
  background: transparent;
}

.table > tbody > tr > td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.table > tbody > tr:last-child > td {
  border-bottom: none;
}

.table-hover > tbody > tr:hover > td {
  background: rgba(0, 0, 0, 0.015);
}


/* ═══════════════════════════════════════════════════════════════
   CUSTOM COMPONENTS (not in Bootstrap)
   ═══════════════════════════════════════════════════════════════ */

/* ─── PAGE HEADER ─── */
.page-header h1 {
  font-size: clamp(26px, 3.5vw, 34px);
}

.page-header p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 4px;
}


/* ─── STAT CARDS ─── */
.stat-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s var(--ease-out-expo);
}

.stat-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
  border-color: transparent;
}

.stat-card:active {
  transform: scale(0.98);
}

/* Top accent line */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.stat-card:hover::before { opacity: 1; }

.stat-card--stock::before  { background: var(--color-stock); }
.stat-card--service::before { background: var(--color-service); }
.stat-card--sold::before   { background: var(--color-sold); }
.stat-card--disposed::before { background: var(--color-disposed); }

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--ease-spring);
}

.stat-card:hover .stat-icon {
  transform: scale(1.08);
}

.stat-icon svg {
  width: 20px;
  height: 20px;
}

.stat-card--stock .stat-icon    { background: var(--color-stock-soft); color: var(--color-stock); }
.stat-card--service .stat-icon  { background: var(--color-service-soft); color: var(--color-service); }
.stat-card--sold .stat-icon     { background: var(--color-sold-soft); color: var(--color-sold); }
.stat-card--disposed .stat-icon { background: var(--color-disposed-soft); color: var(--color-disposed); }

.stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(36px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-primary);
}

.stat-label {
  font-size: 13.5px;
  color: var(--text-secondary);
  font-weight: 450;
  letter-spacing: 0.01em;
}


/* ─── BADGES (custom status) ─── */
.badge-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.badge-up      { background: var(--color-sold-soft); color: var(--color-sold); }
.badge-down    { background: var(--color-disposed-soft); color: var(--color-disposed); }
.badge-neutral { background: rgba(0, 0, 0, 0.04); color: var(--text-tertiary); }
.badge-info    { background: var(--color-stock-soft); color: var(--color-stock); }
.badge-warn    { background: var(--color-service-soft); color: var(--color-service); }


/* ─── ACTIVITY DOT ─── */
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.activity-dot--stock    { background: var(--color-stock); }
.activity-dot--service  { background: var(--color-service); }
.activity-dot--sold     { background: var(--color-sold); }
.activity-dot--disposed { background: var(--color-disposed); }


/* ─── SECTION DIVIDER ─── */
.section-divider h2 {
  font-size: 18px;
  margin: 0;
}


/* ─── EMPTY STATE ─── */
.empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--text-tertiary);
  opacity: 0.5;
}

.empty-state-title {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 600;
}


/* ─── AUTH PAGES ─── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
}

.auth-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-right {
  flex: 1;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px;
  position: relative;
  overflow: hidden;
}

.auth-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(61, 90, 254, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(13, 170, 109, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(245, 133, 10, 0.08) 0%, transparent 50%);
}

.auth-right-content {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.92);
  max-width: 400px;
}

.auth-brand-logo {
  height: 120px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 32px;
}

.auth-right-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  margin-bottom: 16px;
  line-height: 1.15;
}

.auth-right-content p {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

.auth-features {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.auth-features li .feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-features li .feature-icon svg {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.5);
}

/* OTP input */
.otp-input {
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.3em;
  padding-left: 0;
  padding-right: 0;
}

.otp-input::placeholder {
  letter-spacing: 0.3em;
  font-weight: 400;
  font-size: 24px;
  color: var(--text-tertiary);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 500;
  margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

@media (max-width: 991.98px) {
  .auth-wrapper {
    flex-direction: column;
  }

  .auth-right {
    display: none;
  }

  .auth-left {
    padding: 24px;
  }
}

@media (max-width: 575.98px) {
  .auth-left {
    padding: 20px 16px;
    align-items: flex-start;
    padding-top: 60px;
  }
}


/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
  opacity: 0;
  animation: fadeUp 0.6s var(--ease-out-expo) forwards;
}

.animate-fade-down {
  opacity: 0;
  animation: fadeDown 0.5s var(--ease-out-expo) forwards;
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.20s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.30s; }


/* ─── FOCUS STATES ─── */
button:focus-visible,
a:focus-visible,
.form-control:focus-visible {
  outline: 2px solid var(--color-stock);
  outline-offset: 2px;
}


/* ─── BATTERY BAR ─── */
.battery-bar {
  width: 48px;
  height: 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 9999px;
  overflow: hidden;
  flex-shrink: 0;
}

.battery-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: var(--color-sold);
  transition: width 0.4s var(--ease-out-expo);
}

.battery-bar-fill[data-health] {
  background: var(--color-sold);
}


/* ─── AUTOCOMPLETE DROPDOWN ─── */
.autocomplete-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 240px;
  overflow-y: auto;
  margin-top: 4px;
}

.autocomplete-item {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease;
}

.autocomplete-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.autocomplete-item:first-child {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.autocomplete-item:last-child {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}


/* ─── DEVICE STATUS NAV ─── */
.device-status-nav {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
}

.device-status-nav-items {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.device-status-nav-items::-webkit-scrollbar {
  display: none;
}

.device-status-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 450;
  color: var(--text-secondary);
  border-radius: 9999px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.device-status-nav-item:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.device-status-nav-item.active {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.06);
  font-weight: 500;
}

.device-status-nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.device-status-nav-dot--stock    { background: var(--color-stock); }
.device-status-nav-dot--service  { background: var(--color-service); }
.device-status-nav-dot--sold     { background: var(--color-sold); }
.device-status-nav-dot--disposed { background: var(--color-disposed); }


/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.12); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.2); }


/* ─── RESPONSIVE TWEAKS ─── */
@media (max-width: 575.98px) {
  .stat-card {
    padding: 22px 20px 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 0 16px;
    align-items: center;
  }

  .stat-card .d-flex:first-child {
    margin-bottom: 0;
    grid-row: 1 / 3;
    grid-column: 1;
  }

  .stat-card .badge-status {
    display: none;
  }

  .stat-number {
    font-size: 28px;
    grid-column: 2;
    grid-row: 1;
  }

  .stat-label {
    grid-column: 2;
    grid-row: 2;
  }
}

/* ─── WIZARD STEPS ─── */
.wizard-steps {
  gap: 0;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid var(--border-medium);
  color: var(--text-tertiary);
  background: var(--bg-surface);
  transition: all 0.3s var(--ease-out-expo);
}

.wizard-step.active .wizard-step-circle {
  background: var(--text-primary);
  color: var(--text-inverse);
  border-color: var(--text-primary);
}

.wizard-step.completed .wizard-step-circle {
  background: var(--color-sold);
  color: var(--text-inverse);
  border-color: var(--color-sold);
}

.wizard-step-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.wizard-step.active .wizard-step-label {
  color: var(--text-primary);
  font-weight: 600;
}

.wizard-step.completed .wizard-step-label {
  color: var(--color-sold);
}

.wizard-step-line {
  width: 40px;
  height: 2px;
  background: var(--border-medium);
  margin: 0 8px;
  transition: background 0.3s var(--ease-out-expo);
}

.wizard-step-line.completed {
  background: var(--color-sold);
}

/* ─── SIGNATURE PAD ─── */
.signature-pad-wrapper {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
  cursor: crosshair;
}

.signature-pad-canvas {
  display: block;
  touch-action: none;
}

/* ─── PDF PREVIEW ─── */
.pdf-preview {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f0f0f0;
  min-height: 300px;
}

.pdf-preview-iframe {
  width: 100%;
  height: 400px;
  border: none;
  display: block;
}
