/* SYL AppSyla — overrides sutiles */
html, body { -webkit-font-smoothing: antialiased; }

/* Scrollbars suaves */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }
::-webkit-scrollbar-track { background: transparent; }

/* Selects con flecha propia */
select { -webkit-appearance: none; appearance: none; }

/* Transiciones base */
a, button, .role-tab { transition: background-color .15s ease, border-color .15s ease,
                                   color .15s ease, box-shadow .15s ease, transform .15s ease; }

/* Focus ring visible pero discreto */
:focus-visible { outline: 2px solid #10b981; outline-offset: 2px; border-radius: 8px; }

/* Chart tooltips */
canvas { max-width: 100%; }

/* Tabla: primera columna con padding izquierdo más natural */
table thead th:first-child, table tbody td:first-child { padding-left: 1.25rem; }

/* Modal show */
#modal.flex { display: flex; }

/* Animación sutil para las tarjetas del dashboard */
@media (prefers-reduced-motion: no-preference) {
  main > * { animation: fade-up .3s ease both; }
  main > *:nth-child(2) { animation-delay: .04s; }
  main > *:nth-child(3) { animation-delay: .08s; }
  main > *:nth-child(4) { animation-delay: .12s; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* Portal comercial — login y páginas de autenticación */
.login-display { font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif; }

.auth-page-bg {
  background: linear-gradient(135deg, #f8fafc 0%, rgba(240, 253, 250, 0.45) 45%, rgba(255, 251, 235, 0.35) 100%);
}

@keyframes login-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-reveal { animation: login-fade-up 0.55s ease-out both; }

.btn-auth {
  background: linear-gradient(to right, #0d9488, #0e7490);
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.22);
}
.btn-auth:hover {
  background: linear-gradient(to right, #0f766e, #155e75);
}

.auth-input:focus {
  --tw-ring-color: rgb(20 184 166 / 0.45);
  border-color: #14b8a6;
}

.auth-link { color: #0f766e; font-weight: 500; }
.auth-link:hover { color: #115e59; text-decoration: underline; }

/* Informe comercial — calendario mensual en cuadrícula 7×N (compacto) */
.informe-cal-wrap {
  max-width: 14.5rem; /* ~mitad del tamaño anterior (celdas llenaban el ancho de la card) */
  width: 100%;
}
.informe-cal-head {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.2rem;
  margin-bottom: 0.25rem;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  text-align: center;
}
.informe-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.2rem;
}
.informe-cal-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 1.35rem;
  aspect-ratio: 1 / 1;
  border-radius: 0.3rem;
  border: 0;
  padding: 0;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}
.informe-cal-cell.is-empty {
  visibility: hidden;
  pointer-events: none;
  cursor: default;
}
.informe-cal-cell.tone-0 { background: #f8fafc; color: #94a3b8; }
/* Llamadas — verdes */
.informe-cal-cell.kind-llamada.tone-1 { background: #d1fae5; color: #065f46; }
.informe-cal-cell.kind-llamada.tone-2 { background: #a7f3d0; color: #064e3b; }
.informe-cal-cell.kind-llamada.tone-3 { background: #10b981; color: #fff; }
.informe-cal-cell.kind-llamada.tone-4 { background: #047857; color: #fff; }
/* Visitas comerciales — azul info (distinto del verde) */
.informe-cal-cell.kind-visita.tone-1 { background: #e0f2fe; color: #075985; }
.informe-cal-cell.kind-visita.tone-2 { background: #bae6fd; color: #0c4a6e; }
.informe-cal-cell.kind-visita.tone-3 { background: #0ea5e9; color: #fff; }
.informe-cal-cell.kind-visita.tone-4 { background: #0369a1; color: #fff; }
/* Ambos en el mismo día — diagonal verde + azul */
.informe-cal-cell.kind-mix {
  background: linear-gradient(135deg, #10b981 0 50%, #0ea5e9 50% 100%);
  color: #fff;
  text-shadow: 0 0 2px rgba(0,0,0,.35);
}
.informe-cal-cell.kind-mix.tone-1 {
  background: linear-gradient(135deg, #a7f3d0 0 50%, #bae6fd 50% 100%);
  color: #0f172a;
  text-shadow: none;
}
.informe-cal-cell.is-in-range { box-shadow: inset 0 0 0 1px #e2e8f0; }
.informe-cal-cell.is-out-range { opacity: 0.4; }
.informe-cal-cell.is-today { box-shadow: 0 0 0 1.5px #059669, 0 0 0 3px #fff; }
.informe-cal-cell:not(.is-empty):hover { filter: brightness(0.96); }
.informe-cal-day { line-height: 1; }
.informe-cal-count {
  line-height: 1;
  margin-top: 1px;
  font-size: 8px;
  font-weight: 700;
  opacity: 0.9;
}
.informe-cal-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 10px;
  color: #64748b;
}
.informe-cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.informe-cal-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.informe-cal-swatch.llamada { background: #10b981; }
.informe-cal-swatch.visita { background: #0ea5e9; }
.informe-cal-swatch.mix {
  background: linear-gradient(135deg, #10b981 0 50%, #0ea5e9 50% 100%);
}
.informe-cal-swatch.festivo { background: #e11d48; }

/* Festivo CO sin actividad */
.informe-cal-cell.kind-festivo,
.informe-cal-cell.kind-festivo.tone-0 {
  background: #ffe4e6;
  color: #be123c;
  font-weight: 700;
}
/* Festivo con actividad: mantiene color de llamadas/visitas + borde rojo */
.informe-cal-cell.is-festivo {
  box-shadow: inset 0 0 0 2px #e11d48;
}
.informe-cal-cell.is-festivo.is-today {
  box-shadow: 0 0 0 1.5px #059669, 0 0 0 3px #fff, inset 0 0 0 2px #e11d48;
}


/* Informe — Actividad comercial encima de Más tiempo de gestión */
.informe-mid-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.informe-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.informe-charts-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .informe-charts-pair {
    grid-template-columns: 1fr 1fr;
  }
}
.informe-chart-tall {
  height: 20rem;
  position: relative;
}
.informe-chart-med {
  height: 18rem;
  position: relative;
}
@media (min-width: 1280px) {
  .informe-chart-tall { height: 22rem; }
  .informe-chart-med { height: 20rem; }
}

/* Más tiempo de gestión — pares (1|2, 3|4, …) */
.informe-gestion-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 0.75rem;
  list-style: none;
  margin: 0;
}
@media (min-width: 640px) {
  .informe-gestion-grid {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 1024px) {
  .informe-gestion-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.informe-gestion-card {
  margin: 0;
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid #f1f5f9;
  background: #f8fafc;
  height: 100%;
  box-sizing: border-box;
}
.informe-gestion-card:hover {
  background: #f1f5f9;
}
.informe-gestion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 0.75rem;
  align-items: start;
  height: 100%;
}
@media (max-width: 639px) {
  .informe-gestion-row {
    grid-template-columns: 1fr;
  }
}
.informe-gestion-main {
  min-width: 0;
}
.informe-gestion-obs-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  min-width: 0;
  padding-left: 0.75rem;
  border-left: 1px solid #e2e8f0;
}
@media (max-width: 639px) {
  .informe-gestion-obs-side {
    grid-template-columns: 1fr;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.5rem;
  }
}
.informe-gestion-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  list-style: none;
}
.informe-gestion-obs-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.informe-gestion-obs-text {
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* —— Cotización: paleta SYL (naranja + teal) —— */
.cot-theme {
  --syl-black: #000000;
  --syl-white: #FFFFFF;
  --syl-orange: #E8A33C;
  --syl-orange-dark: #D98F2E;
  --syl-dark-bg: #0D0D0D;
  --syl-gray-dark: #4A4A4A;
  --syl-gray-light: #E0E0E0;
  --syl-white-soft: #F5F5F5;
}
.cot-theme :focus-visible {
  outline-color: var(--syl-orange);
}
.cot-theme input:focus,
.cot-theme select:focus,
.cot-theme textarea:focus {
  border-color: var(--syl-orange);
}
.cot-theme li:has(> input[data-cot-svc]:checked) .cot-svc-check {
  background-color: var(--syl-orange-dark);
  color: var(--syl-white);
  border-color: var(--syl-orange-dark);
}






