/* ===== Sistema Olivos — estilo premium ===== */
:root {
  --verde:      #4d7c3a;
  --verde-vivo: #5c9a41;
  --verde-osc:  #2f4d22;
  --verde-claro:#e7f0dc;
  --dorado:     #d4a840;
  --dorado-osc: #a87c26;
  --dorado-claro:#f7edd2;
  --bg:         #eceee4;
  --card:       #ffffff;
  --texto:      #22291d;
  --texto-sec:  #6b7464;
  --borde:      #e2e6d9;
  --rojo:       #c0392b;
  --azul:       #2f6f8f;
  --violeta:    #7c5b8f;
  --sombra:     0 14px 40px rgba(45, 60, 30, .12);
  --sombra-sm:  0 4px 16px rgba(45, 60, 30, .08);
  --glow:       0 6px 20px rgba(77, 124, 58, .35);
  --radio:      16px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(165deg, #eff2e8 0%, var(--bg) 45%, #e5e8dc 100%);
  background-attachment: fixed;
  color: var(--texto);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }

/* ===================== LOGIN ===================== */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-aside {
  position: relative;
  /* Foto del olivar de KEK con un velo verde SUAVE encima (se ve nítida la foto,
     y el texto blanco se lee gracias a un leve degradado + sombra de texto) */
  background:
    linear-gradient(150deg, rgba(30,52,22,.48) 0%, rgba(22,40,18,.55) 55%, rgba(12,24,10,.72) 100%),
    url("kek-fondo.jpg") center / cover no-repeat;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 48px;
  overflow: hidden;
}
.login-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(closest-side, rgba(200,162,74,.25), transparent) 80% 20% / 60% 60% no-repeat,
    radial-gradient(closest-side, rgba(255,255,255,.10), transparent) 10% 90% / 50% 50% no-repeat;
}
.login-aside-inner { position: relative; z-index: 1; max-width: 380px; text-shadow: 0 1px 5px rgba(0,0,0,.55); }
.olivo-mark { font-size: 56px; }
.login-aside h2 { font-size: 30px; margin: 12px 0 10px; font-weight: 800; }
.login-aside p { color: rgba(255,255,255,.82); line-height: 1.6; margin: 0 0 26px; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.feature-list li { position: relative; padding-left: 30px; color: rgba(255,255,255,.92); }
.feature-list li::before {
  content: "✓"; position: absolute; left: 0; top: -1px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--dorado); color: #2f2200; font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 360px; }
.login-card h1 { font-size: 28px; margin: 0 0 6px; font-weight: 800; }
.login-card .sub { color: var(--texto-sec); margin: 0 0 28px; }
.campo { display: block; margin-bottom: 16px; }
.campo span { display: block; font-size: 13px; font-weight: 600; color: var(--texto-sec); margin-bottom: 7px; }
.campo input {
  width: 100%; padding: 13px 15px; font-size: 15px;
  border: 1.5px solid var(--borde); border-radius: 11px; background: #fbfcfa;
  transition: border-color .15s, box-shadow .15s;
}
.campo input:focus {
  outline: none; border-color: var(--verde);
  box-shadow: 0 0 0 4px rgba(77,124,58,.14); background: #fff;
}
.btn-primary {
  border: none; cursor: pointer; font-weight: 700; font-size: 15px;
  color: #fff; background: linear-gradient(180deg, var(--verde-vivo), var(--verde));
  padding: 14px 22px; border-radius: 12px;
  box-shadow: var(--glow);
  transition: transform .13s cubic-bezier(.2,.8,.3,1), box-shadow .18s, filter .15s;
}
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(77,124,58,.45); }
.btn-primary:active { transform: translateY(1px) scale(.99); }
.btn-primary.full { width: 100%; margin-top: 6px; }
.error { color: var(--rojo); font-size: 13.5px; margin-top: 12px; min-height: 18px; text-align: center; }

