/* Taller Mackauto — fase 5 (inicio). */

/* =====================================================================
   F5-01 · Inicio = «Hoy» (operations/today/index)
   Móvil primero: dedos de 44 px, nada más ancho que la pantalla.
   ===================================================================== */
.mack-hoy {
    display: grid;
    gap: 1rem;
    min-width: 0;
    max-width: 64rem;
}

.mack-hoy *,
.mack-hoy *::before,
.mack-hoy *::after {
    box-sizing: border-box;
}

.mack-hoy__cabecera {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
}

.mack-hoy__titulos {
    min-width: 0;
}

.mack-hoy__titulo {
    margin: 0;
    color: var(--mack-navy-950, #111a33);
    font-size: 1.625rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.mack-hoy__fecha {
    margin: 0.125rem 0 0;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
}

.mack-hoy__enlace-tablero {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    min-height: 44px;
    padding: 0 0.875rem;
    border: 1px solid var(--mack-borde, #dde1ea);
    border-radius: 10px;
    background: #fff;
    color: var(--mack-navy, #202f57);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
}

.mack-hoy__enlace-tablero:hover {
    border-color: var(--mack-navy, #202f57);
}

/* ── Bloques ───────────────────────────────────────────────── */
.mack-hoy-bloque {
    min-width: 0;
    border: 1px solid var(--mack-borde, #dde1ea);
    border-radius: var(--mack-radio, 12px);
    background: #fff;
    padding: 0.875rem;
}

.mack-hoy-bloque--listos {
    border-left: 4px solid #16a34a;
}

.mack-hoy-bloque__cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
}

.mack-hoy-bloque__titulo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    min-width: 0;
    color: var(--mack-navy-950, #111a33);
    font-size: 1.0625rem;
    font-weight: 800;
    line-height: 1.25;
}

.mack-hoy-bloque__cuenta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4375rem;
    border-radius: 999px;
    background: var(--mack-fondo, #eef0f5);
    color: var(--mack-navy, #202f57);
    font-size: 0.8125rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.mack-hoy-bloque__ver {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    min-height: 44px;
    padding: 0 0.25rem;
    color: var(--mack-navy, #202f57);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mack-hoy-vacio {
    margin: 0;
    color: #64748b;
    font-size: 0.9375rem;
}

.mack-hoy-mas {
    margin: 0.625rem 0 0;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 600;
}

.mack-hoy-lista {
    display: grid;
    gap: 0.625rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ── Fila con acciones (listos, presupuestos, avisos) ─────── */
.mack-hoy-fila {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "coche importe"
        "acciones acciones";
    align-items: center;
    gap: 0.5rem 0.75rem;
    min-width: 0;
    padding-top: 0.625rem;
    border-top: 1px solid #eef0f5;
}

.mack-hoy-lista > .mack-hoy-fila:first-child {
    padding-top: 0;
    border-top: 0;
}

.mack-hoy-fila__coche {
    grid-area: coche;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    min-height: 44px;
    color: inherit;
    text-decoration: none;
}

.mack-hoy-fila__texto {
    display: grid;
    min-width: 0;
    line-height: 1.25;
}

.mack-hoy-fila__modelo {
    overflow: hidden;
    color: var(--mack-navy-950, #111a33);
    font-size: 0.9375rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mack-hoy-fila__cliente {
    overflow: hidden;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mack-hoy-fila__hace {
    color: #b45309;
    font-size: 0.8125rem;
    font-weight: 700;
}

.mack-hoy-fila__importe {
    grid-area: importe;
    color: var(--mack-navy-950, #111a33);
    font-size: 1rem;
    font-weight: 800;
    white-space: nowrap;
}

.mack-hoy-fila__acciones {
    grid-area: acciones;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.mack-hoy-fila__acciones .mack-tel {
    flex: 1 1 auto;
}

/* Matrícula grande, como la placa. */
.mack-hoy-matricula {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    min-height: 2.25rem;
    padding: 0 0.5rem;
    border: 2px solid var(--mack-navy-950, #111a33);
    border-left-width: 6px;
    border-left-color: #1d4ed8;
    border-radius: 6px;
    background: #fff;
    color: var(--mack-navy-950, #111a33);
    font-size: 1.0625rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.mack-hoy-matricula--pequena {
    min-height: 1.75rem;
    padding: 0 0.375rem;
    border-width: 1.5px;
    border-left-width: 4px;
    font-size: 0.875rem;
}

.mack-hoy-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 1rem;
    border-radius: 10px;
    background: var(--mack-navy, #202f57);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.mack-hoy-boton:hover {
    background: var(--mack-navy-900, #17223f);
    color: #fff;
}

.mack-hoy-sin-tel {
    flex: 1 1 auto;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 600;
}

.mack-hoy-motivo {
    grid-area: importe;
    justify-self: end;
    max-width: 11rem;
    color: #b45309;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: right;
}

.mack-hoy-motivo--urgente {
    color: var(--mack-red, #cb1824);
}

/* ── Filas compactas (entregas, en el taller) ─────────────── */
.mack-hoy-lista--compacta {
    gap: 0;
}

.mack-hoy-compacta {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.25rem 0.625rem;
    min-height: 48px;
    padding: 0.375rem 0;
    border-top: 1px solid #eef0f5;
    color: inherit;
    text-decoration: none;
}

.mack-hoy-lista--compacta > li:first-child .mack-hoy-compacta {
    border-top: 0;
}

.mack-hoy-compacta:hover .mack-hoy-compacta__modelo {
    text-decoration: underline;
}

.mack-hoy-compacta__modelo {
    overflow: hidden;
    color: var(--mack-navy-950, #111a33);
    font-size: 0.875rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mack-hoy-compacta__detalle,
.mack-hoy-compacta__hora {
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.mack-hoy-compacta__hora--tarde {
    color: var(--mack-red, #cb1824);
}

.mack-hoy-compacta__estado {
    grid-column: 2 / -1;
    justify-self: start;
}

/* ── Los 4 contadores, pequeños ───────────────────────────── */
.mack-hoy-contadores {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.mack-hoy-contador {
    --mack-estado: #64748b;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 0 0.5rem;
    min-height: 44px;
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--mack-borde, #dde1ea);
    border-top: 3px solid var(--mack-estado);
    border-radius: 10px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.mack-hoy-contador:hover {
    border-color: var(--mack-estado);
}

.mack-hoy-contador__nombre {
    overflow: hidden;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mack-hoy-contador__numero {
    grid-row: span 2;
    color: var(--mack-navy-950, #111a33);
    font-size: 1.375rem;
    font-weight: 800;
    line-height: 1;
}

.mack-hoy-contador__euros {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ── Móvil ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .mack-hoy-bloque {
        padding: 0.75rem;
    }

    /* Los botones Llamar / WhatsApp / Abrir en una sola fila, a partes iguales. */
    .mack-hoy-fila__acciones {
        flex-wrap: nowrap;
    }

    .mack-hoy-fila__acciones .mack-tel--botones {
        flex-direction: row;
        width: auto;
        min-width: 0;
    }

    .mack-hoy-fila__acciones .mack-tel--botones .mack-tel__acciones {
        flex-wrap: nowrap;
    }

    .mack-hoy-fila__acciones .mack-tel--botones .mack-tel__boton {
        min-width: 0;
        min-height: 44px;
        padding: 0 0.5rem;
    }

    .mack-hoy-boton {
        flex: 0 0 auto;
        padding: 0 0.875rem;
    }
}

/* ── Ordenador: cada fila en una línea ─────────────────────── */
@media (min-width: 768px) {
    .mack-hoy-fila {
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-areas: "coche importe acciones";
    }

    .mack-hoy-fila__acciones {
        flex-wrap: nowrap;
        justify-content: flex-end;
    }

    .mack-hoy-fila__acciones .mack-tel {
        flex: 0 0 auto;
    }

    .mack-hoy-motivo {
        max-width: 18rem;
    }

    .mack-hoy-compacta__estado {
        grid-column: auto;
    }

    .mack-hoy-lista--compacta .mack-hoy-compacta:has(.mack-hoy-compacta__estado) {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
    }

    .mack-hoy-contadores {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
