/* ================================================================
   Venvers Licitaciones – Design System
   Extiende el sistema base del proyecto OC.
   Paleta: azul marino #1E1B4B, violeta #6366F1, acentos verde/naranja/celeste
   ================================================================ */

/* ── Fuente: Poppins ─────────────────────────────────────────── */
@font-face { font-family:'Poppins'; font-style:normal; font-weight:400; font-display:swap;
  src: url(https://fonts.gstatic.com/s/poppins/v24/pxiEyp8kv8JHgFVrJJfecg.woff2) format('woff2'); }
@font-face { font-family:'Poppins'; font-style:normal; font-weight:500; font-display:swap;
  src: url(https://fonts.gstatic.com/s/poppins/v24/pxiByp8kv8JHgFVrLGT9Z1xlFc-K.woff2) format('woff2'); }
@font-face { font-family:'Poppins'; font-style:normal; font-weight:600; font-display:swap;
  src: url(https://fonts.gstatic.com/s/poppins/v24/pxiByp8kv8JHgFVrLEj6Z1xlFc-K.woff2) format('woff2'); }
@font-face { font-family:'Poppins'; font-style:normal; font-weight:700; font-display:swap;
  src: url(https://fonts.gstatic.com/s/poppins/v24/pxiByp8kv8JHgFVrLCz7Z1xlFc-K.woff2) format('woff2'); }

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  /* Marca */
  --clr-primary:        oklch(0.50 0.22 283);
  --clr-primary-dark:   oklch(0.36 0.24 283);
  --clr-primary-light:  oklch(0.95 0.05 283);

  /* Superficies */
  --clr-bg:             oklch(0.972 0.004 283);
  --clr-card:           oklch(1     0     0);
  --clr-muted:          oklch(0.963 0.006 283);
  --clr-accent:         oklch(0.94  0.04  283);
  --clr-border:         oklch(0.90 0.005 283);
  --clr-input-border:   oklch(0.91 0.006 283);

  /* Texto */
  --clr-text:           oklch(0.145 0 0);
  --clr-text-muted:     oklch(0.50  0 0);

  /* Alias de compatibilidad — usados por vistas de Portal Proveedores
     (Pagos/Cancelaciones). Mapean a los tokens --clr-* del design system. */
  --text-primary:       var(--clr-text);
  --text-muted:         var(--clr-text-muted);
  --bg-card:            var(--clr-card);
  --border-color:       var(--clr-border);
  --bg-hover:           var(--clr-muted);

  /* Sidebar oscuro */
  --clr-sidebar:        oklch(0.17 0.10 283);
  --clr-sidebar-text:   oklch(0.93 0    0);
  --clr-sidebar-dim:    oklch(0.58 0    0);
  --clr-sidebar-active: oklch(0.25 0.12 283);
  --clr-sidebar-border: oklch(0.28 0.08 283);
  --clr-table-head:     oklch(0.23 0.10 283);

  /* Funcionales */
  --clr-success:        oklch(0.55  0.18  142);
  --clr-success-bg:     oklch(0.95  0.04  142);
  --clr-warning:        oklch(0.72  0.18  75);
  --clr-warning-bg:     oklch(0.97  0.04  75);
  --clr-danger:         oklch(0.577 0.245 27.325);
  --clr-danger-bg:      oklch(0.96  0.02  27);
  --clr-info:           oklch(0.62  0.17  230);
  --clr-info-bg:        oklch(0.95  0.04  230);

  /* Estados de licitación */
  --clr-status-published:   oklch(0.55 0.18 142);   /* verde */
  --clr-status-closing:     oklch(0.72 0.18 55);    /* naranja */
  --clr-status-closed:      oklch(0.50 0.22 283);   /* violeta */
  --clr-status-awarded:     oklch(0.40 0.20 142);   /* verde oscuro */
  --clr-status-cancelled:   oklch(0.55 0    0);     /* gris */
  --clr-status-draft:       oklch(0.68 0    0);     /* gris claro */

  /* Tipografía */
  --font-sans:  'Poppins', system-ui, -apple-system, sans-serif;
  --font-mono:  'Consolas', 'Courier New', monospace;

  /* Espaciado / radios */
  --radius-sm:  0.25rem;
  --radius:     0.5rem;
  --radius-lg:  0.75rem;
  --radius-xl:  1rem;
  --radius-full:9999px;

  /* Sombras */
  --shadow-sm:  0 1px 2px oklch(0 0 0 / 0.06);
  --shadow:     0 1px 3px oklch(0 0 0 / 0.10), 0 1px 2px oklch(0 0 0 / 0.06);
  --shadow-md:  0 4px 6px oklch(0 0 0 / 0.07), 0 2px 4px oklch(0 0 0 / 0.06);

  /* Layout */
  --sidebar-w:  88px;
  --header-h:   56px;
}

/* ── Reset / Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: var(--font-sans); background: var(--clr-bg); color: var(--clr-text);
  -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ── Layout Licitaciones ─────────────────────────────────────── */
.layout-licitaciones {
  display: flex;
  min-height: 100vh;
}

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

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--clr-sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--clr-sidebar-border);
}

.sidebar__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--header-h);
  border-bottom: 1px solid var(--clr-sidebar-border);
}

.sidebar__logo-btn {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1.125rem;
  transition: opacity .15s;
}
.sidebar__logo-btn:hover { opacity: .85; }
.sidebar__logo-img { width: 100%; height: 100%; object-fit: contain; }
.sidebar__logo-fallback {
  width: 36px; height: 36px;
  background: var(--clr-primary);
  border-radius: var(--radius);
  color: #fff; font-weight: 700; font-size: 1.125rem;
  align-items: center; justify-content: center;
}

.sidebar__nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; flex: 1; }

.sidebar__item {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px; padding: 10px 4px; width: 100%;
  color: oklch(0.6 0 0);
  font-size: 0.5625rem; font-weight: 500;
  text-align: center; line-height: 1.2;
  transition: color .15s, background .15s;
}
.sidebar__item:hover { color: var(--clr-sidebar-text); background: var(--clr-sidebar-active); }
.sidebar__item.active {
  color: #fff; background: var(--clr-sidebar-active);
  border-left: 2px solid var(--clr-primary);
}
.sidebar__item svg { width: 20px; height: 20px; flex-shrink: 0; }

.sidebar__section-label {
  padding: .5rem .25rem .25rem;
  font-size: .5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.15;
  text-align: center;
  color: rgba(255,255,255,.32);
  pointer-events: none;
  user-select: none;
}
.sidebar__back {
  display: flex; align-items: center; gap: .625rem;
  padding: .65rem 1rem;
  font-size: .78rem; font-weight: 500;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,.07);
  margin-top: auto;
  transition: color .15s;
}
.sidebar__back:hover { color: rgba(255,255,255,.85); }
.sidebar__back svg { width: 15px; height: 15px; flex-shrink: 0; }

.sidebar__section-divider {
  margin: .25rem 1rem .5rem;
  border: none;
  border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar__badge {
  margin-left: auto;
  background: var(--clr-primary);
  color: #fff;
  font-size: .625rem;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: 99px;
  line-height: 1.4;
}

/* ── Header ──────────────────────────────────────────────────── */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 1.5rem;
  background: var(--clr-card);
  border-bottom: 1px solid var(--clr-border);
  flex-shrink: 0;
}

.top-header__breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8125rem; color: var(--clr-text-muted);
}

.top-header__right {
  display: flex; align-items: center; gap: 1rem;
}

.top-header__user {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; font-weight: 500; color: var(--clr-text);
}

/* ── Avatar de marca ─────────────────────────────────────────────
   Logotipo de la empresa en la barra superior. Tamaño fijo y recorte
   circular para que cualquier logo (cuadrado o apaisado) quede limpio. */
.marca-avatar {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--clr-primary-light);
  border: 1px solid var(--clr-border);
}
.marca-avatar img {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #fff;
}
.marca-avatar__ini {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: .02em;
  color: var(--clr-primary-dark);
}

/* ── Role Switcher ───────────────────────────────────────────── */
.role-switcher {
  display: flex;
  background: var(--clr-muted);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.role-btn {
  padding: 0.25rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 500;
  color: var(--clr-text-muted);
  transition: all .2s;
}
.role-btn--active {
  background: var(--clr-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* ── Breadcrumb inline en header ─────────────────────────────── */
.breadcrumb__link { color: var(--clr-text-muted); transition: color .15s; }
.breadcrumb__link:hover { color: var(--clr-text); }
.breadcrumb__sep { color: var(--clr-border); }
.breadcrumb__current { font-weight: 600; color: var(--clr-primary); }

/* ── Main content ────────────────────────────────────────────── */
.main-content { flex: 1; padding: 1.5rem; overflow: auto; }

/* ── Página / secciones ──────────────────────────────────────── */
.page-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
.page-title { font-size: 1.5rem; font-weight: 700; flex: 1; }
.page-subtitle { font-size: 0.875rem; color: var(--clr-text-muted); margin-top: 0.25rem; }
.section-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}
.card__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem;
}

/* ── KPI Grid ────────────────────────────────────────────────── */
.kpi-section { margin-bottom: 1.5rem; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.kpi-card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: box-shadow .2s, border-color .2s, transform .15s;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.kpi-card:hover {
  border-color: var(--clr-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.kpi-card__icon { font-size: 1.5rem; }
.kpi-card__value { font-size: 2rem; font-weight: 700; color: var(--clr-primary); line-height: 1; }
.kpi-card__label { font-size: 0.75rem; color: var(--clr-text-muted); font-weight: 500; }

.kpi-card__icon--activas   { color: var(--clr-info); }
.kpi-card__icon--pendientes { color: var(--clr-warning); }
.kpi-card__icon--evaluacion { color: var(--clr-primary); }
.kpi-card__icon--adjudicadas { color: var(--clr-success); }
.kpi-card__icon--rechazadas { color: var(--clr-danger); }
.kpi-card__icon--proximas  { color: var(--clr-primary); }
.kpi-card__icon--draft     { color: var(--clr-text-muted); }

/* ── Dashboard grid ──────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1rem;
}
@media (max-width: 1024px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs-bar {
  display: flex; gap: 0.25rem; flex-wrap: wrap;
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 0.375rem;
  margin-bottom: 1rem;
}

.tab {
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius);
  font-size: 0.8125rem; font-weight: 500;
  color: var(--clr-text-muted);
  transition: all .15s;
  white-space: nowrap;
}
.tab:hover { background: var(--clr-muted); color: var(--clr-text); }
.tab--active { background: var(--clr-primary); color: #fff; }

/* ── Search bar ──────────────────────────────────────────────── */
.search-bar {
  display: flex; gap: 0.75rem; margin-bottom: 1rem;
}
.search-input {
  flex: 1; padding: 0.625rem 1rem;
  border: 1px solid var(--clr-input-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--clr-card);
  transition: border-color .15s;
}
.search-input:focus { outline: none; border-color: var(--clr-primary); }

/* ── Data table ──────────────────────────────────────────────── */
.data-table {
  width: 100%; border-collapse: collapse;
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: 0.875rem;
}
.data-table thead tr {
  background: var(--clr-table-head);
  color: #fff;
}
.data-table th {
  padding: 0.75rem 1rem;
  text-align: left; font-weight: 600;
  font-size: 0.75rem; letter-spacing: 0.04em;
  white-space: nowrap;
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--clr-border);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--clr-muted); }

/* ── Status badges ───────────────────────────────────────────── */
.status-badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem; font-weight: 600;
  white-space: nowrap;
}
.status--published   { background: oklch(0.95 0.04 142); color: oklch(0.40 0.18 142); }
.status--closing     { background: oklch(0.97 0.04 55);  color: oklch(0.50 0.18 55); }
.status--closed      { background: var(--clr-primary-light); color: var(--clr-primary-dark); }
.status--awarded     { background: oklch(0.92 0.06 142); color: oklch(0.35 0.20 142); }
.status--cancelled   { background: oklch(0.95 0 0);      color: oklch(0.45 0 0); }
.status--draft       { background: oklch(0.93 0 0);      color: oklch(0.55 0 0); }
.status--submitted   { background: oklch(0.92 0.04 230); color: oklch(0.40 0.18 230); }
.status--review      { background: var(--clr-primary-light); color: var(--clr-primary); }
.status--rejected    { background: var(--clr-danger-bg); color: var(--clr-danger); }
.status--withdrawn   { background: oklch(0.95 0 0);      color: oklch(0.50 0 0); }

/* ── Match badge ─────────────────────────────────────────────── */
.match-badge {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.match-badge--high   { background: var(--clr-success); }
.match-badge--medium { background: var(--clr-warning); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 600;
  transition: all .15s;
  white-space: nowrap;
}
.btn--primary {
  background: var(--clr-primary); color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--clr-primary-dark); }
.btn--outline {
  border: 1.5px solid var(--clr-primary); color: var(--clr-primary);
  background: transparent;
}
.btn--outline:hover { background: var(--clr-primary-light); }
.btn--ghost { color: var(--clr-text-muted); background: transparent; }
.btn--ghost:hover { background: var(--clr-muted); color: var(--clr-text); }
.btn--danger { background: var(--clr-danger); color: #fff; }
.btn--danger:hover { opacity: .9; }
.btn--sm { padding: 0.3rem 0.75rem; font-size: 0.8125rem; }
.btn--icon { padding: 0.375rem; border-radius: var(--radius); color: var(--clr-text-muted); }
.btn--icon:hover { background: var(--clr-muted); color: var(--clr-text); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ── Links ───────────────────────────────────────────────────── */
.link-numero { color: var(--clr-primary); font-weight: 600; }
.link-numero:hover { text-decoration: underline; }
.link-ver-todas { font-size: 0.8125rem; color: var(--clr-primary); font-weight: 500; }
.link-ver-todas:hover { text-decoration: underline; }

/* ── Cell helpers ────────────────────────────────────────────── */
.cell-comprador { font-weight: 600; }
.cell-industria { font-size: 0.75rem; color: var(--clr-text-muted); }
.cell-secondary { font-size: 0.75rem; color: var(--clr-text-muted); }
.actions-cell { display: flex; gap: 0.375rem; white-space: nowrap; }
.star-fav { color: #F59E0B; font-size: 0.875rem; }

/* ── Detail layout ───────────────────────────────────────────── */
.page-detail { max-width: 1200px; margin: 0 auto; }
.detail-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
.detail-header .page-title { flex: 1; }
.detail-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.detail-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
}
@media (max-width: 900px) { .detail-body { grid-template-columns: 1fr; } }
.detail-aside { display: flex; flex-direction: column; gap: 1rem; }

/* ── Item cards ──────────────────────────────────────────────── */
.item-card {
  padding: 0.875rem;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}
.item-card:last-child { margin-bottom: 0; }
.item-card__header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.item-card__specs { font-size: 0.8125rem; color: var(--clr-text-muted); line-height: 1.5; }

/* ── Badge ───────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--clr-accent); color: var(--clr-primary);
  border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600;
}

/* ── Cronograma ──────────────────────────────────────────────── */
.cronograma { display: flex; flex-direction: column; gap: 0.75rem; }
.cronograma__etapa {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.5rem 0;
  border-left: 2px solid var(--clr-border);
  padding-left: 1rem;
}
.cronograma__etapa--done { border-left-color: var(--clr-success); }
.cronograma__dot { font-size: 1rem; flex-shrink: 0; }
.cronograma__nombre { font-size: 0.875rem; font-weight: 500; }
.cronograma__fecha { font-size: 0.75rem; color: var(--clr-text-muted); }

/* ── Q&A ─────────────────────────────────────────────────────── */
.qa-item { padding: 0.75rem 0; border-bottom: 1px solid var(--clr-border); }
.qa-item:last-child { border-bottom: none; }
.qa-item__empresa { font-size: 0.75rem; color: var(--clr-text-muted); margin-bottom: 0.25rem; }
.qa-item__pregunta { font-size: 0.875rem; font-weight: 500; margin-bottom: 0.25rem; }
.qa-item__respuesta { font-size: 0.875rem; color: var(--clr-primary); }

/* ── Doc items ───────────────────────────────────────────────── */
.doc-item {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.5rem 0; border-bottom: 1px solid var(--clr-border);
  font-size: 0.8125rem;
}
.doc-item:last-of-type { border-bottom: none; }

/* ── Requisito items ─────────────────────────────────────────── */
.req-item { font-size: 0.8125rem; padding: 0.375rem 0; color: var(--clr-text-muted); }

/* ── Fecha rows ──────────────────────────────────────────────── */
.fecha-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.375rem 0; font-size: 0.875rem; border-bottom: 1px solid var(--clr-border);
}
.fecha-row:last-child { border-bottom: none; }

/* ── Wizard ──────────────────────────────────────────────────── */
.page-wizard { max-width: 900px; margin: 0 auto; }

.wizard-stepper {
  display: flex; align-items: center; gap: 0;
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.wizard-step {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.8125rem; font-weight: 500;
  color: var(--clr-text-muted);
  transition: all .15s;
  white-space: nowrap;
  flex: 1;
}
.wizard-step--active {
  background: var(--clr-primary-light);
  color: var(--clr-primary);
  font-weight: 600;
}
.wizard-step--done { color: var(--clr-success); }
.wizard-step__num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--clr-muted);
  color: var(--clr-text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
}
.wizard-step--active .wizard-step__num { background: var(--clr-primary); color: #fff; }
.wizard-step--done .wizard-step__num { background: var(--clr-success); color: #fff; }

.wizard-content { margin-bottom: 1.5rem; }
.wizard-pane {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.wizard-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem;
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
}

.autosave-indicator { font-size: 0.75rem; }

/* ── Utility ─────────────────────────────────────────────────── */
.text-muted   { color: var(--clr-text-muted); }
.text-danger  { color: var(--clr-danger); }
.text-success { color: var(--clr-success); }
.text-warning { color: var(--clr-warning); }

.loading-state, .empty-state {
  text-align: center; padding: 3rem 1rem;
  color: var(--clr-text-muted); font-size: 0.875rem;
}

/* ── Modals ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: oklch(0 0 0 / 0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 1rem;
}
.modal {
  background: var(--clr-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  width: 100%; max-width: 560px;
  display: flex; flex-direction: column;
  max-height: 90vh;
}
.modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--clr-border);
}
.modal__title { font-size: 1.0625rem; font-weight: 700; }
.modal__body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal__footer {
  display: flex; justify-content: flex-end; gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--clr-border);
}

/* ── Form controls ───────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.8125rem; font-weight: 500; margin-bottom: 0.375rem; color: var(--clr-text); }
.form-label .required { color: var(--clr-danger); margin-left: 2px; }
.form-control {
  width: 100%; padding: 0.5rem 0.875rem;
  border: 1px solid var(--clr-input-border);
  border-radius: var(--radius);
  font-size: 0.875rem; background: var(--clr-card);
  transition: border-color .15s;
}
.form-control:focus { outline: none; border-color: var(--clr-primary); }
.form-control::placeholder { color: var(--clr-text-muted); }

/* ── Actividad / notificaciones ──────────────────────────────── */
.actividad-card { min-height: 200px; }
.notif-card { }

/* ── Page list helper ────────────────────────────────────────── */
.page-list { }
.page-inicio { }

/* ── Wizard ──────────────────────────────────────────────────── */
.page-wizard { max-width: 900px; margin: 0 auto; }

.wizard-stepper {
  display: flex; gap: 0; margin-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  border: 1px solid var(--clr-border);
}
.wizard-step {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.875rem 0.5rem;
  background: var(--clr-muted); border: none; cursor: pointer;
  font-size: 0.8125rem; font-weight: 500; color: var(--clr-text-muted);
  border-right: 1px solid var(--clr-border);
  transition: background .15s, color .15s;
}
.wizard-step:last-child { border-right: none; }
.wizard-step:disabled { cursor: not-allowed; opacity: 0.6; }
.wizard-step--active { background: var(--clr-primary); color: #fff; }
.wizard-step--done   { background: var(--clr-success-bg); color: var(--clr-success); }
.wizard-step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: rgba(255,255,255,.25); font-size: 0.75rem; font-weight: 700;
}
.wizard-step--done .wizard-step__num   { background: var(--clr-success); color: #fff; }
.wizard-step--active .wizard-step__num { background: rgba(255,255,255,.3); }

.wizard-progress {
  height: 4px; background: var(--clr-border);
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 1.5rem;
  border: 1px solid var(--clr-border); border-top: none;
}
.wizard-progress__bar {
  height: 100%; background: var(--clr-primary);
  transition: width .3s ease;
}

.wizard-pane { display: flex; flex-direction: column; gap: 1.25rem; }
.wizard-pane .card + .card { margin-top: 0; }

.wizard-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--clr-border);
}

/* Autosave indicator */
.autosave-indicator { font-size: 0.75rem; color: var(--clr-text-muted); }

/* Wizard: Requisitos */
.req-list { display: flex; flex-direction: column; gap: 0.75rem; }
.req-row {
  border: 1px solid var(--clr-border); border-radius: var(--radius);
  padding: 0.875rem 1rem; background: var(--clr-muted);
}
.req-row--obligatorio { border-color: oklch(0.85 0.06 50); background: oklch(0.98 0.01 50); }
.req-row__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.req-row__desc { font-size: 0.875rem; line-height: 1.4; }
.req-row__btns { display: flex; gap: 0.5rem; flex-shrink: 0; }
.req-row .input { margin-top: 0.625rem; width: 100%; }

/* Wizard: Documentos */
.docs-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.doc-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--clr-border); border-radius: var(--radius);
  background: var(--clr-muted);
}
.doc-row__nombre { flex: 1; font-size: 0.875rem; }
.doc-upload { display: flex; gap: 0.75rem; align-items: center; }
.doc-upload .input { flex: 1; }

/* Wizard: Tabla económica */
.input--num { width: 130px; text-align: right; }
.total-row { background: var(--clr-muted); font-weight: 600; }
.text-right { text-align: right; }
.textarea { resize: vertical; }
.input-group { display: flex; gap: 0.5rem; }

/* Wizard: Revisión */
.revision-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
}
.revision-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 1rem;
  border: 1px solid var(--clr-border); border-radius: var(--radius);
  background: var(--clr-muted);
}
.checkbox-row {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.625rem 0; font-size: 0.875rem; cursor: pointer;
}
.checkbox-row input[type=checkbox] { margin-top: 2px; flex-shrink: 0; width: 1rem; height: 1rem; }
.btn--lg { padding: 0.75rem 2rem; font-size: 1rem; }

