/* =========================================================
   Operador Logístico · tokens y componentes base (tema claro)
   Fuente: canvas de diseño en Claude (noviembre 2026)
   Uso: importar este archivo antes de los estilos propios.
   ========================================================= */

/* Las fuentes (Oswald y Barlow) se cargan desde index.html sin bloquear el render: un @import aquí dejaba la página en blanco si Google Fonts no respondía. */

:root {
  /* Superficies */
  --ol-bg: #EEF3F8;            /* fondo general */
  --ol-surface: #FFFFFF;       /* paneles, tarjetas, barras */
  --ol-surface-2: #F5F8FB;     /* campos, tarjetas internas, celdas */
  --ol-surface-3: #EAF1F7;     /* cabeceras de grupo */
  --ol-selected: #E8F5FC;      /* tarjeta seleccionada */
  --ol-warning-bg: #FFF8E1;    /* franja de requisitos */

  /* Bordes */
  --ol-border: #D5DFE9;
  --ol-border-strong: #C9D6E2;
  --ol-border-control: #B7C7D6;

  /* Texto */
  --ol-text: #0F2233;
  --ol-text-2: #3A4F63;
  --ol-text-muted: #5A6E82;

  /* Marca y estados */
  --ol-blue: #1676C9;
  --ol-cyan: #0A8FC7;          /* acento: activos, íconos, enlaces */
  --ol-cyan-bright: #1E9BD7;   /* borde de tarjeta seleccionada */
  --ol-orange: #C84B11;        /* acción principal (texto blanco) */
  --ol-orange-bright: #F26B1D; /* barras decorativas */
  --ol-amber-text: #9A6A00;    /* textos de advertencia / pendientes */
  --ol-amber: #F2B705;         /* reputación, arrendado */
  --ol-amber-border: #E0B43A;
  --ol-green: #1D8A55;
  --ol-green-border: #9FD8B9;
  --ol-red-now: #E5484D;       /* línea "Ahora" del calendario */
  --ol-trip: #2F8FD0;          /* ocupado en viaje */

  /* Tipografía */
  --ol-font-display: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;   /* títulos, botones, cifras */
  --ol-font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Forma */
  --ol-radius-sm: 6px;
  --ol-radius: 8px;
  --ol-radius-lg: 10px;
  --ol-radius-xl: 14px;
  --ol-shadow-cta: 0 6px 18px rgba(200, 75, 17, 0.25);
  --ol-shadow-panel: 0 10px 28px rgba(15, 34, 51, 0.12);
  --ol-scrim: rgba(15, 34, 51, 0.45);
  --ol-control-h: 44px;        /* alto mínimo táctil */
}

body {
  margin: 0;
  background: var(--ol-bg);
  color: var(--ol-text);
  font-family: var(--ol-font-body);
}

