/* =============================================
   FAR Verify — Professional Audit Theme
   Deep Navy × Muted Gold  (Module 6)
   ============================================= */

/* ── Design Tokens ───────────────────────────── */
:root {
  /* Core palette */
  --primary:        #1B2A4A;   /* deep navy        */
  --primary-light:  #243860;   /* medium navy      */
  --primary-dark:   #0F1E35;   /* darkest navy     */
  --accent:         #C8973A;   /* muted gold       */
  --accent-light:   #DBA84E;   /* lighter gold     */
  --accent-dark:    #A67B2C;   /* darker gold      */

  /* Semantic */
  --success:  #059669;
  --warning:  #D97706;
  --danger:   #DC2626;
  --info:     #0284C7;

  /* Surface */
  --bg:         #EEF1F6;
  --card-bg:    #FFFFFF;
  --text:       #1A2332;
  --text-muted: #5C6B7E;
  --border:     #D3D9E4;

  /* Sidebar (light) */
  --sidebar-bg:           #FFFFFF;
  --sidebar-text:         #5A6E8A;
  --sidebar-active:       #C8973A;
  --sidebar-title-color:  #1B2A4A;
  --sidebar-border:       #D3D9E4;
  --sidebar-hover-bg:     rgba(27,42,74,0.05);
  --sidebar-hover-color:  #1B2A4A;
  --sidebar-active-color: #1B2A4A;
  --sidebar-active-bg:    rgba(200,151,58,0.10);

  /* Geometry */
  --sidebar-w:  240px;
  --topbar-h:   56px;
  --radius:     10px;
  --radius-sm:  6px;

  /* Shadows (navy-tinted, not pure black) */
  --shadow:    0 1px 3px rgba(27,42,74,0.09), 0 1px 2px rgba(27,42,74,0.05);
  --shadow-md: 0 4px 12px rgba(27,42,74,0.12), 0 2px 4px rgba(27,42,74,0.06);
  --shadow-lg: 0 10px 28px rgba(27,42,74,0.15), 0 4px 8px rgba(27,42,74,0.07);
}

[data-theme="dark"] {
  --bg:         #0F172A;
  --card-bg:    #1A2640;
  --text:       #E4EAF4;
  --text-muted: #8394AA;
  --border:     #2A3A54;
  /* Sidebar (dark) */
  --sidebar-bg:           #090F1D;
  --sidebar-text:         rgba(255,255,255,0.68);
  --sidebar-title-color:  #ffffff;
  --sidebar-border:       rgba(255,255,255,0.07);
  --sidebar-hover-bg:     rgba(255,255,255,0.09);
  --sidebar-hover-color:  rgba(255,255,255,0.95);
  --sidebar-active-color: #E8B84C;
  --sidebar-active-bg:    rgba(200,151,58,0.18);
}

/* ── Base ─────────────────────────────────────── */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont,
               'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  font-size: 0.9rem;
  -webkit-font-smoothing: antialiased;
}

/* ── Bootstrap Color Overrides ────────────────── */
/* Hijack Bootstrap's default blue with our navy+gold palette */
.btn-primary               { background-color: var(--primary)       !important; border-color: var(--primary)       !important; color: #fff !important; }
.btn-primary:hover         { background-color: var(--primary-light)  !important; border-color: var(--primary-light)  !important; }
.btn-primary:focus,
.btn-primary:active        { background-color: var(--primary-dark)   !important; border-color: var(--primary-dark)   !important;
                             box-shadow: 0 0 0 .25rem rgba(27,42,74,.25) !important; }
.btn-outline-primary       { color: var(--primary) !important; border-color: var(--primary) !important; }
.btn-outline-primary:hover { background-color: var(--primary) !important; color: #fff !important; }

.bg-primary                { background-color: var(--primary) !important; }
.text-primary              { color: var(--primary) !important; }
.border-primary            { border-color: var(--primary) !important; }
.badge.bg-primary          { background-color: var(--primary) !important; }

.alert-info  { background-color: rgba(27,42,74,.07); border-color: rgba(27,42,74,.18);
               color: var(--primary-light); }
.alert-info .alert-link { color: var(--primary-dark); }

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-light) !important;
  box-shadow: 0 0 0 0.2rem rgba(27,42,74,.15) !important;
}