/* ===================== APP LAYOUT ===================== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 252px; flex-shrink: 0;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(212,168,64,.14), transparent 60%),
    linear-gradient(180deg, #35562a, var(--verde-osc) 55%, #1e3216);
  color: #fff; padding: 22px 16px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  box-shadow: 4px 0 24px rgba(30,50,22,.18);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 800; padding: 6px 10px 22px;
}
.brand-mark { font-size: 24px; }
.menu { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  background: transparent; border: none; color: rgba(255,255,255,.75);
  padding: 12px 14px; border-radius: 11px; cursor: pointer;
  font-size: 14.5px; font-weight: 600; font-family: inherit; text-align: left;
  transition: background .15s, color .15s;
}
.nav-item svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: rgba(255,255,255,.09); color: #fff; transform: translateX(2px); }
.nav-item.activo {
  background: linear-gradient(90deg, rgba(212,168,64,.28), rgba(255,255,255,.10));
  color: #fff; box-shadow: inset 4px 0 0 var(--dorado), 0 4px 14px rgba(0,0,0,.15);
}
.nav-item.activo svg { stroke: var(--dorado); }
.sidebar-foot { color: rgba(255,255,255,.4); font-size: 12px; text-align: center; padding-top: 14px; }
.sidebar-brand .brand-mark svg { stroke: var(--dorado); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 30px; background: #fff; border-bottom: 1px solid var(--borde);
  position: sticky; top: 0; z-index: 5;
}
.titulo-seccion { font-size: 20px; font-weight: 800; position: relative; padding-left: 15px; }
.titulo-seccion::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 22px; border-radius: 3px; background: linear-gradient(var(--dorado), var(--verde)); }
.userbox { display: flex; align-items: center; gap: 14px; }
.user-info { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.user-name { font-weight: 700; font-size: 14px; }
.user-role { font-size: 12px; color: var(--texto-sec); text-transform: capitalize; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--verde), var(--dorado));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
}
.btn-ghost {
  background: #fff; border: 1.5px solid var(--borde); color: var(--texto-sec);
  padding: 9px 15px; border-radius: 10px; cursor: pointer; font-weight: 600; font-family: inherit;
  transition: background .15s, color .15s, border-color .15s, transform .12s, box-shadow .15s;
}
.btn-ghost:hover { background: var(--verde-claro); color: var(--verde-osc); border-color: var(--verde); transform: translateY(-1px); box-shadow: var(--sombra-sm); }
.btn-ghost:active { transform: translateY(1px) scale(.98); }

.contenido { padding: 30px 34px; max-width: 1180px; width: 100%; margin: 0 auto; overflow-x: hidden; }

/* ===================== ENCABEZADO DASHBOARD (banda premium) ===================== */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radio);
  background:
    radial-gradient(130% 150% at 100% 0%, rgba(212,168,64,.24), transparent 55%),
    linear-gradient(120deg, var(--verde-osc) 0%, var(--verde) 62%, var(--verde-vivo) 100%);
  color: #fff; padding: 22px 28px; margin-bottom: 24px; box-shadow: var(--sombra);
}
.hero::after {
  content: ""; position: absolute; right: -30px; bottom: -40px; width: 180px; height: 180px;
  background: radial-gradient(closest-side, rgba(255,255,255,.12), transparent); pointer-events: none;
}
.hero .hero-saludo { font-size: 20px; font-weight: 800; margin: 0; letter-spacing: -.2px; }
.hero .hero-sub { margin: 6px 0 0; color: rgba(255,255,255,.82); font-size: 14px; }

/* ===================== TARJETAS DE RESUMEN ===================== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-bottom: 26px; }
.stat-card {
  position: relative;
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(212,168,64,.10), transparent 55%),
    linear-gradient(155deg, #ffffff 0%, #f4f8ee 55%, #eaf2df 100%);
  border: 1px solid #dfe7d2; border-radius: var(--radio);
  padding: 20px; box-shadow: var(--sombra-sm); display: flex; align-items: center; gap: 13px;
  transition: transform .14s cubic-bezier(.2,.8,.3,1), box-shadow .18s;
}
/* filo dorado-verde en el borde superior para el toque premium */
.stat-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: var(--radio) var(--radio) 0 0;
  background: linear-gradient(90deg, var(--verde-vivo), var(--dorado));
  opacity: .85;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(45,60,30,.16); }
