/* =============================================================================
   SeguRent Admin — Design System v2.1 (Tailwind-inspired refresh)
   Carga DESPUÉS de style.css. Capa agresiva con !important para vencer
   los miles de style="..." inline que tienen los js/pages/*.js.
   ============================================================================= */

:root {
  /* Marca */
  --brand-900: #1a1233;
  --brand-800: #231942;
  --brand-700: #2d1f5e;
  --brand-100: #ede9f4;
  --brand-50:  #f6f3fb;

  --mint-600: #5ec3b5;
  --mint-500: #7ED4C8;
  --mint-400: #9addd2;
  --mint-100: #d5f2ee;
  --mint-50:  #ecfaf7;

  /* Neutrals (slate) */
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Tokens semánticos */
  --primary:        var(--brand-800);
  --primary-hover:  var(--brand-900);
  --primary-light:  var(--brand-100);
  --accent:         var(--mint-500);
  --accent-hover:   var(--mint-600);

  --bg:        #eef1f6;
  --bg-soft:   var(--slate-50);
  --surface:   #ffffff;
  --surface-2: var(--slate-50);
  --border:    var(--slate-200);
  --border-strong: var(--slate-300);

  --text:        var(--slate-800);
  --text-muted:  var(--slate-500);
  --text-light:  var(--slate-400);
  --text-on-primary: #ffffff;

  --success:        #10b981;
  --success-light:  #d1fae5;
  --warning:        #f59e0b;
  --warning-light:  #fef3c7;
  --danger:         #ef4444;
  --danger-light:   #fee2e2;
  --info:           #0ea5e9;
  --info-light:     #e0f2fe;

  --sidebar-bg:     var(--brand-800);
  --sidebar-text:   #cbc4dc;
  --sidebar-active: var(--mint-500);

  /* Radii */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Sombras suaves */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05), 0 1px 1px 0 rgba(15, 23, 42, 0.03);
  --shadow:    0 1px 3px 0 rgba(15, 23, 42, 0.07), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.10), 0 8px 10px -6px rgba(15, 23, 42, 0.05);

  --ring:      0 0 0 3px rgba(35, 25, 66, 0.15);
  --ring-mint: 0 0 0 3px rgba(126, 212, 200, 0.30);

  /* Tipografía */
  --font-sans: 'Inter', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Inconsolata', ui-monospace, SFMono-Regular, monospace;

  /* Compat (algunos JS los usan) */
  --bg-card:  var(--surface);
  --bg-hover: var(--slate-50);
}

/* ── Base / typography ───────────────────────────────────────────────────── */
html, body {
  font-family: var(--font-sans) !important;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(126,212,200,0.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(45,31,94,0.05), transparent 60%),
    var(--bg);
  color: var(--text);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--slate-900);
  letter-spacing: -0.02em;
  font-weight: 700;
}

::selection { background: var(--brand-100); color: var(--brand-900); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--slate-400); background-clip: padding-box; border: 2px solid transparent; }

