/* ══════════════════════════════════════════════════════════════
   SANFER VOLVO — Design System v2.0
   Premium, modern UI with gradients, glassmorphism & animations
   ══════════════════════════════════════════════════════════════ */

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

/* ── Design Tokens ───────────────────────────────────────────── */
:root {
  /* Brand */
  --volvo-blue: #003057;
  --volvo-mid: #005287;
  --volvo-accent: #006cb7;
  --volvo-light: #e8f4f8;

  /* Surfaces */
  --bg: #f0f2f8;
  --bg-card: #ffffff;
  --bg-subtle: #f8f9fc;

  /* Text */
  --text-dark: #0f172a;
  --text-mid: #475569;
  --text-light: #94a3b8;
  --white: #ffffff;

  /* Borders */
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* Status */
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --info: #0369a1;
  --info-light: #e0f2fe;

  /* Layout */
  --sidebar-w: 260px;
  --header-h: 64px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
  --shadow: 0 2px 8px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 12px 32px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.12), 0 20px 60px rgba(0,0,0,.08);

  /* Radii */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --radius-full: 9999px;

  /* Transition */
  --ease: cubic-bezier(.4,0,.2,1);
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(16px) } to { opacity:1; transform:translateY(0) } }
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }
@keyframes scaleUp { from { transform:scale(.96); opacity:0 } to { transform:scale(1); opacity:1 } }
@keyframes slideIn { from { opacity:0; transform:translateX(20px) } to { opacity:1; transform:translateX(0) } }
@keyframes spin { from { transform:rotate(0deg) } to { transform:rotate(360deg) } }
@keyframes dot-pulse { 0%,100% { opacity:1 } 50% { opacity:.3 } }
@keyframes shimmer { 0% { background-position:-200% 0 } 100% { background-position:200% 0 } }

/* ══════════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(180deg, #001a33 0%, var(--volvo-blue) 50%, #002244 100%);
  position: fixed;
  left: 0; top: 0;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform .3s var(--ease);
}
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 900; opacity: 0; pointer-events: none; transition: opacity .3s;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { opacity: 1; pointer-events: all; }

.sidebar-brand {
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 14px;
}
.logo-sanfer { width: 100%; }
.sidebar-logo { width: 150px; height: 65px; flex-shrink: 0; }
.sidebar-brand-text { color: white; }
.sidebar-brand-text strong { display: block; font-size: .9rem; letter-spacing: .1em; }
.sidebar-brand-text span   { font-size: .72rem; opacity: .6; letter-spacing: .15em; }

/* Module tag */
.module-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.7);
  font-size: .63rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,.12);
}
.module-tag-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4db8ff; animation: dot-pulse 2s infinite; display: inline-block;
}

/* Nav items */
.nav-menu { padding: 14px 0; flex: 1; overflow-y: auto; }
.nav-section-label {
  font-size: .6rem; font-weight: 800; letter-spacing: .18em;
  color: rgba(255,255,255,.25); padding: 14px 22px 6px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 22px;
  color: rgba(255,255,255,.6); text-decoration: none; font-size: .84rem;
  font-weight: 500; transition: all .2s var(--ease); border-left: 3px solid transparent;
  margin: 1px 0;
}
.nav-item i { width: 20px; text-align: center; font-size: .9rem; flex-shrink: 0; }
.nav-item:hover { color: rgba(255,255,255,.95); background: rgba(255,255,255,.06); }
.nav-item.active {
  color: #fff; background: rgba(255,255,255,.1);
  border-left-color: #4db8ff; font-weight: 700;
}
.nav-badge {
  margin-left: auto; background: var(--volvo-accent); color: white;
  font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full);
}

/* Sidebar footer */
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.08); }
.user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #0369a1, #003057);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: .82rem; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,48,87,.3);
}
.user-details strong { display: block; font-size: .82rem; color: white; }
.user-details span   { font-size: .71rem; color: rgba(255,255,255,.45); }
.btn-logout {
  width: 100%; padding: 9px; background: rgba(255,255,255,.05); color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-xs);
  font-family: 'Montserrat', sans-serif; font-size: .78rem; cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-logout:hover { background: rgba(220,38,38,.15); color: #fca5a5; border-color: rgba(220,38,38,.25); }
.btn-logout svg { width: 15px; height: 15px; }

/* ══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left .3s;
  width: calc(100% - var(--sidebar-w));
  max-width: 100%;
  background: var(--bg);
}

/* Topbar */
.topbar {
  height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; padding: 0 28px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-xs);
}
.topbar-title {
  font-size: 1.1rem; font-weight: 800; color: var(--text-dark); flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Menu toggle */
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--text-mid); padding: 6px; border-radius: var(--radius-xs);
  transition: background .2s;
}
.menu-toggle:hover { background: var(--bg); }
.menu-toggle i { font-size: 1.15rem; }
.menu-toggle svg { width: 22px; height: 22px; }

