﻿/* =====================================================================
   GARANTÍAS — Azure Aurora (mismo lenguaje visual de Microcréditos)
   Prefijo: wa-   ·   Variables: --wa-*
   Sin Bootstrap: todas las utilidades del módulo están aquí.

   Segmentos
     1. Tokens
     2. Base y utilidades
     3. Hero
     4. Botones y segmentado
     5. Tarjetas, pills, chips, avatar
     6. KPIs
     7. Filtros y campos
     8. Clientes
     9. Tablas
    10. Ficha (modal)
    11. Portal de proveedores
    12. Asignación de marcas
    13. Estados vacíos, avisos y skeleton
    14. Responsive y movimiento reducido
   ===================================================================== */


/* ─────────────────────────────────────────────────────────────────────
   1. TOKENS
   ───────────────────────────────────────────────────────────────────── */
:root {
    --wa-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

    --wa-indigo: #4f46e5;
    --wa-blue: #2563eb;
    --wa-navy: #1e3a8a;

    --wa-aurora: linear-gradient(135deg, #4338ca 0%, #2563eb 48%, #7c3aed 100%);
    --wa-aurora-soft: linear-gradient(135deg, rgba(79, 70, 229, .08), rgba(37, 99, 235, .06) 50%, rgba(124, 58, 237, .08));

    --wa-success: #059669;
    --wa-success-bg: #ecfdf5;
    --wa-success-border: #a7f3d0;
    --wa-danger: #dc2626;
    --wa-danger-bg: #fef2f2;
    --wa-danger-border: #fecaca;
    --wa-warning: #b45309;
    --wa-warning-bg: #fffbeb;
    --wa-warning-border: #fde68a;
    --wa-info: #2563eb;
    --wa-info-bg: #eff6ff;
    --wa-info-border: #bfdbfe;

    --wa-text: #334155;
    --wa-text-strong: #1e293b;
    --wa-text-2: #64748b;
    --wa-text-3: #94a3b8;
    --wa-border: #e2e8f0;
    --wa-border-strong: #cbd5e1;
    --wa-surface: #ffffff;
    --wa-surface-2: #f8fafc;

    --wa-radius-sm: 9px;
    --wa-radius: 14px;
    --wa-radius-lg: 20px;

    --wa-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(30, 41, 99, .16);
    --wa-shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 20px 44px -20px rgba(49, 46, 129, .32);
    --wa-ring: 0 0 0 4px rgba(79, 70, 229, .14);

    --wa-ease: cubic-bezier(.2, .8, .2, 1);
}


/* ─────────────────────────────────────────────────────────────────────
   2. BASE Y UTILIDADES
   ───────────────────────────────────────────────────────────────────── */
.wa-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0 40px;
    font-family: var(--wa-font);
    font-size: 13px;
    color: var(--wa-text);
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top:20px;
}

.wa-page *, .wa-modal *, .wa-portal * { box-sizing: border-box; }
.wa-page p, .wa-modal p { margin: 0; }
.wa-page h1, .wa-page h2, .wa-page h3, .wa-modal h2, .wa-modal h3 { margin: 0; color: var(--wa-text-strong); }

.wa-page .material-symbols-outlined,
.wa-modal .material-symbols-outlined,
.wa-portal .material-symbols-outlined { font-size: 18px; line-height: 1; vertical-align: middle; }

.wa-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wa-muted { color: var(--wa-text-2); }
.wa-block { display: block; }
.wa-strong { font-weight: 600; color: var(--wa-text-strong); }
.wa-mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12px; }
.wa-zero { color: var(--wa-border-strong) !important; }
.wa-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Descripción de producto: minúscula, pequeña y en una línea (se recorta a ~40 letras en C#). */
.wa-desc {
    font-size: 11px !important;
    font-weight: 400;
    color: var(--wa-text-2);
    text-transform: lowercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.wa-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wa-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--wa-indigo);
    margin-bottom: 2px;
}