/* Gold accent utility (use where appropriate) */
.btn-accent               { background: var(--accent); color: #fff; border: 1px solid var(--accent); font-weight: 600; }
.btn-accent:hover         { background: var(--accent-light); border-color: var(--accent-light); color: #fff; }
.btn-accent:active        { background: var(--accent-dark);  border-color: var(--accent-dark);  color: #fff; }
.text-accent              { color: var(--accent) !important; }
.bg-accent                { background: var(--accent) !important; }


/* ══════════════════════════════════════════════
   LOGIN
   ══════════════════════════════════════════════ */
.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #060E1C 0%, #0F1E35 45%, #1B2A4A 100%);
  position: relative; overflow: hidden;
}
/* Subtle radial highlight for depth */
.login-screen::before {
  content: ""; position: absolute; top: -20%; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,151,58,.12) 0%, transparent 70%);
  pointer-events: none;
}

.login-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%; max-width: 420px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.05);
  position: relative; z-index: 1;
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo i {
  font-size: 3rem;
  color: var(--accent);
  filter: drop-shadow(0 2px 8px rgba(200,151,58,0.35));
}
.login-logo h2 {
  margin: 0.6rem 0 0.25rem;
  color: var(--primary);
  font-weight: 700; font-size: 1.75rem; letter-spacing: -0.02em;
}
.login-logo p { color: var(--text-muted); margin: 0; font-size: 0.85rem; }


/* ══════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════ */
#mainApp { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ──────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex; flex-direction: column;
  height: 100vh; overflow-y: auto; overflow-x: hidden;
  flex-shrink: 0; transition: transform 0.25s ease;
  position: fixed; left: 0; top: 0; z-index: 100;
  border-right: 1px solid var(--sidebar-border);
  box-shadow: 2px 0 8px rgba(27,42,74,0.06);
}
.sidebar-header {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-header .brand-icon {
  font-size: 1.4rem;
  color: var(--accent);
  filter: drop-shadow(0 1px 4px rgba(200,151,58,0.5));
  flex-shrink: 0;
}
.sidebar-title {
  font-weight: 700; font-size: 1.05rem;
  color: var(--sidebar-title-color); letter-spacing: -0.01em;
}

.project-select {
  background: var(--bg) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  font-size: 0.8rem; border-radius: var(--radius-sm) !important;
}
.project-select option { background: var(--card-bg); color: var(--text); }

.sidebar-nav { padding: 6px; list-style: none; margin: 0; flex: 1; }
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 0.855rem; font-weight: 500;
  transition: all 0.14s;
  cursor: pointer; text-decoration: none;
  margin-bottom: 1px; position: relative;
}
.sidebar-nav .nav-link i {
  font-size: 1.05rem; width: 20px; text-align: center; flex-shrink: 0;
}
.sidebar-nav .nav-link:hover {
  background: var(--sidebar-hover-bg);
  color: var(--sidebar-hover-color);
}
/* Gold left-bar active state */
.sidebar-nav .nav-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-color);
  font-weight: 600;
}
.sidebar-nav .nav-link.active::before {
  content: "";
  position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.sidebar-footer {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--sidebar-border);
  margin-top: auto;
}
.user-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; color: var(--sidebar-text); }
.user-info > div { min-width: 0; }
.user-info .fw-semibold { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--sidebar-title-color); }

/* ── Main content ─────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w); flex: 1;
  display: flex; flex-direction: column;
  height: 100vh; overflow: hidden;
}

/* ── Topbar ───────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 1.5rem; gap: 12px; flex-shrink: 0;
  box-shadow: 0 1px 0 var(--border), 0 2px 8px rgba(27,42,74,0.05);
}
/* Thin gold accent stripe at top of topbar */
.topbar::before {
  content: "";
  position: absolute; left: var(--sidebar-w); right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  pointer-events: none;
}
.topbar { position: relative; }
.topbar-title {
  font-weight: 700; font-size: 1rem;
  color: var(--primary); letter-spacing: -0.01em;
}

/* ── Page content ─────────────────────────────── */
.page-content { flex: 1; overflow-y: auto; padding: 1.5rem; }