/* ── Login ─────────────────────────────────────────────────────────────────── */
.login-container {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(126,212,200,0.18), transparent 60%),
    radial-gradient(800px 500px at 110% 110%, rgba(45,31,94,0.55), transparent 60%),
    linear-gradient(135deg, #150E28 0%, var(--brand-800) 55%, var(--brand-700) 100%);
}
.login-card {
  border-radius: var(--radius-xl);
  padding: 44px 36px;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255,255,255,0.06);
}
.login-logo h1 { letter-spacing: 0.5px; font-size: 26px; }
.login-logo p { color: var(--text-muted); }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar {
  width: 256px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 240px),
    linear-gradient(180deg, var(--brand-800), var(--brand-900));
  border-right: 1px solid rgba(255,255,255,0.04);
}
.sidebar.collapsed { transform: translateX(-256px); }
.sidebar-header { padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); gap: 10px; }
.sidebar-header span:first-child { font-size: 26px; color: var(--mint-500); filter: drop-shadow(0 0 8px rgba(126,212,200,0.35)); }
.sidebar-title { font-size: 17px; }
.sidebar-menu { padding: 10px 8px 14px; }
.sidebar-menu li {
  position: relative; padding: 9px 14px; margin: 1px 4px;
  font-size: 13.5px; border-radius: var(--radius);
  color: rgba(255,255,255,0.72); gap: 11px; font-weight: 500;
  transition: background-color .15s, color .15s;
}
.sidebar-menu li:not(.sidebar-section):hover { background: rgba(255,255,255,0.06); color: #ffffff; }
.sidebar-menu li.active {
  background: rgba(126,212,200,0.12);
  color: #ffffff; font-weight: 600;
  box-shadow: inset 3px 0 0 var(--mint-500);
  border-radius: var(--radius);
}
.sidebar-menu li.active .material-icons-round { color: var(--mint-500); }
.sidebar-menu li .material-icons-round { font-size: 19px; opacity: 0.9; }
.sidebar-menu li.sidebar-section {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px;
  color: rgba(255,255,255,0.40);
  padding: 16px 16px 6px; margin: 2px 0 0;
  background: transparent !important; box-shadow: none !important;
}
.sidebar-menu li.sidebar-section:hover { color: rgba(255,255,255,0.65); }
.sidebar-menu li.submenu-item { padding-left: 48px; font-size: 13px; color: rgba(255,255,255,0.62); }
.sidebar-menu li.submenu-item:hover { color: #ffffff; }
.sidebar-footer { padding: 12px 12px 16px; border-top: 1px solid rgba(255,255,255,0.06); }
.sidebar-footer .btn-ghost { color: rgba(255,255,255,0.78); border-radius: var(--radius); padding: 10px 12px; font-weight: 500; }
.sidebar-footer .btn-ghost:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* Layout main */
.main-content {
  margin-left: 256px;
  width: calc(100% - 256px);
  max-width: calc(100% - 256px);
  background: transparent;
}
.sidebar.collapsed + .main-content { margin-left: 0; width: 100%; max-width: 100%; }

/* ── Topbar ───────────────────────────────────────────────────────────────── */
.topbar {
  padding: 14px 28px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  gap: 16px;
}
.topbar h2 {
  font-size: 17px; font-weight: 700;
  letter-spacing: -0.015em; color: var(--slate-900);
}
.admin-name {
  font-size: 13px; color: var(--text); font-weight: 600;
  padding: 6px 12px; background: var(--slate-100);
  border-radius: var(--radius-full); border: 1px solid var(--border);
}

/* ── Profile menu (topbar) ─────────────────────────────────────────────── */
.profile-menu { position: relative; }
.profile-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-full);
  cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s;
  color: var(--text); font: inherit;
}
.profile-trigger:hover { border-color: var(--brand-800); box-shadow: var(--shadow-xs); }
.profile-trigger .admin-name { padding: 0; background: transparent; border: 0; border-radius: 0; }
.profile-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #231942, #7ED4C8);
  color: #fff; font-weight: 700; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; text-transform: uppercase;
  background-size: cover; background-position: center;
}
.profile-avatar.has-image .profile-avatar-initials { display: none; }
.profile-chevron { font-size: 18px !important; color: var(--text-muted); }
.profile-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 240px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 6px; display: none; z-index: 1000;
}
.profile-menu.open .profile-dropdown { display: block; }
.profile-menu.open .profile-trigger { border-color: var(--brand-800); box-shadow: var(--ring); }
.profile-dropdown-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; background: transparent; border: 0;
  border-radius: var(--radius); cursor: pointer; text-align: left;
  font: inherit; font-size: 13.5px; color: var(--text); font-weight: 500;
}
.profile-dropdown-item:hover { background: var(--slate-100); }
.profile-dropdown-item .material-icons-round { font-size: 19px !important; color: var(--text-muted); }
.profile-dropdown-danger { color: #b91c1c; }
.profile-dropdown-danger:hover { background: #fef2f2; }
.profile-dropdown-danger .material-icons-round { color: #b91c1c !important; }

/* Profile settings modal */
.profile-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.profile-form-grid .full { grid-column: 1 / -1; }
.profile-avatar-editor {
  display: flex; align-items: center; gap: 16px; margin-bottom: 18px;
  padding: 16px; background: #f8fafc;
  border: 1px solid var(--border); border-radius: var(--radius-md);
}
.profile-avatar-editor .profile-avatar-lg {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, #231942, #7ED4C8);
  color: #fff; font-weight: 700; font-size: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; text-transform: uppercase;
  background-size: cover; background-position: center;
}
.profile-avatar-editor-actions { display: flex; flex-direction: column; gap: 6px; }
.profile-avatar-editor-actions .btn { padding: 6px 12px; font-size: 12.5px; }
.profile-section-title {
  font-size: 12.5px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em; margin: 18px 0 8px;
}
@media (max-width: 640px) {
  .profile-form-grid { grid-template-columns: 1fr; }
  .profile-trigger .admin-name { display: none; }
}

.global-search-wrapper {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 14px; min-width: 340px;
  transition: border-color .15s, box-shadow .15s;
}
.global-search-wrapper:focus-within { border-color: var(--brand-800); box-shadow: var(--ring); }
.global-search-wrapper input { font-size: 13px; color: var(--text); }
.global-search-wrapper input::placeholder { color: var(--text-light); }

.global-search-results {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  margin-top: 6px; top: calc(100% + 6px);
}
.gsr-section { background: var(--slate-50); color: var(--text-muted); font-weight: 700; border-top: 1px solid var(--border); }
.gsr-item { color: var(--text); }
.gsr-item:hover { background: var(--mint-50); }
.gsr-item .material-icons-round { color: var(--brand-800); }

/* ── Content ──────────────────────────────────────────────────────────────── */
.content { padding: 26px 30px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  padding: 9px 16px; font-size: 13px; font-weight: 600;
  border-radius: var(--radius); letter-spacing: -0.005em;
  transition: background-color .15s, color .15s, box-shadow .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(0.5px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

.btn-primary {
  background: linear-gradient(180deg, #2d1f5e, var(--brand-800)) !important;
  color: #fff !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 1px 2px rgba(35,25,66,0.20), inset 0 1px 0 rgba(255,255,255,0.10);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--brand-800), var(--brand-900)) !important; }

.btn-success { background: var(--success) !important; color: #fff !important; }
.btn-success:hover { background: #059669 !important; }
.btn-warning { background: var(--warning) !important; color: #fff !important; }
.btn-warning:hover { background: #d97706 !important; }
.btn-danger  { background: var(--danger) !important; color: #fff !important; }
.btn-danger:hover  { background: #dc2626 !important; }

.btn-outline {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-xs);
}
.btn-outline:hover { background: var(--slate-50) !important; border-color: var(--border-strong) !important; }

.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { background: var(--slate-100); color: var(--text); }

.btn-icon { border-radius: var(--radius); padding: 8px; color: var(--text-muted); }
.btn-icon:hover { background: var(--slate-100); color: var(--text); }

.btn-sm { padding: 5px 11px; font-size: 12px; font-weight: 600; }
.btn-block { padding: 12px 16px; font-size: 14px; border-radius: var(--radius); }

/* ── Forms (no solo .form-group; tambien inputs sueltos en el contenido) ── */
.content input[type="text"],
.content input[type="email"],
.content input[type="password"],
.content input[type="number"],
.content input[type="date"],
.content input[type="search"],
.content input[type="tel"],
.content input[type="url"],
.content select,
.content textarea,
.form-group input, .form-group select, .form-group textarea {
  padding: 9px 12px !important;
  font-size: 14px !important;
  font-family: var(--font-sans) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  transition: border-color .15s, box-shadow .15s !important;
}
.content input::placeholder, .content textarea::placeholder { color: var(--text-light); }
.content input:focus, .content select:focus, .content textarea:focus,
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none !important;
  border-color: var(--brand-800) !important;
  box-shadow: var(--ring) !important;
}
.form-group label { font-size: 12.5px; font-weight: 600; color: var(--slate-700); letter-spacing: -0.005em; }

/* ── Cards / Panels ───────────────────────────────────────────────────────── */
.card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-xs) !important;
  margin-bottom: 22px;
  overflow: hidden;
}
.card-header {
  padding: 16px 20px !important;
  border-bottom: 1px solid var(--border) !important;
  background: linear-gradient(180deg, #ffffff, #fbfbfd) !important;
}
.card-header h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--slate-900); }
.card-body { padding: 20px !important; }

/* ── Stats grid ───────────────────────────────────────────────────────────── */
.stats-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 22px;
}
.stat-card {
  position: relative;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-xs) !important;
  padding: 18px 20px !important;
  gap: 14px;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.stat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--brand-800); border-radius: 4px 0 0 4px;
}
.stat-card:hover { border-color: var(--border-strong) !important; box-shadow: var(--shadow-sm) !important; transform: translateY(-1px); }
.stat-icon { width: 44px; height: 44px; border-radius: var(--radius); flex-shrink: 0; }
.stat-icon .material-icons-round { font-size: 22px; }
.stat-icon.blue   { background: var(--brand-100);     color: var(--brand-800); }
.stat-icon.green  { background: var(--success-light); color: var(--success); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.red    { background: var(--danger-light);  color: var(--danger); }
.stat-icon.cyan   { background: var(--mint-100);      color: #0d9488; }
.stat-icon.purple { background: var(--brand-100);     color: var(--brand-800); }
.stat-value {
  font-size: 26px; font-weight: 800;
  color: var(--slate-900); letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 12.5px; color: var(--text-muted); font-weight: 500; margin-top: 2px; }

/* KPIs cliqueables como filtro (inyectados por js/pages/_ui-enhance.js) */
.stat-card.sr-kpi-clickable { cursor: pointer; border: 1px solid var(--border) !important; }
.stat-card.sr-kpi-clickable:hover {
  border-color: var(--brand-700) !important;
  box-shadow: var(--shadow-md) !important;
  transform: translateY(-2px);
}
.stat-card.sr-kpi-clickable:focus-visible { outline: none; box-shadow: var(--ring) !important; }
.stat-card.sr-kpi-active {
  border-color: var(--brand-800) !important;
  box-shadow: var(--ring) !important;
}
.stat-card.sr-kpi-active::before { background: var(--mint-500); width: 5px; }

/* Buscador inyectado automáticamente en páginas sin buscador propio */
.sr-auto-toolbar { margin-bottom: 16px; }

/* Mini stat-boxes (dashboard usa div centrado con bg-card) */
.content div[style*="text-align:center"][style*="background:var(--bg-card)"],
.content div[style*="text-align: center"][style*="background: var(--bg-card)"] {
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-xs);
  padding: 16px 12px !important;
  border-radius: var(--radius-md) !important;
  transition: transform .1s, box-shadow .15s;
}
.content div[style*="text-align:center"][style*="background:var(--bg-card)"]:hover {
  transform: translateY(-1px); box-shadow: var(--shadow-sm);
}

/* ── Tables ───────────────────────────────────────────────────────────────── */
.table-container {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: auto;
  box-shadow: var(--shadow-xs);
}
table { font-size: 13px; }
thead th {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9) !important;
  color: var(--slate-600) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.07em !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--border) !important;
  text-transform: uppercase;
}
tbody td {
  padding: 13px 16px !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--slate-700);
  vertical-align: middle;
}
tbody tr { transition: background-color .12s; }
tbody tr:nth-child(even) { background: #fbfbfd; }
tbody tr:hover { background: var(--mint-50) !important; }
tbody tr:last-child td { border-bottom: none !important; }
tbody td strong { color: var(--slate-900); font-weight: 700; }

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
  padding: 3px 10px !important;
  border-radius: var(--radius-full) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.4 !important;
  border: 1px solid transparent !important;
}
.badge-green  { background: var(--success-light) !important; color: #047857 !important;       border-color: #a7f3d0 !important; }
.badge-orange { background: var(--warning-light) !important; color: #b45309 !important;       border-color: #fde68a !important; }
.badge-red    { background: var(--danger-light)  !important; color: #b91c1c !important;       border-color: #fecaca !important; }
.badge-blue   { background: var(--brand-100)     !important; color: var(--brand-800) !important; border-color: #d8d2e8 !important; }
.badge-cyan   { background: var(--mint-100)      !important; color: #0f766e !important;       border-color: #a7f3d0 !important; }
.badge-gray   { background: var(--slate-100)     !important; color: var(--slate-600) !important; border-color: var(--slate-200) !important; }

/* ── Toolbar ──────────────────────────────────────────────────────────────── */
.toolbar { gap: 10px; margin-bottom: 16px; }
.toolbar .search-input {
  padding: 9px 12px !important;
  border-radius: var(--radius) !important;
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  font-size: 13px;
  transition: border-color .15s, box-shadow .15s;
}
.toolbar .search-input:focus {
  outline: none;
  border-color: var(--brand-800) !important;
  box-shadow: var(--ring) !important;
}
.toolbar select {
  padding: 9px 12px !important;
  border-radius: var(--radius) !important;
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  font-size: 13px;
}

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  background: rgba(15, 23, 42, 0.55) !important;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.modal { border: 1px solid var(--border); border-radius: var(--radius-lg) !important; box-shadow: var(--shadow-xl) !important; }
.modal-header { padding: 18px 22px !important; border-bottom: 1px solid var(--border) !important; }
.modal-header h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }

/* ── Toast ────────────────────────────────────────────────────────────────── */
.toast {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  font-size: 13px; font-weight: 500;
  background: var(--surface); color: var(--text);
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }

/* ── Empty / loading ──────────────────────────────────────────────────────── */
.empty-state { color: var(--text-muted); padding: 56px 20px; }
.empty-state .material-icons-round { color: var(--slate-300); opacity: 1; }
.spinner { border-top-color: var(--brand-800); }

/* ── Kanban / Reports ─────────────────────────────────────────────────────── */
.kanban-column {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-xs);
}
.kanban-header { border-bottom: 1px solid var(--border) !important; font-weight: 700; }
.kanban-card {
  background: var(--slate-50) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.kanban-card:hover { border-color: var(--brand-800) !important; box-shadow: var(--shadow-sm); transform: translateY(-1px); }

.reports-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.report-card {
  position: relative;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  padding: 24px !important;
  box-shadow: var(--shadow-xs) !important;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  overflow: hidden;
}
.report-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-800), var(--mint-500));
  opacity: 0; transition: opacity .15s;
}
.report-card:hover {
  border-color: var(--brand-800) !important;
  box-shadow: var(--shadow-md) !important;
  transform: translateY(-2px);
}
.report-card:hover::before { opacity: 1; }
.report-card h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.report-card p { color: var(--text-muted); font-size: 13px; line-height: 1.5; }

/* ── Progress ─────────────────────────────────────────────────────────────── */
.progress-bar { background: var(--slate-200); }
.progress-fill { background: var(--brand-800); }
.progress-fill.warning { background: var(--warning); }
.progress-fill.danger { background: var(--danger); }

/* ── Sidebar mobile backdrop ──────────────────────────────────────────────── */
.sidebar-backdrop { background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(2px); }

/* ============================================================================
   OVERRIDES AGRESIVOS DE COLORES HARDCODED EN inline style=""
   (los js/pages usan hex viejos; los reasignamos a la nueva paleta)
   ============================================================================ */

/* Greys hardcoded → slate scale */
.content [style*="color:#888"], .content [style*="color: #888"] { color: var(--slate-500) !important; }
.content [style*="color:#666"], .content [style*="color: #666"] { color: var(--slate-600) !important; }
.content [style*="color:#999"], .content [style*="color: #999"] { color: var(--slate-400) !important; }
.content [style*="color:#aaa"], .content [style*="color: #aaa"] { color: var(--slate-400) !important; }

/* Borders hardcoded → border token */
.content [style*="border:1px solid #ddd"],
.content [style*="border: 1px solid #ddd"],
.content [style*="border:1px solid #eee"],
.content [style*="border: 1px solid #eee"],
.content [style*="border:1px solid #e5e7eb"],
.content [style*="border: 1px solid #e5e7eb"],
.content [style*="border:1px solid #d1d5db"] {
  border-color: var(--border) !important;
  border-radius: var(--radius) !important;
}

/* Backgrounds hardcoded → surface */
.content [style*="background:#fafafa"],
.content [style*="background: #fafafa"],
.content [style*="background:#f9fafb"],
.content [style*="background: #f9fafb"],
.content [style*="background:#f5f5f5"],
.content [style*="background: #f5f5f5"] {
  background: var(--slate-50) !important;
}

/* Estado: verde Material → success moderno */
.content [style*="color:#4caf50"], .content [style*="color: #4caf50"],
.content [style*="color:#4CAF50"], .content [style*="color: #4CAF50"] { color: var(--success) !important; }
.content [style*="background:#4caf50"], .content [style*="background:#4CAF50"] { background: var(--success) !important; color: #fff !important; }

/* Naranja viejo → warning moderno */
.content [style*="color:#ff9800"], .content [style*="color: #ff9800"],
.content [style*="color:#FF9800"], .content [style*="color: #FF9800"] { color: var(--warning) !important; }
.content [style*="background:#ff9800"], .content [style*="background:#FF9800"] { background: var(--warning) !important; color: #fff !important; }

/* Rojo viejo → danger moderno */
.content [style*="color:#f44336"], .content [style*="color: #f44336"],
.content [style*="color:#F44336"], .content [style*="color: #F44336"] { color: var(--danger) !important; }
.content [style*="background:#f44336"], .content [style*="background:#F44336"] { background: var(--danger) !important; color: #fff !important; }

/* Azules Tailwind viejos del wrapper de mensajería → marca SeguRent */
.content [style*="color:#1a56db"], .content [style*="color: #1a56db"],
.content [style*="color:#1d4ed8"], .content [style*="color: #1d4ed8"] { color: var(--brand-800) !important; }
.content [style*="background:#1a56db"], .content [style*="background:#1d4ed8"] { background: var(--brand-800) !important; color: #fff !important; }

/* Cyan viejo Material → teal moderno */
.content [style*="color:#00BCD4"], .content [style*="color: #00BCD4"],
.content [style*="color:#00bcd4"], .content [style*="color: #00bcd4"] { color: #0d9488 !important; }
.content [style*="background:#00BCD4"], .content [style*="background:#00bcd4"] { background: #0d9488 !important; color: #fff !important; }

/* border-radius viejo pequeño → radius moderno */
.content [style*="border-radius:4px"], .content [style*="border-radius: 4px"] { border-radius: var(--radius) !important; }
.content [style*="border-radius:6px"], .content [style*="border-radius: 6px"] { border-radius: var(--radius) !important; }
.content [style*="border-radius:8px"], .content [style*="border-radius: 8px"] { border-radius: var(--radius-md) !important; }

/* ── Detail grid / dl-style ───────────────────────────────────────────────── */
.detail-grid > div { padding: 8px 0 !important; font-size: 13px; }
.detail-grid strong { color: var(--text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 2px; }

/* ── Section titles dentro de páginas ─────────────────────────────────────── */
.content h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 16px; color: var(--slate-900); }
.content h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--slate-900); }
.content h4 { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin: 6px 0 8px; }

/* ── Links ────────────────────────────────────────────────────────────────── */
.content a:not(.btn) { color: var(--brand-800); text-decoration: none; font-weight: 600; }
.content a:not(.btn):hover { color: var(--brand-900); text-decoration: underline; text-underline-offset: 3px; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sidebar { width: 232px; }
  .main-content { margin-left: 232px; width: calc(100% - 232px); max-width: calc(100% - 232px); }
}
@media (max-width: 768px) {
  .sidebar { width: 260px; transform: translateX(-260px); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-xl); }
  .main-content { margin-left: 0 !important; width: 100% !important; max-width: 100% !important; }
  .content { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .global-search-wrapper { display: none; }
  .admin-name { display: none; }
}
