/* ══════════════════════════════════════════════
   FLUXA — Hoja de estilos principal
   Basada en la plantilla GestionCC v1.0
   ══════════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  /* ── Marca Fluxa (cian/teal · isotipo #00b9c3) ── */
  --brand-950: #06232a;
  --brand-900: #0a2f38;
  --brand-800: #0d4753;
  --brand-700: #0f6270;
  --brand-600: #0a8e99;
  --brand-500: #00b9c3;
  --brand-400: #33cbd3;
  --brand-300: #7bdde2;
  --brand-200: #a9e9ec;
  --brand-100: #d4f4f6;
  --brand-50:  #ecfbfc;
  --accent:    #00b9c3;
  --accent-lt: #d4f4f6;
  --success:   #10b981;
  --success-lt:#d1fae5;
  --danger:    #ef4444;
  --danger-lt: #fee2e2;
  --warning:   #f59e0b;
  --warning-lt:#fef3c7;
  --purple:    #8b5cf6;
  --purple-lt: #ede9fe;
  --teal:      #14b8a6;
  --teal-lt:   #ccfbf1;
  --g-900: #0f172a;
  --g-800: #1e293b;
  --g-700: #334155;
  --g-600: #475569;
  --g-500: #64748b;
  --g-400: #94a3b8;
  --g-300: #cbd5e1;
  --g-200: #e2e8f0;
  --g-100: #f1f5f9;
  --g-50:  #f8fafc;
  --white: #ffffff;
  --sidebar-w: 252px;
  --topbar-h:  56px;
  --font: 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --r:    8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 12px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.1), 0 4px 8px rgba(0,0,0,.06);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-size: 14px; scroll-behavior: smooth; }
body  { font-family: var(--font); background: var(--g-100); color: var(--g-900);
        line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a     { color: inherit; text-decoration: none; }
button{ cursor: pointer; font-family: inherit; border: none; background: none; }

/* ═══════════════════════════════════════════
   LAYOUT CON MENÚ (todas las vistas internas)
   ═══════════════════════════════════════════ */

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w); position: fixed; top: 0; left: 0; bottom: 0;
  background: var(--brand-900); display: flex; flex-direction: column;
  z-index: 100; overflow: hidden; border-right: 1px solid rgba(255,255,255,.04);
}
.sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 14px; border-bottom: 1px solid rgba(255,255,255,.05); min-height: 60px;
}
.logo { display: flex; align-items: center; gap: 9px; }
.logo-icon {
  display: block; width: 30px; height: 30px; flex-shrink: 0;
  object-fit: contain;
}
.logo-text .name { display: block; font-size: .88rem; font-weight: 700; color: #fff; letter-spacing: -.2px; }
.logo-text .tag  { display: block; font-size: .6rem;  color: rgba(255,255,255,.3); font-family: var(--mono); }

.sidebar-entity {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px; font-size: .7rem; color: var(--brand-400);
  background: rgba(0,185,195,.07); border-bottom: 1px solid rgba(255,255,255,.03);
}
.sidebar-entity svg { flex-shrink: 0; opacity: .7; }
.entity-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 0;
               scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.08) transparent; }
.nav-sep {
  padding: 10px 14px 3px; font-size: .6rem; font-weight: 700;
  letter-spacing: .1em; color: rgba(255,255,255,.22); text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 14px; color: rgba(255,255,255,.42);
  font-size: .81rem; font-weight: 400;
  transition: all .18s; border-left: 2px solid transparent;
}
.nav-item:hover  { color: rgba(255,255,255,.8); background: rgba(255,255,255,.04); border-left-color: var(--brand-500); }
.nav-item.active { color: #fff; background: rgba(0,185,195,.14); border-left-color: var(--brand-400); font-weight: 500; }
.nav-item svg    { width: 15px; height: 15px; flex-shrink: 0; opacity: .85; }
.nav-badge {
  background: var(--danger); color: #fff; font-size: .58rem;
  font-weight: 700; padding: 1px 5px; border-radius: 10px; margin-left: auto;
}

.sidebar-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-top: 1px solid rgba(255,255,255,.05);
}
.u-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand-700);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.u-info { flex: 1; overflow: hidden; }
.u-name { display: block; font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.85);
          white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-role { display: block; font-size: .63rem; color: rgba(255,255,255,.3); }
.btn-logout { color: rgba(255,255,255,.3); padding: 5px; border-radius: 4px; transition: all .2s; }
.btn-logout:hover { color: var(--danger); background: rgba(239,68,68,.1); }
.btn-logout svg  { width: 14px; height: 14px; }

/* ── MAIN ── */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex;
        flex-direction: column; min-height: 100vh; }
.topbar {
  height: var(--topbar-h); background: var(--white);
  border-bottom: 1px solid var(--g-200);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
.topbar-left  { display: flex; align-items: center; gap: 10px; }
.topbar-right { display: flex; align-items: center; gap: 6px; }

.breadcrumb   { display: flex; align-items: center; gap: 5px; font-size: .75rem; color: var(--g-500); }
.breadcrumb a { color: var(--g-400); }
.breadcrumb .sep   { color: var(--g-300); font-size: .6rem; }
.breadcrumb span   { color: var(--g-700); font-weight: 500; }

.tb-btn { padding: 6px; border-radius: var(--r); color: var(--g-500); transition: all .18s; position: relative; }
.tb-btn:hover { background: var(--g-100); color: var(--g-800); }
.tb-btn svg   { width: 17px; height: 17px; }
.notif-dot {
  position: absolute; top: 4px; right: 4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger); border: 1.5px solid var(--white);
}
.clock {
  font-family: var(--mono); font-size: .68rem; color: var(--g-500);
  background: var(--g-100); padding: 3px 8px; border-radius: 4px;
}