/* ---------- Botones ---------- */
.ol-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--ol-control-h); padding: 0 18px;
  border-radius: var(--ol-radius); border: 1px solid var(--ol-border-control);
  background: transparent; color: var(--ol-text);
  font-family: var(--ol-font-display); font-weight: 600; font-size: 15px; letter-spacing: 0.05em;
  text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.ol-btn--primary { background: var(--ol-orange); border-color: var(--ol-orange); color: #FFFFFF; box-shadow: var(--ol-shadow-cta); }
.ol-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Botonera segmentada (X1 / X2 / X4) */
.ol-segmented { display: inline-flex; gap: 2px; padding: 3px; background: var(--ol-surface-2); border: 1px solid var(--ol-border-strong); border-radius: var(--ol-radius-lg); }
.ol-segmented button { width: 44px; height: 36px; border: 0; border-radius: 7px; background: transparent; color: var(--ol-text); font-family: var(--ol-font-display); font-weight: 600; font-size: 15px; cursor: pointer; }
.ol-segmented button[aria-pressed="true"] { background: var(--ol-cyan); color: #FFFFFF; }

/* ---------- Paneles ---------- */
.ol-panel { background: var(--ol-surface); border: 1px solid var(--ol-border); border-radius: var(--ol-radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ol-panel__title { margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--ol-font-display); font-weight: 600; font-size: 17px; letter-spacing: 0.04em; text-transform: uppercase; }
.ol-panel__title svg { color: var(--ol-cyan); }
/* Variante "destacado" (4b) */
.ol-panel--featured { border-color: #BFD0E0; box-shadow: var(--ol-shadow-panel); overflow: hidden; }
.ol-panel--featured .ol-panel__title { margin: -16px -16px 4px; padding: 12px 16px; background: #EAF3FB; border-bottom: 1px solid #BFD0E0; }

/* Tarjeta de orden */
.ol-order { background: var(--ol-surface-2); border: 1px solid var(--ol-border-strong); border-left: 4px solid #E0A800; border-radius: var(--ol-radius); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.ol-order--planned { border-left-color: #E8611A; }

/* Cápsulas de estado */
.ol-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; border-radius: 999px; padding: 2px 8px; border: 1px solid; }
.ol-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ol-pill--ok { color: var(--ol-green); border-color: var(--ol-green-border); }
.ol-pill--warn { color: var(--ol-amber-text); border-color: var(--ol-amber-border); }

/* ---------- Formularios ---------- */
.ol-field { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; background: var(--ol-surface-2); border: 1px solid var(--ol-border-strong); border-radius: var(--ol-radius); }
.ol-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ol-text); font: inherit; font-size: 15px; }
.ol-field svg { color: var(--ol-text-muted); }
.ol-check-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--ol-surface-2); border: 1px solid var(--ol-border-strong); border-radius: var(--ol-radius); cursor: pointer; }
.ol-check-card input { accent-color: var(--ol-cyan); width: 16px; height: 16px; margin: 2px 0 0; }

/* Título con barra naranja (login, saludo) */
.ol-heading-bar { display: flex; align-items: center; gap: 12px; }
.ol-heading-bar::before { content: ""; width: 4px; height: 1em; border-radius: 2px; background: var(--ol-orange-bright); }

/* ---------- Modal ---------- */
.ol-scrim { position: fixed; inset: 0; background: var(--ol-scrim); display: flex; justify-content: center; align-items: stretch; padding: 20px 16px; }
.ol-modal { width: 100%; max-width: 1120px; max-height: 100%; background: var(--ol-surface); border: 1px solid var(--ol-border-strong); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.ol-modal__header, .ol-modal__footer { flex: none; }
.ol-modal__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; position: relative; }
/* Aviso de "hay más contenido": degradado + cápsula, ocultar al llegar al final */
.ol-more-fade { position: absolute; left: 0; right: 10px; bottom: 0; height: 96px; background: linear-gradient(to bottom, rgba(255,255,255,0), #FFFFFF 85%); pointer-events: none; }

/* ---------- Calendario ---------- */
.ol-cal-track {
  background-color: var(--ol-surface-2);
  background-image: linear-gradient(to right, var(--ol-border-strong) 1px, transparent 1px),
                    linear-gradient(to right, #E8EEF4 1px, transparent 1px);
  background-size: calc(100% / 7) 100%, calc(100% / 28) 100%; /* 7 días × 4 tramos de 6 h */
}
.ol-cal-block { position: absolute; top: 4px; bottom: 4px; min-width: 40px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.ol-cal-block--reserved { border: 1.5px dashed var(--ol-cyan); background: rgba(34, 193, 238, 0.16); color: #075E85; }
.ol-cal-block--sub { border: 1.5px solid #8DA0B3; background: repeating-linear-gradient(45deg, #E3EAF1 0 4px, #E8EEF4 4px 8px); }
.ol-cal-block--trip { background: var(--ol-trip); color: #FFFFFF; }
.ol-cal-block--rented { background: var(--ol-amber); color: #1A1400; }