/* Buttons */
.topbar-btn {
  padding: 8px 18px; border-radius: var(--radius-xs); font-family: 'Montserrat', sans-serif;
  font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .2s var(--ease);
  display: inline-flex; align-items: center; gap: 7px; border: none; text-decoration: none;
  white-space: nowrap;
}
.topbar-btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: linear-gradient(135deg, var(--volvo-accent), var(--volvo-mid));
  color: white; box-shadow: 0 2px 8px rgba(0,108,183,.25);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(0,108,183,.35); transform: translateY(-1px); }
.btn-secondary { background: var(--bg); color: var(--text-mid); border: 1.5px solid var(--border); }
.btn-secondary:hover { background: var(--border-light); border-color: var(--text-light); }

/* Module switcher */
.module-switcher {
  display: none; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 6px 14px; text-decoration: none;
  color: var(--text-mid); font-size: .78rem; font-weight: 600;
  transition: all .2s; cursor: pointer;
}
.module-switcher:hover { background: var(--volvo-light); color: var(--volvo-accent); border-color: var(--volvo-accent); }

/* Page content */
.page-content { padding: 28px; flex: 1; min-width: 0; }

/* ══════════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 10px;
}
.card-title {
  font-size: .92rem; font-weight: 700; color: var(--text-dark);
  display: flex; align-items: center; gap: 8px;
}

/* ══════════════════════════════════════════════════════════════
   STAT CARDS
   ══════════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s;
  animation: fadeUp .4s var(--ease) both;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1.15rem;
}
.stat-icon.blue   { background: rgba(0,108,183,.1); color: var(--volvo-accent); }
.stat-icon.green  { background: rgba(22,163,74,.1);  color: var(--success); }
.stat-icon.yellow { background: rgba(217,119,6,.1);   color: var(--warning); }
.stat-icon.red    { background: rgba(220,38,38,.1);   color: var(--danger); }
.stat-icon.purple { background: rgba(124,58,237,.1);  color: #7c3aed; }
.stat-icon svg { width: 22px; height: 22px; }
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text-dark); line-height: 1.1; }
.stat-label { font-size: .7rem; color: var(--text-light); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin-top: 3px; }
.stat-change { font-size: .74rem; color: var(--text-light); margin-top: 2px; font-weight: 500; }

/* ══════════════════════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════════════════════ */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.table-wrapper::-webkit-scrollbar { height: 6px; }
.table-wrapper::-webkit-scrollbar-track { background: var(--bg); border-radius: 3px; }
.table-wrapper::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.table-wrapper::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

table { width: 100%; border-collapse: collapse; font-size: .84rem; }
thead tr { border-bottom: 2px solid var(--border); }
th {
  text-align: left; padding: 12px 14px;
  font-size: .65rem; font-weight: 700; color: var(--text-light);
  letter-spacing: .07em; text-transform: uppercase;
  background: var(--bg-subtle); white-space: nowrap;
}
td {
  padding: 12px 14px; border-bottom: 1px solid var(--border-light);
  color: var(--text-mid); vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s var(--ease); }
tbody tr:hover { background: var(--bg-subtle); }

/* ══════════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: .72rem; font-weight: 700; white-space: nowrap;
}
.badge-blue   { background: rgba(0,108,183,.08);  color: var(--volvo-accent); }
.badge-green  { background: rgba(22,163,74,.08);  color: var(--success); }
.badge-yellow { background: rgba(217,119,6,.08);   color: var(--warning); }
.badge-red    { background: rgba(220,38,38,.08);   color: var(--danger); }
.badge-gray   { background: rgba(148,163,184,.1);  color: var(--text-light); }
.badge-purple { background: rgba(124,58,237,.08);  color: #7c3aed; }

/* ══════════════════════════════════════════════════════════════
   FORM CONTROLS
   ══════════════════════════════════════════════════════════════ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full-width { grid-column: 1 / -1; }
.modal > .form-grid,
.modal > .fgrid { padding: 20px 24px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: .76rem; font-weight: 600; color: var(--text-mid);
  letter-spacing: .04em;
}
.form-control {
  padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-xs);
  font-family: 'Montserrat', sans-serif; font-size: .875rem;
  color: var(--text-dark); background: var(--white);
  transition: border-color .2s, box-shadow .2s; outline: none; width: 100%;
}
.form-control:focus {
  border-color: var(--volvo-accent);
  box-shadow: 0 0 0 3px rgba(0,108,183,.08);
}
select.form-control { cursor: pointer; }

/* ══════════════════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════════════════ */
.hidden { display: none !important; }