.wa-link {
    border: 0;
    background: none;
    padding: 0;
    color: var(--wa-indigo);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}


/* ─────────────────────────────────────────────────────────────────────
   3. HERO
   ───────────────────────────────────────────────────────────────────── */
.wa-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 24px 28px;
    border-radius: var(--wa-radius-lg);
    background: var(--wa-aurora);
    color: #fff;
    box-shadow: var(--wa-shadow-lg);
}

.wa-hero::after {
    content: "";
    position: absolute;
    inset: -40% -10% auto auto;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 65%);
    pointer-events: none;
}

.wa-hero--compact { padding: 18px 24px; }

.wa-hero__copy { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; }

.wa-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 3px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.wa-hero__dot { width: 7px; height: 7px; border-radius: 50%; background: #a7f3d0; box-shadow: 0 0 0 3px rgba(167, 243, 208, .3); }
.wa-page .wa-hero__title { color: #fff; font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; letter-spacing: -.02em; }
.wa-hero__subtitle { color: rgba(255, 255, 255, .8); font-size: 13px; }


/* ─────────────────────────────────────────────────────────────────────
   4. BOTONES Y SEGMENTADO
   ───────────────────────────────────────────────────────────────────── */
.wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px;
    border-radius: 11px;
    border: 1px solid transparent;
    font: 600 13px var(--wa-font);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all .15s var(--wa-ease);
}

.wa-btn:disabled { opacity: .55; cursor: not-allowed; }
.wa-btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }

.wa-btn--primary { background: var(--wa-aurora); color: #fff; box-shadow: 0 8px 18px -10px rgba(79, 70, 229, .8); }
.wa-btn--primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 22px -10px rgba(79, 70, 229, .9); }

.wa-btn--success { background: var(--wa-success); color: #fff; }
.wa-btn--success:hover:not(:disabled) { background: #047857; }

.wa-btn--ghost { background: var(--wa-surface); color: var(--wa-text); border-color: var(--wa-border); }
.wa-btn--ghost:hover:not(:disabled) { color: var(--wa-indigo); border-color: #a5b4fc; background: var(--wa-info-bg); }

.wa-btn--glass { position: relative; z-index: 1; background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .3); }
.wa-btn--glass:hover { background: rgba(255, 255, 255, .26); }

.wa-segmented {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    border-radius: 11px;
    background: var(--wa-surface-2);
    border: 1px solid var(--wa-border);
}

.wa-segmented button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--wa-text-2);
    font: 600 12.5px var(--wa-font);
    cursor: pointer;
    transition: all .15s var(--wa-ease);
}

.wa-segmented button.is-active { background: var(--wa-surface); color: var(--wa-indigo); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.wa-segmented button:disabled { cursor: not-allowed; }

.wa-segmented--glass { position: relative; z-index: 1; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .25); }
.wa-segmented--glass button { color: rgba(255, 255, 255, .85); height: 34px; padding: 0 14px; }
.wa-segmented--glass button.is-active { background: #fff; color: var(--wa-indigo); }


/* ─────────────────────────────────────────────────────────────────────
   5. TARJETAS, PILLS, CHIPS, AVATAR
   ───────────────────────────────────────────────────────────────────── */
.wa-card {
    background: var(--wa-surface);
    border: 1px solid var(--wa-border);
    border-radius: var(--wa-radius);
    box-shadow: var(--wa-shadow);
    padding: 16px;
}

.wa-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.5;
}

.wa-pill--success { color: var(--wa-success); background: var(--wa-success-bg); border-color: var(--wa-success-border); }
.wa-pill--danger { color: var(--wa-danger); background: var(--wa-danger-bg); border-color: var(--wa-danger-border); }
.wa-pill--warning { color: var(--wa-warning); background: var(--wa-warning-bg); border-color: var(--wa-warning-border); }
.wa-pill--info { color: var(--wa-info); background: var(--wa-info-bg); border-color: var(--wa-info-border); }
.wa-pill--neutral { color: var(--wa-text-2); background: var(--wa-surface-2); border-color: var(--wa-border); }