/* Badge variants */
.badge { display: inline-block; padding: 0.2em 0.6em; border-radius: 999px; font-size: 0.7rem; font-weight: 600; }
.badge--success { background: var(--clr-success-bg); color: var(--clr-success); }
.badge--danger  { background: var(--clr-danger-bg);  color: var(--clr-danger); }
.badge--warning { background: var(--clr-warning-bg); color: var(--clr-warning); }
.badge--info    { background: var(--clr-primary-light); color: var(--clr-primary); }

/* Alert */
.alert { padding: 0.75rem 1rem; border-radius: var(--radius); font-size: 0.875rem; margin-bottom: 1rem; }
.alert--warning { background: var(--clr-warning-bg); color: oklch(0.45 0.12 60); border: 1px solid oklch(0.88 0.08 75); }
.alert--danger  { background: var(--clr-danger-bg);  color: var(--clr-danger);  border: 1px solid oklch(0.85 0.08 27); }

/* Modal simple */
.modal__actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; }

/* Button variants */
.btn--success { background: var(--clr-success); color: #fff; border-color: var(--clr-success); }
.btn--danger  { background: var(--clr-danger);  color: #fff; border-color: var(--clr-danger); }

/* Detail layout */
.detail-header {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.detail-actions { display: flex; gap: 0.75rem; margin-left: auto; flex-wrap: wrap; }
.detail-body { display: grid; grid-template-columns: 1fr 360px; gap: 1.5rem; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 1.25rem; }
.detail-aside { display: flex; flex-direction: column; gap: 1.25rem; }

.item-card { padding: 0.75rem; border: 1px solid var(--clr-border); border-radius: var(--radius); margin-bottom: 0.5rem; }
.item-card:last-child { margin-bottom: 0; }
.item-card__header { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.item-card__specs { color: var(--clr-text-muted); font-size: 0.8125rem; margin-top: 0.25rem; }

.cronograma { display: flex; flex-direction: column; gap: 0.625rem; }
.cronograma__etapa { display: flex; align-items: flex-start; gap: 0.875rem; }
.cronograma__etapa--done .cronograma__nombre { text-decoration: line-through; color: var(--clr-text-muted); }
.cronograma__dot { font-size: 1rem; margin-top: 2px; }
.cronograma__nombre { font-size: 0.875rem; font-weight: 500; }
.cronograma__fecha { font-size: 0.75rem; color: var(--clr-text-muted); }

.qa-item { padding: 0.75rem 0; border-bottom: 1px solid var(--clr-border); }
.qa-item:last-child { border-bottom: none; }
.qa-item__empresa { font-size: 0.75rem; color: var(--clr-text-muted); margin-bottom: 0.25rem; }
.qa-item__pregunta { font-size: 0.875rem; font-weight: 500; }
.qa-item__respuesta { font-size: 0.875rem; margin-top: 0.25rem; color: var(--clr-success); }

.doc-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--clr-border); }
.doc-item:last-child { border-bottom: none; }
.doc-item span:first-child { flex: 1; font-size: 0.875rem; }

.req-item { padding: 0.375rem 0; font-size: 0.875rem; border-bottom: 1px solid var(--clr-border); }
.req-item:last-child { border-bottom: none; }

.fecha-row { display: flex; justify-content: space-between; padding: 0.375rem 0; font-size: 0.875rem; border-bottom: 1px solid var(--clr-border); }
.fecha-row:last-child { border-bottom: none; }

.form-row { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* ── Comparación de propuestas ───────────────────────────────── */
.tr--winner { background: var(--clr-success-bg); }
.tr--rejected { opacity: 0.55; }

.progress-mini {
  height: 6px; background: var(--clr-border); border-radius: 3px;
  overflow: hidden; margin-bottom: 2px;
}
.progress-mini__bar { height: 100%; background: var(--clr-primary); border-radius: 3px; }

.alert--success { background: var(--clr-success-bg); color: var(--clr-success); border: 1px solid oklch(0.80 0.10 142); }

/* ── Input styles ────────────────────────────────────────────── */
.input {
  width: 100%; padding: 0.5rem 0.75rem;
  border: 1px solid var(--clr-input-border);
  border-radius: var(--radius);
  font-size: 0.875rem; font-family: inherit;
  background: var(--clr-card); color: var(--clr-text);
  transition: border-color .15s;
  box-sizing: border-box;
}
.input:focus { outline: none; border-color: var(--clr-primary); }
.input::placeholder { color: var(--clr-text-muted); }
select.input { cursor: pointer; }

/* ── Page subtitle ───────────────────────────────────────────── */
.page-subtitle { color: var(--clr-text-muted); font-size: 0.875rem; margin-top: 0.25rem; }

/* ── Sort buttons ────────────────────────────────────────────── */
.sort-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  font-size: inherit; font-weight: 600; color: inherit;
  display: flex; align-items: center; gap: 0.25rem;
  white-space: nowrap;
}
.sort-btn:hover { color: var(--clr-primary); }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination { display: flex; gap: 0.25rem; align-items: center; }
.table-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--clr-border);
  font-size: 0.8125rem; color: var(--clr-text-muted);
}

/* ── Tabs badge ──────────────────────────────────────────────── */
.tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.25rem; height: 1.25rem; padding: 0 0.3rem;
  border-radius: 999px; font-size: 0.7rem; font-weight: 700;
  background: var(--clr-muted); color: var(--clr-text-muted);
  margin-left: 0.25rem;
}
.tab-count--badge { background: var(--clr-danger); color: #fff; }

/* ── Drawer de filtros ───────────────────────────────────────── */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 200; display: flex; justify-content: flex-end;
}
.drawer {
  width: 340px; max-width: 90vw; height: 100%;
  background: var(--clr-card); display: flex; flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,.15);
  animation: slideInRight .2s ease;
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.drawer__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--clr-border);
}
.drawer__title { font-size: 1rem; font-weight: 700; }
.drawer__body { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.drawer__footer {
  padding: 1rem 1.5rem; border-top: 1px solid var(--clr-border);
  display: flex; gap: 0.75rem; justify-content: flex-end;
}
.check-group { display: flex; flex-direction: column; gap: 0.375rem; }
.btn--active { border-color: var(--clr-primary); color: var(--clr-primary); background: var(--clr-primary-light); }

/* ── Notificaciones ──────────────────────────────────────────── */
.notif-list { padding: 0; }
.notif-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem 1.25rem; cursor: pointer;
  border-bottom: 1px solid var(--clr-border);
  transition: background .1s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--clr-muted); }
.notif-item--leida { opacity: 0.6; }
.notif-item__icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }
.notif-item__body { flex: 1; min-width: 0; }
.notif-item__titulo {
  font-weight: 600; font-size: 0.875rem; margin-bottom: 0.25rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.notif-item__mensaje { font-size: 0.8125rem; color: var(--clr-text-muted); line-height: 1.4; }
.notif-item__fecha { font-size: 0.75rem; color: var(--clr-text-muted); margin-top: 0.25rem; }
.notif-item__tipo { flex-shrink: 0; }
.notif-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--clr-primary); flex-shrink: 0;
}

/* Notif badge en sidebar */
.notif-badge {
  position: absolute; top: -6px; right: -8px;
  background: var(--clr-danger); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  min-width: 16px; height: 16px; padding: 0 3px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
}

/* ── Login page ─────────────────────────────────────────────── */
.lp {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: url('/images/login-space-bg.png') center center / cover no-repeat;
  background-color: oklch(0.13 0.05 280);
  color: #fff;
}

/* Top bar */
.lp__topbar {
  display: flex; align-items: center;
  padding: 80px 2.5rem 1.25rem 80px;
  gap: 0.75rem;
}
.lp__logo { height: 40px; }
.lp__logo-fallback { display: flex; align-items: center; gap: 4px; }
.lp__logo-v { font-size: 1.75rem; font-weight: 900; color: #fff; }
.lp__logo-text { font-size: 1.25rem; font-weight: 700; color: #fff; }
.lp__region {
  margin-left: auto;
  font-size: 0.875rem; font-weight: 600; color: rgba(255,255,255,0.8);
  letter-spacing: 0.05em;
}
/* Empuja el switcher de idioma del login al extremo derecho del topbar */
.lp__topbar .lang-switch { margin-left: auto; }

/* Body */
.lp__body {
  flex: 1; display: flex; align-items: center;
  padding: 2rem 2.5rem 2rem 80px;
  gap: 4rem;
}

/* Card */
.lp__card-wrap { flex-shrink: 0; width: 400px; }
.lp__card {
  background: #fff; color: var(--clr-text);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.lp__title {
  font-size: 1.75rem; font-weight: 700;
  color: var(--clr-primary);
  text-align: center;
  margin: 0 0 1.5rem;
}
.lp__error {
  background: oklch(0.95 0.05 25); color: oklch(0.45 0.18 25);
  border: 1px solid oklch(0.82 0.1 25);
  border-radius: 8px; padding: 0.65rem 1rem;
  font-size: 0.85rem; margin-bottom: 1rem;
}
.lp__field { display: flex; flex-direction: column; gap: 0.375rem; margin-bottom: 1rem; }
.lp__label { font-size: 0.8rem; font-weight: 500; color: var(--clr-text-muted); }
.lp__input {
  width: 100%; padding: 0.65rem 0.875rem;
  border: 1.5px solid var(--clr-border); border-radius: 8px;
  font-size: 0.9rem; font-family: inherit;
  color: var(--clr-text); background: #fff;
  transition: border-color .15s; box-sizing: border-box;
}
.lp__input:focus { outline: none; border-color: var(--clr-primary); }
.lp__input-wrap { position: relative; }
.lp__input-wrap .lp__input { padding-right: 2.75rem; }
.lp__eye {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1rem; padding: 0;
  line-height: 1;
}
.lp__remember {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: var(--clr-text-muted);
  margin-bottom: 1.25rem; cursor: pointer;
}
.lp__remember input { width: 1rem; height: 1rem; cursor: pointer; }
.lp__btn {
  width: 100%; padding: 0.8rem;
  background: var(--clr-primary); color: #fff;
  border: none; border-radius: 8px;
  font-size: 0.95rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background .15s;
}
.lp__btn:hover:not(:disabled) { background: var(--clr-primary-dark); }
.lp__btn:disabled { opacity: 0.65; cursor: not-allowed; }
.lp__divider {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 1.25rem 0; color: var(--clr-text-muted); font-size: 0.8rem;
}
.lp__divider::before, .lp__divider::after {
  content: ''; flex: 1; height: 1px; background: var(--clr-border);
}
.lp__hint {
  font-size: 0.75rem; color: var(--clr-text-muted);
  background: var(--clr-muted); border-radius: 8px;
  padding: 0.75rem; line-height: 1.7; text-align: center;
}

/* Welcome (lado derecho) */
.lp__welcome { flex: 1; }
.lp__welcome-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 400; line-height: 1.3;
  color: #fff; margin: 0 0 1rem;
}
.lp__welcome-title strong { font-weight: 800; }
.lp__welcome-sub {
  font-size: 1rem; color: rgba(255,255,255,0.7);
  line-height: 1.6; margin: 0;
}

/* Footer */
.lp__footer {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  padding: 1rem 2.5rem;
  font-size: 0.75rem; color: rgba(255,255,255,0.5);
}
.lp__footer-sep { opacity: 0.4; }
.lp__footer-link { color: rgba(255,255,255,0.5); text-decoration: none; }
.lp__footer-link:hover { color: #fff; }
.lp__footer-domain { margin-left: auto; color: var(--clr-primary-light); font-weight: 600; }

/* Login responsive */
@media (max-width: 767px) {
  .lp__body { flex-direction: column; padding: 1.5rem; gap: 2rem; align-items: stretch; }
  .lp__card-wrap { width: 100%; }
  .lp__welcome { text-align: center; }
  .lp__topbar { padding: 1rem 1.5rem; }
  .lp__footer { padding: 1rem 1.5rem; justify-content: center; }
  .lp__footer-domain { margin-left: 0; }
}

/* User empresa badge in header */
.user-empresa {
  font-size: 0.7rem; background: var(--clr-primary-light);
  color: var(--clr-primary); padding: 0.1rem 0.5rem;
  border-radius: 999px; font-weight: 600;
}

/* ── Perfil de Empresa ───────────────────────────────────────── */
.page-perfil { display: flex; flex-direction: column; gap: 0; }

.completitud-label { font-size: 0.875rem; color: var(--clr-text-muted); }

.completitud-bar {
  height: 8px; background: var(--clr-border); border-radius: 4px;
  overflow: hidden; margin-bottom: 0.5rem;
}
.completitud-bar__fill {
  height: 100%; background: var(--clr-primary); border-radius: 4px;
  transition: width .4s ease;
}
.completitud-bar__fill--ok { background: var(--clr-success); }

.completitud-hint {
  font-size: 0.8125rem; color: var(--clr-text-muted);
  margin-bottom: 1.25rem; margin-top: 0;
}

.perfil-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.perfil-col { display: flex; flex-direction: column; gap: 1.25rem; }

.cats-grid {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.cat-chip {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.35rem 0.75rem;
  border: 1.5px solid var(--clr-border); border-radius: 999px;
  font-size: 0.8125rem; cursor: pointer; user-select: none;
  transition: border-color .15s, background .15s;
}
.cat-chip input[type=checkbox] { display: none; }
.cat-chip--selected {
  border-color: var(--clr-primary);
  background: var(--clr-primary-light);
  color: var(--clr-primary); font-weight: 600;
}
.cat-chip:hover:not(.cat-chip--selected) { border-color: var(--clr-primary); background: var(--clr-muted); }

/* ── Favorita toggle ─────────────────────────────────────────── */
.btn--fav {
  background: none; border: 2px solid var(--clr-border);
  border-radius: var(--radius); padding: 0.4rem 0.75rem;
  cursor: pointer; font-size: 1rem; line-height: 1;
  transition: border-color .15s, transform .15s;
}
.btn--fav:hover { border-color: oklch(0.75 0.18 50); }
.btn--fav--active {
  border-color: oklch(0.70 0.22 50);
  background: oklch(0.97 0.04 50);
  animation: heartPop .25s ease;
}
@keyframes heartPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ── Sidebar móvil: hamburguesa + off-canvas ─────────────────── */
/* El botón y el backdrop los inyecta /js/sidebar-mobile.js, que añade
   .has-sidebar-toggle al <body> solo en layouts de módulo (sin bottom-nav). */
.sidebar-toggle {
  display: none;
  position: fixed; top: .55rem; left: .6rem; z-index: 210;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border: 1px solid var(--clr-sidebar-border);
  border-radius: var(--radius);
  background: var(--clr-sidebar); color: #fff;
  cursor: pointer;
}
.sidebar-toggle svg { width: 22px; height: 22px; }
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; z-index: 190;
  background: rgba(0,0,0,.45);
}

/* ── Responsive ──────────────────────────────────────────────── */

/* Tablet (< 1024px): sidebar narrow, perfil 1 column */
@media (max-width: 1023px) {
  .sidebar { width: 64px; }
  .sidebar__item { padding: 10px 2px; }
  .sidebar__item span { font-size: .5rem; }
  .sidebar__section-label { font-size: .45rem; letter-spacing: 0; padding: .5rem .15rem .25rem; }
  .layout__main { margin-left: 64px; }
  .perfil-grid { grid-template-columns: 1fr; }
  .detail-body { grid-template-columns: 1fr; }
  .revision-grid { grid-template-columns: 1fr; }
}

/* Mobile (< 768px): bottom nav, full-width layout */
@media (max-width: 767px) {
  .sidebar { display: none; }
  .layout__main { margin-left: 0; padding-bottom: 4.5rem; }

  /* Módulos sin bottom-nav: sidebar como drawer off-canvas con hamburguesa */
  body.has-sidebar-toggle .sidebar-toggle { display: inline-flex; }
  body.has-sidebar-toggle .top-header { padding-left: 3.75rem; }
  body.has-sidebar-toggle .sidebar {
    display: flex;
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w); z-index: 200;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 4px 0 32px rgba(0,0,0,.45);
  }
  body.has-sidebar-toggle.sidebar-open .sidebar { transform: none; }
  body.has-sidebar-toggle.sidebar-open .sidebar-backdrop { display: block; }

  /* Bottom navigation */
  .bottom-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 56px; background: var(--clr-card);
    border-top: 1px solid var(--clr-border);
    z-index: 100; justify-content: space-around; align-items: stretch;
  }
  .bottom-nav__item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2px; text-decoration: none;
    color: var(--clr-text-muted); font-size: 0.6rem; font-weight: 600;
    transition: color .15s;
  }
  .bottom-nav__item--active,
  .bottom-nav__item:hover { color: var(--clr-primary); }
  .bottom-nav__icon { font-size: 1.25rem; }

  /* Tables → stacked cards on mobile */
  .table-responsive { overflow-x: hidden; }
  .table-responsive table,
  .table-responsive thead,
  .table-responsive tbody,
  .table-responsive tr,
  .table-responsive th,
  .table-responsive td { display: block; width: 100%; }
  .table-responsive thead { display: none; }
  .table-responsive tr {
    background: var(--clr-card);
    border: 1px solid var(--clr-border); border-radius: var(--radius);
    margin-bottom: 0.75rem; padding: 0.875rem;
    display: flex; flex-direction: column; gap: 0.375rem;
  }
  .table-responsive td {
    padding: 0; font-size: 0.875rem;
    display: flex; justify-content: space-between; align-items: center;
    gap: 0.5rem;
  }
  .table-responsive td[data-label]::before {
    content: attr(data-label);
    font-size: 0.75rem; font-weight: 600; color: var(--clr-text-muted);
    min-width: 90px; flex-shrink: 0;
  }

  /* Page header stacks on mobile */
  .page-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .page-header > div { width: 100%; }

  /* Detail layout single column */
  .detail-body { grid-template-columns: 1fr; }
  .detail-header { flex-direction: column; align-items: flex-start; }
  .detail-actions { margin-left: 0; }

  /* Wizard stepper: numbers only */
  .stepper { gap: 0.25rem; }
  .step__label { display: none; }

  /* Drawer full width */
  .drawer { width: 100%; max-width: 100%; }
}