/* ══════════════════════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px; backdrop-filter: blur(4px);
  animation: fadeIn .2s var(--ease);
}
.modal {
  background: var(--white); border-radius: 18px; padding: 0;
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: scaleUp .25s var(--ease);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  background: var(--bg-subtle); border-radius: 18px 18px 0 0;
}
.modal-title { font-size: 1.05rem; font-weight: 800; color: var(--text-dark); }
.modal-close {
  width: 34px; height: 34px; border-radius: var(--radius-xs); border: none;
  background: var(--bg); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light); transition: all .2s;
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); }
.modal-close svg { width: 16px; height: 16px; }
.modal-close i { font-size: 1rem; }
.modal-body {
  padding: 20px 24px;
}
.modal-footer {
  display: flex; gap: 12px; justify-content: flex-end;
  padding: 18px 24px; border-top: 1px solid var(--border);
  background: var(--bg-subtle); border-radius: 0 0 18px 18px;
}

/* ══════════════════════════════════════════════════════════════
   FILTERS BAR
   ══════════════════════════════════════════════════════════════ */
.filters-bar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
  flex-wrap: wrap; padding: 12px 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-xs);
}
.search-box { flex: 1; min-width: 200px; position: relative; }
.search-box svg, .search-box i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-light); font-size: .82rem;
  pointer-events: none;
}
.search-box input {
  width: 100%; padding: 9px 14px 9px 36px; border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); font-family: 'Montserrat', sans-serif; font-size: .84rem;
  background: var(--white); outline: none; transition: border-color .2s, box-shadow .2s;
}
.search-box input:focus { border-color: var(--volvo-accent); box-shadow: 0 0 0 3px rgba(0,108,183,.06); }
.filter-select {
  padding: 9px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-xs);
  font-family: 'Montserrat', sans-serif; font-size: .82rem; font-weight: 600;
  background: var(--white); outline: none; cursor: pointer; color: var(--text-mid);
  transition: border-color .2s;
}
.filter-select:focus { border-color: var(--volvo-accent); }

/* ══════════════════════════════════════════════════════════════
   ACTION BUTTONS (Small icon buttons)
   ══════════════════════════════════════════════════════════════ */
.action-btn {
  padding: 6px 8px; border-radius: 6px; border: none; cursor: pointer;
  transition: all .15s; background: transparent; color: var(--text-light);
  display: inline-flex; align-items: center;
}
.action-btn svg { width: 16px; height: 16px; }
.action-btn:hover { background: var(--bg); color: var(--text-dark); }
.action-btn.danger:hover { background: var(--danger-light); color: var(--danger); }

/* ══════════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════════ */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 0; font-size: .82rem; color: var(--text-light);
  flex-wrap: wrap; gap: 10px;
}
.pg-btn {
  width: 32px; height: 32px; border-radius: var(--radius-xs); border: 1px solid var(--border);
  background: var(--white); cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-family: 'Montserrat', sans-serif; color: var(--text-mid); transition: all .15s;
}
.pg-btn:hover, .pg-btn.active {
  background: var(--volvo-accent); border-color: var(--volvo-accent); color: white;
}

/* ══════════════════════════════════════════════════════════════
   TOASTS
   ══════════════════════════════════════════════════════════════ */
