/* ===== Estilos base del cotizador (CSS plano, compatible con Tailwind CDN) ===== */

html, body { min-height: 100%; }
body.menu-abierto { overflow: hidden; }
#menu.abierto { transform: translateX(0); }

/* Navegacion */
.nav-link {
  display: flex; align-items: center; gap: .75rem;
  padding: .625rem .75rem; margin-bottom: .125rem;
  border-radius: .75rem; font-size: .9rem; font-weight: 600;
  color: #475569; transition: background .15s, color .15s;
}
.nav-link:hover { background: #f1f5f9; color: #0f172a; }
.nav-link.nav-on {
  background: color-mix(in srgb, var(--c1) 12%, white);
  color: var(--c1);
}

/* Tarjetas */
.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem; box-shadow: 0 1px 2px rgba(15,23,42,.04); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .625rem 1rem; border-radius: .75rem; font-size: .875rem; font-weight: 700;
  line-height: 1.25rem; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: filter .15s, background .15s, box-shadow .15s;
}
.btn:focus-visible { outline: 2px solid var(--c1); outline-offset: 2px; }
.btn svg { width: 1.125rem; height: 1.125rem; }
.btn-primario { background: var(--c1); color: var(--c1-txt); }
.btn-primario:hover { filter: brightness(.92); }
.btn-acento { background: var(--c2); color: var(--c2-txt); }
.btn-acento:hover { filter: brightness(.92); }
.btn-claro { background: #fff; color: #334155; border-color: #cbd5e1; }
.btn-claro:hover { background: #f8fafc; }
.btn-peligro { background: #e11d48; color: #fff; }
.btn-peligro:hover { background: #be123c; }
.btn-exito { background: #059669; color: #fff; }
.btn-exito:hover { background: #047857; }
.btn-sm { padding: .4rem .7rem; font-size: .8rem; border-radius: .6rem; }
.btn-icono { padding: .5rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Formularios */
.campo { display: block; }
.campo > span { display: block; margin-bottom: .35rem; font-size: .8rem; font-weight: 700; color: #334155; }
.input, .select, .textarea {
  width: 100%; border: 1px solid #cbd5e1; background: #fff; color: #0f172a;
  border-radius: .75rem; padding: .625rem .8rem; font-size: 1rem; line-height: 1.4;
  transition: border-color .15s, box-shadow .15s;
}
@media (min-width: 640px) { .input, .select, .textarea { font-size: .9rem; } }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--c1);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c1) 20%, transparent);
}
.input[readonly] { background: #f8fafc; }
.input-color { height: 2.75rem; padding: .25rem; cursor: pointer; }
.ayuda { margin-top: .3rem; font-size: .75rem; color: #64748b; }

/* Tablas responsivas: en movil cada fila se muestra como tarjeta */
.tabla { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .875rem; }
.tabla th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; font-weight: 700; padding: .75rem 1rem; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.tabla td { padding: .8rem 1rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.tabla tbody tr:hover td { background: #fafafa; }
.tabla tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 767px) {
  .tabla-movil thead { display: none; }
  .tabla-movil, .tabla-movil tbody, .tabla-movil tr, .tabla-movil td { display: block; width: 100%; }
  .tabla-movil tr { padding: .85rem 1rem; border-bottom: 1px solid #e2e8f0; }
  .tabla-movil tbody tr:last-child { border-bottom: 0; }
  .tabla-movil td { padding: .2rem 0; border: 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .tabla-movil td::before { content: attr(data-label); font-weight: 600; color: #64748b; font-size: .78rem; text-align: left; }
  .tabla-movil td[data-label=""]::before, .tabla-movil td:not([data-label])::before { content: none; }
  .tabla-movil td.td-principal { display: block; text-align: left; font-size: .95rem; padding-bottom: .4rem; }
  .tabla-movil td.td-principal::before { content: none; }
  .tabla-movil td.td-acciones { justify-content: flex-end; padding-top: .6rem; }
  .tabla-movil tbody tr:hover td { background: transparent; }
}

/* Lineas de la cotizacion */
.linea-item { position: relative; }

/* Calendario (FullCalendar) */
.fc { --fc-border-color: #e2e8f0; --fc-today-bg-color: color-mix(in srgb, var(--c2) 14%, white); --fc-button-bg-color: var(--c1); --fc-button-border-color: var(--c1); --fc-button-hover-bg-color: var(--c1); --fc-button-hover-border-color: var(--c1); --fc-button-active-bg-color: var(--c1); --fc-button-active-border-color: var(--c1); --fc-event-bg-color: var(--c1); --fc-event-border-color: var(--c1); --fc-event-text-color: var(--c1-txt); font-size: .85rem; }
.fc .fc-button { border-radius: .6rem; font-weight: 700; text-transform: capitalize; padding: .4rem .7rem; color: var(--c1-txt); }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:not(:disabled):active { filter: brightness(.85); }
.fc .fc-toolbar-title { font-size: 1.1rem; font-weight: 800; color: #0f172a; }
.fc .fc-toolbar-title::first-letter { text-transform: uppercase; }
.fc .fc-col-header-cell-cushion { text-transform: capitalize; font-weight: 700; color: #475569; padding: .5rem 0; }
.fc .fc-daygrid-day-number { color: #334155; font-weight: 600; }
.fc .fc-daygrid-event { border-radius: .4rem; padding: 1px 4px; cursor: pointer; }
.fc .fc-list-event { cursor: pointer; }
@media (max-width: 640px) {
  .fc .fc-toolbar { flex-direction: column; gap: .6rem; }
  .fc .fc-toolbar-title { font-size: 1rem; }
  .fc .fc-button { padding: .35rem .55rem; font-size: .8rem; }
}

/* Utilidades */
.texto-marca { color: var(--c1); }
.bg-marca-suave { background: color-mix(in srgb, var(--c1) 10%, white); }
[x-cloak] { display: none !important; }

/* Desplegables */
details.desplegable > summary { list-style: none; }
details.desplegable > summary::-webkit-details-marker { display: none; }
details.desplegable > summary .chevron { transition: transform .2s; }
details.desplegable[open] > summary .chevron { transform: rotate(180deg); }
details.desplegable { scroll-margin-top: 5rem; }
#pagos { scroll-margin-top: 5rem; }