.wa-avatar {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--wa-aurora);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

/* Días de espera */
.wa-days {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 2px 8px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.wa-days--success { color: var(--wa-success); background: var(--wa-success-bg); }
.wa-days--danger { color: var(--wa-danger); background: var(--wa-danger-bg); }
.wa-days--warning { color: var(--wa-warning); background: var(--wa-warning-bg); }
.wa-days--info { color: var(--wa-info); background: var(--wa-info-bg); }


/* ─────────────────────────────────────────────────────────────────────
   6. KPIs
   ───────────────────────────────────────────────────────────────────── */
.wa-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }

.wa-kpi {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: var(--wa-radius);
    border: 1px solid var(--wa-border);
    background: var(--wa-surface);
    box-shadow: var(--wa-shadow);
    font-family: var(--wa-font);
    text-align: left;
    cursor: pointer;
    transition: all .18s var(--wa-ease);
}

.wa-kpi:hover:not(:disabled) { transform: translateY(-2px); border-color: #c7d2fe; }
.wa-kpi:disabled { cursor: default; }
.wa-kpi.is-active { border-color: var(--wa-indigo); box-shadow: var(--wa-ring), var(--wa-shadow); }

.wa-kpi__icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; }
.wa-kpi__body { display: flex; flex-direction: column; min-width: 0; }
.wa-kpi__label { font-size: 11px; font-weight: 600; color: var(--wa-text-2); text-transform: uppercase; letter-spacing: .04em; }
.wa-kpi__value { font-size: 20px; font-weight: 700; color: var(--wa-text-strong); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

.wa-kpi--warning .wa-kpi__icon { color: var(--wa-warning); background: var(--wa-warning-bg); }
.wa-kpi--info .wa-kpi__icon { color: var(--wa-info); background: var(--wa-info-bg); }
.wa-kpi--danger .wa-kpi__icon { color: var(--wa-danger); background: var(--wa-danger-bg); }
.wa-kpi--success .wa-kpi__icon { color: var(--wa-success); background: var(--wa-success-bg); }
.wa-kpi--neutral .wa-kpi__icon { color: var(--wa-text-2); background: var(--wa-surface-2); }


/* ─────────────────────────────────────────────────────────────────────
   7. FILTROS Y CAMPOS
   ───────────────────────────────────────────────────────────────────── */
.wa-filters { display: flex; flex-direction: column; gap: 14px; }
.wa-filters__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.wa-filters__actions { display: flex; justify-content: flex-end; gap: 8px; }

.wa-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.wa-field > span { font-size: 11.5px; font-weight: 600; color: var(--wa-text-2); }

.wa-field input,
.wa-field select,
.wa-supplier__add select {
    width: 100%;
    height: 38px;
    padding: 0 11px;
    border: 1px solid var(--wa-border);
    border-radius: 10px;
    background: var(--wa-surface);
    color: var(--wa-text);
    font: 13px var(--wa-font);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.wa-field input:focus,
.wa-field select:focus,
.wa-supplier__add select:focus { border-color: #a5b4fc; box-shadow: var(--wa-ring); }

.wa-field input[readonly], .wa-field select:disabled { background: var(--wa-surface-2); color: var(--wa-text-2); }
.wa-field input::placeholder { color: var(--wa-text-3); }

.wa-search {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    min-width: 240px;
    padding: 0 11px;
    border: 1px solid var(--wa-border);
    border-radius: 10px;
    background: var(--wa-surface);
    color: var(--wa-text-3);
}

.wa-search:focus-within { border-color: #a5b4fc; box-shadow: var(--wa-ring); }
.wa-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: 13px var(--wa-font); color: var(--wa-text); }


/* ─────────────────────────────────────────────────────────────────────
   8. CLIENTES
   ───────────────────────────────────────────────────────────────────── */
.wa-results { display: flex; flex-direction: column; gap: 12px; }

.wa-results__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wa-results__head h2 { font-size: 16px; font-weight: 700; }
.wa-results__head p { color: var(--wa-text-2); font-size: 12.5px; }

.wa-customers { display: flex; flex-direction: column; gap: 8px; }

.wa-customer {
    border: 1px solid var(--wa-border);
    border-radius: var(--wa-radius);
    background: var(--wa-surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: border-color .15s, box-shadow .15s;
}

.wa-customer.is-open { border-color: #c7d2fe; box-shadow: var(--wa-shadow); }

.wa-customer__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 14px;
    flex-wrap: wrap;
}

.wa-customer__who { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1 1 260px; }
.wa-customer__who > div { display: flex; flex-direction: column; min-width: 0; }
.wa-customer__who strong { font-weight: 600; color: var(--wa-text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-customer__who small { font-size: 11.5px; color: var(--wa-text-3); }

.wa-customer__chips { display: flex; gap: 6px; flex-wrap: wrap; }

.wa-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 6px 0 11px;
    border-radius: 9px;
    border: 1px solid var(--wa-border);
    background: var(--wa-surface);
    color: var(--wa-text-2);
    font: 600 12px var(--wa-font);
    cursor: pointer;
    transition: all .15s var(--wa-ease);
}

.wa-chip__count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
}

.wa-chip:disabled { opacity: .45; cursor: default; }
.wa-chip:disabled .wa-chip__count { background: var(--wa-surface-2); color: var(--wa-text-3); }

.wa-chip--warning:not(:disabled) .wa-chip__count { color: var(--wa-warning); background: var(--wa-warning-bg); }
.wa-chip--info:not(:disabled) .wa-chip__count { color: var(--wa-info); background: var(--wa-info-bg); }
.wa-chip--danger:not(:disabled) .wa-chip__count { color: var(--wa-danger); background: var(--wa-danger-bg); }
.wa-chip--success:not(:disabled) .wa-chip__count { color: var(--wa-success); background: var(--wa-success-bg); }
.wa-chip--neutral:not(:disabled) .wa-chip__count { color: var(--wa-text); background: var(--wa-surface-2); }

.wa-chip:hover:not(:disabled) { border-color: #a5b4fc; color: var(--wa-indigo); }
.wa-chip.is-active { border-color: var(--wa-indigo); color: var(--wa-indigo); background: #eef2ff; }

.wa-customer > .wa-table-wrap { border-top: 1px solid var(--wa-border); border-radius: 0 0 var(--wa-radius) var(--wa-radius); }


/* ─────────────────────────────────────────────────────────────────────
   9. TABLAS
   ───────────────────────────────────────────────────────────────────── */
.wa-table-wrap { width: 100%; overflow-x: auto; }
.wa-table-wrap--report { max-height: calc(100vh - 330px); overflow: auto; border: 1px solid var(--wa-border); border-radius: var(--wa-radius-sm); }

.wa-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }

.wa-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 9px 12px;
    background: var(--wa-surface-2);
    border-bottom: 1px solid var(--wa-border);
    color: var(--wa-text-2);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-align: left;
    white-space: nowrap;
}

.wa-table thead th.wa-num { text-align: right; }

/* Fila de totales fija bajo el encabezado */
.wa-table thead .wa-total-row th {
    top: 35px;
    background: #eef2ff;
    color: var(--wa-navy);
    font-size: 12px;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 1px solid #c7d2fe;
}

.wa-table td { padding: 9px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.wa-table tbody tr:last-child td { border-bottom: 0; }
.wa-table tbody tr:hover td { background: #fafbff; }

.wa-row { cursor: pointer; }
.wa-row:hover td { background: #f5f7ff !important; }

.wa-table--requests { table-layout: fixed; min-width: 960px; }
.wa-col-xs { width: 64px; }
.wa-col-sm { width: 96px; }
.wa-col-md { width: 120px; }
.wa-col-lg { width: 170px; }

.wa-table--report td small { font-size: 11.5px; }

/* Producto con imagen */
.wa-product { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wa-product img,
.wa-product__placeholder {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--wa-border);
    background: #fff;
    object-fit: contain;
    padding: 2px;
}
.wa-product__placeholder { display: grid; place-items: center; color: var(--wa-text-3); }
.wa-product > div { display: flex; flex-direction: column; min-width: 0; }
.wa-product strong { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; color: var(--wa-text-strong); }
.wa-product small { color: var(--wa-text-2); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }


/* ─────────────────────────────────────────────────────────────────────
   10. FICHA (MODAL)
   Una sola columna: encabezado, cronología horizontal y bloques en una
   grilla que se adapta al ancho del modal (en pantallas pequeñas no se
   comprime: baja a una columna).
   ───────────────────────────────────────────────────────────────────── */
.wa-modal { font-family: var(--wa-font); font-size: 13px; color: var(--wa-text); display: flex; flex-direction: column; gap: 18px; }

/* Encabezado */
.wa-detail-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px 18px;
    align-items: center;
    padding: 18px 20px;
    border-radius: var(--wa-radius);
    background: var(--wa-aurora-soft);
    border: 1px solid #e0e7ff;
}

.wa-detail-head__image {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--wa-border);
    overflow: hidden;
    color: var(--wa-text-3);
}

.wa-detail-head__image img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }

.wa-detail-head__copy { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.wa-detail-head__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wa-modal .wa-detail-head__title h2 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }

/* El nombre del producto de SAP puede ser muy largo: máximo 2 líneas. */
.wa-detail-head__product { display: flex; align-items: baseline; gap: 8px; min-width: 0; color: var(--wa-text); }
.wa-detail-head__product .wa-desc { font-size: 12px !important; }

/* Datos clave en una franja propia debajo, con espacio para respirar. */
.wa-detail-head__meta {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px 20px;
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid #e0e7ff;
}

.wa-detail-head__meta dt { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--wa-text-3); margin-bottom: 3px; }
.wa-detail-head__meta dd { margin: 0; font-weight: 600; color: var(--wa-text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wa-detail-body { display: flex; flex-direction: column; gap: 18px; }

.wa-modal h3 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; margin-bottom: 14px; }
.wa-modal h3 .material-symbols-outlined { color: var(--wa-indigo); }

/* Cronología horizontal */
.wa-timeline-card { padding: 18px 20px; }

.wa-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px 12px;
}

.wa-timeline__item { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* Línea que une los pasos */
.wa-timeline__item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 34px;
    right: -6px;
    top: 13px;
    height: 2px;
    background: var(--wa-border);
}

.wa-timeline__item--success:not(:last-child)::before { background: #a7f3d0; }

.wa-timeline__dot { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.wa-timeline__dot .material-symbols-outlined { font-size: 15px !important; }

.wa-timeline__item--success .wa-timeline__dot { color: #fff; background: var(--wa-success); }
.wa-timeline__item--danger .wa-timeline__dot { color: #fff; background: var(--wa-danger); }
.wa-timeline__item--warning .wa-timeline__dot { color: var(--wa-warning); background: var(--wa-warning-bg); border: 1px dashed var(--wa-warning); }

.wa-timeline__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wa-timeline__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wa-timeline__title strong { font-weight: 600; color: var(--wa-text-strong); }
.wa-timeline__body p { font-size: 12.5px; color: var(--wa-text); line-height: 1.4; }
.wa-timeline__body small { font-size: 11.5px; color: var(--wa-text-3); line-height: 1.4; }

/* Bloques */
.wa-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }

.wa-section { padding: 18px 20px; border-top-width: 3px; }
.wa-section--info { border-top-color: var(--wa-info); }
.wa-section--success { border-top-color: var(--wa-success); }
.wa-section--warning { border-top-color: #f59e0b; }
.wa-section--danger { border-top-color: var(--wa-danger); }
.wa-section--danger h3 .material-symbols-outlined { color: var(--wa-danger); }

.wa-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 20px; margin: 0; }
.wa-fields > div { min-width: 0; }
.wa-fields__wide { grid-column: 1 / -1; }
.wa-fields dt { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--wa-text-3); margin-bottom: 3px; }
.wa-fields dd { margin: 0; color: var(--wa-text-strong); line-height: 1.45; overflow-wrap: break-word; white-space: pre-line; }

.wa-gallery { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.wa-gallery a { display: block; width: 88px; height: 88px; border-radius: 10px; overflow: hidden; border: 1px solid var(--wa-border); background: var(--wa-surface-2); transition: transform .15s; }
.wa-gallery a:hover { transform: scale(1.04); }
.wa-gallery img { width: 100%; height: 100%; object-fit: cover; }


/* ─────────────────────────────────────────────────────────────────────
   11. PORTAL DE PROVEEDORES
   ───────────────────────────────────────────────────────────────────── */
/* El proveedor ve solo la página (sin menú); el empleado ve la intranet normal. Ver SupplierLayout. */
.wa-page--portal { padding-bottom: 24px; }

.wa-report-form { display: flex; flex-direction: column; gap: 12px; }
.wa-report-form__grid { display: grid; grid-template-columns: 1fr 2fr 150px 150px auto; gap: 12px; align-items: end; }

.wa-report { display: flex; flex-direction: column; gap: 14px; }
.wa-report__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.wa-report__head h2 { font-size: 16px; font-weight: 700; }
.wa-report__tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wa-report__tools .wa-search { margin-left: auto; }


/* ─────────────────────────────────────────────────────────────────────
   12. ASIGNACIÓN DE MARCAS
   ───────────────────────────────────────────────────────────────────── */
.wa-supplier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }

.wa-supplier { display: flex; flex-direction: column; gap: 12px; }
.wa-supplier.is-inactive { opacity: .65; }

.wa-supplier__head { display: flex; align-items: center; gap: 11px; }
.wa-supplier__head > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wa-supplier__head strong { font-weight: 600; color: var(--wa-text-strong); }
.wa-supplier__head small { font-size: 12px; color: var(--wa-text-2); overflow: hidden; text-overflow: ellipsis; }

.wa-supplier__brands { display: flex; gap: 6px; flex-wrap: wrap; min-height: 28px; align-items: center; }

.wa-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 4px 0 10px;
    border-radius: 8px;
    background: #eef2ff;
    color: var(--wa-indigo);
    font-size: 12px;
    font-weight: 600;
}

.wa-tag button {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.wa-tag button:hover:not(:disabled) { background: rgba(79, 70, 229, .14); }
.wa-tag button .material-symbols-outlined { font-size: 15px !important; }

.wa-supplier__add { display: flex; gap: 8px; }
.wa-supplier__add select { height: 32px; flex: 1; }


/* ─────────────────────────────────────────────────────────────────────
   13. ESTADOS VACÍOS, AVISOS Y SKELETON
   ───────────────────────────────────────────────────────────────────── */
.wa-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 40px 20px;
    text-align: center;
    color: var(--wa-text-2);
}

.wa-empty--card { background: var(--wa-surface); border: 1px dashed var(--wa-border-strong); border-radius: var(--wa-radius); }
.wa-empty .material-symbols-outlined { font-size: 34px !important; color: #a5b4fc; }
.wa-page .wa-empty h3 { font-size: 15px; font-weight: 700; }

.wa-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 13px;
    border-radius: 10px;
    border: 1px solid;
    font-size: 12.5px;
}

.wa-notice--warning { color: var(--wa-warning); background: var(--wa-warning-bg); border-color: var(--wa-warning-border); }
.wa-notice--info { color: #1e40af; background: var(--wa-info-bg); border-color: var(--wa-info-border); }

.wa-skeleton {
    height: 44px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
    background-size: 400% 100%;
    animation: wa-shimmer 1.4s ease infinite;
}

.wa-skeleton:last-child { margin-bottom: 0; }

@keyframes wa-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}


/* ─────────────────────────────────────────────────────────────────────
   14. RESPONSIVE Y MOVIMIENTO REDUCIDO
   ───────────────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .wa-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .wa-filters__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .wa-report-form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wa-report-form__go { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .wa-hero { padding: 18px; }
    .wa-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wa-filters__grid, .wa-report-form__grid { grid-template-columns: 1fr; }
    .wa-search { min-width: 0; width: 100%; }
    .wa-report__tools .wa-search { margin-left: 0; }
    .wa-fields { grid-template-columns: 1fr; }
    .wa-timeline__item::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .wa-page *, .wa-modal *, .wa-portal * { transition: none !important; animation: none !important; }
}


/* ─────────────────────────────────────────────────────────────────────
   PROVEEDORES: cuentas del portal (/Warranty/Suppliers)
   ───────────────────────────────────────────────────────────────────── */
.wa-hero__actions { position: relative; z-index: 1; display: flex; gap: 8px; flex-wrap: wrap; }

.wa-supplier-new { display: flex; flex-direction: column; gap: 16px; border: 1px dashed #a5b4fc; }

.wa-supplier-new__head { display: flex; align-items: center; gap: 12px; }
.wa-supplier-new__head > .material-symbols-outlined {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--wa-info-bg);
    color: var(--wa-indigo, #4f46e5);
    font-size: 22px !important;
}
.wa-supplier-new__head > div { display: flex; flex-direction: column; }
.wa-supplier-new__head strong { font-size: 15px; font-weight: 600; color: var(--wa-text-strong); }
.wa-supplier-new__head small { font-size: 12px; color: var(--wa-text-2); }

.wa-supplier-new__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; }

.wa-supplier-new__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; }

.wa-supplier__head small { display: inline-flex; align-items: center; gap: 4px; }
.wa-supplier__head small .material-symbols-outlined { font-size: 14px !important; }

.wa-supplier__reset { display: flex; gap: 8px; }
.wa-supplier__reset input {
    flex: 1;
    min-width: 0;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--wa-border-strong, #cbd5e1);
    border-radius: 10px;
    font: inherit;
    font-size: 13px;
}
.wa-supplier__reset input:focus { outline: none; border-color: #a5b4fc; box-shadow: var(--wa-ring); }

.wa-supplier__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--wa-border);
}

.wa-btn--danger-text { color: var(--wa-danger, #dc2626) !important; }

@media (max-width: 768px) {
    .wa-supplier-new__grid { grid-template-columns: 1fr; }
    .wa-supplier__reset { flex-wrap: wrap; }
}


/* ─────────────────────────────────────────────────────────────────────
   CABECERA AURORA en /Supplier y /Warranty/Suppliers
   La base es la de /Warranty (mc-hero de microCredits.css); aquí solo
   lo propio: etiquetas de marca y la columna derecha (cifras + acciones).
   ───────────────────────────────────────────────────────────────────── */
.wa-page .mc-hero-copy { flex: 1; min-width: 260px; }

.wa-hero-brands { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.wa-hero-brand {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 240px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-page .wa-hero-brand .material-symbols-outlined { font-size: 14px; color: #c7d2fe; }
.wa-hero-brand--more { background: transparent; border-style: dashed; cursor: help; }

.wa-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.wa-page .mc-hero-stats strong.wa-hero-stat--sm { font-size: 14px; line-height: 1.55; white-space: nowrap; }

@media (max-width: 820px) {
    .wa-hero-side { align-items: stretch; width: 100%; }
    .wa-page .mc-hero-stats { flex-wrap: wrap; }
    .wa-page .mc-hero-stats > div { flex: 1; min-width: 96px; }
    .wa-page .wa-hero-side .mc-hero-actions .mc-btn { flex: 1; }
}
