/* Fase 3 (2026-10-02) — estilos propios de las pantallas del área "daily". */

/* ═══════════════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════════════ */

/* Modal "¡Orden lista!" */
.dash-modal__acciones { margin-top: 16px; flex-direction: column; gap: 10px; }
.dash-modal__btn { width: 100%; justify-content: center; text-decoration: none; min-height: 44px; }
.dash-modal__icono { font-size: 18px; }

/* Carga: esqueleto con la forma de la tarjeta de caja + 3 números */
.dash-esqueleto { display: flex; flex-direction: column; gap: 14px; }
.dash-esqueleto__caja { height: 190px; border-radius: 18px; }
.dash-esqueleto__kpis { display: grid; grid-template-columns: 1fr; gap: 12px; }
.dash-esqueleto__kpi { height: 84px; border-radius: 14px; }
@media (min-width: 640px) {
    .dash-esqueleto__kpis { grid-template-columns: repeat(3, 1fr); }
    .dash-esqueleto__kpi { height: 110px; }
}

/* "Ver los números día por día": control grande y claro (antes 13px / ~20px de alto) */
.dash-tabla .dash-tabla__resumen {
    display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px;
    font-size: 15px; font-weight: 600; color: var(--lt-primary-dark);
    background: var(--lt-bg); border: 1px solid var(--lt-border); border-radius: 10px;
    cursor: pointer; list-style: none;
}
.dash-tabla .dash-tabla__resumen::-webkit-details-marker { display: none; }
.dash-tabla .dash-tabla__resumen::after {
    content: ""; margin-left: auto; width: 8px; height: 8px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); transition: transform .15s;
}
.dash-tabla[open] .dash-tabla__resumen::after { transform: rotate(-135deg); }
.dash-tabla td, .dash-tabla th { padding: 10px 6px; }

/* Barras: tocar (celular), pasar el mouse o enfocar muestra el valor */
.dash-barra__zona:focus .dash-barra__tip,
.dash-barra--activa .dash-barra__tip { opacity: 1; }
.dash-barra--hoy .dash-barra__zona:focus .dash-barra__etiqueta,
.dash-barra--hoy.dash-barra--activa .dash-barra__etiqueta { opacity: 0; }
.dash-barra--activa .dash-barra__relleno { filter: brightness(1.15); }
/* La primera y la última no deben salirse de la pantalla */
.dash-barra:first-child .dash-barra__tip { left: 0; transform: translateY(-100%); text-align: left; }
.dash-barra:last-child  .dash-barra__tip { left: auto; right: 0; transform: translateY(-100%); text-align: right; }

.dash-semana .dash-link { min-height: 44px; padding: 8px 0; }
.dash-fila .dash-fila__accion { min-height: 44px; padding: 0 14px; }
.dash-vacio__btn { margin-top: 12px; min-height: 44px; }

/* ═══════════════════════════════════════════════════════════════════════
   CLIENTES
   ═══════════════════════════════════════════════════════════════════════ */

.cl-pista { margin: 6px 0 10px; font-size: 13px; }
.cl-filtros { margin-bottom: 10px; }
.cl-badge { margin-left: 6px; }
.cl-modal__error { text-align: left; }
.cl-modal__acciones { margin-top: 16px; flex-direction: column; gap: 10px; }
.cl-modal__btn { width: 100%; justify-content: center; }
.cl-btn-eliminar { color: var(--lt-danger); }
.cl-accion__texto { font-size: 13px; font-weight: 600; }

/* El nombre ocupa el ancho; las acciones van abajo en celular (ya están dentro de .lt-client-row__actions) */
.lt-client-row__name { overflow-wrap: anywhere; }
@media (max-width: 600px) {
    .lt-client-row__info { flex: 1 1 calc(100% - 52px); }
    .lt-client-row__actions .lt-btn { min-height: 44px; min-width: 44px; padding: 0 12px; }
}