/* ══════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 1.2rem;
  font-weight: 600; font-size: 0.9rem;
  color: var(--primary);
}

/* ── Stat cards ───────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: default;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  position: relative; overflow: hidden;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card .icon {
  width: 46px; height: 46px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; flex-shrink: 0;
}
.stat-card .value {
  font-size: clamp(1.05rem, 2.8vw, 1.85rem);
  font-weight: 700; line-height: 1.15;
  margin: 0.5rem 0 0.2rem;
  word-break: break-word; overflow-wrap: break-word; min-width: 0;
}
.stat-card .label {
  font-size: 0.75rem; color: var(--text-muted);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
}
.stat-card .sub { font-size: 0.72rem; color: var(--text-muted); }

/* Drillable stat cards */
.stat-card-drillable { cursor: pointer; }
.stat-card-drillable::after {
  content: "View details \2192";
  position: absolute; bottom: 8px; right: 12px;
  font-size: 0.65rem; color: var(--accent);
  opacity: 0; transition: opacity 0.2s;
}
.stat-card-drillable:hover::after { opacity: 1; }
.stat-card-drillable:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }

/* Drillable table rows and list items */
.drill-row { cursor: pointer; transition: background 0.12s; }
.asset-table tbody tr.drill-row:hover { background: rgba(200,151,58,0.06) !important; }
.scan-history-item.drill-row:hover { background: rgba(200,151,58,0.06); border-radius: 6px; }

/* Tag Printing page — asset list rows */
.tp-asset-row { transition: background 0.1s; }
.tp-asset-row:hover { background: rgba(200,151,58,0.06); }
.tp-asset-row:has(.tp-chk:checked) { background: rgba(27,42,74,0.05); }


/* ══════════════════════════════════════════════
   VERIFY SCREEN
   ══════════════════════════════════════════════ */
