/* ==========================================================================
   LOIZZO CARS — identidad propia del CRM (2026-12-02)
   Se carga DESPUÉS de style.css (heredado del CRM de Leger) y lo pisa.
   Dirección: «boxes de carrera». Sale del logo (cromado, amarillo racing,
   cursiva deportiva) y del 🏁 del Instagram: tipografía condensada en
   cursiva, amarillo como único acento, cortes en diagonal y la bandera a
   cuadros como detalle. Lo funcional (estructura, tablas, kanban) no cambia.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=Barlow+Condensed:ital,wght@0,600;0,700;1,700;1,800&display=swap');

:root {
  --lz-y: #f5e21b;              /* amarillo del logo */
  --lz-y-ink: #141414;          /* texto sobre amarillo */
  --lz-y-soft: rgba(245, 226, 27, 0.12);
  --lz-cut: 12px;               /* corte en diagonal de tarjetas y botones */
  --lz-head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --lz-body: 'Barlow', -apple-system, 'Segoe UI', sans-serif;
  --radius: 3px;
  --gold: var(--lz-y);          /* style.css y varias plantillas usan --gold */
  --success: #3ddc84;
  --success-bg: rgba(61, 220, 132, 0.12);
  --warning: #ff9f1c;
  --warning-bg: rgba(255, 159, 28, 0.13);
  --lz-checker: repeating-conic-gradient(#e9e9e4 0 25%, #121212 0 50%) 0 0 / 10px 10px;
}

:root[data-theme="dark"] {
  --bg: #0c0c0d;
  --surface: #121214;
  --surface-2: #17171a;
  --surface-hover: #222226;
  --border: #2a2a2e;
  --text: #f4f4f0;
  --text-dim: #a5a5aa;
  --text-faint: #75757b;
  --lz-accent-text: var(--lz-y);
}

:root[data-theme="light"] {
  --bg: #efefea;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --surface-hover: #f4f4ef;
  --border: #dcdcd4;
  --text: #121214;
  --text-dim: #5d5d63;
  --text-faint: #8a8a90;
  --lz-accent-text: #6f6400;    /* amarillo oscurecido: legible sobre claro */
}

/* ---------- tipografía ---------- */
body, button, input, select, textarea, .btn, th, td { font-family: var(--lz-body); }
body { font-size: 15px; }