/* ================================================================
   Listado de Licitaciones
   ================================================================ */

.lic-wrap { display: flex; flex-direction: column; gap: 1.25rem; }

/* ── Tabs ── */
.lic-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--clr-border);
}
.lic-tab {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .625rem 1.25rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.lic-tab:hover         { color: #260296; }
.lic-tab--active       { color: #260296; border-bottom-color: #260296; font-weight: 600; }

/* ── Filtros ── */
.lic-filters {
  display: flex;
  align-items: center;
  gap: .625rem;
  flex-wrap: wrap;
  background: #fff;
  padding: .875rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.lic-filters__search {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.lic-filters__search-icon {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--clr-text-muted);
  pointer-events: none;
}
.lic-filters__input {
  width: 100%;
  padding: .5rem .75rem .5rem 2.25rem;
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  font-size: .875rem;
  font-family: 'Poppins', sans-serif;
  outline: none;
  transition: border-color .15s;
}
.lic-filters__input:focus { border-color: #260296; }
.lic-filters__select {
  padding: .5rem .75rem;
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  font-size: .875rem;
  font-family: 'Poppins', sans-serif;
  background: #fff;
  outline: none;
  cursor: pointer;
  min-width: 160px;
}
.lic-filters__select:focus { border-color: #260296; }

/* ── Meta / contador ── */
.lic-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8125rem;
  color: var(--clr-text-muted);
}

/* ── Empty state ── */
.lic-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 2rem;
  color: var(--clr-text-muted);
  text-align: center;
}
.lic-empty svg { opacity: .35; }
.lic-empty p { margin: 0; font-size: .9375rem; }

/* ── Card grid ── */
.lic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.125rem;
}
@media (max-width: 1100px) { .lic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width:  640px) { .lic-grid { grid-template-columns: 1fr; } }

/* ── Licitación card ── */
.lic-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  border: 1px solid transparent;
  transition: box-shadow .2s, border-color .2s;
}
.lic-card:hover         { box-shadow: 0 6px 20px rgba(38,2,150,.1); border-color: rgba(38,2,150,.15); }
.lic-card--urgent       { border-left: 3px solid #dc2626; }
.lic-card--expired      { opacity: .75; }

.lic-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
}
.lic-card__badges { display: flex; gap: .375rem; flex-wrap: wrap; }

.lic-card__fav {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--clr-text-muted);
  padding: .25rem;
  border-radius: 6px;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}
.lic-card__fav:hover     { color: #e11d48; background: #fff1f2; }
.lic-card__fav--active   { color: #e11d48; }

.lic-card__meta {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.lic-card__numero  { font-family: monospace; font-size: .75rem; color: var(--clr-text-muted); }
.lic-card__industria { font-size: .75rem; color: var(--clr-text-muted); }

.lic-card__title {
  font-size: .9375rem;
  font-weight: 600;
  margin: 0;
  color: var(--clr-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lic-card__comprador {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .8125rem;
  color: var(--clr-text-muted);
  margin: 0;
}

.lic-card__info {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--clr-border);
  padding-top: .625rem;
  margin-top: auto;
}
.lic-card__info-item  { display: flex; flex-direction: column; gap: .1rem; }
.lic-card__info-label { font-size: .7rem; color: var(--clr-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.lic-card__info-val   { font-size: .8125rem; font-weight: 600; color: var(--clr-text); }
.text-danger          { color: #dc2626 !important; }

.lic-card__actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn--primary-sm {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem 1rem;
  border-radius: 7px;
  background: linear-gradient(135deg, #260296, #1D0875);
  color: #fff;
  font-size: .8125rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity .2s;
  font-family: 'Poppins', sans-serif;
}
.btn--primary-sm:hover { opacity: .88; color: #fff; }

.btn--outline-sm {
  display: inline-flex;
  align-items: center;
  padding: .4rem 1rem;
  border-radius: 7px;
  background: transparent;
  border: 1px solid var(--clr-border);
  color: var(--clr-text);
  font-size: .8125rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  font-family: 'Poppins', sans-serif;
}
.btn--outline-sm:hover { border-color: #260296; color: #260296; }

.btn--ghost-sm {
  display: inline-flex;
  align-items: center;
  padding: .4rem .875rem;
  border-radius: 7px;
  background: transparent;
  border: none;
  color: var(--clr-text-muted);
  font-size: .8125rem;
  text-decoration: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
}
.btn--ghost-sm:hover { color: var(--clr-text); }

/* ── Paginación ── */
.lic-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 0;
}
.lic-pager__btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .875rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--clr-border);
  color: var(--clr-text);
  font-size: .8125rem;
  text-decoration: none;
  transition: border-color .15s;
}
.lic-pager__btn:hover    { border-color: #260296; color: #260296; }
.lic-pager__pages        { display: flex; gap: .25rem; }
.lic-pager__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 7px;
  border: 1px solid var(--clr-border);
  background: #fff;
  color: var(--clr-text);
  font-size: .8125rem;
  text-decoration: none;
  transition: all .15s;
}
.lic-pager__page:hover       { border-color: #260296; color: #260296; }
.lic-pager__page--active     { background: #260296; border-color: #260296; color: #fff; font-weight: 600; }

/* Desktop: hide bottom nav */
@media (min-width: 768px) {
  .bottom-nav { display: none; }
}

/* ================================================================
   Dashboard proveedor
   ================================================================ */

/* Wrapper */
.db-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Bienvenida */
.db-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, #260296 0%, #1D0875 100%);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  color: #fff;
}
.db-welcome__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 .25rem;
  color: #fff;
}
.db-welcome__sub {
  font-size: .875rem;
  margin: 0;
  opacity: .8;
}

/* KPI grid */
/* Compactos (incidencia "los indicadores ocupan mucho espacio"): fila horizontal
   ícono+número+etiqueta, más columnas por renglón y menos padding. */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: .75rem;
  margin: 1rem 0;
}
@media (max-width: 540px)  { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }

.kpi-card {
  background: #fff;
  border-radius: 12px;
  padding: .7rem .9rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: .7rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.kpi-card__icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kpi-card__icon svg { width: 17px; height: 17px; }
.kpi-card__body { display: flex; flex-direction: column; align-items: flex-start; }
.kpi-card__num {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  font-family: 'Poppins', sans-serif;
}
.kpi-card__label { font-size: .72rem; color: var(--clr-text-muted); margin-top: .15rem; line-height: 1.2; }

/* KPI color variants */
.kpi-card--purple .kpi-card__icon { background: rgba(38,2,150,.12); color: #260296; }
.kpi-card--purple .kpi-card__num  { color: #260296; }
.kpi-card--blue   .kpi-card__icon { background: rgba(0,180,255,.12); color: #007bff; }
.kpi-card--blue   .kpi-card__num  { color: #007bff; }
.kpi-card--orange .kpi-card__icon { background: rgba(255,129,14,.12); color: #e07b00; }
.kpi-card--orange .kpi-card__num  { color: #e07b00; }
.kpi-card--green  .kpi-card__icon { background: rgba(34,197,94,.12);  color: #15803d; }
.kpi-card--green  .kpi-card__num  { color: #15803d; }
.kpi-card--teal   .kpi-card__icon { background: rgba(6,182,212,.12);  color: #0891b2; }
.kpi-card--teal   .kpi-card__num  { color: #0891b2; }
.kpi-card--red    .kpi-card__icon { background: rgba(239,68,68,.12);  color: #dc2626; }
.kpi-card--red    .kpi-card__num  { color: #dc2626; }

/* ── Sistema de acciones de tabla (promovido desde Admin/Usuarios) ─────────────
   Uso: <td class="uic-td-actions"><div class="uic-actions">…botones…</div></td>
   Garantiza que los botones de Acciones NUNCA se apilen (la celda no cede ancho)
   y que la tabla con .uic-scroll deslice horizontal en pantallas angostas. */
.uic-scroll { overflow-x:auto; }
.uic-scroll .hoja-items-table { min-width:820px; }
.uic-scroll .hoja-items-table td { vertical-align:middle; }
.uic-scroll .hoja-items-table tbody tr { transition:background .1s; }
.uic-scroll .hoja-items-table tbody tr:hover { background:#fafbff; }
.uic-actions { display:flex; gap:.4rem; flex-wrap:nowrap; justify-content:flex-end; align-items:center; }
.uic-td-actions { white-space:nowrap; width:1%; }
.uic-btn { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; padding:0;
           border:1px solid var(--clr-border); border-radius:8px; background:#fff; color:#6b7280; cursor:pointer; transition:all .12s; }
.uic-btn svg { width:16px; height:16px; }
.uic-btn:hover { background:#f8fafc; transform:translateY(-1px); box-shadow:0 2px 6px rgba(0,0,0,.08); }
.uic-btn--danger { color:#dc2626; border-color:#fca5a5; }
.uic-btn--danger:hover { background:#fef2f2; }
.uic-btn--ok { color:#16a34a; border-color:#86efac; }
.uic-btn--ok:hover { background:#f0fdf4; }
.uic-btn--mail:hover { color:var(--clr-primary); border-color:var(--clr-primary); }
.uic-btn--edit:hover { color:var(--clr-primary); border-color:var(--clr-primary); }
.uic-user { display:flex; align-items:center; gap:.6rem; min-width:150px; }
.uic-avatar { width:32px; height:32px; border-radius:50%; flex-shrink:0; display:flex; align-items:center;
              justify-content:center; font-size:.72rem; font-weight:700; color:#fff; letter-spacing:.02em; }
.uic-mail { color:#6b7280; max-width:190px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:block; }
.uic-empresa { font-size:.85rem; white-space:nowrap; }

/* Tables section */
.db-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 860px) { .db-tables { grid-template-columns: 1fr; } }

.db-panel {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  overflow: hidden;
}
.db-panel__head,
.db-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--clr-border);
}
.db-panel__title {
  font-size: .9375rem;
  font-weight: 600;
  margin: 0;
  color: var(--clr-text);
}
.db-panel__link {
  font-size: .8125rem;
  color: #260296;
  text-decoration: none;
  font-weight: 500;
}
.db-panel__link:hover { text-decoration: underline; }

/* Botón "Descargar Excel" auto-inyectado en grids (grid-excel-export.js) */
.grid-excel-bar { display: flex; justify-content: flex-end; margin: 0 0 .5rem; }
.grid-excel-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: inherit; font-size: .76rem; font-weight: 600;
  color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 8px; padding: .3rem .7rem; cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.grid-excel-btn:hover { background: #dcfce7; border-color: #86efac; }
.grid-excel-btn__ico { font-size: .9rem; line-height: 1; }

.db-empty {
  padding: 2rem 1.5rem;
  color: var(--clr-text-muted);
  font-size: .875rem;
  margin: 0;
}

.db-table-wrap { overflow-x: auto; }
.db-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8125rem;
}
.db-table th {
  text-align: left;
  padding: .625rem 1rem;
  color: var(--clr-text-muted);
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--clr-muted);
  border-bottom: 1px solid var(--clr-border);
  white-space: nowrap;
}
.db-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--clr-border);
  vertical-align: middle;
  color: var(--clr-text);
}
.db-table tr:last-child td { border-bottom: none; }
.db-table tr:hover td { background: var(--clr-muted); }
.db-table__mono { font-family: monospace; font-size: .75rem; color: var(--clr-text-muted); }
.db-table__title { font-weight: 500; }  /* display:block en un td rompia la reticula de la tabla (lineas desfasadas) */
.db-table__sub   { font-size: .7rem; color: var(--clr-text-muted); display: block; }
.db-table__date  { white-space: nowrap; color: var(--clr-text-muted); }
.db-table__btn {
  display: inline-block;
  padding: .25rem .75rem;
  border-radius: 6px;
  background: var(--clr-primary-light);
  color: #260296;
  font-size: .75rem;
  font-weight: 600;
  text-decoration: none;
}
.db-table__btn:hover { background: #260296; color: #fff; }

/* Badges */
.badge {
  display: inline-block;
  padding: .2em .65em;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge--blue   { background: #e0f0ff; color: #0057c8; }
.badge--green  { background: #dcfce7; color: #15803d; }
.badge--orange { background: #fff7ed; color: #c2410c; }
.badge--red    { background: #fef2f2; color: #dc2626; }
.badge--grey   { background: #f3f4f6; color: #6b7280; }

/* Progress bar */
.progress-bar {
  height: 6px;
  background: var(--clr-border);
  border-radius: 99px;
  overflow: hidden;
  min-width: 70px;
  display: inline-block;
  vertical-align: middle;
}
.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #260296, #6366f1);
  border-radius: 99px;
}
.progress-bar__pct {
  font-size: .7rem;
  color: var(--clr-text-muted);
  margin-left: .4rem;
  vertical-align: middle;
}

/* btn--purple */
.btn--purple {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  font-size: .875rem;
  font-weight: 500;
  padding: .5rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background .2s;
  font-family: 'Poppins', sans-serif;
}
.btn--purple:hover { background: rgba(255,255,255,.25); color: #fff; }

/* ================================================================
   DETALLE LICITACIÓN
   ================================================================ */

.det-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .det-wrap { grid-template-columns: 1fr; }
  .det-sidebar { order: -1; }
}

/* Header */
.det-header { background: #fff; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.det-header__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.det-header__badges { display: flex; gap: .5rem; flex-wrap: wrap; }
.det-header__numero { font-size: .78rem; font-weight: 600; color: #6366f1; letter-spacing: .05em; margin-bottom: .25rem; }
.det-header__titulo { font-size: 1.4rem; font-weight: 700; color: #1e1b4b; line-height: 1.3; margin-bottom: .5rem; }
.det-header__comprador { display: flex; align-items: center; gap: .4rem; font-size: .83rem; color: #6b7280; }

/* Sections */
.det-section { background: #fff; border-radius: 12px; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.det-section__title { font-size: 1rem; font-weight: 600; color: #1e1b4b; display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.det-section__count { background: #ede9fe; color: #6366f1; border-radius: 20px; padding: .1rem .55rem; font-size: .7rem; font-weight: 700; }
.det-section__body { color: #374151; line-height: 1.7; font-size: .92rem; white-space: pre-wrap; }

/* Table */
.det-table-wrap { overflow-x: auto; }
.det-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.det-table th { background: #f8f7ff; color: #6b7280; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding: .6rem .75rem; text-align: left; border-bottom: 1px solid #e5e7eb; }
.det-table td { padding: .65rem .75rem; border-bottom: 1px solid #f3f4f6; color: #374151; vertical-align: top; }
.det-table tbody tr:last-child td { border-bottom: none; }
.det-table__num { font-weight: 600; color: #6366f1; width: 40px; }
.det-table__spec { color: #9ca3af; font-size: .82rem; max-width: 200px; }

/* Requisitos */
.det-req-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .75rem; }
.det-req-item { display: flex; gap: .75rem; padding: .875rem 1rem; border: 1px solid #e5e7eb; border-radius: 8px; background: #fafafa; }
.det-req-item__icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #f3f4f6; color: #6b7280; }
.det-req-item__icon--req { background: #fee2e2; color: #dc2626; }
.det-req-item__desc { font-size: .9rem; color: #374151; line-height: 1.4; }

/* Cronograma */
.det-timeline { position: relative; padding-left: 1.5rem; }
.det-timeline::before { content: ''; position: absolute; left: .5rem; top: 0; bottom: 0; width: 2px; background: #e5e7eb; }
.det-timeline__item { position: relative; padding-left: 1rem; margin-bottom: 1.25rem; }
.det-timeline__item:last-child { margin-bottom: 0; }
.det-timeline__dot { position: absolute; left: -1.35rem; top: .25rem; width: 12px; height: 12px; border-radius: 50%; background: #e5e7eb; border: 2px solid #fff; box-shadow: 0 0 0 2px #e5e7eb; }
.det-timeline__item--done .det-timeline__dot { background: #6366f1; box-shadow: 0 0 0 2px #ede9fe; }
.det-timeline__name { font-size: .9rem; font-weight: 600; color: #1e1b4b; }
.det-timeline__date { font-size: .8rem; color: #6b7280; margin-top: .1rem; }

/* Documentos */
.det-docs { display: flex; flex-wrap: wrap; gap: .75rem; }
.det-doc { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border: 1px solid #e5e7eb; border-radius: 8px; background: #fafafa; min-width: 200px; color: #374151; }
.det-doc svg { color: #6366f1; flex-shrink: 0; }
.det-doc__name { font-size: .88rem; font-weight: 500; }
.det-doc__size { font-size: .75rem; color: #9ca3af; }

/* Q&A */
.det-qa-list { display: flex; flex-direction: column; gap: 1rem; }
.det-qa-item { border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.det-qa-item__pregunta { padding: .875rem 1rem; background: #fafafa; }
.det-qa-item__empresa { font-size: .72rem; font-weight: 700; color: #6366f1; text-transform: uppercase; letter-spacing: .05em; }
.det-qa-item__pregunta p { font-size: .9rem; color: #374151; margin: .25rem 0; }
.det-qa-item__fecha { font-size: .72rem; color: #9ca3af; }
.det-qa-item__respuesta { display: flex; gap: .5rem; align-items: flex-start; padding: .75rem 1rem; background: #ede9fe; font-size: .88rem; color: #4c1d95; }
.det-qa-item__respuesta svg { flex-shrink: 0; margin-top: .1rem; }

/* Sidebar */
.det-sidebar { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 1rem; }
.det-sidebar-card { background: #fff; border-radius: 12px; padding: 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.det-sidebar-card--action { border: 2px solid #6366f1; }
.det-sidebar-card__title { font-size: .8rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .875rem; }
.det-sidebar__row { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: #374151; padding: .35rem 0; border-bottom: 1px solid #f3f4f6; }
.det-sidebar__row:last-child { border-bottom: none; }
.det-sidebar__row span { color: #6b7280; }
.det-sidebar__prop-status { display: flex; justify-content: space-between; align-items: center; }
.det-sidebar__prop-label { font-size: .82rem; font-weight: 600; color: #374151; }
.det-sidebar__expired { font-size: .85rem; color: #9ca3af; text-align: center; }
.det-sidebar__company { font-size: .9rem; font-weight: 600; color: #1e1b4b; margin-bottom: .2rem; }
.det-sidebar__detail { font-size: .8rem; color: #6b7280; }

/* Alert */
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; padding: .875rem 1.25rem; border-radius: 8px; font-size: .9rem; margin-bottom: 1.25rem; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; padding: .875rem 1.25rem; border-radius: 8px; font-size: .9rem; }
.text-danger   { color: #dc2626; }

/* ================================================================
   WIZARD PROPUESTA
   ================================================================ */

/* Stepper integrado en wiz-card */
.wiz-stepper { padding: 1.25rem 2rem 1rem; }
.wiz-stepper__top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; gap: 1rem; }
.wiz-stepper__left { min-width: 0; flex: 1; }
.wiz-stepper__divider { height: 1px; background: #e5e7eb; margin: 0 0 1.5rem; }
/* Legacy — mantener por compatibilidad */
.wiz-header { background: #fff; border-radius: 12px; padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.wiz-header__top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.25rem; gap: 1rem; }
.wiz-header__left { min-width: 0; flex: 1; }
.wiz-header__lic { font-size: .82rem; font-weight: 600; color: #6366f1; margin-bottom: .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiz-progress-bar { height: 6px; background: #e5e7eb; border-radius: 3px; max-width: 300px; margin-bottom: .3rem; }
.wiz-progress-bar__fill { height: 100%; background: linear-gradient(90deg,#6366f1,#8b5cf6); border-radius: 3px; transition: width .4s; }
.wiz-header__pct { font-size: .73rem; color: #9ca3af; }

/* Steps nav */
.wiz-steps { display: flex; align-items: flex-start; padding: 4px 0 2px; }
.wiz-step { display: flex; align-items: center; position: relative; flex: 1; min-width: 0; }
.wiz-step + .wiz-step::before { content: ''; position: absolute; left: -50%; top: 16px; width: 100%; height: 2px; background: #e5e7eb; z-index: 0; }
.wiz-step--done + .wiz-step::before, .wiz-step--active + .wiz-step::before { background: #6366f1; }
.wiz-step__link { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-decoration: none; cursor: default; z-index: 1; width: 100%; }
a.wiz-step__link { cursor: pointer; }
.wiz-step__dot { width: 32px; height: 32px; border-radius: 50%; background: #e5e7eb; color: #9ca3af; font-size: .8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 0 0 2px #e5e7eb; transition: all .2s; flex-shrink: 0; }
.wiz-step--active .wiz-step__dot { background: #6366f1; color: #fff; box-shadow: 0 0 0 3px #ede9fe; }
.wiz-step--done .wiz-step__dot { background: #6366f1; color: #fff; box-shadow: 0 0 0 2px #6366f1; }
a.wiz-step__link:hover .wiz-step__dot { background: #4f46e5; color: #fff; }
.wiz-step__label { font-size: .72rem; font-weight: 600; color: #9ca3af; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
.wiz-step--active .wiz-step__label { color: #6366f1; }
.wiz-step--done .wiz-step__label { color: #6366f1; }

/* Body and card */
.wiz-body { max-width: 900px; margin: 0 auto; }
.wiz-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 2rem; }
.wiz-card__title { font-size: 1.125rem; font-weight: 700; color: #1e1b4b; margin-bottom: .35rem; }
.wiz-card__sub { font-size: .875rem; color: #6b7280; margin-bottom: 1.75rem; }
.wiz-empty { text-align: center; color: #9ca3af; padding: 2rem; }

/* Unify wiz-card field styles with requisiciones wizard */
.wiz-card .form-label { font-size: .8125rem; font-weight: 500; color: #374151; margin-bottom: .375rem; }
.wiz-card .form-control {
  padding: .625rem .875rem; border: 1px solid #d1d5db; border-radius: 8px;
  font-size: .9375rem; color: #111827; transition: border-color .15s;
}
.wiz-card .form-control:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.08); }

/* Form utilities */
.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.form-label { display: block; font-size: .83rem; font-weight: 600; color: #374151; margin-bottom: .4rem; }
.form-label__req { color: #dc2626; }
.form-label__hint { font-weight: 400; color: #9ca3af; font-size: .78rem; }
.form-control { width: 100%; padding: .55rem .875rem; border: 1.5px solid #d1d5db; border-radius: 8px; font-size: .9rem; font-family: 'Poppins', sans-serif; color: #1e1b4b; background: #fff; transition: border .2s, box-shadow .2s; box-sizing: border-box; }
.form-control:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.form-control--textarea { resize: vertical; min-height: 110px; }

/* Requisitos paso 2 */
.req-list { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 1.75rem; }
.req-item { border: 1.5px solid #e5e7eb; border-radius: 10px; padding: 1.1rem 1.25rem; background: #fafafa; transition: border .2s; }
.req-item:hover { border-color: #c4b5fd; }
.req-item__header { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.req-item__info { flex: 1; min-width: 200px; }
.req-item__desc { font-size: .9rem; font-weight: 500; color: #1e1b4b; line-height: 1.4; }
.req-item__toggle { display: flex; gap: .5rem; flex-shrink: 0; }
.toggle-opt { display: flex; align-items: center; gap: .35rem; cursor: pointer; }
.toggle-opt input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-opt__label { padding: .3rem .75rem; border-radius: 20px; border: 1.5px solid #d1d5db; font-size: .78rem; font-weight: 600; cursor: pointer; transition: all .15s; }
.toggle-opt__label--yes { color: #059669; border-color: #6ee7b7; background: #f0fdf4; }
.toggle-opt input:checked + .toggle-opt__label--yes { background: #d1fae5; border-color: #059669; }
.toggle-opt__label--no { color: #dc2626; border-color: #fca5a5; background: #fff5f5; }
.toggle-opt input:checked + .toggle-opt__label--no { background: #fee2e2; border-color: #dc2626; }

/* Tabla económica */
.eco-table-wrap { overflow-x: auto; margin-bottom: 1.75rem; }
.eco-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.eco-table th { background: #f8f7ff; color: #6b7280; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding: .6rem .75rem; text-align: left; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.eco-table td { padding: .6rem .75rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.eco-table tbody tr:last-child td { border-bottom: none; }
.eco-table__num { font-weight: 600; color: #6366f1; width: 40px; }
.eco-table__price { max-width: 140px; text-align: right; }
.eco-table__sub { text-align: right; font-weight: 600; color: #1e1b4b; white-space: nowrap; }
.eco-table tfoot td { background: #f8f7ff; border-top: 2px solid #e5e7eb; font-weight: 600; }
.eco-table__total-label { text-align: right; color: #6b7280; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.eco-table__total { text-align: right; color: #6366f1; font-size: 1.05rem; font-weight: 700; }

/* Revisión paso 4 */
.rev-checklist { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.75rem; }
.rev-check { display: flex; gap: .875rem; align-items: center; padding: .875rem 1rem; border-radius: 10px; border: 1.5px solid #e5e7eb; background: #fff; }
.rev-check--ok { border-color: #6ee7b7; background: #f0fdf4; }
.rev-check--pend { border-color: #fca5a5; background: #fff5f5; }
.rev-check__icon { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 700; flex-shrink: 0; }
.rev-check--ok   .rev-check__icon { background: #d1fae5; color: #059669; }
.rev-check--pend .rev-check__icon { background: #fee2e2; color: #dc2626; }
.rev-check__title  { font-size: .9rem; font-weight: 600; color: #1e1b4b; }
.rev-check__detail { font-size: .8rem; color: #6b7280; margin-top: .1rem; }

.rev-summary { border: 1.5px solid #ede9fe; border-radius: 10px; padding: 1.25rem; margin-bottom: 1.75rem; background: #faf9ff; }
.rev-summary__title { font-size: .82rem; font-weight: 700; color: #6366f1; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 1rem; }
.rev-summary__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: .75rem; }
.rev-summary__item { display: flex; flex-direction: column; gap: .15rem; }
.rev-summary__item span { font-size: .75rem; color: #9ca3af; }
.rev-summary__item strong { font-size: .92rem; color: #1e1b4b; }
.rev-summary__total { color: #6366f1; font-size: 1.05rem; }

.rev-sent { display: flex; gap: 1rem; align-items: center; background: #d1fae5; border: 1.5px solid #6ee7b7; border-radius: 10px; padding: 1.25rem; margin-bottom: 1.75rem; color: #065f46; }
.rev-sent__title { font-weight: 700; font-size: .95rem; margin-bottom: .2rem; }
.rev-sent__detail { font-size: .83rem; }

/* Actions bar */
.wiz-actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; border-top: 1px solid #f3f4f6; padding-top: 1.25rem; margin-top: .25rem; }
.wiz-actions__hint { font-size: .78rem; color: #9ca3af; margin-left: .5rem; }
.btn--disabled { opacity: .45; cursor: not-allowed; }
/* Quill overrides para wizard */
.ql-toolbar.ql-snow { border-radius: 8px 8px 0 0; border-color: #d1d5db; background: #f9fafb; }
.ql-container.ql-snow { border-radius: 0 0 8px 8px; border-color: #d1d5db; font-family: 'Poppins', sans-serif; font-size: .9375rem; color: #111827; }
.ql-container.ql-snow:focus-within { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.08); }
.ql-editor { min-height: 160px; padding: .625rem .875rem; }

/* ================================================================
   DASHBOARD COMPRADOR – extensiones
   ================================================================ */

.db-welcome--buyer {
  background: linear-gradient(135deg, #0f2564 0%, #1e1b4b 100%);
}
.db-welcome--buyer .btn--white {
  display: inline-flex; align-items: center; gap: .4rem;
  background: #fff; color: #1e1b4b;
  padding: .5rem 1.1rem; border-radius: 8px;
  font-size: .83rem; font-weight: 600;
  text-decoration: none; transition: opacity .2s;
  white-space: nowrap;
}
.db-welcome--buyer .btn--white:hover { opacity: .88; }

/* KPI color variants */
.kpi-card--grey { border-top-color: #9ca3af; }
.kpi-card--grey .kpi-card__icon { background: #f3f4f6; color: #6b7280; }
.kpi-card--grey .kpi-card__num  { color: #374151; }
.kpi-card--cyan { border-top-color: #06b6d4; }
.kpi-card--cyan .kpi-card__icon { background: #ecfeff; color: #06b6d4; }
.kpi-card--cyan .kpi-card__num  { color: #0e7490; }

/* Two-column panels layout */
.db-panels { display: flex; flex-direction: column; gap: 1.5rem; }

/* Count badge */
.db-count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; padding: 0 .5rem;
  background: #ede9fe; color: #6366f1;
  border-radius: 12px; font-size: .78rem; font-weight: 700;
}

/* Table sub-text */
.db-table__sub { font-size: .75rem; color: #9ca3af; margin-top: .1rem; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Empty state */
.db-empty { text-align: center; padding: 2rem 1rem; color: #9ca3af; font-size: .88rem; }

/* Table title column */
.db-table__title { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.text-danger { color: #dc2626; }

/* ================================================================
   MIS PUBLICACIONES — listado
   ================================================================ */

.pub-index { max-width: 1100px; margin: 0 auto; }
.pub-index__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; }
.pub-index__title { font-size: 1.4rem; font-weight: 700; color: #1e1b4b; }
.pub-index__sub { font-size: .85rem; color: #6b7280; margin-top: .2rem; }

.pub-empty { text-align: center; padding: 4rem 2rem; color: #9ca3af; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.pub-empty p { font-size: .95rem; }

.pub-table-wrap { overflow-x: auto; background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.pub-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.pub-table th { background: #f8f7ff; color: #6b7280; font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: .75rem 1rem; text-align: left; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.pub-table td { padding: .7rem 1rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle; color: #374151; }
.pub-table tbody tr:last-child td { border-bottom: none; }
.pub-table__mono { font-family: monospace; font-size: .82rem; color: #6366f1; white-space: nowrap; }
.pub-table__title { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.pub-table__date { color: #9ca3af; font-size: .8rem; white-space: nowrap; }

/* ================================================================
   WIZARD PUBLICAR — filas dinámicas
   ================================================================ */

.pub-row { display: flex; align-items: flex-start; gap: .75rem; padding: 1rem; border: 1.5px solid #e5e7eb; border-radius: 10px; margin-bottom: .75rem; background: #fafafa; transition: border .2s; }
.pub-row:hover { border-color: #c4b5fd; }
.pub-row__num { min-width: 28px; height: 28px; background: #6366f1; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; flex-shrink: 0; margin-top: 1.8rem; }
.pub-row__fields { display: flex; gap: .75rem; flex: 1; flex-wrap: wrap; }
.pub-row__del { flex-shrink: 0; background: none; border: none; color: #9ca3af; font-size: 1rem; cursor: pointer; padding: .25rem .4rem; border-radius: 4px; margin-top: 1.8rem; transition: color .2s, background .2s; }
.pub-row__del:hover { color: #dc2626; background: #fee2e2; }

.pub-add-btn { margin: .25rem 0 1.5rem; }

.req-toggle-wrap { display: flex; gap: .5rem; margin-top: .4rem; }

/* ================================================================
   NOTIFICACIONES
   ================================================================ */

/* Badge en sidebar */
.notif-badge {
  position: absolute; top: -5px; right: -7px;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: #ef4444; color: #fff;
  border-radius: 9px; font-size: .65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; border: 2px solid #1e1b4b;
  pointer-events: none;
}

/* ── Campanita de notificaciones en barra superior ─────────── */
.topbar-bell {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  color: var(--clr-text-muted, #6b7280);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.topbar-bell:hover {
  background: var(--clr-muted, #f3f4f6);
  color: var(--clr-primary, #6366f1);
}
/* anillo claro para que el badge contraste sobre la barra superior */
.topbar-bell .notif-badge { border-color: #fff; }

/* ── App launcher (estilo Google Apps) en barra superior ───── */
.applauncher { position: relative; display: inline-flex; }
.applauncher__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: none; background: transparent; cursor: pointer;
  color: var(--clr-text-muted, #6b7280);
  transition: background .15s ease, color .15s ease;
}
.applauncher__btn:hover { background: var(--clr-muted, #f3f4f6); color: var(--clr-primary, #6366f1); }
.applauncher__menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 320px; background: #fff;
  border: 1px solid var(--clr-border, #e5e7eb); border-radius: 16px;
  box-shadow: 0 16px 40px rgba(17,24,39,.16);
  padding: .75rem; z-index: 1200;
}
.applauncher__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .25rem .5rem .625rem;
}
.applauncher__title { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9ca3af; }
.applauncher__all { font-size: .72rem; font-weight: 600; color: var(--clr-primary, #6366f1); text-decoration: none; }
.applauncher__all:hover { text-decoration: underline; }
.applauncher__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem; }
.applauncher__item {
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  padding: .75rem .4rem; border-radius: 12px; text-decoration: none;
  color: #374151; transition: background .12s ease;
}
.applauncher__item:hover { background: #f5f3ff; }
.applauncher__ico {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: #ede9fe; color: var(--clr-primary, #6366f1);
}
.applauncher__ico svg { width: 22px; height: 22px; }
.applauncher__label { font-size: .68rem; font-weight: 600; text-align: center; line-height: 1.15; color: #4b5563; }

/* Página */
.notif-page { max-width: 720px; margin: 0 auto; }
.notif-page__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; flex-wrap: wrap; gap: .75rem; }
.notif-page__title { font-size: 1.4rem; font-weight: 700; color: #1e1b4b; }
.notif-page__sub { font-size: .85rem; color: #6b7280; margin-top: .2rem; }

/* Empty */
.notif-empty { text-align: center; padding: 4rem 2rem; color: #9ca3af; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.notif-empty__sub { font-size: .82rem; }

/* Groups */
.notif-list { display: flex; flex-direction: column; gap: 1.5rem; }
.notif-group__date { font-size: .75rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .75rem; padding-bottom: .5rem; border-bottom: 1px solid #f3f4f6; }

/* Item */
.notif-item { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.1rem; background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.05); border-left: 3px solid transparent; transition: box-shadow .2s; }
.notif-item:hover { box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.notif-item--unread { border-left-color: #6366f1; background: #faf9ff; }
.notif-item + .notif-item { margin-top: .5rem; }

/* Icon */
.notif-icon { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-icon--blue   { background: #dbeafe; color: #2563eb; }
.notif-icon--purple { background: #ede9fe; color: #7c3aed; }
.notif-icon--green  { background: #d1fae5; color: #059669; }
.notif-icon--red    { background: #fee2e2; color: #dc2626; }
.notif-icon--orange { background: #ffedd5; color: #ea580c; }
.notif-icon--cyan   { background: #ecfeff; color: #0891b2; }
.notif-icon--grey   { background: #f3f4f6; color: #6b7280; }

/* Body */
.notif-item__body { flex: 1; min-width: 0; }
.notif-item__titulo { font-size: .9rem; font-weight: 600; color: #1e1b4b; margin-bottom: .2rem; }
.notif-item__mensaje { font-size: .83rem; color: #6b7280; line-height: 1.45; }
.notif-item__time { font-size: .73rem; color: #9ca3af; margin-top: .3rem; display: block; }

.notif-item__cta { flex-shrink: 0; align-self: center; white-space: nowrap; }

/* ================================================================
   PERFIL DE EMPRESA
   ================================================================ */

/* Page */
.prf-page { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.25rem; }

/* Hero */
.prf-hero { background: linear-gradient(135deg,#260296 0%,#1D0875 100%); border-radius: 14px; padding: 1.75rem 2rem; display: flex; gap: 1.5rem; align-items: center; }
.prf-hero__avatar { width: 70px; height: 70px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 1.6rem; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; letter-spacing: .02em; }
.prf-hero__info { flex: 1; min-width: 0; }
.prf-hero__nombre { color: #fff; font-size: 1.3rem; font-weight: 700; margin-bottom: .2rem; }
.prf-hero__sub { color: rgba(255,255,255,.7); font-size: .83rem; }

/* Tags */
.prf-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.prf-tag { border-radius: 20px; font-size: .72rem; font-weight: 600; padding: .2rem .65rem; }
.prf-tag--cert { background: rgba(255,255,255,.18); color: #fff; }
.prf-tag--cat  { background: #ede9fe; color: #6d28d9; }

/* Alert */
.prf-alert { margin: 0; }

/* Form sections */
.prf-form { display: flex; flex-direction: column; gap: 1rem; }
.prf-section { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 1.4rem 1.6rem; }
.prf-section__head { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .9rem; color: #1e1b4b; margin-bottom: 1.1rem; padding-bottom: .7rem; border-bottom: 1px solid #f3f4f6; }

/* Grids */
.prf-grid { display: grid; gap: 1rem; }
.prf-grid--2 { grid-template-columns: repeat(2, 1fr); }
.prf-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .prf-grid--2, .prf-grid--3 { grid-template-columns: 1fr; } }
.prf-col--2 { grid-column: span 2; }
@media (max-width: 640px) { .prf-col--2 { grid-column: span 1; } }

/* Error state */
.form-group--error .form-control { border-color: #ef4444; }
.field-error { color: #ef4444; font-size: .75rem; margin-top: .2rem; display: block; }
.form-hint { color: #9ca3af; font-size: .74rem; margin-top: .2rem; display: block; }

/* Actions */
.prf-actions { display: flex; gap: .75rem; align-items: center; padding: .5rem 0 1rem; }

/* ================================================================
   PORTAL HOME (buyer module selector)
   ================================================================ */

/* Full-page body */
body.portal-body { background: #f5f6fa; min-height: 100vh; display: flex; flex-direction: column; font-family: 'Poppins', sans-serif; }

/* Header */
.portal-header { display: flex; align-items: center; justify-content: space-between; padding: 0 2.5rem; height: 60px; background: #fff; border-bottom: 1px solid #e5e7eb; }
.portal-header__logo { display: flex; align-items: center; text-decoration: none; }
.portal-header__logo-text { display: flex; align-items: center; }
.portal-header__right { display: flex; align-items: center; gap: 1.5rem; }
.portal-header__lang { font-size: .85rem; color: #6b7280; font-weight: 500; }

/* Switcher de idioma ES|EN (toggle segmentado, legible en cualquier header) */
.lang-switch { display: inline-flex; align-items: stretch; border: 1px solid var(--clr-border, #d1d5db); border-radius: 6px; overflow: hidden; background: #fff; }
.lang-switch__btn { border: none; cursor: pointer; font-family: inherit; font-size: .72rem; font-weight: 600; line-height: 1; padding: .25rem .45rem; background: #fff; color: var(--clr-text, #374151); transition: background .12s, color .12s; }
.lang-switch__btn + .lang-switch__btn { border-left: 1px solid var(--clr-border, #d1d5db); }
.lang-switch__btn:hover { background: var(--clr-hover, #f3f4f6); }
.lang-switch__btn--active { background: var(--clr-primary, #6366f1); color: #fff; }
.lang-switch__btn--active:hover { background: var(--clr-primary, #6366f1); }

/* Switcher de empresa (multi-empresa) — reemplaza el badge de empresa en los headers */
.emp-switch { position: relative; display: inline-block; }
.emp-switch__badge {
  display: inline-flex; align-items: center;
  background: #ede9fe; color: #6d28d9;
  font-size: .75rem; font-weight: 600;
  padding: .2rem .6rem; border-radius: 999px; white-space: nowrap;
}
.emp-switch__badge--btn { cursor: pointer; list-style: none; }
.emp-switch__badge--btn::-webkit-details-marker { display: none; }
.emp-switch__badge--btn:hover { background: #ddd6fe; }
.emp-switch__menu {
  position: absolute; top: calc(100% + .4rem); right: 0;
  min-width: 220px; background: #fff;
  border: 1px solid var(--clr-border, #e5e7eb); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(38, 2, 150, .14); overflow: hidden; z-index: 50;
}
.emp-switch__head { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #9ca3af; padding: .6rem .85rem .3rem; }
.emp-switch__item { margin: 0; }
.emp-switch__item button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  text-align: left; background: none; border: none; cursor: pointer; font-family: inherit;
  padding: .55rem .85rem; font-size: .82rem; color: var(--clr-text, #374151);
}
.emp-switch__item button:hover { background: #f5f3ff; }
.emp-switch__item--active button { font-weight: 600; color: #6d28d9; }
.emp-switch__check { color: #6d28d9; font-weight: 700; }

.portal-header__logout { background: none; border: none; cursor: pointer; font-size: .85rem; color: #6b7280; font-family: inherit; padding: 0; }
.portal-header__logout:hover { color: #1e1b4b; }

/* Main */
.portal-main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 3rem 2rem; }

/* Home container */
.portal-home { width: 100%; max-width: 900px; }
.portal-home__greeting { margin-bottom: 2.5rem; }
.portal-home__greeting h1 { font-size: 1.9rem; font-weight: 700; color: #1e1b4b; margin-bottom: .25rem; }
.portal-home__greeting p  { font-size: .95rem; color: #6b7280; }
.portal-home__name { color: #6366f1; }

/* Module grid */
.portal-modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 700px) { .portal-modules { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .portal-modules { grid-template-columns: 1fr; } }

/* Module card */
.portal-module { background: #fff; border-radius: 16px; padding: 2rem 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 1.1rem; border: 1.5px solid #e5e7eb; transition: all .2s; cursor: pointer; text-decoration: none; }
.portal-module--active:hover { border-color: #6366f1; box-shadow: 0 4px 20px rgba(99,102,241,.12); transform: translateY(-2px); }
.portal-module--soon { opacity: .55; cursor: default; }

.portal-module__icon { width: 68px; height: 68px; background: #ede9fe; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #6366f1; }
.portal-module--soon .portal-module__icon { background: #f3f4f6; color: #9ca3af; }

.portal-module__label { font-size: .88rem; font-weight: 600; color: #1e1b4b; text-align: center; line-height: 1.35; }
.portal-module--soon .portal-module__label { color: #9ca3af; }


/* ═══════════════════════════════════════════════════════════════════════════
   REQUISICIONES MODULE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tab bar ─────────────────────────────────────────────────────────────── */
.req-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
}

.req-tab {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .65rem 1.1rem;
    font-size: .875rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}

.req-tab:hover { color: #4f46e5; }

.req-tab--active {
    color: #6366f1;
    border-bottom-color: #6366f1;
    font-weight: 600;
}

.req-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 .4rem;
    border-radius: 999px;
    background: #e0e7ff;
    color: #4f46e5;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
}

.req-tab--active .req-tab__count {
    background: #6366f1;
    color: #fff;
}

/* ── Table ───────────────────────────────────────────────────────────────── */
.req-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.req-table thead tr {
    background: #f9fafb;
}

.req-table th {
    padding: .7rem 1rem;
    text-align: left;
    font-size: .72rem;
    font-weight: 700;
    color: #9ca3af;
    letter-spacing: .05em;
    text-transform: uppercase;
    border-bottom: 1px solid #e5e7eb;
}

.req-table td {
    padding: .85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    line-height: 1.4;
}

.req-table tbody tr:last-child td { border-bottom: none; }
.req-table tbody tr:hover td { background: #fafafa; }

/* ── Cell helpers ────────────────────────────────────────────────────────── */
.req-num {
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
    font-size: .875rem;
}
.req-num:hover { color: #4f46e5; text-decoration: underline; }

.req-area__cc {
    font-size: .72rem;
    color: #9ca3af;
    margin-top: .1rem;
    display: block;
}

.req-solicitante {
    font-size: .72rem;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    margin-top: .15rem;
}

.req-monto {
    font-weight: 600;
    color: #1e1b4b;
    white-space: nowrap;
}

.req-nivel {
    font-size: .7rem;
    color: #9ca3af;
    display: block;
    margin-top: .2rem;
}

/* ── Priority badges ─────────────────────────────────────────────────────── */
.badge--prioridad-alta   { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.badge--prioridad-media  { background: #fefce8; color: #a16207; border: 1px solid #fde68a; }
.badge--prioridad-critica{ background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.badge--prioridad-baja   { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.req-badge-prioridad {
    font-size: .72rem;
    font-weight: 600;
    padding: .2rem .55rem;
    border-radius: 999px;
}

/* ── Action buttons ──────────────────────────────────────────────────────── */
.req-actions {
    display: flex;
    align-items: center;
    gap: .3rem;
}

.req-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
    padding: 0;
    line-height: 1;
}

.req-action-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #eef2ff;
}

.req-action-btn--approve {
    border-color: #bbf7d0;
    color: #15803d;
    background: #f0fdf4;
}
.req-action-btn--approve:hover {
    border-color: #16a34a;
    color: #15803d;
    background: #dcfce7;
}

.req-action-btn--reject {
    border-color: #fecaca;
    color: #b91c1c;
    background: #fef2f2;
}
.req-action-btn--reject:hover {
    border-color: #dc2626;
    color: #b91c1c;
    background: #fee2e2;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .req-table th:nth-child(3),
    .req-table td:nth-child(3) { display: none; }
}

@media (max-width: 700px) {
    .req-table th:nth-child(2),
    .req-table td:nth-child(2),
    .req-table th:nth-child(5),
    .req-table td:nth-child(5) { display: none; }
}

/* ── Requisición: Selección de tipo ────────────────────────────────────────── */

.req-tipo-page {
  max-width: 680px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.req-tipo-header {
  margin-bottom: 2rem;
}

.req-tipo-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 .375rem;
}

.req-tipo-subtitle {
  font-size: .9375rem;
  color: #6b7280;
  margin: 0;
}

.req-tipo-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.req-tipo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1.5rem;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  user-select: none;
}

.req-tipo-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 2px 12px rgba(99,102,241,.08);
}

.req-tipo-card--selected {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

.req-tipo-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.req-tipo-card__check {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  color: #d1d5db;
  transition: color .15s;
}

.req-tipo-card--selected .req-tipo-card__check {
  color: #6366f1;
}

.req-tipo-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f0f0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
}

.req-tipo-card__icon svg {
  width: 22px;
  height: 22px;
}

.req-tipo-card__icon--urgente {
  background: #fff7ed;
  color: #f59e0b;
}

.req-tipo-card__body {
  display: flex;
  flex-direction: column;
  gap: .375rem;
}

.req-tipo-card__name {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.req-tipo-card__desc {
  font-size: .8125rem;
  color: #6b7280;
  line-height: 1.5;
}

.req-tipo-actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
}

.req-tipo-continuar {
  display: inline-flex;
  align-items: center;
}

@media (max-width: 540px) {
  .req-tipo-cards { grid-template-columns: 1fr; }
}

/* ── Wizard (Crear Requisición) ────────────────────────────────── */
.wizard-page { max-width: 900px; margin: 2rem auto; padding: 0 1.5rem; }
.wizard-header { margin-bottom: 1.5rem; }
.wizard-title { font-size: 1.5rem; font-weight: 700; color: #111827; margin: 0 0 .25rem; }
.wizard-subtitle { font-size: .875rem; color: #6b7280; margin: 0; }

.wizard-progress { background: transparent; border: none; border-radius: 0; padding: 0; margin: 3.5rem 0; display: flex; align-items: center; }
.wz-step { display: flex; flex-direction: column; align-items: center; gap: .375rem; flex: 0 0 auto; min-width: 64px; }
.wz-step__circle { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .875rem; background: #e5e7eb; color: #9ca3af; transition: background .2s, color .2s; flex-shrink: 0; }
.wz-step--active .wz-step__circle { background: #6366f1; color: #fff; }
.wz-step--done .wz-step__circle { background: #6366f1; color: #fff; }
.wz-step__label { font-size: .6875rem; color: #9ca3af; text-align: center; max-width: 80px; line-height: 1.3; }
.wz-step--active .wz-step__label, .wz-step--done .wz-step__label { color: #6366f1; }
.wz-connector { flex: 1 1 auto; height: 2px; background: #e5e7eb; margin: 0 6px; margin-bottom: 18px; min-width: 20px; transition: background .2s; }
.wz-connector--done { background: #6366f1; }

.wizard-step-panel { display: none; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 2rem; }
.wizard-step-panel--active { display: block; }
.wizard-step-title { font-size: 1.125rem; font-weight: 700; color: #1e1b4b; margin: 0 0 1.5rem; }

.wizard-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
.wizard-col-full { grid-column: 1 / -1; }

.wizard-field label { display: block; font-size: .8125rem; font-weight: 500; color: #374151; margin-bottom: .375rem; }
.wizard-field label .req { color: #ef4444; margin-left: 2px; }
.wizard-field input, .wizard-field select, .wizard-field textarea {
  width: 100%; padding: .625rem .875rem; border: 1px solid #d1d5db; border-radius: 8px;
  font-size: .9375rem; color: #111827; background: #fff; font-family: inherit;
  transition: border-color .15s; box-sizing: border-box;
}
.wizard-field input:focus, .wizard-field select:focus, .wizard-field textarea:focus {
  outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.08);
}
.wizard-field input[readonly] { background: #f9fafb; color: #6b7280; }

/* Step panel inputs (not wrapped in .wizard-field) */
.wizard-step-panel input:not([type=checkbox]):not([type=radio]),
.wizard-step-panel select,
.wizard-step-panel textarea {
  width: 100%; padding: .625rem .875rem; border: 1px solid #d1d5db; border-radius: 8px;
  font-size: .9375rem; color: #111827; background: #fff; font-family: inherit;
  transition: border-color .15s; box-sizing: border-box;
}
.wizard-step-panel input:not([type=checkbox]):not([type=radio]):focus,
.wizard-step-panel select:focus,
.wizard-step-panel textarea:focus {
  outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.08);
}
.wizard-step-panel input[readonly] { background: #f9fafb; color: #6b7280; }

.wizard-proveedor-box { border: 1px solid #e5e7eb; border-radius: 8px; padding: .875rem 1rem; background: #f9fafb; display: flex; align-items: center; gap: .625rem; }
.wizard-proveedor-box input[type=checkbox] { width: 16px; height: 16px; accent-color: #6366f1; flex-shrink: 0; }
.wizard-proveedor-box label { font-size: .875rem; color: #374151; margin: 0; cursor: pointer; }

/* Items table */
.wizard-items-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .875rem; }
.wizard-items-table { width: 100%; border-collapse: collapse; }
.wizard-items-table th { font-size: .6875rem; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; padding: .5rem .75rem; text-align: left; border-bottom: 2px solid #e5e7eb; }
.wizard-items-table td { padding: .5rem .5rem; vertical-align: middle; border-bottom: 1px solid #f3f4f6; }
.wizard-items-table input, .wizard-items-table select { padding: .4rem .5rem; font-size: .875rem; }
.wizard-items-table .col-desc { width: 35%; }
.wizard-items-table .col-qty { width: 80px; }
.wizard-items-table .col-unit { width: 110px; }
.wizard-items-table .col-price { width: 130px; }
.wizard-items-table .col-total { width: 100px; font-weight: 600; color: #374151; padding-right: 1rem; }
.wizard-items-table .col-action { width: 48px; text-align: center; }
.wizard-item-delete { background: none; border: none; cursor: pointer; color: #9ca3af; padding: .25rem; transition: color .15s; }
.wizard-item-delete:hover { color: #ef4444; }
.wizard-total-row { text-align: right; padding: 1rem 0 0; }
.wizard-total-label { font-size: .9375rem; color: #374151; }
.wizard-total-amount { font-size: 1.375rem; font-weight: 700; color: #6366f1; margin-left: .5rem; }

/* Step 4 */
.wizard-dropzone { border: 2px dashed #d1d5db; border-radius: 10px; padding: 2.5rem; text-align: center; color: #9ca3af; font-size: .875rem; }
.wizard-dropzone svg { width: 36px; height: 36px; margin-bottom: .5rem; color: #d1d5db; display: block; margin-left: auto; margin-right: auto; }
.wizard-summary { background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 10px; padding: 1.25rem 1.5rem; margin-top: 1.25rem; }
.wizard-summary__title { font-weight: 700; color: #312e81; margin: 0 0 1rem; display: flex; align-items: center; gap: .5rem; }
.wizard-summary__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1.5rem; font-size: .875rem; }
.wizard-summary__item { display: flex; gap: .375rem; }
.wizard-summary__key { color: #6b7280; }
.wizard-summary__val { font-weight: 600; color: #1e1b4b; }
.wizard-summary__total { grid-column: 1/-1; margin-top: .5rem; padding-top: .75rem; border-top: 1px solid #c7d2fe; font-size: 1rem; }
.wizard-flow-notice { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 10px; padding: 1rem 1.25rem; margin-top: 1rem; font-size: .8125rem; color: #92400e; display: flex; align-items: flex-start; gap: .625rem; }
.wizard-flow-notice svg { width: 18px; height: 18px; flex-shrink: 0; color: #f59e0b; margin-top: 1px; }

/* Urgente banner */
.wizard-urgente-banner { background: #fff7ed; border: 1px solid #fdba74; border-radius: 10px; padding: .875rem 1.25rem; margin-bottom: 1.5rem; color: #c2410c; font-size: .875rem; display: flex; align-items: center; gap: .625rem; }
.wizard-urgente-banner svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Compra directa section */
.wizard-compra-directa { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid #e5e7eb; }
.wizard-compra-directa__title { font-size: .9375rem; font-weight: 700; color: #1e1b4b; margin: 0 0 1rem; }
.wizard-radio-group, .wizard-check-group { display: flex; flex-direction: column; gap: .625rem; margin-top: .5rem; }
.wizard-radio-opt, .wizard-check-opt { display: flex; align-items: flex-start; gap: .625rem; font-size: .875rem; color: #374151; cursor: pointer; }
.wizard-radio-opt input, .wizard-check-opt input { width: 16px; height: 16px; accent-color: #6366f1; flex-shrink: 0; margin-top: 2px; }

/* Navigation */
.wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; background: transparent; border: none; padding: 0; }
.wizard-nav--step1 { justify-content: flex-end; }
.btn--green { background: #16a34a; color: #fff; }
.btn--green:hover { background: #15803d; }
.btn--outline { background: transparent; color: #374151; border: 1px solid #d1d5db; }
.btn--outline:hover { background: #f9fafb; }

@media (max-width: 640px) {
  .wizard-grid-2 { grid-template-columns: 1fr; }
  .wizard-summary__grid { grid-template-columns: 1fr; }
  .wizard-progress { padding: 1rem; }
  .wz-step__label { display: none; }
}

/* ── Hoja de Requisición ─────────────────────────────────────────── */
.hoja-page { max-width: 960px; margin: 0 auto; padding: 1.5rem; }
.hoja-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.hoja-header__left { display: flex; flex-direction: column; gap: .25rem; }
.hoja-back { font-size: .8125rem; color: #6366f1; text-decoration: none; display: inline-flex; align-items: center; gap: .25rem; }
.hoja-back:hover { text-decoration: underline; }
.hoja-title { font-size: 1.375rem; font-weight: 700; color: #111827; margin: 0; }
.hoja-num { font-size: 1rem; font-weight: 600; color: #6366f1; }
.hoja-date { font-size: .8125rem; color: #6b7280; }
.hoja-header__right { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }

/* Status badges — large */
.badge-status { padding: .375rem .875rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; }
.badge-status--pendiente  { background: #fef3c7; color: #92400e; }
.badge-status--aprobada   { background: #d1fae5; color: #065f46; }
.badge-status--rechazada  { background: #fee2e2; color: #991b1b; }
.badge-status--en_revision   { background: #fff7ed; color: #c2410c; }
.badge-status--borrador      { background: #f3f4f6; color: #374151; }
.badge-status--en_licitacion { background: #ede9fe; color: #5b21b6; }
.badge-tipo--urgente { background: #fff7ed; color: #c2410c; padding: .25rem .625rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-tipo--ordinaria { background: #eff6ff; color: #1d4ed8; padding: .25rem .625rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }

/* Autorizar banner */
.hoja-auth-banner { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 10px; padding: 1rem 1.5rem; margin-bottom: 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hoja-auth-banner__text { display: flex; align-items: center; gap: .625rem; font-size: .9375rem; color: #92400e; font-weight: 500; }
.hoja-auth-banner__actions { display: flex; gap: .75rem; }
.btn--green-solid { background: #16a34a; color: #fff; border: none; }
.btn--green-solid:hover { background: #15803d; }
.btn--red-outline { background: transparent; color: #dc2626; border: 1.5px solid #dc2626; padding: .5rem 1rem; border-radius: 8px; cursor: pointer; font-size: .875rem; font-weight: 500; font-family: inherit; }
.btn--red-outline:hover { background: #fee2e2; }

/* Error banner */
.hoja-error { background: #fee2e2; border: 1px solid #fca5a5; border-radius: 8px; padding: .875rem 1.25rem; margin-bottom: 1.25rem; color: #991b1b; font-size: .875rem; }

/* Section cards */
.hoja-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.25rem; }
.hoja-card__title { font-size: 1rem; font-weight: 700; color: #1e1b4b; margin: 0 0 1.25rem; display: flex; align-items: center; gap: .5rem; border-bottom: 1px solid #f3f4f6; padding-bottom: .75rem; }
.hoja-card__title svg { width: 18px; height: 18px; color: #6366f1; }

/* Info grid */
.hoja-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .875rem 2rem; }
.hoja-info-item { display: flex; flex-direction: column; gap: .125rem; }
.hoja-info-label { font-size: .75rem; font-weight: 500; color: #9ca3af; text-transform: uppercase; letter-spacing: .05em; }
.hoja-info-value { font-size: .9375rem; color: #111827; }
.hoja-info-value--empty { color: #9ca3af; font-style: italic; }
.hoja-full { grid-column: 1 / -1; }

/* Items table */
.hoja-items-table { width: 100%; border-collapse: collapse; }
.hoja-items-table th { font-size: .6875rem; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; padding: .5rem .75rem; text-align: left; border-bottom: 2px solid #e5e7eb; }
.hoja-items-table td { padding: .75rem .75rem; border-bottom: 1px solid #f3f4f6; font-size: .875rem; color: #374151; }
.hoja-items-table .col-total { font-weight: 600; text-align: right; }
.hoja-items-table th:last-child { text-align: right; }
.hoja-items-total { text-align: right; padding: 1rem .75rem 0; }
.hoja-items-total__label { font-size: .9375rem; color: #6b7280; }
.hoja-items-total__amount { font-size: 1.375rem; font-weight: 700; color: #6366f1; margin-left: .5rem; }

/* Rejection card */
.hoja-rechazo { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.25rem; }
.hoja-rechazo__title { font-weight: 700; color: #c2410c; margin: 0 0 .75rem; display: flex; align-items: center; gap: .5rem; }
.hoja-rechazo__motivo { font-size: .9375rem; color: #374151; line-height: 1.6; white-space: pre-wrap; }
.hoja-rechazo__ajustes { margin-top: .75rem; font-size: .8125rem; color: #92400e; background: #fef3c7; padding: .375rem .75rem; border-radius: 6px; display: inline-block; }

/* Timeline */
.hoja-timeline { display: flex; flex-direction: column; gap: 0; }
.hoja-timeline-item { display: flex; gap: 1rem; position: relative; }
.hoja-timeline-item:not(:last-child)::after { content: ''; position: absolute; left: 11px; top: 28px; width: 2px; bottom: -8px; background: #e5e7eb; }
.hoja-timeline-dot { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; display: flex; align-items: center; justify-content: center; }
.hoja-timeline-dot--aprobada { background: #d1fae5; color: #065f46; }
.hoja-timeline-dot--rechazada { background: #fee2e2; color: #991b1b; }
.hoja-timeline-body { padding-bottom: 1.25rem; flex: 1; }
.hoja-timeline-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .25rem; }
.hoja-timeline-actor { font-weight: 600; font-size: .875rem; color: #111827; }
.hoja-timeline-action { font-size: .75rem; font-weight: 600; text-transform: uppercase; padding: .125rem .5rem; border-radius: 999px; }
.hoja-timeline-action--aprobada { background: #d1fae5; color: #065f46; }
.hoja-timeline-action--rechazada { background: #fee2e2; color: #991b1b; }
.hoja-timeline-date { font-size: .75rem; color: #9ca3af; }
.hoja-timeline-comment { font-size: .8125rem; color: #6b7280; margin-top: .25rem; }

/* Impact pills */
.hoja-impact-pills { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.hoja-impact-pill { background: #fee2e2; color: #991b1b; padding: .25rem .75rem; border-radius: 999px; font-size: .8125rem; font-weight: 500; }

/* Modal overlay */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay--open { display: flex; }
.modal-card { background: #fff; border-radius: 16px; padding: 2rem; max-width: 500px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal-card__title { font-size: 1.125rem; font-weight: 700; color: #111827; margin: 0 0 .5rem; }
.modal-card__desc { font-size: .875rem; color: #6b7280; margin: 0 0 1.25rem; }
.modal-field { margin-bottom: 1rem; }
.modal-field label { display: block; font-size: .8125rem; font-weight: 500; color: #374151; margin-bottom: .375rem; }
.modal-field textarea, .modal-field input[type=text] { width: 100%; padding: .625rem .875rem; border: 1px solid #d1d5db; border-radius: 8px; font-size: .9375rem; font-family: inherit; resize: vertical; box-sizing: border-box; }
.modal-field textarea:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.08); }
.modal-check-row { display: flex; align-items: flex-start; gap: .625rem; font-size: .875rem; color: #374151; margin-bottom: 1rem; }
.modal-check-row input { width: 16px; height: 16px; accent-color: #6366f1; flex-shrink: 0; margin-top: 2px; }
.modal-actions { display: flex; justify-content: flex-end; gap: .75rem; padding-top: .5rem; border-top: 1px solid #f3f4f6; margin-top: 1rem; flex-wrap: wrap; }
.btn--amber { background: #f59e0b; color: #fff; border: none; padding: .5rem 1rem; border-radius: 8px; cursor: pointer; font-size: .875rem; font-weight: 500; font-family: inherit; }
.btn--amber:hover { background: #d97706; }
.btn--red { background: #dc2626; color: #fff; border: none; padding: .5rem 1rem; border-radius: 8px; cursor: pointer; font-size: .875rem; font-weight: 500; font-family: inherit; }
.btn--red:hover { background: #b91c1c; }

@media (max-width: 640px) {
  .hoja-info-grid { grid-template-columns: 1fr; }
  .hoja-header { flex-direction: column; }
  .hoja-auth-banner { flex-direction: column; align-items: flex-start; }
}

/* ── Evaluación ─────────────────────────────────────────────────── */
.eval-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.eval-stat { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 1.25rem 1.5rem; }
.eval-stat__label { font-size: .75rem; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: .05em; }
.eval-stat__value { font-size: 1.75rem; font-weight: 700; color: #1e1b4b; margin-top: .25rem; }
.eval-action-bar { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 10px; padding: 1rem 1.5rem; margin-bottom: 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.eval-winner-banner { background: #d1fae5; border: 1px solid #6ee7b7; border-radius: 10px; padding: 1rem 1.5rem; margin-bottom: 1.5rem; color: #065f46; font-weight: 600; display: flex; align-items: center; gap: .625rem; }

/* Propuesta cards */
.eval-cards { display: flex; flex-direction: column; gap: 1rem; }
.eval-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 1.5rem; }
.eval-card--awarded { border-color: #6ee7b7; background: #f0fdf4; }
.eval-card--rejected { opacity: .6; }
.eval-card__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; flex-wrap: wrap; gap: .5rem; }
.eval-card__nombre { font-size: 1rem; font-weight: 700; color: #111827; }
.eval-card__monto { font-size: 1.5rem; font-weight: 700; color: #6366f1; margin-bottom: .75rem; }
.eval-card__meta { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 2rem; margin-bottom: 1rem; }
.eval-card__meta-item { font-size: .875rem; color: #6b7280; }
.eval-card__meta-label { font-weight: 600; color: #374151; }
.eval-req-bar { margin-bottom: 1rem; }
.eval-req-bar__label { font-size: .8125rem; color: #6b7280; margin-bottom: .375rem; }
.eval-req-bar__track { height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.eval-req-bar__fill { height: 100%; background: #6366f1; border-radius: 3px; }
.eval-card__resumen { font-size: .875rem; color: #374151; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 1rem; }
.eval-card__actions { display: flex; gap: .625rem; flex-wrap: wrap; padding-top: .75rem; border-top: 1px solid #f3f4f6; }

/* Status badges for propuestas */
.badge-prop--submitted    { background: #dbeafe; color: #1e40af; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-prop--under_review { background: #fef3c7; color: #92400e; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-prop--awarded      { background: #d1fae5; color: #065f46; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-prop--rejected     { background: #f3f4f6; color: #6b7280; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }

@media (max-width: 640px) {
  .eval-stats { grid-template-columns: 1fr; }
  .eval-card__meta { grid-template-columns: 1fr; }
}

/* ── Documentos adjuntos ─────────────────────────────────────── */
.hoja-docs-list { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .5rem; }
.hoja-doc-item { display: flex; align-items: center; gap: .75rem; padding: .625rem .875rem; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; }
.hoja-doc-name { font-size: .875rem; color: #6366f1; text-decoration: none; flex: 1; display: flex; align-items: center; gap: .5rem; }
.hoja-doc-name:hover { text-decoration: underline; }
/* El nombre previsualizable es un <button> pero se ve y se comporta como el enlace */
.hoja-doc-name--btn { background: none; border: none; cursor: pointer; font-family: inherit; text-align: left; padding: 0; }

/* Modal de vista previa de documentos */
.doc-modal { position: fixed; inset: 0; background: rgba(15,23,42,.6); z-index: 1000; align-items: center; justify-content: center; padding: 2rem; }
.doc-modal__panel { background: #fff; border-radius: 12px; width: min(920px, 96vw); height: min(86vh, 960px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,.32); }
.doc-modal__head { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; border-bottom: 1px solid #e5e7eb; flex-shrink: 0; }
.doc-modal__title { flex: 1; font-weight: 600; font-size: .95rem; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-modal__btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: none; background: none; cursor: pointer; color: #6b7280; border-radius: 7px; text-decoration: none; font-size: 1.4rem; line-height: 1; }
.doc-modal__btn:hover { background: #f3f4f6; color: #111827; }
.doc-modal__body { flex: 1; min-height: 0; overflow: auto; background: #f1f5f9; display: flex; }
.doc-modal__frame { width: 100%; height: 100%; border: none; }
.doc-modal__img { max-width: 100%; max-height: 100%; object-fit: contain; margin: auto; display: block; }
.hoja-doc-size { font-size: .75rem; color: #9ca3af; white-space: nowrap; }
.hoja-doc-download { display: inline-flex; align-items: center; color: #6b7280; text-decoration: none; padding: .125rem .375rem; border-radius: 4px; }
.hoja-doc-download:hover { background: #eef2ff; color: #6366f1; }
.hoja-doc-delete { background: none; border: none; cursor: pointer; color: #dc2626; font-size: 1.125rem; padding: .125rem .375rem; border-radius: 4px; }
.hoja-doc-delete:hover { background: #fee2e2; }
.hoja-upload-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 1.5rem; border: 2px dashed #d1d5db; border-radius: 10px; cursor: pointer; text-align: center; font-size: .9375rem; color: #6b7280; transition: border-color .2s; }
.hoja-upload-zone:hover { border-color: #6366f1; background: #f5f3ff; }
.hoja-upload-input { display: none; }

/* ── Filter bar ─────────────────────────────────────────────── */
.req-filter-bar { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
.req-filter-search { position: relative; }
.req-filter-search__icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #9ca3af; pointer-events: none; }
.req-filter-search__input { width: 100%; padding: .625rem .875rem .625rem 2.25rem; border: 1px solid #e5e7eb; border-radius: 8px; font-size: .9375rem; font-family: inherit; box-sizing: border-box; background: #f9fafb; }
.req-filter-search__input:focus { outline: none; border-color: #6366f1; background: #fff; box-shadow: 0 0 0 3px rgba(99,102,241,.08); }
.req-filter-clear { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); color: #9ca3af; text-decoration: none; font-size: 1.125rem; line-height: 1; }
.req-filter-row { display: flex; gap: .625rem; flex-wrap: wrap; align-items: center; }
.req-filter-select { padding: .5rem .875rem; border: 1px solid #e5e7eb; border-radius: 8px; font-size: .875rem; font-family: inherit; background: #f9fafb; color: #374151; cursor: pointer; }
.req-filter-select:focus { outline: none; border-color: #6366f1; }
.req-empty { text-align: center; padding: 3rem 1rem; color: #9ca3af; }

/* ── Sidebar nav links (Autorizador Dashboard) ───────────────── */
.req-nav__link { display: flex; align-items: center; gap: .625rem; padding: .625rem .875rem; color: #6b7280; text-decoration: none; border-radius: 8px; font-size: .9375rem; transition: background .15s, color .15s; }
.req-nav__link:hover { background: #f3f4f6; color: #111827; }
.req-nav__link--active { background: #ede9fe; color: #4338ca; font-weight: 600; }

/* ── Centros de Costo Module ───────────────────────────── */
.cc-tab-nav { display:flex; gap:.5rem; margin-bottom:1.5rem; border-bottom:2px solid #e5e7eb; padding-bottom:0; }
.cc-tab-nav a { padding:.625rem 1.25rem; font-size:.9rem; font-weight:600; color:#6b7280; text-decoration:none; border-bottom:2px solid transparent; margin-bottom:-2px; transition:color .15s,border-color .15s; }
.cc-tab-nav a.active, .cc-tab-nav a:hover { color:#6366f1; border-bottom-color:#6366f1; }
.cc-kpi-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; margin-bottom:1.5rem; }
.cc-kpi-card { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:1.25rem 1.5rem; display:flex; align-items:center; gap:1rem; }
.cc-kpi-icon { width:48px; height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.cc-kpi-label { font-size:.75rem; color:#6b7280; font-weight:500; }
.cc-kpi-value { font-size:1.5rem; font-weight:800; color:#111827; line-height:1.1; }
.cc-kpi-sub { font-size:.7rem; color:#9ca3af; margin-top:.15rem; }
.cc-charts-row { display:grid; grid-template-columns:1fr 2fr; gap:1rem; margin-bottom:1.5rem; }
.cc-chart-card { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:1.25rem; }
.cc-chart-title { font-size:.875rem; font-weight:700; color:#1e1b4b; margin-bottom:1rem; }
.cc-semaforo { display:inline-block; width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.cc-semaforo--verde   { background:#16a34a; box-shadow:0 0 0 3px #dcfce7; }
.cc-semaforo--amarillo{ background:#d97706; box-shadow:0 0 0 3px #fef9c3; }
.cc-semaforo--rojo    { background:#dc2626; box-shadow:0 0 0 3px #fee2e2; }
.cc-progress-wrap { background:#f3f4f6; border-radius:99px; height:8px; overflow:hidden; width:100%; min-width:80px; }
.cc-progress-fill { height:100%; border-radius:99px; transition:width .3s; }
.cc-progress-fill--verde    { background:linear-gradient(90deg,#16a34a,#22c55e); }
.cc-progress-fill--amarillo { background:linear-gradient(90deg,#d97706,#f59e0b); }
.cc-progress-fill--rojo     { background:linear-gradient(90deg,#dc2626,#ef4444); }
.cc-tree-indent { padding-left:1.5rem; }
.cc-tree-row-root td:first-child { font-weight:700; }
.cc-badge { display:inline-flex; align-items:center; padding:.2rem .6rem; border-radius:99px; font-size:.7rem; font-weight:700; gap:.3rem; }
.cc-badge--verde    { background:#dcfce7; color:#16a34a; }
.cc-badge--amarillo { background:#fef9c3; color:#d97706; }
.cc-badge--rojo     { background:#fee2e2; color:#dc2626; }
.cc-badge--inactivo { background:#f3f4f6; color:#9ca3af; }
.cc-control-card { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:1.25rem 1.5rem; margin-bottom:1rem; }
.cc-control-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:.75rem; }
.cc-control-strip { height:4px; border-radius:4px 4px 0 0; margin:-1.25rem -1.5rem 1.25rem; }
.cc-alert-banner { background:#fee2e2; border:1px solid #fecaca; border-radius:12px; padding:1rem 1.5rem; margin-bottom:1.5rem; display:flex; align-items:center; gap:.75rem; color:#dc2626; font-weight:600; font-size:.9rem; }
.cc-monthly-table th, .cc-monthly-table td { padding:.5rem .625rem; font-size:.8rem; white-space:nowrap; }
.cc-monthly-table th { background:#f9fafb; font-weight:700; color:#374151; position:sticky; top:0; }
.cc-monthly-amount { font-variant-numeric:tabular-nums; text-align:right; }

/* ── Match score (licitaciones index cards) ──────────────────── */
.lic-match { display:inline-flex; align-items:center; gap:.25rem; font-size:.68rem; font-weight:600; padding:.15em .55em; border-radius:999px; }
.lic-match--high   { background:#dcfce7; color:#15803d; }
.lic-match--medium { background:#fef9c3; color:#a16207; }

/* ── Autosave indicator (wizard stepper) ─────────────────────── */
.wiz-header__pct-row { display:flex; align-items:center; gap:.75rem; }
.wiz-autosave-lbl { font-size:.7rem; font-weight:500; transition:color .3s; }

/* ── Documents section header row ───────────────────────────── */
.det-section__head-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:1rem; }
.det-section__head-row .det-section__title { margin-bottom:0; }
.det-docs__dl-all { display:inline-flex; align-items:center; gap:.35rem; font-size:.78rem; white-space:nowrap; }

/* ── Document links ──────────────────────────────────────────── */
.det-doc--link { text-decoration:none; cursor:pointer; transition:border-color .15s, background .15s; }
.det-doc--link:hover { border-color:#a5b4fc; background:#f5f3ff; }
.det-doc__dl-icon { margin-left:auto; color:#a5b4fc; flex-shrink:0; }

/* ═══════════════════════════════════════════════════════════════
   PORTAL PROVEEDORES — Layout + Sidebar
   ═══════════════════════════════════════════════════════════════ */
.pp-body  { margin:0; background:#f3f4f6; }
.pp-layout { display:flex; min-height:100vh; }
.pp-sidebar { width:80px; background:var(--clr-sidebar, #1E1B4B); display:flex; flex-direction:column; align-items:center; padding:1rem 0; flex-shrink:0; position:sticky; top:0; height:100vh; overflow-y:auto; }
.pp-sidebar__logo { margin-bottom:1.5rem; }
.pp-sidebar__logo-img { width:38px; height:38px; object-fit:contain; border-radius:8px; }
.pp-sidebar__logo-fallback { width:38px;height:38px;background:var(--clr-primary, #6366f1);border-radius:8px;color:#fff;font-weight:800;font-size:1.1rem;display:flex;align-items:center;justify-content:center; }
.pp-sidebar__nav { display:flex; flex-direction:column; align-items:center; gap:.25rem; width:100%; padding:0 .5rem; }
.pp-sidebar__divider { width:60%;height:1px;background:rgba(255,255,255,.12);margin:.5rem 0; }
.pp-nav__item { display:flex; flex-direction:column; align-items:center; gap:.25rem; padding:.6rem .25rem; border-radius:10px; color:rgba(255,255,255,.55); text-decoration:none; width:100%; cursor:pointer; transition:background .15s, color .15s; }
.pp-nav__item svg { width:20px; height:20px; flex-shrink:0; }
.pp-nav__item span { font-size:.55rem; font-weight:600; text-align:center; line-height:1.2; color:inherit; }
.pp-nav__item:hover { background:var(--clr-sidebar-active, rgba(255,255,255,.1)); color:#fff; }
.pp-nav__item--active { background:var(--clr-sidebar-active, rgba(99,102,241,.25)); color:var(--clr-primary-light, #a5b4fc) !important; }
.pp-nav__item--disabled { opacity:.35; cursor:not-allowed; pointer-events:none; }
.pp-main { flex:1; display:flex; flex-direction:column; min-width:0; }
.pp-header { display:flex; justify-content:space-between; align-items:center; padding:.75rem 1.5rem; background:#fff; border-bottom:1px solid #e5e7eb; }
.pp-header__right { display:flex; align-items:center; gap:1rem; }
.pp-header__emp { font-size:.8rem; font-weight:600; color:#374151; }
.pp-header__user { font-size:.8rem; color:#6b7280; }
.pp-header__logout { background:none; border:1px solid #d1d5db; color:#6b7280; border-radius:6px; padding:.25rem .625rem; font-size:.75rem; cursor:pointer; }
.pp-header__logout:hover { border-color:#6366f1; color:#6366f1; }
.pp-content { padding:1.5rem; flex:1; }
/* ═══════════════════════════════════════════════════════════════
   PORTAL PROVEEDORES — Dashboard
   ═══════════════════════════════════════════════════════════════ */
.ppdash { width:100%; }
.ppdash-topbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.75rem; margin-bottom:1.5rem; }
.ppdash-titulo { font-size:1.25rem; font-weight:700; color:#1e1b4b; margin:0; }
/* Barra de controles: todos en una sola fila, agrupados en un pill */
.ppdash-controls {
    display:flex; align-items:center; gap:0;
    background:#fff; border:1px solid #e5e7eb; border-radius:10px;
    padding:.3rem .5rem; flex-wrap:nowrap;
}
.ppdash-controls-div { width:1px; height:1.4rem; background:#e5e7eb; margin:0 .5rem; flex-shrink:0; }
.ppdash-periodo { display:flex; align-items:center; gap:.4rem; }
.ppdash-periodo__label { font-size:.72rem; font-weight:600; color:#9ca3af; white-space:nowrap; letter-spacing:.03em; text-transform:uppercase; }
.ppdash-periodo__inputs { display:flex; align-items:center; gap:.35rem; }
.ppdash-periodo__sep { color:#d1d5db; font-size:.85rem; }
.ppdash-dateinput { border:none; outline:none; font-size:.82rem; color:#374151; background:transparent; padding:.15rem 0; width:110px; }
.ppdash-select { border:none; outline:none; padding:.3rem .5rem; font-size:.82rem; color:#374151; background:transparent; cursor:pointer; }
.ppdash-btn { display:inline-flex; align-items:center; gap:.4rem; padding:.4rem .9rem; border-radius:7px; font-size:.82rem; font-weight:600; cursor:pointer; border:none; }
.ppdash-btn--primary { background:#4f46e5; color:#fff; }
.ppdash-btn--primary:hover { background:#4338ca; }
.ppdash-btn--outline { background:#f3f4f6; color:#374151; border:none; }
.ppdash-btn--outline:hover { background:#e5e7eb; }
.ppdash-btn:disabled { opacity:.55; cursor:not-allowed; }
.ppdash-loading { display:flex; align-items:center; justify-content:center; gap:1rem; padding:3rem; color:#6b7280; font-size:.9rem; }
.ppdash-spinner { width:28px; height:28px; border:3px solid #e5e7eb; border-top-color:#6366f1; border-radius:50%; animation:ppdash-spin .7s linear infinite; }
@keyframes ppdash-spin { to { transform:rotate(360deg); } }
.ppdash-card { background:#fff; border-radius:12px; padding:1.25rem 1.5rem; box-shadow:0 1px 4px rgba(0,0,0,.07); margin-bottom:1rem; }
.ppdash-card__head { display:flex; align-items:center; justify-content:space-between; margin-bottom:1rem; }
.ppdash-card__title { font-size:.9rem; font-weight:700; color:#1e1b4b; margin-bottom:.875rem; }
.ppdash-card--full .ppdash-card__title { margin-bottom:0; }
.ppdash-row { display:grid; gap:1rem; margin-bottom:1rem; }
.ppdash-row--3 { grid-template-columns:repeat(3,1fr); }
.ppdash-row--2 { grid-template-columns:repeat(2,1fr); }
@media (max-width:1024px) { .ppdash-row--3 { grid-template-columns:1fr 1fr; } }
@media (max-width:700px) { .ppdash-row--3,.ppdash-row--2 { grid-template-columns:1fr; } }
.ppdash-chart-wrap { height:280px; position:relative; }
.ppdash-chart-donut-wrap { height:220px; position:relative; margin:auto; max-width:240px; }
.ppdash-legend { display:flex; gap:.75rem; flex-wrap:wrap; }
.ppdash-leg-item { display:flex; align-items:center; gap:.35rem; font-size:.72rem; color:#6b7280; }
.ppdash-leg-item i { display:inline-block; width:10px; height:10px; border-radius:2px; flex-shrink:0; }
.ppdash-leg-item--block { display:flex; align-items:center; gap:.4rem; margin-bottom:.35rem; }
.ppdash-estatus-total { display:flex; align-items:baseline; gap:.5rem; margin-bottom:1rem; }
.ppdash-big-num { font-size:2rem; font-weight:700; color:#1e1b4b; line-height:1; }
.ppdash-big-sub { font-size:.8rem; color:#9ca3af; }
.ppdash-estatus-item { display:flex; align-items:center; gap:.5rem; margin-bottom:.35rem; }
.ppdash-estatus-dot { width:12px; height:12px; border-radius:3px; flex-shrink:0; }
.ppdash-estatus-nombre { flex:1; font-size:.8rem; color:#374151; }
.ppdash-estatus-qty { font-size:.8rem; font-weight:700; color:#1e1b4b; }
.ppdash-estatus-label { font-size:.72rem; color:#9ca3af; }
.ppdash-estatus-pct { font-size:.72rem; color:#6b7280; margin-left:auto; }
.ppdash-estatus-bar { height:5px; background:#f3f4f6; border-radius:3px; margin-bottom:.75rem; }
.ppdash-estatus-bar__fill { height:100%; border-radius:3px; transition:width .4s; }
.ppdash-pagos-legend { display:flex; gap:.75rem; flex-wrap:wrap; margin-bottom:.75rem; }
.ppdash-ppd-detail { margin-top:.75rem; }
.ppdash-ppd-label { font-size:.8rem; font-weight:600; color:#374151; margin-bottom:.4rem; }
.ppdash-ppd-bar { height:10px; background:#f3f4f6; border-radius:5px; margin-bottom:.5rem; overflow:hidden; }
.ppdash-ppd-bar__fill { height:100%; background:#FF9C42; border-radius:5px; }
.ppdash-ppd-foot { display:flex; gap:1rem; }
.ppdash-ppd-item { display:flex; align-items:center; gap:.35rem; font-size:.75rem; color:#6b7280; }
.ppdash-ppd-dot { width:10px; height:10px; border-radius:50%; }
.ppdash-sort-btns { display:flex; align-items:center; gap:.5rem; margin-bottom:.75rem; flex-wrap:wrap; }
.ppdash-sort-btns span { font-size:.72rem; color:#9ca3af; }
.ppdash-sort-btn { background:none; border:none; font-size:.7rem; font-weight:600; color:#9ca3af; cursor:pointer; padding:.2rem .4rem; border-radius:4px; letter-spacing:.03em; }
.ppdash-sort-btn--active { color:#6366f1; background:#ede9fe; }
.ppdash-list { }
.ppdash-prov-item { display:flex; align-items:center; gap:.6rem; padding:.5rem 0; border-bottom:1px solid #f3f4f6; }
.ppdash-prov-item:last-child { border:none; }
.ppdash-rank { width:24px; height:24px; border-radius:50%; background:#e5e7eb; color:#6b7280; font-size:.7rem; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.ppdash-rank--gold   { background:#F59E0B; color:#fff; }
.ppdash-rank--silver { background:#9CA3AF; color:#fff; }
.ppdash-rank--bronze { background:#92400E; color:#fff; }
.ppdash-prov-nombre { flex:1; font-size:.8rem; font-weight:500; color:#374151; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ppdash-prov-monto  { font-size:.8rem; font-weight:700; color:#1e1b4b; white-space:nowrap; }
.ppdash-prov-cfdi   { font-size:.72rem; color:#9ca3af; white-space:nowrap; }
.ppdash-formas-wrap { display:flex; gap:1rem; align-items:flex-start; }
.ppdash-formas-legend { flex:1; max-height:260px; overflow-y:auto; }
.ppdash-moneda-bar { height:12px; border-radius:6px; overflow:hidden; background:#f3f4f6; margin-bottom:1.25rem; }
.ppdash-moneda-list { display:flex; flex-direction:column; gap:.75rem; }
.ppdash-moneda-item { display:flex; align-items:center; gap:.75rem; }
.ppdash-moneda-dot { width:12px; height:12px; border-radius:50%; flex-shrink:0; }
.ppdash-moneda-info { flex:1; }
.ppdash-moneda-cfdi { font-size:.8rem; color:#374151; }
.ppdash-moneda-monto { font-size:1.2rem; font-weight:700; color:#1e1b4b; line-height:1.2; }
.ppdash-moneda-codigo { font-size:.72rem; color:#9ca3af; }
.ppdash-moneda-pct { font-size:.75rem; color:#6b7280; font-weight:600; white-space:nowrap; }
.ppdash-empty { font-size:.82rem; color:#9ca3af; text-align:center; padding:1.5rem 0; }

/* ============================================================
   Clases faltantes detectadas en auditoría de consistencia
   ============================================================ */

/* Botón secundario (alias de outline gris) — usado en "Cancelar"/"Reset" */
.btn--secondary {
  background: transparent; color: #374151; border: 1px solid #d1d5db;
}
.btn--secondary:hover { background: #f9fafb; }

/* Badge neutro (alias de grey) */
.badge--neutral { background: #f3f4f6; color: #6b7280; }

/* Wrapper de tabla con scroll horizontal (req/OC anchas) */
.req-table-wrap { overflow-x: auto; }

/* Sección de hoja/detalle con su título (faltaban; usadas en OC Detalle y fallo) */
.hoja-section { margin-bottom: 1.75rem; }
.hoja-section__title {
  font-size: 1rem; font-weight: 700; color: #1e1b4b; margin: 0 0 1rem;
  display: flex; align-items: center; gap: .5rem;
  border-bottom: 1px solid #f3f4f6; padding-bottom: .75rem;
}
.hoja-section__title svg { width: 18px; height: 18px; color: #6366f1; }

/* Utilidades de ancho (Requisiciones/Editar) */
.wf-100 { width: 100%; }
.wf-80  { width: 80%; }

/* Peso Poppins semibold */
.poppins-semibold { font-weight: 600; }

/* ============================================================
   Wizard de Alta de Proveedor (.alta-*) — antes vivían solo en
   el <style> de Paso1, por lo que Paso2/3/4 se veían sin estilo.
   ============================================================ */
.alta-wrap   { max-width:680px; margin:2.5rem auto; padding:0 1.25rem; }
.alta-header { margin-bottom:2rem; text-align:center; }
.alta-title  { font-size:1.5rem; font-weight:700; color:#111827; margin:0 0 .375rem; }
.alta-sub    { font-size:.9375rem; color:#6b7280; margin:0; }

.alta-stepper { display:flex; align-items:center; justify-content:center; gap:0; margin-bottom:2rem; flex-wrap:nowrap; }
.alta-step    { display:flex; flex-direction:column; align-items:center; gap:.375rem; }
.alta-step__circle { width:32px; height:32px; border-radius:50%; border:2px solid #d1d5db; background:#fff;
                     display:flex; align-items:center; justify-content:center; font-size:.875rem; font-weight:600; color:#9ca3af; }
.alta-step--active .alta-step__circle { border-color:#6366f1; background:#6366f1; color:#fff; }
.alta-step--done   .alta-step__circle { border-color:#22c55e; background:#22c55e; color:#fff; }
.alta-step__label  { font-size:.75rem; font-weight:500; color:#9ca3af; white-space:nowrap; }
.alta-step--active .alta-step__label { color:#6366f1; font-weight:600; }
.alta-step--done   .alta-step__label { color:#16a34a; }
.alta-step__line   { flex:1; min-width:32px; height:2px; background:#e5e7eb; margin:0 .25rem; margin-bottom:1.25rem; }
.alta-step__line--done { background:#22c55e; }

.alta-card  { background:#fff; border:1px solid #e5e7eb; border-radius:16px; padding:2rem; }
.alta-card__title { font-size:1.125rem; font-weight:700; color:#111827; margin:0 0 .25rem; }
.alta-card__sub   { font-size:.875rem; color:#6b7280; margin:0 0 1.75rem; }

.alta-grid  { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.alta-field { display:flex; flex-direction:column; gap:.375rem; }
.alta-field--full { grid-column:1/-1; }
.alta-label { font-size:.8125rem; font-weight:600; color:#374151; }
.alta-label sup { color:#ef4444; }
.alta-input { width:100%; padding:.625rem .875rem; border:1.5px solid #e5e7eb; border-radius:8px;
              font-size:.9375rem; color:#111827; font-family:inherit; transition:border .15s; }
.alta-input:focus { outline:none; border-color:#6366f1; box-shadow:0 0 0 3px rgba(99,102,241,.12); }
.alta-input.error { border-color:#ef4444; }

.alta-error { font-size:.8125rem; color:#dc2626; margin-top:.25rem; }
.alta-section-label { font-size:.75rem; font-weight:700; color:#6366f1; text-transform:uppercase;
                      letter-spacing:.05em; margin:1.5rem 0 1rem; padding-bottom:.375rem;
                      border-bottom:1px solid #e5e7eb; }
.alta-actions { display:flex; justify-content:flex-end; gap:.75rem; margin-top:1.75rem; padding-top:1.25rem; border-top:1px solid #f3f4f6; }
.alta-rechazado-banner { background:#fee2e2; border:1px solid #fca5a5; border-radius:10px;
                          padding:.875rem 1.25rem; margin-bottom:1.5rem; color:#991b1b;
                          font-size:.9375rem; }

/* ── Dropzone de documentos (alta paso 4) ─────────────────────── */
.dz { position:relative; display:flex; align-items:center; gap:.875rem;
      border:1.5px dashed #d1d5db; border-radius:10px; background:#fafafa;
      padding:1rem 1.125rem; cursor:pointer;
      transition:border-color .15s, background .15s; }
.dz:hover { border-color:#6366f1; background:#f5f6ff; }
.dz.dz--over { border-color:#6366f1; border-style:solid; background:#eef0ff; }
.dz input[type=file] { position:absolute; inset:0; width:100%; height:100%;
                       opacity:0; cursor:pointer; }
.dz__icon { flex-shrink:0; width:2.5rem; height:2.5rem; border-radius:8px;
            background:#eef0ff; color:#6366f1;
            display:flex; align-items:center; justify-content:center; }
.dz--uploaded { background:#fff; }
.dz--uploaded .dz__icon { background:#d1fae5; color:#065f46; }
.dz__body { display:flex; flex-direction:column; gap:.125rem; min-width:0; }
.dz__text { font-size:.875rem; font-weight:600; color:#374151; }
.dz__text em { color:#6366f1; font-style:normal; }
.dz__hint { font-size:.75rem; color:#9ca3af; }
.dz--busy { pointer-events:none; opacity:.6; }
.dz--busy .dz__icon { animation:dz-pulse 1s ease-in-out infinite; }
@keyframes dz-pulse { 50% { transform:scale(.88); opacity:.7; } }
@media (prefers-reduced-motion: reduce) { .dz--busy .dz__icon { animation:none; } }
.dz__error { font-size:.8125rem; color:#dc2626; margin-top:.375rem; }

/* ── Monitor de cancelaciones SAT ─────────────────────────────── */
.mon-wrap { padding: 0 0 2rem; }
.mon-header { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; margin-bottom:1.5rem; flex-wrap:wrap; }
.mon-titulo { font-size:1.35rem; font-weight:700; color:var(--text-primary); margin:0 0 .25rem; }
.mon-subtitulo { font-size:.85rem; color:var(--text-muted); margin:0; }
.mon-actions { display:flex; gap:.5rem; flex-shrink:0; }

/* Cards resumen */
.mon-cards { display:grid; grid-template-columns:repeat(4,1fr); gap:1rem; margin-bottom:1.5rem; }
.mon-card { display:flex; flex-direction:column; gap:.25rem; padding:1rem 1.25rem; border-radius:10px;
            text-decoration:none; border:1px solid transparent; transition:transform .15s,box-shadow .15s; }
.mon-card:hover { transform:translateY(-2px); box-shadow:0 4px 16px rgba(0,0,0,.12); }
.mon-card__num { font-size:2rem; font-weight:800; line-height:1; }
.mon-card__label { font-size:.78rem; font-weight:600; text-transform:uppercase; letter-spacing:.05em; }
.mon-card svg { opacity:.4; margin-top:.25rem; }
.mon-card--vigente   { background:#d1fae5; color:#065f46; border-color:#a7f3d0; }
.mon-card--cancelado { background:#fee2e2; color:#991b1b; border-color:#fca5a5; }
.mon-card--pendiente { background:#fef3c7; color:#92400e; border-color:#fde68a; }
.mon-card--noenc     { background:#e0e7ff; color:#3730a3; border-color:#c7d2fe; }

/* Progress bar */
.mon-progress { margin-bottom:1rem; }
.mon-progress__bar { height:6px; background:#e5e7eb; border-radius:3px; overflow:hidden; }
.mon-progress__fill { height:100%; background:var(--primary-500,#6366f1); border-radius:3px; transition:width .4s ease; width:0; }
.mon-progress__txt { font-size:.8rem; color:var(--text-muted); display:block; margin-top:.35rem; }

/* Tabs */
.mon-tabs { display:flex; gap:.25rem; margin-bottom:1rem; flex-wrap:wrap; border-bottom:1px solid var(--border-color,#e5e7eb); padding-bottom:.5rem; }
.mon-tab { padding:.35rem .75rem; border-radius:6px; font-size:.82rem; font-weight:500; text-decoration:none;
           color:var(--text-muted); transition:background .15s,color .15s; }
.mon-tab:hover { background:var(--bg-hover,#f3f4f6); color:var(--text-primary); }
.mon-tab--active { background:var(--primary-100,#e0e7ff); color:var(--primary-700,#4338ca); font-weight:600; }

/* Tabla */
.mon-table-wrap { overflow-x:auto; }
.mon-table { width:100%; border-collapse:collapse; font-size:.86rem; }
.mon-table th { text-align:left; padding:.5rem .75rem; font-size:.75rem; text-transform:uppercase; letter-spacing:.05em;
                color:var(--text-muted); border-bottom:2px solid var(--border-color,#e5e7eb); white-space:nowrap; }
.mon-table td { padding:.6rem .75rem; border-bottom:1px solid var(--border-color,#f3f4f6); vertical-align:middle; }
.mon-table tr:hover td { background:var(--bg-hover,#f9fafb); }
.mon-uuid { font-family:monospace; font-size:.8rem; color:var(--text-muted); }
.mon-nombre { display:block; font-weight:500; }
.mon-rfc    { display:block; font-size:.78rem; color:var(--text-muted); }
.mon-fecha-carga { font-size:.8rem; color:var(--text-muted); }
.text-right { text-align:right; }

/* Badges */
.mon-badge { display:inline-flex; align-items:center; padding:.2rem .6rem; border-radius:999px; font-size:.75rem; font-weight:600; }
.mon-badge--vigente   { background:#d1fae5; color:#065f46; }
.mon-badge--cancelado { background:#fee2e2; color:#991b1b; }
.mon-badge--pendiente { background:#fef3c7; color:#92400e; }
.mon-badge--noenc     { background:#e0e7ff; color:#3730a3; }

/* Botón revalidar fila */
.mon-btn-rev { background:none; border:1px solid var(--border-color,#e5e7eb); border-radius:6px; padding:.25rem .4rem;
               cursor:pointer; color:var(--text-muted); transition:border-color .15s,color .15s; display:flex; }
.mon-btn-rev:hover { border-color:var(--primary-400,#818cf8); color:var(--primary-600,#4f46e5); }
.mon-btn-rev:disabled { opacity:.4; cursor:default; }
@keyframes mon-spin-anim { to { transform:rotate(360deg); } }
.mon-spin { animation:mon-spin-anim .8s linear infinite; }

/* Empty / misc */
.mon-empty { text-align:center; padding:3rem 1rem; color:var(--text-muted); }
.mon-empty svg { margin-bottom:1rem; opacity:.3; }
.mon-empty p { margin-bottom:1rem; }
.mon-pager-info { font-size:.85rem; color:var(--text-muted); }
.mon-total-info { font-size:.8rem; color:var(--text-muted); text-align:right; margin-top:.75rem; }

@media (max-width:768px) {
    .mon-cards { grid-template-columns:repeat(2,1fr); }
    .mon-header { flex-direction:column; }
}
@media (max-width:480px) {
    .mon-cards { grid-template-columns:1fr 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   PORTAL PROVEEDORES — Comprobante (réplica Detecno)
   ═══════════════════════════════════════════════════════════════ */
.cmp { width:100%; }
.cmp-titulo { font-size:1.35rem; font-weight:700; color:#4338ca; letter-spacing:.02em; margin:0 0 1rem; }

/* ── Panel de filtros ── */
.cmp-filtros { background:#fff; border-radius:14px; padding:1.5rem; box-shadow:0 1px 3px rgba(0,0,0,.06); margin-bottom:1rem; }
.cmp-filtros__grid { display:grid; grid-template-columns:1fr 1fr 1fr 1fr; gap:1.25rem; }
.cmp-field { display:flex; flex-direction:column; gap:.4rem; min-width:0; }
.cmp-field__label { font-size:.82rem; font-weight:600; color:#374151; }

/* Tag box */
.cmp-tagbox { background:#f3f4f6; border:1px solid #e5e7eb; border-radius:8px; padding:.5rem .7rem; min-height:64px;
              display:flex; flex-direction:column; gap:.4rem; cursor:text; transition:border-color .15s; }
.cmp-tagbox:focus-within { border-color:#6366f1; background:#fff; }
.cmp-tag-input { border:none; outline:none; background:transparent; font-size:.85rem; color:#374151; width:100%; padding:.1rem 0; }
.cmp-tag-input::placeholder { color:#9ca3af; }
.cmp-tags { display:flex; flex-wrap:wrap; gap:.35rem; }
.cmp-tags:empty { display:none; }
.cmp-chip { display:inline-flex; align-items:center; gap:.3rem; background:#e0e7ff; color:#3730a3; font-size:.78rem;
            font-weight:600; padding:.2rem .5rem; border-radius:6px; }
.cmp-chip button { background:none; border:none; color:#6366f1; cursor:pointer; font-size:1rem; line-height:1; padding:0; }
.cmp-chip button:hover { color:#1e1b4b; }

/* Periodo */
.cmp-field--periodo { gap:.4rem; }
.cmp-periodo-head { display:flex; align-items:center; justify-content:space-between; gap:.5rem; flex-wrap:wrap; }
.cmp-radios { display:flex; gap:.75rem; }
.cmp-radio { font-size:.78rem; color:#374151; display:inline-flex; align-items:center; gap:.25rem; cursor:pointer; }
.cmp-radio input { accent-color:#4f46e5; }
.cmp-periodo-inputs { display:flex; align-items:center; gap:.5rem; background:#f3f4f6; border:1px solid #e5e7eb;
                      border-radius:8px; padding:.55rem .7rem; min-height:64px; }
.cmp-date { border:none; outline:none; background:transparent; font-size:.82rem; color:#374151; flex:1; min-width:0; }
.cmp-periodo-sep { color:#9ca3af; }

/* Footer filtros */
.cmp-filtros__foot { display:flex; align-items:center; justify-content:space-between; margin-top:1.25rem; flex-wrap:wrap; gap:.75rem; }
.cmp-avanzados { color:#4f46e5; font-size:.85rem; font-weight:600; text-decoration:none; display:inline-flex; align-items:center; gap:.35rem; }
.cmp-avanzados:hover { text-decoration:underline; }
.cmp-avanzados__plus { font-size:1.1rem; line-height:1; }
.cmp-filtros__btns { display:flex; gap:.75rem; }
.cmp-btn { padding:.6rem 1.75rem; border-radius:999px; font-size:.85rem; font-weight:600; cursor:pointer; border:1.5px solid transparent; text-decoration:none; display:inline-flex; align-items:center; }
.cmp-btn--outline { background:#fff; color:#4f46e5; border-color:#c7d2fe; }
.cmp-btn--outline:hover { background:#eef2ff; }
.cmp-btn--primary { background:#312e81; color:#fff; }
.cmp-btn--primary:hover { background:#1e1b4b; }
.cmp-adv { max-height:0; overflow:hidden; transition:max-height .2s; }
.cmp-adv--open { max-height:120px; margin-top:1rem; }
.cmp-adv__note { font-size:.8rem; color:#9ca3af; }
.cmp-moneda-note { font-size:.78rem; color:#6b7280; margin-top:1rem; }

.cmp-aviso { font-size:.82rem; color:#374151; margin:0 0 1rem; }

/* ── Tarjetas resumen ── */
.cmp-cards { display:grid; grid-template-columns:repeat(5,1fr); gap:1.25rem; margin-bottom:1.5rem; }
.cmp-card { background:#fff; border-radius:14px; box-shadow:0 1px 3px rgba(0,0,0,.06); padding:1.25rem 1.25rem 0;
            cursor:pointer; transition:transform .15s,box-shadow .15s; display:flex; flex-direction:column;
            min-height:150px; position:relative; overflow:hidden; }
.cmp-card:hover { transform:translateY(-2px); box-shadow:0 6px 18px rgba(0,0,0,.1); }
.cmp-card--plain { padding-bottom:1.25rem; }
.cmp-card__title { font-size:1.05rem; font-weight:700; margin-bottom:.75rem; }
.cmp-card--ingresos .cmp-card__title { color:#16a34a; }
.cmp-card--egresos  .cmp-card__title { color:#f59e0b; }
.cmp-card--pagos    .cmp-card__title { color:#ec4899; }
.cmp-card__title--slate { color:#475569; }
.cmp-card__cdfis { text-align:right; font-size:.85rem; color:#6b7280; margin-bottom:.6rem; }
.cmp-card__cdfis b { font-size:1.15rem; color:#111827; font-weight:700; }
.cmp-card__total { display:flex; align-items:baseline; justify-content:space-between; gap:.5rem; margin-top:auto; padding-bottom:1.1rem; }
.cmp-card__total span { font-size:.85rem; color:#6b7280; font-weight:600; }
.cmp-card__total b { font-size:.9rem; color:#111827; font-weight:700; }
.cmp-card__foot { position:absolute; left:0; right:0; bottom:0; height:26px; display:flex; align-items:center; justify-content:center; color:#fff; }
.cmp-card--ingresos .cmp-card__foot { background:#16a34a; }
.cmp-card--egresos  .cmp-card__foot { background:#f59e0b; }
.cmp-card--pagos    .cmp-card__foot { background:#ec4899; }

/* ── Toolbar ── */
.cmp-toolbar { display:flex; justify-content:flex-end; gap:.75rem; margin-bottom:.75rem; flex-wrap:wrap; }
.cmp-tool-wrap { position:relative; }
.cmp-tool { display:inline-flex; align-items:center; gap:.45rem; background:#fff; border:1px solid #e5e7eb;
            border-radius:8px; padding:.55rem 1rem; font-size:.82rem; font-weight:600; color:#374151; cursor:pointer; text-decoration:none; }
.cmp-tool:hover { border-color:#6366f1; color:#4f46e5; }
.cmp-tool:disabled { opacity:.55; cursor:default; }
.cmp-colmenu { position:absolute; right:0; top:calc(100% + .35rem); background:#fff; border:1px solid #e5e7eb;
               border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.12); padding:.5rem; min-width:210px; z-index:30;
               display:none; max-height:320px; overflow-y:auto; }
.cmp-colmenu--open { display:block; }
.cmp-colmenu label { display:flex; align-items:center; gap:.5rem; padding:.35rem .5rem; font-size:.82rem; color:#374151; border-radius:6px; cursor:pointer; }
.cmp-colmenu label:hover { background:#f3f4f6; }
.cmp-colmenu input { accent-color:#4f46e5; }

/* ── Tabla ── */
.cmp-table-wrap { background:#fff; border-radius:14px; box-shadow:0 1px 3px rgba(0,0,0,.06); overflow-x:auto; }
.cmp-table { width:100%; border-collapse:collapse; font-size:.8rem; white-space:nowrap; }
.cmp-table thead tr { background:#4338ca; }
.cmp-table th { color:#fff; font-weight:600; text-align:left; padding:.85rem 1rem; font-size:.78rem; }
.cmp-table th:first-child { border-top-left-radius:0; }
.cmp-th-chk, .cmp-td-chk { width:42px; text-align:center; padding-left:1rem; padding-right:0; }
.cmp-th-chk input, .cmp-td-chk input { accent-color:#fff; }
.cmp-td-chk input { accent-color:#4f46e5; }
.cmp-th-acc, .cmp-td-acc { text-align:center; }
.cmp-table tbody td { padding:.8rem 1rem; border-bottom:1px solid #f1f5f9; color:#374151; }
.cmp-table tbody tr:hover { background:#f9fafb; }
.cmp-td-strong { font-weight:600; color:#111827; }
.cmp-td-num { text-align:right; font-weight:600; color:#111827; font-variant-numeric:tabular-nums; }
.cmp-td-mono { font-family:ui-monospace,Menlo,monospace; font-size:.76rem; color:#6b7280; }
.cmp-td-muted { color:#9ca3af; }
.cmp-empty { text-align:center; padding:3rem; color:#9ca3af; }

/* Badges */
.cmp-sat { font-weight:600; }
.cmp-sat--ok   { color:#16a34a; }
.cmp-sat--bad  { color:#dc2626; }
.cmp-sat--warn { color:#c2410c; }
.cmp-sat--pend { color:#9ca3af; }
.cmp-com { font-weight:600; }
.cmp-com--ok   { color:#16a34a; }
.cmp-com--bad  { color:#dc2626; }
.cmp-com--pend { color:#9ca3af; }

/* Acciones menu */
.cmp-acc-wrap { position:relative; display:inline-block; }
.cmp-acc-btn { background:none; border:none; font-size:1.2rem; color:#6b7280; cursor:pointer; line-height:1; padding:.2rem .5rem; border-radius:6px; }
.cmp-acc-btn:hover { background:#f3f4f6; color:#4f46e5; }
.cmp-accmenu { position:absolute; right:0; top:calc(100% + .25rem); background:#fff; border:1px solid #e5e7eb;
               border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.12); min-width:140px; z-index:20; display:none; overflow:hidden; }
.cmp-accmenu--open { display:block; }
.cmp-accmenu a { display:block; padding:.55rem .85rem; font-size:.82rem; color:#374151; text-decoration:none; }
.cmp-accmenu a:hover { background:#f3f4f6; color:#4f46e5; }

/* Paginación */
.cmp-pager { display:flex; align-items:center; justify-content:center; gap:1rem; padding:1.25rem 0; }
.cmp-pager__btn { padding:.45rem 1rem; border:1px solid #e5e7eb; border-radius:8px; font-size:.82rem; color:#374151; text-decoration:none; background:#fff; }
.cmp-pager__btn:hover { border-color:#6366f1; color:#4f46e5; }
.cmp-pager__info { font-size:.82rem; color:#6b7280; }

@media (max-width:1280px) {
    .cmp-cards { grid-template-columns:repeat(3,1fr); }
    .cmp-filtros__grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:768px) {
    .cmp-cards { grid-template-columns:1fr 1fr; }
    .cmp-filtros__grid { grid-template-columns:1fr; }
}

/* Comprobante — badges listas negras + programación de pago */
.cmp-ln { font-weight:600; font-size:.76rem; }
.cmp-ln--ok    { color:#16a34a; }
.cmp-ln--warn  { color:#c2410c; }
.cmp-ln--bad   { color:#dc2626; }
.cmp-ln--muted { color:#9ca3af; }
.cmp-prog { font-weight:600; color:#4338ca; font-variant-numeric:tabular-nums; }

/* Menú contextual (clic derecho) — validación comercial */
.cmp-ctxmenu { position:absolute; z-index:1000; min-width:190px; background:#fff; border:1px solid #e5e7eb;
    border-radius:10px; box-shadow:0 12px 32px rgba(0,0,0,.14); padding:.35rem; }
.cmp-ctxmenu__hdr { font-size:.72rem; font-weight:600; color:#9ca3af; padding:.35rem .6rem .45rem;
    border-bottom:1px solid #f3f4f6; margin-bottom:.25rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:240px; }
.cmp-ctxmenu__item { display:block; width:100%; text-align:left; background:none; border:none; cursor:pointer;
    font-family:inherit; font-size:.85rem; color:#111827; padding:.5rem .6rem; border-radius:7px; }
.cmp-ctxmenu__item:hover { background:#f5f3ff; }
.cmp-ctxmenu__item--danger { color:#b91c1c; }
.cmp-ctxmenu__item--danger:hover { background:#fef2f2; }

/* ═══════════════════════════════════════════════════════════════
   Grids de 2/3 columnas — utilidades responsivas
   Reemplazan el patrón inline "display:grid;grid-template-columns:1fr 1fr"
   repetido en varias vistas: en pantalla angosta colapsan a una columna.
   ═══════════════════════════════════════════════════════════════ */
.grid-cols-2 { display: grid; grid-template-columns: 1fr 1fr; }
.grid-cols-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) {
    .grid-cols-2, .grid-cols-3 { grid-template-columns: 1fr; }

    /* Grids con nombre propio (definidos en <style> por vista) que tampoco
       colapsaban en pantalla angosta. */
    .revision-grid, .perfil-grid, .wizard-grid-2, .wizard-summary__grid,
    .hoja-info-grid, .eval-card__meta, .alta-grid, .req-tipo-cards,
    .sc-modal__grid, .toggle-grid, .cm-grid, .vn__grid, .an-2col, .ep__grid,
    .pesos-grid, .fp-grid2, .fp-grid3 {
        grid-template-columns: 1fr;
    }
}
