/* =====================================================================
   ZUBANKA · Estilo visual
   Colores tomados del flyer oficial de la marca.
   Pensado para personas con poca experiencia en computación:
   letras grandes, botones amplios, íconos con texto y colores claros.
   ===================================================================== */
:root {
  --zb-navy: #011E4D;
  --zb-navy-900: #001131;
  --zb-navy-700: #0A2D6B;
  --zb-blue: #0D5BD7;
  --zb-blue-light: #2F80ED;
  --zb-cyan: #22C3F3;
  --zb-yellow: #FCE20F;
  --zb-yellow-dark: #E5C800;
  --zb-green: #029E23;
  --zb-red: #E5333B;
  --zb-orange: #F47B20;
  --zb-purple: #6A3DD9;
  --zb-bg: #F2F6FC;
  --zb-text: #10233F;
  --zb-muted: #5B6B85;
  --zb-radius: 16px;
  --zb-shadow: 0 6px 20px rgba(1, 30, 77, .08);
  --sidebar-width: 270px;

  --bs-primary: var(--zb-blue);
  --bs-primary-rgb: 13, 91, 215;
  --bs-body-font-size: 1.0625rem;
  --bs-body-color: var(--zb-text);
  --bs-body-bg: var(--zb-bg);
  --bs-link-color: var(--zb-blue);
  --bs-border-radius: 12px;
  --bs-border-radius-lg: 14px;
}

body { font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; }
h1, h2, h3, h4, .h4, .h5, .fw-black { font-weight: 800; color: var(--zb-navy); }
.text-muted { color: var(--zb-muted) !important; }

/* ---------- Botones grandes y claros ---------- */
.btn { font-weight: 600; border-radius: 12px; padding: .6rem 1.2rem; }
.btn-lg { padding: .8rem 1.6rem; font-size: 1.1rem; }
.btn-primary { --bs-btn-bg: var(--zb-blue); --bs-btn-border-color: var(--zb-blue);
  --bs-btn-hover-bg: var(--zb-navy-700); --bs-btn-hover-border-color: var(--zb-navy-700);
  --bs-btn-active-bg: var(--zb-navy); }