/* Confirmación en línea para inactivar */
.lt-client-row__actions.cl-confirmar { flex-wrap: wrap; flex-shrink: 1; }
.cl-confirmar__texto { flex: 1 1 100%; font-size: 14px; color: var(--lt-text); }
@media (min-width: 601px) {
    .lt-client-row__actions.cl-confirmar { max-width: 55%; justify-content: flex-end; }
}

/* Cliente inactivo: sin bajar la opacidad del texto (el teléfono quedaba en 2.1:1) */
.lt-clients-list .lt-client-row.lt-client-row--inactive { opacity: 1; background: var(--lt-bg); }

/* Estado vacío */
.cl-vacio { gap: 8px; padding: 32px 16px; text-align: center; }
.cl-vacio strong { font-size: 16px; color: var(--lt-text); }
.cl-vacio__icono { font-size: 40px; color: var(--lt-text-muted); }
.cl-vacio__ayuda { font-size: 14px; }
.cl-vacio__btn { margin-top: 8px; min-height: 44px; }

/* ═══════════════════════════════════════════════════════════════════════
   SERVICIOS
   ═══════════════════════════════════════════════════════════════════════ */

.sv-head__acciones { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sv-badge__icono { font-size: 12px; }
.sv-modal__acciones { margin-top: 16px; flex-direction: column; gap: 10px; }
.sv-modal__btn { width: 100%; justify-content: center; min-height: 44px; }
.sv-fila--ocupada { opacity: .7; }
.lt-page .lt-svc-count { font-size: 14px; }

/* ═══════════════════════════════════════════════════════════════════════
   REPORTES
   ═══════════════════════════════════════════════════════════════════════ */

.rp-titulo__icono { color: var(--lt-primary); font-size: 22px; vertical-align: middle; }
.rp-bloqueo__icono { color: var(--lt-primary); font-size: 2.5rem; }
.rp-subtitulo { margin-top: 0; font-size: 14px; }

/* Montos: el color acompaña al texto ("Debe $X" / "Pagado"), nunca lo reemplaza */
.lt-amount--debe { color: #b91c1c; font-weight: 700; }
.lt-amount--ok   { color: #047857; font-weight: 600; }

/* Utilidades de celda */
.rp-der   { text-align: right; }
.rp-fuerte { font-weight: 600; }
.rp-medio { font-weight: 500; }
.rp-chico { font-size: 13px; }
.rp-tenue { color: var(--lt-text-muted); font-size: 13px; }
.rp-sub   { font-size: 12px; color: var(--lt-text-muted); }
.rp-fecha { font-weight: 600; font-size: 13px; }
.rp-abono { color: var(--lt-primary-dark); font-weight: 600; }
.rp-celda-col { display: flex; flex-direction: column; gap: 1px; }
.rp-col-100 { min-width: 100px; } .rp-col-110 { min-width: 110px; } .rp-col-120 { min-width: 120px; }
.rp-col-130 { min-width: 130px; } .rp-col-140 { min-width: 140px; } .rp-col-160 { min-width: 160px; }
.rp-total-fila { font-weight: 800; background: var(--lt-bg); }
.rp-total-fila td { padding: 12px 14px; border-top: 2px solid var(--lt-border); }
.lt-sales-table tbody td.lt-amount--ok { font-weight: 600; }
.lt-sales-table .lt-sales-total { font-weight: 700; }
.rp-vacio { padding: 40px 24px; }
.rp-cargando { padding: 28px 0; }
.rp-cuenta { font-size: 13px; color: var(--lt-text-muted); white-space: nowrap; }
.rp-filtros { border: none; padding: 0; }

/* Actualizando: los datos se quedan a la vista, atenuados */
.rp-actualizando { display: flex; align-items: center; gap: 8px; min-height: 28px; margin: 4px 0;
                   font-size: 14px; font-weight: 600; color: var(--lt-text-muted); }
.rp-actualizando--oculto { display: none; }
.rp-contenido--actualizando { opacity: .55; pointer-events: none; transition: opacity .15s; }

/* Aviso "órdenes sin cobro": botón con el aspecto del aviso */
.rp-aviso {
    width: 100%; min-height: 44px; border: none; font: inherit; text-align: left; cursor: pointer;
    background: var(--lt-warning-light); color: #92400e;
}
.rp-aviso:hover { filter: brightness(.97); }
.rp-aviso__texto { flex: 1; min-width: 0; }
.rp-aviso__ver { margin-left: auto; font-size: 13px; font-weight: 600; text-decoration: underline; white-space: nowrap; }

/* Botón de exportar: es un <button> con la clase del enlace verde */
.rp-export { border: none; cursor: pointer; min-height: 44px; }

/* Desplegable de servicios */
.rp-combo { position: relative; }
.rp-combo__btn {
    min-width: 190px; min-height: 44px; font-size: 14px; cursor: pointer; text-align: left;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.rp-combo__texto { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-combo__flecha { flex-shrink: 0; }
.rp-combo__fondo { position: fixed; inset: 0; z-index: 98; }
.rp-combo__panel {
    position: absolute; top: calc(100% + 4px); left: 0; z-index: 99; min-width: 260px;
    background: var(--lt-surface, #fff); border: 1px solid var(--lt-border);
    border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); overflow: hidden;
}
.rp-combo__buscar { padding: 8px; }
.rp-combo__buscar .lt-input { width: 100%; font-size: 16px; }
.rp-combo__lista { max-height: 300px; overflow-y: auto; }
.rp-combo__opcion { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; font-size: 14px; cursor: pointer; }
.rp-combo__opcion.active { font-weight: 700; }
.rp-combo__opcion--foco { background: var(--lt-primary-light, #eef3ff); outline: 2px solid var(--lt-primary-dark); outline-offset: -2px; }
.rp-combo__sin { padding: 10px 14px; font-size: 13px; color: var(--lt-text-muted); }
@media (max-width: 768px) {
    .rp-combo__btn { width: 100%; }
    .rp-combo__panel { right: 0; min-width: 0; }
}

/* Detalle de órdenes: tarjetas en celular, tabla desde 769px */
.lt-report-cards { display: none; list-style: none; margin: 0; padding: 0; }
.rp-card {
    display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left;
    padding: 14px; font: inherit; color: var(--lt-text); cursor: pointer;
    background: var(--lt-surface); border: 1px solid var(--lt-border); border-radius: 12px;
}
.rp-card:active { background: #ecfeff; }
.rp-card:focus-visible { outline: 2px solid var(--lt-primary-dark); outline-offset: 2px; }
.rp-card__fila { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rp-card__fila--dinero { justify-content: flex-start; gap: 4px 12px; }
.rp-card__cliente { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.rp-card__fecha { font-size: 13px; color: var(--lt-text-muted); }
.rp-card__total { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rp-card__cobrado { font-size: 13px; color: var(--lt-text-muted); }
.rp-card__fila--dinero .lt-amount--debe, .rp-card__fila--dinero .lt-amount--ok { font-size: 14px; margin-left: auto; }
.rp-card__flecha { color: var(--lt-text-muted); font-size: 18px; margin-left: auto; }
@media (max-width: 768px) {
    .lt-report-cards { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
    .lt-report-table-wrap { display: none; }
}

/* ═══ Servicios — mejora de la pantalla (2026-10-02) ═══════════════════════ */
.sv-hint { font-size: 14px; color: var(--lt-text-muted); margin: 6px 0 0; max-width: 62ch; line-height: 1.5; }
.sv-hint strong { color: var(--lt-text); }

/* Buscador */
.sv-search { position: relative; margin: 0 0 12px; }
.sv-search__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--lt-text-muted); pointer-events: none; }
.sv-search__input { padding-left: 42px; }

/* Lista (ahora <ul>/<li>) */
.lt-svc-list { list-style: none; margin: 0; padding: 0; }
.lt-svc-count { text-align: left; margin: 0 0 10px; }

/* Servicio inactivo: se distingue por fondo y etiqueta, SIN bajar la opacidad del texto
   (con opacity .55 el nombre y el precio quedaban bajo 4.5:1). */
.lt-svc-row.lt-svc-row--inactive { opacity: 1; background: #f1f5f9; border-style: dashed; }
.lt-svc-row--inactive .sv-nombre { color: #475569; }
.lt-svc-row--inactive .lt-svc-row__price { color: #475569; }
.lt-svc-row--inactive .lt-svc-row__icon { background: #e2e8f0; color: #475569; }

.lt-svc-row__name { flex-wrap: wrap; row-gap: 4px; }
.lt-svc-row__desc { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Precio + aclaración */
.lt-svc-row__price { text-align: right; line-height: 1.2; }
.sv-precio { display: block; font-size: 18px; }
.sv-precio__nota { display: block; font-size: 12px; font-weight: 500; color: var(--lt-text-muted); }
.lt-svc-row--inactive .sv-precio__nota { color: #475569; }

/* Acciones con texto (antes solo íconos: el ojo y el globo no se entendían) */
.lt-svc-row__actions { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.sv-accion { gap: 6px; white-space: nowrap; }

/* Edición en la misma fila */
.lt-svc-row.lt-svc-row--form { display: block; padding: 0; border-color: var(--lt-primary); }
.lt-svc-row--form .lt-svc-form-card { margin: 0; border: none; border-radius: inherit; box-shadow: none; animation: none; }

/* Estado vacío con atajos */
.sv-empty__titulo { margin: 0; font-size: 20px; color: var(--lt-text); }
.sv-sugeridos { margin-top: 8px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sv-sugeridos__titulo { font-size: 14px; color: var(--lt-text-muted); }
.sv-sugeridos__lista { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sv-chip {
  min-height: 44px; padding: 0 16px; border-radius: 22px; cursor: pointer;
  border: 1.5px solid var(--lt-border); background: var(--lt-surface); color: var(--lt-text);
  font: inherit; font-size: 14px; font-weight: 600; transition: border-color .15s, background .15s;
}
.sv-chip:hover { border-color: var(--lt-primary); background: var(--lt-primary-light); }

/* Celular: nombre y precio arriba, botones abajo en una cuadrícula cómoda para el dedo */
@media (max-width: 600px) {
  .lt-svc-row__price { text-align: left; }
  .lt-svc-row__actions {
    order: 4; width: 100%; margin-top: 4px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px;
  }
  .sv-accion { justify-content: center; }
  .lt-svc-row--form .lt-svc-form-card { padding: 16px; }
}
/* Los tres botones de la fila con el mismo contorno (Desactivar/Activar no tenía borde). */
.lt-svc-row__actions .sv-accion { border: 1.5px solid currentColor; background: transparent; }
.lt-svc-row__actions .lt-btn--warn-ghost { color: #92400e; }
.lt-svc-row__actions .lt-btn--success-ghost { color: #047857; }

/* El "$" de los campos de precio quedaba DETRÁS del campo (el input crea su propio plano con
   backdrop-filter y se pinta encima). Vale para toda pantalla que use .lt-input-prefix. */
.lt-input-prefix-wrap .lt-input-prefix { z-index: 2; }
.lt-svc-form-card .lt-form-hint { margin: 6px 0 0; }
.lt-svc-form-card .lt-form-row--2col { gap: 14px; align-items: start; }
/* Solo los grupos que van DEBAJO de la fila nombre/precio (descripción, "Disponible en").
   Antes la regla alcanzaba también al campo de precio y lo bajaba respecto al del nombre. */
.lt-svc-form-card > div > .lt-form-group { margin-top: 14px; }
.lt-svc-form-card .lt-form-actions { margin-top: 16px; }