.stat-card > .stat-txt { min-width: 0; flex: 1; }   /* deja que el número use el ancho disponible */
.stat-ico {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  background: var(--verde-claro); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 4px 12px rgba(45,60,30,.10);
}
/* Número: tamaño ajustado para que cifras grandes (ej. $37.135.000) entren cómodas,
   y un tope que evita que se salga de la tarjeta pase lo que pase. */
.stat-num { font-size: 21px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px;
  color: var(--texto); font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-lbl { color: var(--texto-sec); font-size: 13.5px; margin-top: 5px; font-weight: 500; }

/* Tarjeta "VIP" — la de plata resaltada en verde intenso con texto blanco */
.stat-card.vip {
  background:
    radial-gradient(130% 150% at 100% 0%, rgba(212,168,64,.30), transparent 55%),
    linear-gradient(135deg, var(--verde) 0%, var(--verde-osc) 100%);
  border-color: transparent; box-shadow: 0 14px 34px rgba(47,77,34,.30);
}
.stat-card.vip::before { background: var(--dorado); opacity: 1; }
.stat-card.vip .stat-num { color: #fff; }
.stat-card.vip .stat-lbl { color: rgba(255,255,255,.82); }
.stat-card.vip .stat-ico { background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.stat-card.vip .stat-ico svg { stroke: #fff !important; }

.bienvenida { color: var(--texto-sec); margin: 0 0 22px; font-size: 15px; }

/* ===================== TARJETAS / TABLAS ===================== */
h2 { margin: 0 0 4px; font-size: 22px; }
h3 { margin: 0 0 14px; font-size: 16px; }
.card {
  background: var(--card); border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 22px; margin-bottom: 20px; box-shadow: var(--sombra-sm);
}
.card-titulo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--borde); font-size: 14px; }
th { color: var(--texto-sec); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbf8; }

.form-fila { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; max-width: 100%; }
.form-fila label { display: flex; flex-direction: column; font-size: 12.5px; color: var(--texto-sec); font-weight: 600; gap: 6px; min-width: 0; max-width: 100%; }
.form-fila input, .form-fila select {
  padding: 10px 12px; border: 1.5px solid var(--borde); border-radius: 10px; font-size: 14px;
  font-family: inherit; background: #fbfcfa; transition: border-color .15s, box-shadow .15s;
  min-width: 0; max-width: 100%; box-sizing: border-box;
}
.form-fila input:focus, .form-fila select:focus {
  outline: none; border-color: var(--verde); box-shadow: 0 0 0 3px rgba(77,124,58,.13); background: #fff;
}
.btn {
  border: none; cursor: pointer; font-weight: 700; font-size: 14px; font-family: inherit;
  color: #fff; background: linear-gradient(180deg, var(--verde-vivo), var(--verde));
  padding: 11px 20px; border-radius: 11px; box-shadow: var(--glow);
  transition: transform .13s cubic-bezier(.2,.8,.3,1), box-shadow .18s, filter .15s;
  position: relative; letter-spacing: .2px;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(77,124,58,.45); filter: brightness(1.07); }
.btn:active { transform: translateY(1px) scale(.98); box-shadow: 0 3px 10px rgba(77,124,58,.4); }

/* Feedback al presionar CUALQUIER botón: un anillo dorado que pulsa */
@keyframes clickRing { 0% { box-shadow: 0 0 0 0 rgba(212,168,64,.6); } 100% { box-shadow: 0 0 0 13px rgba(212,168,64,0); } }
.clickeando { animation: clickRing .6s ease-out; outline: 2px solid var(--dorado); outline-offset: 1px; }
/* Botón en estado "trabajando" (async en curso) */
.trabajando { opacity: .75; pointer-events: none; position: relative; }
.trabajando::after { content: ""; position: absolute; right: 12px; top: 50%; width: 14px; height: 14px;
  margin-top: -7px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%;
  animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-borrar {
  background: transparent; color: var(--rojo); border: none; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit; padding: 4px 8px; border-radius: 8px;
}
.btn-borrar:hover { background: #fdeceb; }
.chip {
  display: inline-block; background: var(--verde-claro); color: var(--verde-osc);
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; text-transform: capitalize;
}
.vacio { color: var(--texto-sec); font-style: italic; padding: 18px 0; text-align: center; }
.finca-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.finca-nombre { font-size: 17px; font-weight: 700; }
.finca-meta { color: var(--texto-sec); font-size: 13.5px; font-weight: 500; }

/* Responsive: menú arriba en pantallas chicas */
@media (max-width: 820px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 10px; overflow-x: auto; }
  .sidebar-brand { padding: 6px 12px; }
  .menu { flex-direction: row; }
  .nav-item span { display: none; }
  .sidebar-foot { display: none; }
  .contenido { padding: 18px; }
  .form-grid { grid-template-columns: 1fr 1fr !important; }
  .fila-item { flex-wrap: wrap; }
  .card { padding: 16px; }
}

/* ===================== MÓDULO 1 — PARTE DIARIO ===================== */
.brand-sub { font-weight: 600; font-size: 15px; opacity: .8; display: block; }

/* Grilla de campos del formulario */
/* minmax(0,1fr) permite que las columnas se achiquen aunque un <select> tenga texto largo
   (ej. "Banco Nación ($37.135.000)") — evita el desborde horizontal. */
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 6px; }
.form-grid label, label.full {
  display: flex; flex-direction: column; font-size: 12.5px; color: var(--texto-sec); font-weight: 600; gap: 6px;
  min-width: 0;
}
label.full { margin: 8px 0; }
.form-grid input, .form-grid select, label.full textarea, .filtros input {
  padding: 10px 12px; border: 1.5px solid var(--borde); border-radius: 10px; font-size: 14px;
  font-family: inherit; background: #fbfcfa; transition: border-color .15s, box-shadow .15s; color: var(--texto);
  width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box;
}
.form-grid input:focus, .form-grid select:focus, label.full textarea:focus, .filtros input:focus {
  outline: none; border-color: var(--verde); box-shadow: 0 0 0 3px rgba(77,124,58,.13); background: #fff;
}
label.full textarea { resize: vertical; }

/* Sub-bloques de personal e insumos */
.sub-bloque { border: 1px dashed var(--borde); border-radius: 12px; padding: 14px; margin: 14px 0; background: #fbfcfa; }
.sub-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fila-item { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.fila-item select { flex: 1; min-width: 140px; }
.fila-item select, .fila-item input {
  padding: 9px 11px; border: 1.5px solid var(--borde); border-radius: 9px; font-size: 14px;
  font-family: inherit; background: #fff;
}
.fila-item input[type=number] { width: 100px; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--texto-sec); white-space: nowrap; }
.chk input { width: auto; }

.form-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; flex-wrap: wrap; gap: 12px; }
.total-preview { font-size: 17px; font-weight: 800; color: var(--verde-osc); }
.btn-grande { padding: 13px 26px; font-size: 15px; }

/* Cabecera de tarjeta con acción a la derecha */
.card-head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head-row h3 { margin: 0; }
.filtros { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--texto-sec); }

/* Badges de estado */
.badge { display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-ok { background: #e4f2dc; color: #38661f; }
.badge-warn { background: #fbf0d5; color: #8a6a12; }
.badge-mute { background: #eceff0; color: #8b8f92; text-decoration: line-through; }
.badge-bad { background: #f8dcdc; color: #a12020; }
.badge-info { background: #dce8f2; color: #24567e; }

/* Tabla de partes / reportes */
.tabla-scroll { overflow-x: auto; }
.tabla-partes { min-width: 620px; }
.tabla-partes .fila-total td { font-weight: 800; color: var(--verde-osc); border-top: 2px solid var(--borde); background: #fafbf8; }
.btn-mini { padding: 5px 10px; font-size: 12.5px; }
.stock-bajo { color: var(--rojo); font-weight: 700; }

/* Detalle del parte */
.detalle-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--texto-sec); font-size: 13.5px; margin-bottom: 12px; }
.obs { font-style: italic; color: var(--texto-sec); background: #fbfcfa; padding: 10px 14px; border-radius: 10px; border-left: 3px solid var(--dorado); }
h4 { margin: 18px 0 8px; font-size: 14px; color: var(--verde-osc); }
.costos-resumen { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.costos-resumen > div {
  flex: 1; min-width: 130px; background: #fbfcfa; border: 1px solid var(--borde);
  border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px;
}
.costos-resumen span { font-size: 12.5px; color: var(--texto-sec); }
.costos-resumen strong { font-size: 20px; }
.costos-resumen .total { background: linear-gradient(135deg, var(--verde), var(--verde-osc)); border: none; }
.costos-resumen .total span, .costos-resumen .total strong { color: #fff; }
.acciones { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

/* ===================== MÓDULO 2 — MAQUINARIA ===================== */
.maq-card { background: #fbfcfa; border: 1px solid var(--borde); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.maq-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.maq-nombre { font-size: 16px; font-weight: 700; }
.maq-meta { color: var(--texto-sec); font-size: 13px; text-transform: capitalize; }
.maq-datos { display: flex; gap: 16px; align-items: center; margin: 10px 0 4px; }
.maq-datos strong { font-size: 16px; }
.maq-head select { padding: 7px 10px; border: 1.5px solid var(--borde); border-radius: 9px; font-family: inherit; background: #fff; font-size: 13px; color: var(--texto); }
.maq-card .acciones { margin-top: 10px; }

/* ===================== ÍCONOS SVG (marca y tarjetas) ===================== */
.stat-ico svg { width: 26px; height: 26px; fill: none; stroke: var(--verde); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Un color distinto por tarjeta (le da vida al dashboard) */
.stats-grid .stat-card:nth-child(4n+1) .stat-ico { background: var(--verde-claro); }
.stats-grid .stat-card:nth-child(4n+1) .stat-ico svg { stroke: var(--verde); }
.stats-grid .stat-card:nth-child(4n+2) .stat-ico { background: var(--dorado-claro); }
.stats-grid .stat-card:nth-child(4n+2) .stat-ico svg { stroke: var(--dorado-osc); }
.stats-grid .stat-card:nth-child(4n+3) .stat-ico { background: #e4eef4; }
.stats-grid .stat-card:nth-child(4n+3) .stat-ico svg { stroke: var(--azul); }
.stats-grid .stat-card:nth-child(4n)   .stat-ico { background: #efe6f4; }
.stats-grid .stat-card:nth-child(4n)   .stat-ico svg { stroke: var(--violeta); }
.brand-mark svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.olivo-mark svg { width: 52px; height: 52px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 svg, .sub-head svg, .maq-nombre svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; opacity: .7; }
.demo-card { background: linear-gradient(135deg, var(--verde-claro), #fff); border: 1px dashed var(--verde); }

/* Sub-pestañas (Finanzas) */
.subtabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 2px solid var(--borde); flex-wrap: wrap; }
.subtab { border: none; background: transparent; font-family: inherit; font-weight: 700; font-size: 14px; color: var(--texto-sec); padding: 10px 16px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.subtab:hover { color: var(--verde); }
.subtab.act { color: var(--verde-osc); border-bottom-color: var(--dorado); }
.mov-ingreso { color: #38661f; font-weight: 700; }
.mov-egreso { color: var(--rojo); font-weight: 700; }

/* ===================== MÓDULO 5 — TABLERO DE COMANDO ===================== */
.tablero-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.tablero-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .tablero-cols { grid-template-columns: 1fr; } }
.print-only { display: none; }
.tablero-encabezado { margin-bottom: 18px; }

/* Impresión / Exportar PDF: solo el contenido del tablero, prolijo en papel */
@media print {
  .sidebar, .topbar, .no-print, #btn-salir, #btn-password { display: none !important; }
  .print-only { display: block !important; }
  body { background: #fff; }
  .app, .main { display: block; }
  .contenido { max-width: none; padding: 0; margin: 0; }
  .card, .stat-card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .stat-card::before { display: none; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .tablero-cols { grid-template-columns: 1fr 1fr; }
}