.btn-zb-amarillo { background: var(--zb-yellow); color: var(--zb-navy); border: 0; }
.btn-zb-amarillo:hover { background: var(--zb-yellow-dark); color: var(--zb-navy); }
.btn-whatsapp { background: #25D366; color: #fff; border: 0; }
.btn-whatsapp:hover { background: #1DA851; color: #fff; }

/* ---------- Menú lateral ---------- */
.zb-sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--zb-navy) 0%, var(--zb-navy-900) 100%);
  color: #fff;
}
@media (min-width: 992px) {
  .zb-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1030; overflow-y: auto; }
  .zb-contenido { margin-left: var(--sidebar-width); }
}
.zb-marca { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.25rem 1rem; color: #fff; text-decoration: none; }
.zb-marca img { width: 46px; height: auto; }
.zb-marca .nombre { font-weight: 900; font-size: 1.45rem; letter-spacing: .5px; line-height: 1; color: #fff; }
.zb-marca .lema { font-size: .72rem; color: var(--zb-cyan); }
.zb-menu-titulo { font-size: .75rem; text-transform: uppercase; letter-spacing: 1.2px;
  color: rgba(255,255,255,.5); padding: 1rem 1.5rem .35rem; font-weight: 700; }
.zb-menu a, .zb-menu span.deshabilitado {
  display: flex; align-items: center; gap: .85rem; margin: .15rem .75rem; padding: .7rem .9rem;
  border-radius: 12px; color: rgba(255,255,255,.88); text-decoration: none; font-weight: 600;
  white-space: nowrap; font-size: .98rem;
}
.zb-menu a i, .zb-menu span i { font-size: 1.3rem; width: 1.5rem; text-align: center; }
.zb-menu a:hover { background: rgba(255,255,255,.1); color: #fff; }
.zb-menu a.activo { background: var(--zb-yellow); color: var(--zb-navy); }
.zb-menu span.deshabilitado { color: rgba(255,255,255,.4); cursor: not-allowed; }
.zb-pronto { margin-left: auto; font-size: .6rem; background: rgba(34,195,243,.2); color: var(--zb-cyan);
  padding: .15rem .45rem; border-radius: 6px; font-weight: 700; }
.zb-ayuda { margin: 1.5rem .75rem 1rem; padding: 1rem; border-radius: 14px; background: rgba(255,255,255,.07); font-size: .9rem; }

/* ---------- Barra superior ---------- */
.zb-topbar { background: #fff; box-shadow: 0 2px 10px rgba(1,30,77,.06); position: sticky; top: 0; z-index: 1020; }
.zb-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--zb-blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.zb-empresa-chip { background: var(--zb-bg); border-radius: 999px; padding: .4rem .9rem; font-weight: 700; color: var(--zb-navy); }

/* ---------- Tarjetas ---------- */
.zb-card { background: #fff; border: 0; border-radius: var(--zb-radius); box-shadow: var(--zb-shadow); }
.zb-bienvenida { background: linear-gradient(120deg, var(--zb-navy) 0%, var(--zb-blue) 100%); color: #fff;
  border-radius: var(--zb-radius); position: relative; overflow: hidden; }
.zb-bienvenida h1 { color: #fff; }
.zb-bienvenida .resaltado { color: var(--zb-yellow); }
.zb-bienvenida::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
  border-radius: 50%; background: rgba(34,195,243,.18); }

.zb-kpi { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; }
.zb-kpi .icono { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center;
  justify-content: center; font-size: 1.6rem; flex-shrink: 0; }
.zb-kpi .valor { font-size: 1.9rem; font-weight: 900; line-height: 1; color: var(--zb-navy); }
.zb-kpi .titulo { color: var(--zb-muted); font-weight: 600; }
.color-azul { background: rgba(13,91,215,.12); color: var(--zb-blue); }
.color-verde { background: rgba(2,158,35,.12); color: var(--zb-green); }
.color-rojo { background: rgba(229,51,59,.12); color: var(--zb-red); }
.color-amarillo { background: rgba(252,226,15,.3); color: #8A7600; }

/* Botones grandes de acceso rápido */
.zb-acceso { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  text-align: center; padding: 1.4rem .75rem; min-height: 150px; text-decoration: none; color: var(--zb-navy);
  transition: transform .15s, box-shadow .15s; position: relative; }
.zb-acceso:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(1,30,77,.14); color: var(--zb-navy); }
.zb-acceso .circulo { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.8rem; color: #fff; background: var(--zb-blue); }
.zb-acceso .nombre { font-weight: 700; font-size: 1.05rem; }
.zb-acceso.deshabilitado { opacity: .55; pointer-events: none; }
.zb-acceso .zb-pronto { position: absolute; top: .6rem; right: .6rem; background: var(--zb-bg); color: var(--zb-muted); }
.sec-Comercial .circulo { background: var(--zb-blue); }
.sec-Finanzas .circulo { background: var(--zb-green); }
.sec-Administración .circulo { background: var(--zb-orange); }
.sec-Análisis .circulo { background: var(--zb-purple); }
.sec-Configuración .circulo { background: var(--zb-navy); }

/* ---------- Tablas ---------- */
.table { --bs-table-bg: transparent; }
.table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .8px; color: var(--zb-muted);
  border-bottom-width: 2px; white-space: nowrap; }
.table td { vertical-align: middle; padding-top: .9rem; padding-bottom: .9rem; }

/* ---------- Formularios ---------- */
.form-label { font-weight: 700; color: var(--zb-navy); }
.form-control-lg, .form-select-lg { border-width: 2px; font-size: 1.05rem; }
.form-control:focus, .form-select:focus { border-color: var(--zb-cyan); box-shadow: 0 0 0 .25rem rgba(34,195,243,.25); }
.form-text { font-size: .9rem; }
.errorlist { list-style: none; padding: 0; margin: .3rem 0 0; color: var(--zb-red); font-weight: 600; font-size: .95rem; }

/* ---------- Mensajes ---------- */
.alert { border: 0; border-radius: 14px; font-weight: 600; font-size: 1.05rem; }
.alert-success { background: #E3F7E8; color: #0B5D1E; }
.alert-danger, .alert-error { background: #FDE7E8; color: #8E1218; }
.alert-warning { background: #FFF8CC; color: #6B5A00; }
.alert-info { background: #E2F4FD; color: #064A6E; }

/* ---------- Ingreso ---------- */
.zb-login { min-height: 100vh; }
.zb-login-marca { background: linear-gradient(160deg, var(--zb-navy) 0%, var(--zb-navy-900) 60%, var(--zb-blue) 140%);
  color: #fff; position: relative; overflow: hidden; }
.zb-login-marca h1 { color: #fff; font-size: 3rem; font-weight: 900; letter-spacing: 1px; }
.zb-login-marca .lema { color: var(--zb-cyan); font-size: 1.2rem; }
.zb-login-marca .frase { font-size: 1.9rem; font-weight: 800; line-height: 1.2; }
.zb-login-marca .frase span { color: var(--zb-yellow); }
.zb-login-marca .beneficio { display: flex; gap: .75rem; align-items: center; margin-bottom: .8rem; font-weight: 600; }
.zb-login-marca .beneficio i { color: var(--zb-yellow); font-size: 1.3rem; }
.zb-login-form { max-width: 440px; width: 100%; }
.zb-ver-clave { border-width: 2px; }

/* Estados */
.badge-estado { padding: .45rem .7rem; border-radius: 8px; font-weight: 700; font-size: .8rem; }
.estado-activo { background: #E3F7E8; color: var(--zb-green); }
.estado-inactivo { background: #FDE7E8; color: var(--zb-red); }

.zb-vacio { text-align: center; padding: 3rem 1rem; color: var(--zb-muted); }
.zb-vacio i { font-size: 3rem; color: var(--zb-cyan); }

/* ---------- Celular ---------- */
.zb-kpi > div:last-child { min-width: 0; }
@media (max-width: 575.98px) {
  .zb-kpi { flex-direction: column; align-items: flex-start; gap: .6rem; padding: 1rem; }
  .zb-kpi .icono { width: 44px; height: 44px; font-size: 1.25rem; }
  .zb-kpi .valor { font-size: 1.5rem; }
  .zb-acceso { min-height: 130px; padding: 1.1rem .5rem; }
  .zb-acceso .circulo { width: 54px; height: 54px; font-size: 1.5rem; }
  h1, .h1 { font-size: 1.7rem; }
}
.zb-toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 2000; box-shadow: var(--zb-shadow); }
.zb-editor { font-family: Consolas, "Courier New", monospace; font-size: .92rem; line-height: 1.5; }
.zb-variables { position: sticky; top: 90px; max-height: 80vh; overflow-y: auto; }
.zb-doc-btns .btn { text-align: left; }
.zb-recien { background: #FFF8CC; border-radius: 10px; padding-left: .5rem !important; padding-right: .5rem !important; }
.zb-grafico { position: relative; height: 320px; }
.zb-grafico-dona { height: 340px; }
.zb-grafico-bajo { height: 200px; }
.color-morado { background: rgba(106,61,217,.12); color: #6A3DD9; }
.color-navy { background: rgba(1,30,77,.1); color: var(--zb-navy); }
/* Reportes */
.zb-reporte-tarjeta { display: flex; gap: 1rem; align-items: flex-start; padding: 1.4rem; text-decoration: none; color: inherit; height: 100%; transition: transform .12s, box-shadow .12s; }
.zb-reporte-tarjeta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(1,30,77,.12); color: inherit; }
.zb-reporte-tarjeta .icono { width: 52px; height: 52px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; flex: none; }
.zb-reporte-tarjeta h2 { font-size: 1.15rem; margin: 0 0 .2rem; color: var(--zb-navy); font-weight: 800; }
.zb-reporte-tarjeta p { margin: 0; color: var(--zb-muted); font-size: .92rem; }
.zb-pestanas-rep { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; }
.zb-pestanas-rep a { white-space: nowrap; border-radius: 999px; padding: .4rem .9rem; font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--zb-navy); background: #fff; border: 1px solid #D6DEEA; }
.zb-pestanas-rep a.activo { background: var(--zb-navy); color: #fff; border-color: var(--zb-navy); }
.zb-periodos .btn { border-radius: 999px; }
.zb-tabla-rep th { font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--zb-muted); vertical-align: bottom; }
.zb-tabla-rep.principal th { min-width: 4.5rem; }
.zb-tabla-rep.principal td:first-child { min-width: 11rem; }
.zb-tabla-rep td { font-size: .92rem; }
.zb-tabla-rep tfoot td { font-weight: 800; border-top: 2px solid var(--zb-navy); white-space: nowrap; }
.zb-tabla-rep tr[data-href] { cursor: pointer; }
.zb-variacion { font-size: .8rem; font-weight: 700; border-radius: 999px; padding: .05rem .45rem; }
.zb-variacion.bien { background: rgba(2,158,35,.12); color: var(--zb-green); }
.zb-variacion.mal { background: rgba(229,51,59,.12); color: var(--zb-red); }
.zb-kpi .valor.dinero { font-size: 1.45rem; }
/* Comisiones */
.zb-total-mes { background: linear-gradient(135deg, var(--zb-navy), #0D3B8C); color: #fff; }
.zb-total-mes small { color: rgba(255,255,255,.75); }
.zb-chip-comision { display: inline-block; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: .15rem .6rem; white-space: nowrap; }
.zb-chip-comision.PEND { background: #EEF2F8; color: #5B6B85; }
.zb-chip-comision.PAGAR { background: rgba(252,226,15,.35); color: #6B5C00; }
.zb-chip-comision.PAGADA { background: rgba(2,158,35,.13); color: var(--zb-green); }
.zb-chip-comision.ANUL { background: rgba(229,51,59,.12); color: var(--zb-red); text-decoration: line-through; }
.zb-barra-pago { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; background: var(--zb-bg); border-radius: 14px; padding: 1rem; position: sticky; bottom: .5rem; }
.zb-fondo-suave, .zb-ejemplo-comision { background: var(--zb-bg); }
.zb-chips-rapidos { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.zb-chip { border: 1px solid #D6DEEA; background: #fff; color: var(--zb-navy); border-radius: 999px; padding: .3rem .75rem; font-size: .85rem; font-weight: 600; }
.zb-chip:hover { border-color: var(--zb-blue); }
.zb-chip.activo { background: var(--zb-navy); border-color: var(--zb-navy); color: #fff; }
.zb-barra-pago { position: static; }
@media (min-height: 760px) { .zb-barra-pago { position: sticky; } }
.zb-voucher-mini { display: block; border-radius: 12px; overflow: hidden; background: var(--zb-bg); max-height: 220px; }
.zb-voucher-mini img { width: 100%; height: 220px; object-fit: cover; }
