/* ============================================================
   Geintec — Clases de componentes (prefijo gc- para evitar choques
   con el CSS existente de la app). Requiere tokens.css cargado antes.
   Copia las clases que necesites; los nombres son una referencia,
   ajústalos al framework/plantillas reales del proyecto.
   ============================================================ */

* { box-sizing: border-box; }
body { font-family: var(--font-sans); background: var(--surface-page); color: var(--ink); }
a { text-decoration: none; color: inherit; }

/* — Shell de la aplicación — */
.gc-shell { display: flex; min-height: 100vh; background: var(--surface-page); }
.gc-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gc-header {
  height: 72px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.gc-header-client {
  font-size: 12px; font-weight: 600; color: var(--brand-700); background: var(--brand-100);
  padding: 6px 12px; border-radius: var(--radius-full);
}
.gc-avatar {
  width: 34px; height: 34px; border-radius: var(--radius-full); background: var(--accent-teal-100);
  color: var(--accent-teal); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.gc-main { flex: 1; overflow: auto; padding: 32px; display: flex; flex-direction: column; gap: 24px; }

/* — Sidebar — */
.gc-sidebar {
  width: 240px; flex: none; background: var(--surface); border-right: 1px solid var(--border);
  padding: 20px 12px; display: flex; flex-direction: column;
}
.gc-brand { display: flex; align-items: center; gap: 10px; padding: 8px 12px 20px; }
.gc-brand-mark {
  width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--brand-700);
  color: #fff; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.gc-brand-name { font-size: 15px; font-weight: 700; }
.gc-navitem {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; color: var(--ink-muted);
}
.gc-navitem:hover { background: var(--surface-sunken); color: var(--ink); }
.gc-navitem.is-active { background: var(--accent-teal-100); color: var(--accent-teal); }
.gc-navitem svg { width: 18px; height: 18px; flex: none; }
.gc-nav-section {
  font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-subtle);
  font-weight: 700; padding: 16px 12px 6px;
}

/* — Barra de filtros — */
.gc-filterbar { background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: var(--space-4); display: flex; gap: var(--space-4); flex-wrap: wrap; }
.gc-field label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-subtle); margin-bottom: 6px; }
.gc-control {
  height: 36px; min-width: 140px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0 10px; font-size: 13px; color: var(--ink); background: var(--surface); font-family: var(--font-sans);
}
.gc-control:focus, .gc-control.is-focus { outline: none; border-color: var(--accent-teal); box-shadow: 0 0 0 3px var(--accent-teal-100); }

/* — Pestañas de vista (Pedidos / Callcenter / Ventas…) — */
.gc-tabs { display: flex; gap: 4px; background: var(--surface-sunken); padding: 4px; border-radius: var(--radius-md); width: fit-content; flex-wrap: wrap; }
.gc-tab { height: 34px; padding: 0 16px; display: flex; align-items: center; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; color: var(--ink-muted); background: none; border: none; cursor: pointer; font-family: var(--font-sans); }
.gc-tab.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* — Pipeline de estado (Pedidos por estado) — */
.gc-statustab {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--ink-muted); white-space: nowrap; font-family: var(--font-sans);
}
.gc-statustab.is-active { border-color: var(--border-strong); box-shadow: var(--shadow-sm); color: var(--ink); }
.gc-statustab .gc-dot { width: 8px; height: 8px; border-radius: var(--radius-full); flex: none; }
.gc-statustab .gc-count { font-size: 11px; font-weight: 700; color: var(--ink-muted); background: var(--surface-sunken); border-radius: var(--radius-full); padding: 1px 7px; }
.gc-statustab.is-active .gc-count { background: var(--accent-teal-100); color: var(--accent-teal); }

/* — Tarjetas — */
.gc-card { background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }

/* — StatCard — */
.gc-statcard { flex: 1; padding: var(--space-5); display: flex; flex-direction: column; gap: 10px; }
.gc-statcard-top { display: flex; align-items: center; justify-content: space-between; }
.gc-statcard-label { font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.gc-statcard-value { font-size: 26px; font-weight: 700; color: var(--ink); }
.gc-chip { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex: none; }
.gc-trend-up { font-size: 12px; font-weight: 600; color: var(--status-entregado-text); }
.gc-trend-down { font-size: 12px; font-weight: 600; color: var(--status-incidente-text); }
.gc-trend-flat { font-size: 12px; font-weight: 600; color: var(--ink-muted); }

/* — Badge de estado del pedido — usar junto a un modificador .gc-badge--<estado> */
.gc-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
}
.gc-badge .gc-dot { width: 6px; height: 6px; border-radius: var(--radius-full); }
.gc-badge--recepcion    { background: var(--status-recepcion-bg);    color: var(--status-recepcion-text); }
.gc-badge--alistamiento { background: var(--status-alistamiento-bg); color: var(--status-alistamiento-text); }
.gc-badge--facturacion  { background: var(--status-facturacion-bg);  color: var(--status-facturacion-text); }
.gc-badge--despacho     { background: var(--status-despacho-bg);     color: var(--status-despacho-text); }
.gc-badge--declinado    { background: var(--status-declinado-bg);    color: var(--status-declinado-text); }
.gc-badge--incidente    { background: var(--status-incidente-bg);    color: var(--status-incidente-text); }
.gc-badge--entregado    { background: var(--status-entregado-bg);    color: var(--status-entregado-text); }