h1, h2, h3, .section-title, .stat-tile .value, .page-eyebrow {
  font-family: var(--lz-head);
}
h1 {
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: 2.1rem;
  line-height: 1;
}
h2, h3, .section-title {
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Raya amarilla en diagonal debajo del título de cada página */
.page-header h1::after,
.main-content > h1::after {
  content: "";
  display: block;
  width: 54px;
  height: 4px;
  margin-top: 0.45rem;
  background: var(--lz-y);
  transform: skewX(-24deg);
}

a { color: var(--text); }

/* ---------- menú lateral: siempre oscuro, como el box ---------- */
.sidebar {
  --text: #f4f4f0;
  --text-dim: #a5a5aa;
  --text-faint: #75757b;
  --border: #26262a;
  --surface-hover: #1d1d20;
  --surface-2: #151517;
  background: #0a0a0b;
  border-right: 1px solid #000;
  padding-top: 0;
  color: var(--text);
}
.sidebar::before {               /* bandera a cuadros arriba de todo */
  content: "";
  display: block;
  height: 10px;
  margin: 0 -0.9rem 1rem;
  background: var(--lz-checker);
  opacity: 0.9;
}
.sidebar .brand img { height: 30px; }
/* En tema claro el menú sigue oscuro: se usa el logo para fondo oscuro */
:root[data-theme="light"] .sidebar .logo-dark-mode { display: block; }
:root[data-theme="light"] .sidebar .logo-light-mode { display: none; }

.sidebar nav a {
  font-family: var(--lz-head);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 0;
  border-left: 3px solid transparent;
  padding: 0.42rem 0.7rem;
}
.sidebar nav a:hover {
  background: #17171a;
  border-left-color: var(--lz-y);
  color: #fff;
}
.sidebar nav a.active {
  background: var(--lz-y);
  color: var(--lz-y-ink);
  font-weight: 700;
  border-left-color: var(--lz-y);
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.sidebar nav a.active svg { opacity: 1; }
.sidebar .cmdk-trigger { border-radius: 0; }
.sidebar-footer { border-top-color: #26262a; }
.sidebar .user-info, .sidebar-footer a { color: #a5a5aa; }

/* ---------- botones ---------- */
.btn, .btn.gold {
  background: var(--lz-y);
  border: 1px solid var(--lz-y);
  color: var(--lz-y-ink);
  font-family: var(--lz-head);
  font-weight: 700;
  font-size: 0.98rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}
.btn:hover { opacity: 1; filter: brightness(1.08); }
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.secondary:hover { background: var(--surface-hover); border-color: var(--lz-y); filter: none; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #2a0e0c; }

/* ---------- tarjetas y métricas ---------- */
.card, .stat-tile, .form-card {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - var(--lz-cut)) 0, 100% var(--lz-cut), 100% 100%, 0 100%);
}
.stat-tile {
  position: relative;
  border-top: 3px solid var(--lz-y);
}
.stat-tile:hover { border-color: var(--border); border-top-color: var(--lz-y); background: var(--surface-hover); }
.stat-tile .value {
  font-style: italic;
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: 0;
  line-height: 1.05;
}
.stat-tile .label {
  font-family: var(--lz-head);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
}
.stat-tile.positive .value { color: var(--success); }

/* El ícono de cada sección del dashboard va en amarillo */
.section-title svg, .page-eyebrow svg { color: var(--lz-accent-text); }
.page-eyebrow { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- tablas ---------- */
table { border-radius: 0; }
th {
  font-family: var(--lz-head);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  background: var(--surface);
  border-bottom: 2px solid var(--lz-y);
}
tbody tr:hover td { background: var(--lz-y-soft); }

/* ---------- etiquetas ---------- */
.badge {
  border-radius: 2px;
  font-family: var(--lz-head);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

/* ---------- kanban ---------- */
.kanban-card { border-radius: 0; border-left: 3px solid var(--border); }
.kanban-card:hover { border-left-color: var(--lz-y); }

/* ---------- formularios ---------- */
.field input:focus, .field select:focus, .field textarea:focus,
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--lz-y) !important;
  box-shadow: 0 0 0 3px var(--lz-y-soft) !important;
}
.field input, .field select, .field textarea { border-radius: 0; }

/* ---------- pestañas y selector de moneda ---------- */
.tabs a.active, .tabs .active { border-bottom-color: var(--lz-y) !important; color: var(--text) !important; }
.cur-switch a.active, .dash-cur a.active { background: var(--lz-y) !important; color: var(--lz-y-ink) !important; }

/* ---------- botón flotante (+) ---------- */
.fab-trigger, .fab-plus {
  background: var(--lz-y) !important;
  color: var(--lz-y-ink) !important;
  border-color: var(--lz-y) !important;
}

/* ---------- panel del dueño: sus colores propios pasan a Loizzo ---------- */
.pd {
  --pd-gold: var(--lz-y);
  --pd-accent: #d9d9d2;
  --pd-pos: #3ddc84;
  --pd-disp: var(--lz-head);
  --pd-body: var(--lz-body);
  border-radius: 0 !important;
}

/* ---------- login ---------- */
.auth-main {
  background:
    linear-gradient(115deg, transparent 0 62%, var(--lz-y-soft) 62% 64%, transparent 64%),
    var(--bg);
}
.login-card {
  border-radius: 0 !important;
  border-top: 4px solid var(--lz-y) !important;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}
.login-card h1::after { display: none; }
.login-logo { height: 54px !important; }
.login-eyebrow { font-family: var(--lz-head); letter-spacing: 0.3em !important; color: var(--lz-accent-text) !important; }