.toast-container { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; }
.toast {
  background: var(--text-dark); color: white; padding: 13px 20px; border-radius: var(--radius-sm);
  font-size: .84rem; font-weight: 500;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
  animation: slideIn .3s var(--ease); max-width: 360px;
}
.toast.success { background: linear-gradient(135deg, #065f46, #059669); }
.toast.error   { background: linear-gradient(135deg, #991b1b, #dc2626); }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }

.hidden { display: none !important; }

/* ══════════════════════════════════════════════════════════════
   CONFIRM MODAL (Delete confirmation)
   ══════════════════════════════════════════════════════════════ */
.confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000; padding: 20px;
  backdrop-filter: blur(4px);
  animation: fadeIn .2s var(--ease);
}
.confirm-box {
  background: var(--white); border-radius: 18px; padding: 36px;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: scaleUp .25s var(--ease);
}
.confirm-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.confirm-icon svg { width: 32px; height: 32px; }
.confirm-icon.danger  { background: var(--danger-light); color: var(--danger); }
.confirm-icon.warning { background: var(--warning-light); color: var(--warning); }
.confirm-title { font-size: 1.2rem; font-weight: 800; color: var(--text-dark); margin-bottom: 10px; }
.confirm-msg { font-size: .875rem; color: var(--text-mid); margin-bottom: 28px; line-height: 1.5; }
.confirm-btns { display: flex; gap: 12px; justify-content: center; }
.confirm-btns button {
  padding: 10px 20px; border-radius: var(--radius-xs);
  font-family: 'Montserrat', sans-serif; font-size: .875rem;
  font-weight: 600; cursor: pointer; transition: all .2s; flex: 1;
}
.btn-cancel {
  background: var(--bg); color: var(--text-mid); border: 1.5px solid var(--border);
}
.btn-cancel:hover { background: var(--border-light); color: var(--text-dark); }
.btn-confirm-danger {
  background: var(--danger); color: var(--white); border: 1.5px solid var(--danger);
}
.btn-confirm-danger:hover { background: #b91c1c; border-color: #b91c1c; }

/* ══════════════════════════════════════════════════════════════
   IMPORTAR CSV
   ══════════════════════════════════════════════════════════════ */
.drop-zone {
  border: 2.5px dashed var(--border); border-radius: var(--radius);
  padding: 60px 32px; text-align: center; cursor: pointer;
  transition: all .25s; background: var(--bg-subtle); position: relative;
}
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--volvo-accent); background: var(--volvo-light); }
.drop-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop-icon {
  width: 56px; height: 56px; background: rgba(0,108,183,.1); border-radius: 14px;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; color: var(--volvo-accent);
}
.drop-icon svg { width: 28px; height: 28px; }
.drop-title { font-size: 1rem; font-weight: 700; color: var(--text-dark); }
.drop-sub   { font-size: .82rem; color: var(--text-light); margin-top: 6px; }
.drop-btn {
  display: inline-block; margin-top: 18px; padding: 9px 22px; border-radius: var(--radius-xs);
  background: linear-gradient(135deg, var(--volvo-accent), var(--volvo-mid));
  color: white; font-family: 'Montserrat', sans-serif;
  font-size: .82rem; font-weight: 600; border: none; cursor: pointer; pointer-events: none;
}

/* Steps */
.steps { display: flex; gap: 0; margin-bottom: 28px; }
.step {
  flex: 1; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border);
}
.step:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.step:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.step + .step { border-left: none; }
.step-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--border); color: var(--text-light);
  display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; flex-shrink: 0;
}
.step.active .step-num { background: var(--volvo-accent); color: white; }
.step.done .step-num   { background: var(--success); color: white; }
.step-label { font-size: .78rem; font-weight: 600; color: var(--text-light); }
.step.active .step-label, .step.done .step-label { color: var(--text-dark); }

/* Progress bar */
.progress-wrap { background: var(--border); border-radius: var(--radius-full); height: 8px; overflow: hidden; margin-top: 8px; }
.progress-bar  { height: 100%; background: linear-gradient(90deg, var(--volvo-accent), var(--success)); border-radius: var(--radius-full); transition: width .3s; width: 0%; }

/* Mapping chips */
.mapping-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.map-chip {
  display: flex; align-items: center; gap: 8px; background: var(--bg-subtle);
  border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 7px 12px; font-size: .78rem;
}
.map-chip .arrow { color: var(--text-light); font-size: .7rem; }
.chip-from { font-weight: 700; font-family: monospace; color: var(--text-mid); }

/* Preview table */
.preview-table { width: 100%; white-space: normal; table-layout: auto; }
.preview-table th, .preview-table td { font-size: .72rem; padding: 6px; word-wrap: break-word; }
.preview-table .col-estado { min-width: 90px; }
.preview-table .col-om { font-family: monospace; }
.row-skip { opacity: .45; background: #fff8f8 !important; }
.row-skip td { text-decoration: line-through; }
.err-row  { background: rgba(220,38,38,.03) !important; }
.err-row  td:first-child { border-left: 3px solid var(--danger); }
.warn-row td:first-child { border-left: 3px solid var(--warning); }

/* Result box */
.result-box { border-radius: var(--radius); padding: 18px 22px; display: flex; align-items: center; gap: 14px; }
.result-box.ok   { background: rgba(22,163,74,.06); border: 1px solid rgba(22,163,74,.2); }
.result-box.warn { background: rgba(217,119,6,.06); border: 1px solid rgba(217,119,6,.2); }
.result-box svg  { width: 28px; height: 28px; flex-shrink: 0; }
.result-box.ok svg   { color: var(--success); }
.result-box.warn svg { color: var(--warning); }

/* ══════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════ */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 16px; opacity: .3; }
.empty-state i { font-size: 2.5rem; margin-bottom: 12px; opacity: .15; display: block; }
.empty-state p { font-size: .88rem; font-weight: 500; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; width: 100% !important; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .topbar { padding: 0 16px; }
  .topbar-title { font-size: 1rem; }
  .page-content { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .modal { padding: 0; width: 95%; max-height: 85vh; }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .search-box { width: 100%; min-width: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .topbar-btn span { display: none; }
  .topbar-btn { padding: 8px 10px; }
  .stats-grid { grid-template-columns: 1fr; }
  .pagination { justify-content: center; text-align: center; }
  .card { border-radius: var(--radius-sm); }
  .stat-value { font-size: 1.2rem; }
}