/* — Botones — */
.gc-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: var(--radius-md); font: 600 14px/20px var(--font-sans); border: none; cursor: pointer; }
.gc-btn--sm { height: 32px; padding: 0 14px; font-size: 13px; }
.gc-btn--primary { background: var(--accent-teal); color: var(--on-accent-teal); box-shadow: var(--shadow-sm); }
.gc-btn--primary:hover { background: var(--accent-teal-600); }
.gc-btn--secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.gc-btn--secondary:hover { background: var(--surface-sunken); border-color: var(--border-strong); }
.gc-btn--ghost { background: none; color: var(--accent-teal); padding: 0 8px; height: auto; }
.gc-btn[disabled] { background: var(--surface-sunken); color: var(--ink-subtle); box-shadow: none; cursor: not-allowed; }

/* — Tabla de datos — */
.gc-table-card { background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.gc-table { width: 100%; border-collapse: collapse; }
.gc-table thead th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-subtle); background: var(--surface-sunken); padding: 12px 16px; }
.gc-table tbody td { padding: 14px 16px; font-size: 14px; color: var(--ink); border-top: 1px solid var(--border); }
.gc-table tbody tr:hover { background: var(--surface-sunken); }
.gc-table .gc-valor { font-weight: 700; text-align: right; }
.gc-cliente { display: flex; align-items: center; gap: 10px; }
.gc-cliente-avatar { width: 30px; height: 30px; border-radius: var(--radius-full); background: var(--brand-100); color: var(--brand-700); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.gc-cliente-name { font-weight: 600; color: var(--ink); }
.gc-cliente-meta { font-size: 12px; color: var(--ink-muted); }
.gc-kebab { width: 32px; height: 32px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--ink-muted); border: none; background: none; cursor: pointer; font-size: 16px; }
.gc-kebab:hover { background: var(--surface-sunken); color: var(--ink); }

/* — Gráficas con detalle (drill-down) — */
.gc-legendrow { display: flex; align-items: center; gap: 10px; font-size: 13px; background: none; border: none; padding: 6px 4px; border-radius: var(--radius-sm); cursor: pointer; width: 100%; text-align: left; font-family: var(--font-sans); }
.gc-legendrow:hover { background: var(--surface-sunken); }
.gc-legendrow .gc-pct { margin-left: auto; color: var(--ink-muted); }
.gc-legendrow .gc-chevron { margin-left: auto; color: var(--ink-subtle); font-size: 12px; }
.gc-backlink { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: var(--accent-teal); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; margin-bottom: 12px; font-family: var(--font-sans); }
.gc-drillbar-row { display: flex; align-items: center; gap: 12px; font-size: 13px; margin-bottom: 10px; }
.gc-drillbar-track { flex: 1; height: 8px; border-radius: var(--radius-full); background: var(--surface-sunken); overflow: hidden; }
.gc-drillbar-fill { height: 100%; border-radius: var(--radius-full); background: var(--accent-teal); }
.gc-drillbar-label { width: 120px; flex: none; color: var(--ink); }
.gc-drillbar-val { width: 70px; flex: none; text-align: right; color: var(--ink-muted); }

/* — Login — */
.gc-login-screen { min-height: 100vh; background: var(--surface-page); display: flex; align-items: center; justify-content: center; }
.gc-login-card { display: flex; width: 840px; max-width: 92vw; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.gc-login-brand { width: 340px; background: var(--brand-700); position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 44px; overflow: hidden; color: #fff; }
.gc-login-brand-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.gc-login-brand-copy { color: rgba(255,255,255,0.72); font-size: 13px; line-height: 20px; }
.gc-login-form { flex: 1; background: var(--surface); padding: 52px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.gc-input { height: 44px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 14px; font-size: 14px; color: var(--ink); width: 100%; font-family: var(--font-sans); }
.gc-input:focus { outline: none; border-color: var(--accent-teal); box-shadow: 0 0 0 3px var(--accent-teal-100); }