.scan-input-wrapper {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-radius: 14px; padding: 1.4rem; margin-bottom: 1.5rem;
}
.scan-input {
  font-size: 1.5rem !important; font-weight: 700 !important;
  text-align: center; letter-spacing: 4px;
  border: 3px solid rgba(255,255,255,0.45) !important;
  background: rgba(255,255,255,0.96) !important;
  border-radius: 10px !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.scan-input:focus {
  border-color: white !important;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.25) !important;
}
.scan-input.found    { border-color: #34D399 !important; box-shadow: 0 0 0 4px rgba(52,211,153,0.3) !important; }
.scan-input.not-found { border-color: #F87171 !important; box-shadow: 0 0 0 4px rgba(248,113,113,0.3) !important; }

.asset-card {
  background: var(--card-bg); border-radius: var(--radius);
  border: 2px solid var(--border); padding: 1.2rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.asset-card.verified-card { border-color: var(--success); }
.asset-card.warning-card  { border-color: var(--warning); }

/* Status grid */
.status-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.status-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 12px 8px; border-radius: 10px; border: 2px solid transparent;
  cursor: pointer; transition: all 0.15s;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--card-bg);
}
.status-btn i { font-size: 1.35rem; }
.status-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.status-btn.s-verified    { color: #059669; background: #D1FAE5; border-color: #6EE7B7; }
.status-btn.s-not_found   { color: #DC2626; background: #FEE2E2; border-color: #FCA5A5; }
.status-btn.s-damaged     { color: #D97706; background: #FEF3C7; border-color: #FDE68A; }
.status-btn.s-shifted     { color: #B45309; background: #FEF9C3; border-color: #FDE047; }
.status-btn.s-duplicate   { color: #7C3AED; background: #EDE9FE; border-color: #C4B5FD; }
.status-btn.s-new_asset   { color: #1D4ED8; background: #DBEAFE; border-color: #93C5FD; }
.status-btn.s-under_repair { color: #0891B2; background: #CFFAFE; border-color: #67E8F9; }
.status-btn.s-scrapped    { color: #9F1239; background: #FFE4E6; border-color: #FDA4AF; }


/* ══════════════════════════════════════════════
   ASSET TABLE
   ══════════════════════════════════════════════ */
.asset-table-wrapper { overflow-x: auto; border-radius: var(--radius); }
.asset-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.asset-table thead th {
  background: var(--primary);
  color: rgba(255,255,255,0.92);
  padding: 10px 12px;
  font-weight: 600; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.asset-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
.asset-table tbody tr:hover { background: rgba(27,42,74,0.04); }
.asset-table tbody td { padding: 8px 10px; vertical-align: middle; }

/* Sortable column headers */
.asset-table thead th.sortable-th { cursor: pointer; user-select: none; color: rgba(255,255,255,0.9); }
.asset-table thead th.sortable-th:hover { background: var(--primary-light); color: white; }
.sort-ind        { font-size: 0.7rem; margin-left: 4px; color: rgba(255,255,255,0.38) !important; }
.sort-ind.active { color: var(--accent) !important; }   /* gold arrow on active sort column */

/* Status badges */
.badge-status {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.bs-verified    { background: #D1FAE5; color: #065F46; }
.bs-not_found   { background: #FEE2E2; color: #991B1B; }
.bs-damaged     { background: #FEF3C7; color: #92400E; }
.bs-shifted     { background: #FEF9C3; color: #78350F; }
.bs-duplicate   { background: #EDE9FE; color: #4C1D95; }
.bs-new_asset   { background: #DBEAFE; color: #1E40AF; }
.bs-under_repair { background: #CFFAFE; color: #155E75; }
.bs-scrapped    { background: #FFE4E6; color: #9F1239; }
.bs-pending     { background: #EEF1F6; color: #4A5568; }


/* ══════════════════════════════════════════════
   IMPORT
   ══════════════════════════════════════════════ */
.drop-zone {
  border: 2px dashed var(--primary-light);
  border-radius: 14px; padding: 3rem 2rem;
  text-align: center; cursor: pointer;
  transition: all 0.2s; background: rgba(27,42,74,0.03);
}
.drop-zone:hover, .drop-zone.drag-over {
  background: rgba(27,42,74,0.07);
  border-color: var(--primary);
}
.drop-zone i { font-size: 2.75rem; color: var(--primary-light); }
.drop-zone .drop-text {
  font-size: 1.05rem; font-weight: 600; color: var(--text);
  margin: 0.75rem 0 0.25rem;
}
.drop-zone .drop-sub { color: var(--text-muted); font-size: 0.875rem; }

.mapping-table { font-size: 0.8rem; }
.mapping-table select { font-size: 0.8rem; }


/* ══════════════════════════════════════════════
   PHOTO UPLOAD
   ══════════════════════════════════════════════ */
.photo-preview-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.photo-thumb {
  width: 80px; height: 80px; border-radius: 8px; object-fit: cover;
  border: 2px solid var(--border); cursor: pointer; transition: transform 0.15s;
}
.photo-thumb:hover { transform: scale(1.06); }
.photo-thumb-wrapper { position: relative; display: inline-block; }
.photo-thumb-remove {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; padding: 0;
  font-size: 0.72rem; line-height: 20px; text-align: center;
  border-radius: 50%; border: none;
  background: var(--danger); color: white; cursor: pointer;
}
.photo-thumb-remove:hover { background: #B91C1C; }


/* ══════════════════════════════════════════════
   CAMERA VIEWFINDER + SCAN LINE
   ══════════════════════════════════════════════ */
.camera-viewfinder { position: relative; border-radius: 8px; overflow: hidden; }
.scan-line {
  position: absolute; left: 5%; right: 5%; height: 2px;
  background: rgba(0,255,100,0.85);
  box-shadow: 0 0 8px rgba(0,255,100,0.6);
  animation: scan-move 2s linear infinite;
  pointer-events: none;
}
@keyframes scan-move {
  0%   { top: 10%; }
  50%  { top: 85%; }
  100% { top: 10%; }
}
.camera-corner {
  position: absolute; width: 22px; height: 22px; pointer-events: none;
  border-color: rgba(0,255,100,0.85); border-style: solid;
}
.camera-corner.tl { top: 6px; left: 6px;  border-width: 3px 0 0 3px; }
.camera-corner.tr { top: 6px; right: 6px; border-width: 3px 3px 0 0; }
.camera-corner.bl { bottom: 6px; left: 6px;  border-width: 0 0 3px 3px; }
.camera-corner.br { bottom: 6px; right: 6px; border-width: 0 3px 3px 0; }


/* ══════════════════════════════════════════════
   GPS BADGE
   ══════════════════════════════════════════════ */
.gps-badge {
  font-size: 0.72rem; padding: 2px 9px;
  border-radius: 20px; display: inline-flex; align-items: center; gap: 4px;
}
.gps-badge.active  { background: #D1FAE5; color: #065F46; }
.gps-badge.pending { background: #FEF3C7; color: #92400E; }
.gps-badge.denied  { background: #FEE2E2; color: #991B1B; }
.gps-badge.unavail { background: #EEF1F6; color: #5C6B7E; }


/* ══════════════════════════════════════════════
   PROGRESS
   ══════════════════════════════════════════════ */
.progress { height: 10px; border-radius: 20px; }
.progress-bar { border-radius: 20px; transition: width 0.6s ease; }


/* ══════════════════════════════════════════════
   SCAN HISTORY
   ══════════════════════════════════════════════ */
.scan-history-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--card-bg);
  font-size: 0.8rem; margin-bottom: 6px;
}


/* ══════════════════════════════════════════════
   CHARTS
   ══════════════════════════════════════════════ */
.chart-container { position: relative; }


/* ══════════════════════════════════════════════
   SEARCH BAR
   ══════════════════════════════════════════════ */
.search-bar { position: relative; }
.search-bar input { padding-left: 2.5rem !important; border-radius: 8px !important; }
.search-bar .search-icon {
  position: absolute; left: 0.75rem; top: 50%;
  transform: translateY(-50%); color: var(--text-muted); pointer-events: none;
}


/* ══════════════════════════════════════════════
   OFFLINE BANNER
   ══════════════════════════════════════════════ */
.offline-banner {
  background: #FEF3C7; color: #92400E;
  padding: 8px 16px; display: flex; align-items: center;
  gap: 8px; font-size: 0.85rem; font-weight: 500;
}


/* ══════════════════════════════════════════════
   TEAMS
   ══════════════════════════════════════════════ */
.team-card {
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--card-bg); padding: 1.2rem; box-shadow: var(--shadow);
}
.team-card .team-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 0.75rem;
}
.team-card .team-name { font-weight: 700; font-size: 0.975rem; color: var(--primary); }
.team-members-list { display: flex; flex-wrap: wrap; gap: 4px; }
.member-badge {
  background: rgba(200,151,58,0.12);
  color: var(--accent-dark);
  border: 1px solid rgba(200,151,58,0.25);
  padding: 2px 8px; border-radius: 12px;
  font-size: 0.73rem; font-weight: 500;
}


/* ══════════════════════════════════════════════
   DARK MODE ADJUSTMENTS
   ══════════════════════════════════════════════ */
[data-theme="dark"] .login-card { background: #1A2640; color: var(--text); }
[data-theme="dark"] .topbar     { box-shadow: 0 1px 0 var(--border); }
[data-theme="dark"] .topbar::before { opacity: 0.6; }

[data-theme="dark"] .status-btn.s-verified    { background: #064E3B; border-color: #065F46; }
[data-theme="dark"] .status-btn.s-not_found   { background: #7F1D1D; border-color: #991B1B; }
[data-theme="dark"] .status-btn.s-damaged     { background: #78350F; border-color: #92400E; }
[data-theme="dark"] .status-btn.s-shifted     { background: #78350F; border-color: #B45309; }
[data-theme="dark"] .status-btn.s-duplicate   { background: #2E1065; border-color: #4C1D95; }
[data-theme="dark"] .status-btn.s-new_asset   { background: #1E3A8A; border-color: #1D4ED8; }
[data-theme="dark"] .status-btn.s-under_repair { background: #164E63; border-color: #155E75; }
[data-theme="dark"] .status-btn.s-scrapped    { background: #4C0519; border-color: #9F1239; }
[data-theme="dark"] .asset-table thead th     { background: #0F1E35; }
[data-theme="dark"] .drop-zone { border-color: var(--primary-light); background: rgba(27,42,74,0.12); }
[data-theme="dark"] .bs-pending { background: #1E293B; color: #94A3B8; }


/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 991px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-240px); width: 240px; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar::before { left: 0; }
  .status-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 576px) {
  .status-grid { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding: 1rem; }
  .stat-card .value { font-size: clamp(0.9rem, 5vw, 1.4rem); }
}


/* ══════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════ */
.cursor-pointer  { cursor: pointer; }
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.border-start-4  { border-left-width: 4px !important; }
.hover-shadow:hover { box-shadow: var(--shadow-md) !important; }

.table-scroll { max-height: 500px; overflow-y: auto; }
.sticky-col   { position: sticky; left: 0; background: var(--card-bg); z-index: 1; }

/* Animations */
.rotate-on-load { animation: fadeInUp 0.28s ease; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spinning { display: inline-block; animation: spin 0.8s linear infinite; }
.pulse { animation: pulse 1.5s infinite; }