.page-body { padding: 18px 20px 32px; flex: 1; }

/* ── PAGE HEADER ── */
.ph { display: flex; align-items: flex-start; justify-content: space-between;
      margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.ph-title    { font-size: 1.25rem; font-weight: 700; color: var(--g-900); letter-spacing: -.3px; }
.ph-sub      { font-size: .75rem; color: var(--g-500); margin-top: 1px; }
.ph-actions  { display: flex; gap: 7px; }

/* ── BOTONES ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--r);
  font-size: .8rem; font-weight: 500;
  transition: all .18s; cursor: pointer; white-space: nowrap;
  border: 1px solid transparent;
}
.btn svg { width: 13px; height: 13px; }
.btn-primary   { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700);
                     transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,108,168,.25); }
.btn-secondary { background: var(--white); color: var(--g-700); border-color: var(--g-200); }
.btn-secondary:hover { background: var(--g-50); border-color: var(--g-300); }
.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.92); transform: translateY(-1px); }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-sm  { padding: 5px 11px; font-size: .74rem; }
.btn-xs  { padding: 3px 8px;  font-size: .68rem; }

/* ── KPI GRID ── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 14px; margin-bottom: 20px; }
.kpi {
  background: var(--white); border: 1px solid var(--g-200); border-radius: var(--r-lg);
  padding: 16px; position: relative; overflow: hidden;
  transition: all .2s; cursor: default;
}
.kpi:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kpi::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.kpi.blue::before   { background: linear-gradient(90deg, var(--brand-500), var(--brand-400)); }
.kpi.green::before  { background: linear-gradient(90deg, var(--success), #34d399); }
.kpi.amber::before  { background: linear-gradient(90deg, var(--warning), #fcd34d); }
.kpi.red::before    { background: linear-gradient(90deg, var(--danger), #f87171); }
.kpi.purple::before { background: linear-gradient(90deg, var(--purple), #a78bfa); }
.kpi.teal::before   { background: linear-gradient(90deg, var(--teal), #2dd4bf); }

.kpi-label { font-size: .65rem; font-weight: 700; color: var(--g-500);
             text-transform: uppercase; letter-spacing: .07em; margin-bottom: 4px; }
.kpi-val   { font-size: 1.7rem; font-weight: 700; color: var(--g-900); letter-spacing: -.5px; line-height: 1; }
.kpi-sub   { font-size: .7rem; color: var(--g-400); margin-top: 4px; }
.kpi-icon  { position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
             opacity: .05; font-size: 2.4rem; }
.kpi-icon svg { width: 40px; height: 40px; }

/* ── CARDS ── */
.card          { background: var(--white); border: 1px solid var(--g-200); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-header   { display: flex; align-items: center; justify-content: space-between;
                 padding: 14px 18px; border-bottom: 1px solid var(--g-100); }
.card-title    { font-size: .84rem; font-weight: 600; color: var(--g-800);
                 display: flex; align-items: center; gap: 7px; }
.card-title svg{ color: var(--brand-500); width: 15px; height: 15px; }
.card-body     { padding: 18px; }

/* ── GRID LAYOUT ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.mt-4   { margin-top: 16px; }

/* ── TABLE ── */
.table    { width: 100%; border-collapse: collapse; font-size: .78rem; }
.table th { background: var(--g-50); padding: 9px 13px; font-size: .68rem;
            font-weight: 600; color: var(--g-500); text-transform: uppercase;
            letter-spacing: .05em; text-align: left;
            border-bottom: 1px solid var(--g-200); white-space: nowrap; }
.table td { padding: 11px 13px; border-bottom: 1px solid var(--g-100);
            color: var(--g-700); vertical-align: middle; }
.table tbody tr          { transition: background .15s; }
.table tbody tr:hover    { background: var(--g-50); }
.table tbody tr:last-child td { border-bottom: 0; }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px;
  font-size: .65rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
}
.b-blue   { background: var(--brand-100);  color: #1e40af; }
.b-green  { background: var(--success-lt); color: #065f46; }
.b-amber  { background: var(--warning-lt); color: #92400e; }
.b-red    { background: var(--danger-lt);  color: #991b1b; }
.b-gray   { background: var(--g-100);      color: var(--g-600); }
.b-purple { background: var(--purple-lt);  color: #5b21b6; }
.b-teal   { background: var(--teal-lt);    color: #0f766e; }

/* ── ESTADOS CUENTA ── */
.e-borrador { background: #f1f5f9; color: #475569; }
.e-radicada { background: var(--brand-100);  color: #1e40af; }
.e-revision { background: var(--warning-lt); color: #92400e; }
.e-aprobada { background: var(--success-lt); color: #065f46; }
.e-pago     { background: var(--purple-lt);  color: #5b21b6; }
.e-pagada   { background: var(--teal-lt);    color: #0f766e; }
.e-devuelta { background: var(--danger-lt);  color: #991b1b; }

/* ── TICKET PRIORIDAD ── */
.p-baja    { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.p-media   { background: var(--brand-50); color: #1e40af; border: 1px solid var(--brand-100); }
.p-alta    { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.p-critica { background: var(--danger-lt); color: #991b1b; border: 1px solid #fecaca; }

/* ── TIMELINE ── */
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px;
                    bottom: 6px; width: 1.5px; background: var(--g-200); }
.timeline  { padding-left: 20px; position: relative; }
.tl-item   { position: relative; margin-bottom: 16px; }
.tl-dot    { position: absolute; left: -17px; top: 4px; width: 10px; height: 10px;
             border-radius: 50%; background: var(--brand-500);
             border: 2px solid var(--white); box-shadow: 0 0 0 2px var(--brand-200); }
.tl-time   { font-size: .65rem; color: var(--g-400); font-family: var(--mono); margin-bottom: 1px; }
.tl-title  { font-size: .78rem; font-weight: 600; color: var(--g-800); }
.tl-desc   { font-size: .73rem; color: var(--g-500); margin-top: 1px; }
.tl-user   { font-size: .68rem; color: var(--brand-600); margin-top: 2px;
             display: flex; align-items: center; gap: 4px; }

/* ── FORM ── */
.form-row     { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group   { margin-bottom: 14px; }
.form-label   { display: block; font-size: .75rem; font-weight: 600;
                color: var(--g-700); margin-bottom: 5px; }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%; padding: 8px 11px; border: 1px solid var(--g-300);
  border-radius: var(--r); font-family: inherit; font-size: .8rem;
  color: var(--g-900); background: var(--white); transition: all .18s; outline: none;
}
.form-control:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(0,185,195,.12); }

/* ── ALERT ── */
.alert {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; border-radius: var(--r);
  font-size: .78rem; font-weight: 500; margin-bottom: 14px;
}
.alert svg      { width: 15px; height: 15px; flex-shrink: 0; }
.alert-success  { background: var(--success-lt); color: #065f46; border: 1px solid #a7f3d0; }
.alert-warning  { background: var(--warning-lt); color: #92400e; border: 1px solid #fde68a; }
.alert-error    { background: var(--danger-lt);  color: #991b1b; border: 1px solid #fecaca; }

/* ── PAGINACION ── */
.pagination   { display: flex; align-items: center; gap: 3px;
                justify-content: center; padding: 14px 0; }
.page-link    { display: flex; align-items: center; justify-content: center;
                min-width: 30px; height: 30px; padding: 0 7px;
                border: 1px solid var(--g-200); border-radius: 5px;
                font-size: .73rem; color: var(--g-600);
                transition: all .15s; background: var(--white); }
.page-link:hover   { border-color: var(--brand-300); color: var(--brand-600); }
.page-link.active  { background: var(--brand-600); border-color: var(--brand-600); color: #fff; font-weight: 600; }

/* ── USER MINI ── */
.user-mini  { display: flex; align-items: center; gap: 6px; }
.mini-av    { width: 22px; height: 22px; border-radius: 50%; display: flex;
              align-items: center; justify-content: center;
              font-size: .6rem; font-weight: 700; color: #fff; flex-shrink: 0; }

/* ── DOC ITEM ── */
.doc-item    { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--g-100); }
.doc-item:last-child { border-bottom: 0; }
.doc-icon    { width: 34px; height: 34px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-icon svg{ width: 16px; height: 16px; }
.doc-info    { flex: 1; min-width: 0; }
.doc-name    { font-size: .78rem; font-weight: 500; color: var(--g-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta    { font-size: .68rem; color: var(--g-400); margin-top: 1px; }
.doc-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ── SCROLL ── */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--g-300); border-radius: 4px; }

/* ── ANIMACIÓN ENTRADA ── */
@keyframes fadeIn { from { opacity:0; transform:translateY(8px) } to { opacity:1; transform:translateY(0) } }
.page-body { animation: fadeIn .28s ease; }


/* ═══════════════════════════════════════════
   LOGIN — layout independiente (sin sidebar)
   ═══════════════════════════════════════════ */
.login-page {
  min-height: 100vh; width: 100%;
  background: linear-gradient(135deg, var(--brand-950) 0%, var(--brand-800) 55%, var(--brand-900) 100%);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  position: relative; overflow: hidden;
}
.login-bg {
  position: absolute; inset: 0; opacity: .03;
  background-image: radial-gradient(var(--brand-400) 1px, transparent 1px);
  background-size: 28px 28px;
}
.login-card {
  background: rgba(255,255,255,.04); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-xl);
  width: 100%; max-width: 400px; overflow: hidden; position: relative; z-index: 1;
}
.login-head {
  padding: 28px 28px 20px; text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.login-mark {
  display: block; width: 72px; height: 72px; margin: 0 auto 12px;
  filter: drop-shadow(0 4px 14px rgba(0,185,195,.35));
}
.login-logo {
  font-family: var(--font); font-size: 2rem; color: #fff;
  font-weight: 700; letter-spacing: -1px; margin-bottom: 6px;
}
.login-sub   { font-size: .75rem; color: rgba(255,255,255,.35); letter-spacing: .03em; }
.login-body  { padding: 24px 28px 28px; }
.login-label {
  display: block; font-size: .73rem; font-weight: 600;
  color: rgba(255,255,255,.45); margin-bottom: 5px;
  letter-spacing: .03em; text-transform: uppercase;
}
.login-input {
  width: 100%; padding: 9px 12px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r); color: #fff; font-family: inherit; font-size: .82rem;
  outline: none; transition: all .18s; margin-bottom: 14px;
}
.login-input:focus {
  border-color: var(--brand-400); background: rgba(255,255,255,.1);
  box-shadow: 0 0 0 3px rgba(0,185,195,.15);
}
.login-input::placeholder { color: rgba(255,255,255,.2); }
.login-btn {
  width: 100%; padding: 10px; background: var(--brand-600); color: #fff;
  border: none; border-radius: var(--r); font-family: inherit;
  font-size: .85rem; font-weight: 600; cursor: pointer; transition: all .2s; margin-top: 4px;
}
.login-btn:hover { background: var(--brand-500); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,185,195,.3); }

.login-error {
  display: flex; align-items: center; gap: 8px;
  background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.25);
  border-radius: var(--r); padding: 9px 13px;
  color: #fca5a5; font-size: .78rem; font-weight: 500;
  margin-bottom: 14px;
}
.login-error svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── CAPTCHA MATEMÁTICO ── */
.captcha-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
/* Caja que muestra la operación: "4 + 7 = ?" */
.captcha-box {
  flex-shrink: 0;
  padding: 9px 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--r);
  font-family: var(--mono); font-size: 1rem; font-weight: 600;
  color: var(--accent); letter-spacing: 2px;
  white-space: nowrap; user-select: none;
  text-shadow: 0 0 12px rgba(0,185,195,.35);
}
/* Botón de refrescar (ícono de recarga) */
.captcha-refresh {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--r);
  color: rgba(255,255,255,.35);
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  transition: all .2s;
}
.captcha-refresh:hover {
  color: var(--brand-400);
  border-color: var(--brand-400);
  background: rgba(0,185,195,.1);
}
.captcha-refresh svg { width: 14px; height: 14px; }
/* Campo numérico de respuesta */
.captcha-input {
  flex: 1; margin-bottom: 0 !important;
  /* quitar flechas en Chrome/Safari */
  -moz-appearance: textfield;
}
.captcha-input::-webkit-outer-spin-button,
.captcha-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* TOPBAR GENERAL */
.topbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 20px;
  background:#ffffff;
  border-bottom:1px solid #e5e7eb;
}

/* IZQUIERDA */
.topbar-left {
  display:flex;
  align-items:center;
  gap:20px;
}

.breadcrumb {
  display:flex;
  align-items:center;
  gap:6px;
  font-size:13px;
  color:#6b7280;
}

.breadcrumb a {
  color:#4f46e5;
  text-decoration:none;
  font-weight:500;
}

.sep {
  color:#9ca3af;
}

/* RELOJ */
.clock {
  font-size:13px;
  color:#6b7280;
}

/* DERECHA */
.topbar-right {
  display:flex;
  align-items:center;
  gap:15px;
}

/* BOTÓN */
.tb-btn {
  border:none;
  background:#f3f4f6;
  padding:8px;
  border-radius:8px;
  cursor:pointer;
  transition:.2s;
}

.tb-btn:hover {
  background:#e5e7eb;
}

/* PERFIL */
.user-info {
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
}

/* AVATAR */
.avatar {
  width:38px;
  height:38px;
  border-radius:50%;
}

.avatar-fallback {
  width:38px;
  height:38px;
  border-radius:50%;
  background:#4f46e5;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:bold;
}

/* TEXTO */
.user-text .name {
  font-size:13px;
  font-weight:600;
  color:#111827;
}

.user-text .meta {
  font-size:11px;
  color:#6b7280;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 15px;
}

.page-btn {
  padding: 6px 11px;
  border-radius: 8px;
  background: #eef1f5;
  color: #333;
  text-decoration: none;
  font-size: 13px;
  transition: 0.2s;
}

.page-btn:hover {
  background: #dbe2ea;
}

.page-btn.active {
  background: #0d6efd;
  color: #fff;
  font-weight: bold;
}

.dots {
  padding: 6px;
  color: #999;
}

.badge{
    padding:4px 8px;
    border-radius:6px;
    color:white;
    font-size:12px;
}
.b-orange{ background:#ffc107; color:black; }

#calendar{
    width:100%;
    height: calc(100vh - 120px);
}

/* ✅ SELECT PROFESIONAL */
.form-select-small{
    padding:5px 10px;
    border:1px solid #ccc;
    border-radius:6px;
    font-size:13px;
    background:#fff;
    cursor:pointer;
    transition:0.2s;
}

/* ✅ HOVER */
.form-select-small:hover{
    border-color:#0d6efd;
}

/* ✅ FOCUS */
.form-select-small:focus{
    outline:none;
    border-color:#0d6efd;
    box-shadow:0 0 0 2px rgba(13,110,253,0.2);
}

.badge{
    padding:4px 8px;
    border-radius:6px;
    color:white;
    font-size:12px;
}

.b-blue{ background:#0d6efd; }

.container{
    padding:20px;
}

.header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:15px;
}

.btn-crear{
    background:#28a745;
    color:white;
    padding:8px 14px;
    border-radius:6px;
    text-decoration:none;
}

.card{
    background:white;
    padding:15px;
    border-radius:10px;
    box-shadow:0 2px 8px rgba(0,0,0,0.1);
}

.tabla-pro{
    width:100%;
    border-collapse:collapse;
}

.tabla-pro th{
    text-align:left;
    padding:10px;
    background:#f5f5f5;
}

.tabla-pro td{
    padding:10px;
    border-bottom:1px solid #eee;
}

.titulo{
    font-weight:600;
}

.select-pro{
    padding:6px;
    border-radius:6px;
    border:1px solid #ccc;
}

/* BADGES */
.badge{
    padding:4px 8px;
    border-radius:6px;
    color:white;
}

.badge.alta{ background:#dc3545;}
.badge.media{ background:#ffc107; color:black;}
.badge.baja{ background:#28a745;}

/* BOTÓN */
.btn-historial{
    background:#0d6efd;
    color:white;
    border:none;
    padding:5px 10px;
    border-radius:5px;
    cursor:pointer;
}
.btn-ver{
    background:#17a2b8;
    color:white;
    border:none;
    padding:5px 10px;
    border-radius:5px;
    cursor:pointer;
    margin-right:5px;
}
.link-contrato{
color:#0d6efd;
cursor:pointer;
font-weight:600;
position:relative;
}

.link-contrato::after{
content:" 👁";
font-size:12px;
}

.link-contrato:hover{
text-decoration:underline;
color:#084298;
}

/* ✅ CONTENEDOR GENERAL */
.dashboard{
padding:15px;
}

/* ✅ TARJETAS TOP */
.cards-top{
display:grid;
grid-template-columns: repeat(6,1fr);
gap:10px;
margin-bottom:15px;
}

.card-mini{
background:white;
padding:12px;
border-radius:10px;
box-shadow:0 2px 10px rgba(0,0,0,0.08);
border-left:4px solid #0d6efd;
}

.card-mini h5{
font-size:11px;
color:#6c757d;
margin:0;
}

.card-mini .num{
font-size:20px;
font-weight:bold;
margin-top:5px;
}

/* ✅ EXPORTACIONES */
.export-card{
background:white;
padding:15px;
border-radius:10px;
box-shadow:0 2px 10px rgba(0,0,0,0.08);
margin-bottom:15px;
}

.export-grid{
display:grid;
grid-template-columns: repeat(4,1fr);
gap:10px;
margin-top:10px;
}

.export-btn{
border:1px solid #0d6efd;
padding:10px;
border-radius:8px;
cursor:pointer;
text-align:center;
color:#0d6efd;
font-weight:500;
transition:0.2s;
}

.export-btn:hover{
background:#0d6efd;
color:white;
}

/* ✅ GRÁFICAS */
.stats-grid{
display:grid;
grid-template-columns: repeat(3,1fr);
gap:15px;
margin-top:15px;
}

.stat-card{
background:white;
padding:15px;
border-radius:10px;
box-shadow:0 2px 12px rgba(0,0,0,0.08);
}

.stat-card h4{
margin-bottom:10px;
font-size:13px;
color:#333;
}

/* ✅ SECCIÓN */
.section{
margin-top:20px;
}

.section-form{
    margin-top:15px;
    padding-top:10px;
    border-top:1px solid #eee;
}

/* ✅ RESPONSIVE */
@media(max-width:900px){

.cards-top{
grid-template-columns:repeat(2,1fr);
}

.export-grid{
grid-template-columns:repeat(2,1fr);
}

.stats-grid{
grid-template-columns:1fr;
}

}
.badge {
    padding:5px 10px;
    border-radius:6px;
    color:#000;
}


.container-docs {
    display:flex;
    justify-content:center;
    margin-top:40px;
}

.card-doc {
    background:#fff;
    border-radius:12px;
    box-shadow:0 8px 25px rgba(0,0,0,0.08);
    padding:30px;
    width:420px;
    animation:fadeIn 0.3s ease;
}

.card-header-doc h2 {
    margin:0;
    font-size:20px;
}

.card-header-doc p {
    font-size:13px;
    color:#777;
    margin-bottom:20px;
}

.form-group {
    margin-bottom:18px;
}

.form-group label {
    display:block;
    font-weight:600;
    margin-bottom:6px;
}

.input-modern {
    width:100%;
    padding:10px;
    border-radius:8px;
    border:1px solid #ddd;
    background:#f9f9f9;
    transition:.2s;
}

.input-modern:focus {
    border-color:#007bff;
    background:#fff;
    outline:none;
}

.file-box {
    display:flex;
    align-items:center;
    gap:10px;
    background:#f4f6f8;
    padding:10px;
    border-radius:8px;
}

.file-box input {
    flex:1;
}

#file-name {
    font-size:12px;
    color:#555;
}

.btn-primary-modern {
    width:100%;
    padding:12px;
    border:none;
    border-radius:8px;
    background:#007bff;
    color:#fff;
    font-weight:bold;
    cursor:pointer;
    transition:.2s;
}

.btn-primary-modern:hover {
    background:#0056b3;
}

/* progreso */
.progress-box {
    margin-bottom:15px;
}

.progress-text {
    font-size:12px;
    margin-bottom:5px;
}

.progress-bar-container {
    width:100%;
    height:8px;
    background:#eee;
    border-radius:10px;
}

.progress-bar-fill {
    height:100%;
    background:#28a745;
    border-radius:10px;
}

/* animación */
@keyframes fadeIn {
    from {opacity:0; transform:translateY(10px);}
    to {opacity:1; transform:translateY(0);}
}

/* ✅ ESTILO GENERAL SELECT */
.input-modern,
select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #dcdfe6;
    font-size: 14px;
    background: #fff;
    transition: all 0.25s ease;
    outline: none;
}

/* ✅ HOVER */
.input-modern:hover,
select:hover {
    border-color: #409eff;
}

/* ✅ FOCUS */
.input-modern:focus,
select:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22,119,255,0.2);
}

/* ✅ SELECT2 CONTENEDOR */
.select2-container--default .select2-selection--single {
    height: 40px;
    border-radius: 8px;
    border: 1px solid #dcdfe6;
    padding: 5px 10px;
    display: flex;
    align-items: center;
}

/* ✅ TEXTO */
.select2-selection__rendered {
    font-size: 14px;
    color: #333;
}

/* ✅ FOCUS SELECT2 */
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22,119,255,0.2);
}

/* ✅ DROPDOWN */
.select2-dropdown {
    border-radius: 8px;
    border: 1px solid #dcdfe6;
}

/* ✅ OPCIONES */
.select2-results__option {
    padding: 10px;
    font-size: 14px;
}

/* ✅ HOVER OPCIONES */
.select2-results__option--highlighted {
    background-color: #1677ff !important;
    color: #fff;
}

/* ✅ BARRA DE PROGRESO MÁS SUAVE */
.progress-bar-container {
    height: 8px;
    background: #eee;
    border-radius: 20px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1677ff, #409eff);
    transition: width 0.3s ease;
}

/* ✅ CONTENEDOR GENERAL */
.container-docs {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

/* ✅ CARD MÁS GRANDE */
.card-doc {
    width: 100%;
    max-width: 750px;  /* 🔥 AUMENTA AQUÍ */
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 35px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

/* ✅ HOVER SUAVE */
.card-doc:hover {
    transform: translateY(-2px);
}

/* ✅ HEADER */
.card-header-doc h2 {
    font-size: 22px;
    margin-bottom: 5px;
}

.card-header-doc p {
    color: #777;
    font-size: 14px;
}

/* ✅ FORM */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

/* ✅ BOTÓN MÁS GRANDE */
.btn-primary-modern {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    background: linear-gradient(90deg, #1677ff, #409eff);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary-modern:hover {
    opacity: 0.9;
}
/* ===== MODAL FIX ===== */
#fx-modal{
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,0.6) !important;
    display: none !important;
    z-index: 999999 !important;

    align-items: center !important;
    justify-content: center !important;
}

#fx-modal.active{
    display:flex !important;
}

#fx-modal .fx-modal-card{
    width:650px;
    max-height:85vh;
    overflow-y:auto;
}
.contenido{
    display:none;
}
.buscador-container{
    position: relative;
    width: 320px;
    margin-bottom:15px;
}

.buscador-container .icono{
    position:absolute;
    left:10px;
    top:50%;
    transform:translateY(-50%);
    font-size:14px;
    color:#6c757d;
}

.buscador-input{
    width:100%;
    padding:8px 10px 8px 30px; /* espacio para icono */
    border:1px solid #d1d5db;
    border-radius:8px;
    background:#f9fafb;
    font-size:14px;
    transition: all .2s ease;
}

/* ✅ hover */
.buscador-input:hover{
    border-color:#9ca3af;
}

/* ✅ focus */
.buscador-input:focus{
    outline:none;
    border-color:#2563eb;
    background:white;
    box-shadow:0 0 0 2px rgba(37,99,235,.15);
}
/* ✅ CONTENEDOR HEADER */
.header-buscador{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
    flex-wrap:wrap;
    gap:10px;
}

/* ✅ TÍTULO */
.header-buscador .titulo{
    font-size:18px;
    font-weight:600;
}

/* ✅ BUSCADOR */
.buscador-container{
    position:relative;
    width:280px;
}

/* ✅ ICONO */
.buscador-container .icono{
    position:absolute;
    left:10px;
    top:50%;
    transform:translateY(-50%);
    color:#6c757d;
    font-size:13px;
}

/* ✅ INPUT */
.buscador-input{
    width:100%;
    padding:8px 10px 8px 30px;
    border:1px solid #d1d5db;
    border-radius:8px;
    background:#f9fafb;
    font-size:13px;
    transition:0.2s;
}

/* ✅ FOCUS */
.buscador-input:focus{
    outline:none;
    border-color:#2563eb;
    background:white;
    box-shadow:0 0 0 2px rgba(37,99,235,.15);
}

.form-grid-5{
    display:grid;
    grid-template-columns: repeat(5, 1fr);
    gap:10px;
}

/* responsive */
@media(max-width:1200px){
}

@media(max-width:768px){
}
.col-5-custom {
    width: 20%;
    max-width: 20%;
    flex: 0 0 20%;
}

/* responsive */
@media (max-width: 1200px){
}

@media (max-width: 768px){
}

/* ✅ GRID DE 5 COLUMNAS */
.form-row-pro{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ✅ CADA CAMPO */
.col-pro{
    width: 20%;
}

/* ✅ LABEL */
.col-pro label{
    font-size: 12px;
    margin-bottom: 3px;
    display: block;
    color: #444;
}

/* ✅ INPUT */
.col-pro .form-control{
    height: 34px;
    padding: 4px 8px;
    font-size: 13px;
}

/* ✅ SEPARACIÓN ENTRE BLOQUES */
.section-form{
    margin-top:15px;
    padding-top:10px;
    border-top:1px solid #eee;
}

/* ✅ RESPONSIVE */
@media(max-width:1200px){
}

@media(max-width:768px){
}

@media(max-width:500px){
}


.form-grid-5 .field{
    width: 100%;
}

/* Inputs */
.form-grid-5 input,
.form-grid-5 select{
    width: 100%;
    height: 35px;
    font-size: 13px;
    padding: 5px;
}

/* Labels */
.form-grid-5 label{
    font-size: 12px;
    margin-bottom: 3px;
    display:block;
}

/* Responsive */
@media(max-width:1200px){
}

@media(max-width:768px){
}

/* ✅ REPARA GRID DE BOOTSTRAP DENTRO DEL CARD */
.card .row {
    display: flex !important;
    flex-wrap: wrap !important;
}

/* ✅ FUERZA COLUMNAS REALES */
.card .row > div {
    padding: 5px;
}

/* ✅ EVITA QUE TODO SE EXPANDA A 100% */
.card .col-4 { flex: 0 0 33.333% !important; max-width: 33.333% !important; }
.card .col-3 { flex: 0 0 25% !important; max-width: 25% !important; }
.card .col-2 { flex: 0 0 16.666% !important; max-width: 16.666% !important; }

/* ✅ INPUTS MÁS LIMPIOS */
.card input,
.card select {
    height: 34px;
    font-size: 13px;
}

/* ✅ LABELS LIMPIOS */
.card label {
    font-size: 12px;
    margin-bottom: 2px;
}

/* ✅ ESPACIADO ENTRE FILAS */
.card .row {
    row-gap: 10px;
}
.form-row-4{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap:14px;
}

.card{
background:white;
padding:20px;
border-radius:10px;
box-shadow:0 2px 10px rgba(0,0,0,0.08);
}

.header{
display:flex;
justify-content:space-between;
align-items:center;
}

.btn-novedad{
background:#0d6efd;
color:white;
border:none;
padding:7px 12px;
border-radius:6px;
cursor:pointer;
}

.grid{
display:grid;
grid-template-columns:1fr 1fr 1fr;
gap:15px;
margin-top:10px;
}

label{
font-size:12px;
color:#6c757d;
}

.green{
color:green;
font-weight:bold;
}

/* TIMELINE */
.timeline .item{
display:flex;
margin-bottom:15px;
}

.left-line{
width:3px;
background:#0d6efd;
margin-right:10px;
}

.content{
background:#f8f9fa;
padding:10px;
border-radius:6px;
width:100%;
}

.badge{
    padding:5px 10px;
    border-radius:6px;
    font-size:12px;
    font-weight:600;
    display:inline-block;
}

/* ✅ ESTADOS BIEN VISUALES */




.verde{ background:green; }
.azul{ background:#0d6efd; }

.meta{
font-size:11px;
color:#999;
margin-top:5px;
}

/* ADICIONES */
.adiciones{
margin-top:10px;
}

.adicion-item{
display:flex;
justify-content:space-between;
padding:8px;
border-bottom:1px solid #eee;
}

.valor{
font-weight:bold;
}
.barra-container{
    margin-top:8px;
}

.barra{
    width:100%;
    height:12px;
    background:#e9ecef;
    border-radius:6px;
    overflow:hidden;
}

.barra-fill{
    height:100%;
    width:0%;
    background:#28a745;
    transition:.4s;
}

.barra-texto{
    font-size:12px;
    margin-top:5px;
    color:#333;
}
.left-line{
       border-radius:4px;    width:4px;
}

/* ✅ COLORES */
.verde{
    background:#28a745;
}

.rojo{
    background:#dc3545;
}

.azul{
    background:#0d6efd;
}
/* ════════════════════════════════════════════════════════════════════
   FLUXA · CAPA DE NORMALIZACIÓN VISUAL  (v1)
   Añadida al final para unificar componentes sin tocar el resto del CSS.
   Usa las variables de :root ya existentes. Para revertir, borra desde
   aquí hasta el final del archivo.
   ════════════════════════════════════════════════════════════════════ */

/* ── TARJETAS (unifica las 12 definiciones de .card) ── */
.card{
    background: var(--white) !important;
    border: 1px solid var(--g-200) !important;
    border-radius: var(--r-lg) !important;
    box-shadow: var(--shadow-sm) !important;
    padding: 18px;                    /* respiración por defecto */
}
/* Cuando la tarjeta sí trae sus secciones internas con su propio padding
   (.card-header / .card-body), quitamos el padding del .card para que no
   se duplique. Cubre el patrón nuevo sin romper el viejo. */
.card:has(.card-header), .card:has(.card-body){ padding: 0 !important; }

.card-header{
    display:flex; align-items:center; justify-content:space-between;
    padding: 14px 18px !important;
    border-bottom: 1px solid var(--g-100) !important;
    font-size: .9rem; font-weight: 600; color: var(--g-800);
    background: transparent !important;
}
.card-body{ padding: 18px !important; }

/* ── PADDING DEL ÁREA DE PÁGINA (cuando el contenido va suelto sin .card)
   Aplica a títulos sueltos como h1/h2/h3 al inicio de la página, evitando
   que queden pegados al borde superior izquierdo de .page-body. */
.page-body > h1:first-child,
.page-body > h2:first-child,
.page-body > h3:first-child{ margin-top: 0; }

/* ── PAGE HEADER (.ph) — respiración consistente entre el título y el
   contenido que sigue. Útil en /cuentas/admin, /cuentas/supervisor,
   /cuentas/contabilidad, /cuentas/tesoreria. */
.ph{ margin-bottom: 16px !important; }

/* ── BARRA DE PESTAÑAS DE ESTADO (Radicada / Aprobado / Pendiente / Rechazado)
   En varias vistas de cuentas estos chips se ven pegados al borde del card.
   Damos un margen consistente. */
.tabs-estado, .tabs-cuentas{ margin: 4px 0 14px; display:flex; gap:8px; flex-wrap:wrap; }

/* ── CHIPS de estado sueltos en fila (.d-flex.gap-2.mb-3 con .badge) que se
   usan como leyenda al inicio de las vistas de cuentas. Que respiren del
   card de abajo. */
.page-body .d-flex.flex-wrap > .badge,
.page-body .d-flex.gap-2 > .badge{ margin-right: 2px; }
.page-body > div > .d-flex.flex-wrap{ margin-bottom: 14px; }

/* ── Cuando una vista anida su propio <div class="page-body"> dentro del
   layout (patrón viejo en cuentas/*), el segundo .page-body queda sin
   padding. Le restauramos un mínimo para que el contenido respire. */
.page-body .page-body{ padding: 0 !important; }
.page-body .page-body > .ph,
.page-body .page-body > .container-fluid{ padding-left: 0 !important; padding-right: 0 !important; }

/* ── TABLAS (unifica .table / .tabla-pro) ── */
.table, .tabla-pro{
    width:100%; border-collapse:collapse; font-size:.8rem;
}
.table th, .tabla-pro th{
    background: var(--g-50) !important;
    padding: 10px 14px !important;
    font-size: .68rem !important;
    font-weight: 600 !important;
    color: var(--g-500) !important;
    text-transform: uppercase; letter-spacing: .05em;
    text-align:left; white-space:nowrap;
    border-bottom: 1px solid var(--g-200) !important;
}
.table td, .tabla-pro td{
    padding: 11px 14px !important;
    border-bottom: 1px solid var(--g-100) !important;
    color: var(--g-700); vertical-align: middle;
}
.table tbody tr, .tabla-pro tbody tr{ transition: background .15s; }
.table tbody tr:hover, .tabla-pro tbody tr:hover{ background: var(--g-50); }
.table tbody tr:last-child td, .tabla-pro tbody tr:last-child td{ border-bottom:0 !important; }

/* ── BADGES (unifica las 6 definiciones) ── */
.badge{
    display:inline-flex; align-items:center; gap:4px;
    padding: 3px 10px !important;
    border-radius: 20px !important;
    font-size: .68rem !important;
    font-weight: 600 !important;
    line-height: 1.4; letter-spacing: .01em; white-space:nowrap;
    color: #fff;
}
/* Variantes semánticas con texto del tono oscuro de su familia (legibles) */
.badge.alta,   .b-red,    .e-devuelta { background: var(--danger-lt) !important;  color:#991b1b !important; }
.badge.media,  .b-amber,  .b-orange,
.e-revision,   .e-pago_amber                  { background: var(--warning-lt) !important; color:#92400e !important; }
.badge.baja,   .b-green,  .e-aprobada { background: var(--success-lt) !important; color:#065f46 !important; }
.b-blue, .azul, .e-radicada           { background: var(--brand-100) !important;  color:#1e40af !important; }
.b-purple, .e-pago                    { background: var(--purple-lt) !important;  color:#5b21b6 !important; }
.b-teal,  .e-pagada                   { background: var(--teal-lt) !important;    color:#0f766e !important; }
.b-gray,  .verde-gris, .e-borrador    { background: var(--g-100) !important;      color:var(--g-600) !important; }
.verde                                { background: var(--success-lt) !important; color:#065f46 !important; }

/* ── FORMULARIOS (campo consistente de 2 columnas) ── */
.form-control, .input-modern, select.form-control{
    width:100%;
    padding: 8px 12px !important;
    border: 1px solid var(--g-300) !important;
    border-radius: var(--r) !important;
    font-family: inherit; font-size: .82rem;
    color: var(--g-900); background: var(--white);
    transition: border-color .18s, box-shadow .18s; outline:none;
    height: auto;
}
.form-control:hover, .input-modern:hover{ border-color: var(--g-400) !important; }
.form-control:focus, .input-modern:focus{
    border-color: var(--brand-500) !important;
    box-shadow: 0 0 0 3px rgba(0,185,195,.12) !important;
}
.form-label{
    display:block; font-size:.75rem; font-weight:600;
    color: var(--g-700) !important; margin-bottom:5px;
}
.form-label .req{ color: var(--danger); margin-left:2px; }

/* Patrón estándar de formulario en 2 columnas (responsive) */
.form-row{
    display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px;
}
.form-group{ margin-bottom:14px; }
@media(max-width:760px){
    .form-row{ grid-template-columns:1fr; }
}

/* ── BOTONES (consistencia de tamaño/peso) ── */
.btn{
    display:inline-flex; align-items:center; gap:6px;
    padding: 8px 16px !important;
    border-radius: var(--r) !important;
    font-size:.8rem !important; font-weight:500 !important;
    border:1px solid transparent; cursor:pointer; white-space:nowrap;
    transition: all .18s;
}
.btn-primary{ background:var(--brand-600); color:#fff; border-color:var(--brand-600); }
.btn-primary:hover{ background:var(--brand-700); transform:translateY(-1px); box-shadow:0 4px 12px rgba(26,108,168,.25); }
.btn-success{ background:var(--success); color:#fff; }
.btn-success:hover{ filter:brightness(.93); transform:translateY(-1px); }
.btn-warning{ background:var(--warning); color:#fff; }
.btn-warning:hover{ filter:brightness(.93); transform:translateY(-1px); }
.btn-danger{ background:var(--danger); color:#fff; }
.btn-secondary{ background:var(--white); color:var(--g-700); border-color:var(--g-200); }
.btn-secondary:hover{ background:var(--g-50); border-color:var(--g-300); }
.btn-sm{ padding:5px 11px !important; font-size:.74rem !important; }

/* ── KPI / TARJETAS DE MÉTRICA (barra de color semántico arriba) ── */
.kpi, .card-mini{
    background: var(--white) !important;
    border: 1px solid var(--g-200) !important;
    border-left: 1px solid var(--g-200) !important;  /* anula el border-left:4px viejo */
    border-radius: var(--r-lg) !important;
    padding: 16px !important;
    position:relative; overflow:hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
}
.kpi:hover, .card-mini:hover{ box-shadow: var(--shadow); transform: translateY(-1px); }
.kpi::before, .card-mini::before{
    content:''; position:absolute; top:0; left:0; right:0; height:3px;
    background: var(--brand-500);
}
.kpi.blue::before,   .card-mini.blue::before   { background: var(--brand-500); }
.kpi.green::before,  .card-mini.green::before  { background: var(--success); }
.kpi.amber::before,  .card-mini.amber::before  { background: var(--warning); }
.kpi.red::before,    .card-mini.red::before    { background: var(--danger); }
.kpi.purple::before, .card-mini.purple::before { background: var(--purple); }
.kpi.teal::before,   .card-mini.teal::before   { background: var(--teal); }
.card-mini h5{ font-size:.68rem; font-weight:600; color:var(--g-500); text-transform:uppercase; letter-spacing:.04em; margin:0; }
.card-mini .num{ font-size:1.6rem; font-weight:600; color:var(--g-900); margin-top:5px; line-height:1; }

/* ── PAGINACIÓN (unifica .pagination/.page-link/.page-btn) ── */
.page-link, .page-btn{
    display:inline-flex; align-items:center; justify-content:center;
    min-width:30px; height:30px; padding:0 8px;
    border:1px solid var(--g-200) !important; border-radius:6px !important;
    font-size:.73rem; color:var(--g-600) !important;
    background:var(--white) !important; transition:all .15s;
}
.page-link:hover, .page-btn:hover{ border-color:var(--brand-400) !important; color:var(--brand-600) !important; }
.page-link.active, .page-btn.active{
    background:var(--brand-600) !important; border-color:var(--brand-600) !important;
    color:#fff !important; font-weight:600;
}

/* ── PESOS TIPOGRÁFICOS (evita el 700 pesado) ── */
.ph-title{ font-weight:600 !important; }

/* fin capa de normalización */