/* =====================================================================
   MICROCRÉDITOS — Azure Aurora Premium
   Prefijo: mc-   ·   Variables: --mc-*
   Sin Bootstrap: todas las utilidades del módulo están aquí.

   Segmentos
     1. Tokens (en :root para que apliquen también dentro de los modales)
     2. Base de página y utilidades
     3. Hero
     4. Botones
     5. Tarjetas, pills, avatar, medidores
     6. KPIs
     7. Pestañas, toolbar, búsqueda, segmentado
     8. Tablas
     9. Formularios
    10. Modal (detalle, facturas)
    11. Wizard
    12. Referencias y línea de tiempo
    13. Cupos (Budgets)
    14. Verificación (Cartera)
    15. Estados vacíos y skeleton
    16. Responsive y movimiento reducido
   ===================================================================== */


/* ─────────────────────────────────────────────────────────────────────
   1. TOKENS
   ───────────────────────────────────────────────────────────────────── */
:root {
    --mc-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

    --mc-indigo: #4f46e5;
    --mc-blue: #2563eb;
    --mc-violet: #7c3aed;
    --mc-cyan: #0891b2;
    --mc-navy: #153286;

    --mc-aurora: linear-gradient(135deg, #4338ca 0%, #2563eb 48%, #7c3aed 100%);
    --mc-aurora-soft: linear-gradient(135deg, rgba(79, 70, 229, .10), rgba(37, 99, 235, .08) 50%, rgba(124, 58, 237, .10));

    --mc-success: #059669;
    --mc-success-bg: #ecfdf5;
    --mc-danger: #dc2626;
    --mc-danger-bg: #fef2f2;
    --mc-warning: #d97706;
    --mc-warning-bg: #fffbeb;
    --mc-info: #2563eb;
    --mc-info-bg: #eff6ff;

    --mc-text: #334155;
    --mc-text-2: #64748b;
    --mc-text-3: #94a3b8;
    --mc-border: #e2e8f0;
    --mc-border-strong: #cbd5e1;
    --mc-surface: #ffffff;
    --mc-surface-2: #f8fafc;
    --mc-glass: rgba(255, 255, 255, .78);

    --mc-radius-sm: 10px;
    --mc-radius: 16px;
    --mc-radius-lg: 22px;

    --mc-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --mc-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(30, 41, 99, .18);
    --mc-shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 22px 48px -20px rgba(49, 46, 129, .35);
    --mc-ring: 0 0 0 4px rgba(79, 70, 229, .16);

    --mc-ease: cubic-bezier(.2, .8, .2, 1);
}


/* ─────────────────────────────────────────────────────────────────────
   2. BASE Y UTILIDADES
   ───────────────────────────────────────────────────────────────────── */
.mc-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0 48px;
    font-family: var(--mc-font);
    color: var(--mc-text);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mc-page *,
.mc-modal * { box-sizing: border-box; }

.mc-page p,
.mc-modal p { margin: 0; }

.mc-page h1, .mc-page h2, .mc-page h3, .mc-page h4,
.mc-modal h2, .mc-modal h3, .mc-modal h4 { margin: 0; }

.mc-page .material-symbols-outlined,
.mc-modal .material-symbols-outlined { font-size: 18px; line-height: 1; vertical-align: middle; }

.mc-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mc-muted { color: var(--mc-text-2); }
.mc-block { display: block; }
.mc-text-danger { color: var(--mc-danger) !important; font-weight: 600; }
.mc-lead { color: var(--mc-text-2); font-size: 13px; line-height: 1.55; }
.mc-ok { color: var(--mc-success); margin-left: auto; }


/* ─────────────────────────────────────────────────────────────────────
   3. HERO
   ───────────────────────────────────────────────────────────────────── */
.mc-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--mc-radius-lg);
    background-color: var(--mc-navy);
    background-image:
        radial-gradient(60% 120% at 0% 0%, rgba(99, 102, 241, .55), transparent 60%),
        radial-gradient(50% 120% at 100% 0%, rgba(139, 92, 246, .55), transparent 60%),
        radial-gradient(40% 90% at 70% 120%, rgba(6, 182, 212, .35), transparent 70%),
        linear-gradient(135deg, #1e1b4b 0%, #153286 55%, #312e81 100%);
    color: #fff;
    padding: 27px 31px;
    box-shadow: var(--mc-shadow-lg);
    isolation: isolate;
    margin-top:20px;
}

/* Trama de puntos + anillos decorativos */
.mc-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
    background-size: 18px 18px;
    mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
    z-index: -1;
}

.mc-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -140px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 0 0 40px rgba(255, 255, 255, .03), 0 0 0 90px rgba(255, 255, 255, .025);
    z-index: -1;
}

.mc-hero--compact { padding: 20px 27px; }

.mc-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.mc-hero-copy { display: flex; flex-direction: column; gap: 8px; min-width: 260px; }

.mc-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    backdrop-filter: blur(8px);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mc-hero-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #67e8f9;
    box-shadow: 0 0 0 0 rgba(103, 232, 249, .7);
    animation: mc-pulse 2.2s infinite;
}

.mc-hero-title {
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 700;
    letter-spacing: -.02em;
    background: linear-gradient(90deg, #fff 0%, #c7d2fe 60%, #ddd6fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.mc-hero-subtitle { color: rgba(255, 255, 255, .78); font-size: 13px; max-width: 620px; }

.mc-hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.mc-hero-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .24);
    backdrop-filter: blur(10px);
}

.mc-hero-select select {
    background: transparent;
    border: 0;
    color: #fff;
    font: 600 14px var(--mc-font);
    outline: none;
    cursor: pointer;
    min-width: 170px;
}

.mc-hero-select option { color: var(--mc-text); }

.mc-hero-stats { display: flex; gap: 12px; }

.mc-hero-stats > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 110px;
    padding: 12px 15px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    backdrop-filter: blur(10px);
}

.mc-hero-stats strong { font-size: 22px; font-weight: 700; line-height: 1.1; }
.mc-hero-stats span { font-size: 11.5px; color: rgba(255, 255, 255, .75); }
.mc-hero-stats .is-alert { background: rgba(220, 38, 38, .35); border-color: rgba(254, 202, 202, .5); }


/* ─────────────────────────────────────────────────────────────────────
   4. BOTONES
   ───────────────────────────────────────────────────────────────────── */
.mc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font: 600 14px var(--mc-font);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .15s var(--mc-ease), box-shadow .2s var(--mc-ease), background .2s, opacity .2s;
}

.mc-btn:hover:not(:disabled) { transform: translateY(-1px); }
.mc-btn:focus-visible { outline: none; box-shadow: var(--mc-ring); }
.mc-btn:disabled { opacity: .5; cursor: not-allowed; }

.mc-btn--sm { height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.mc-btn--block { width: 100%; }

.mc-btn--primary {
    background: var(--mc-aurora);
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(79, 70, 229, .6);
}

.mc-btn--success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(5, 150, 105, .6);
}

.mc-btn--danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(220, 38, 38, .55);
}

.mc-btn--ghost {
    background: var(--mc-surface);
    color: var(--mc-indigo);
    border-color: var(--mc-border-strong);
}

.mc-btn--ghost:hover:not(:disabled) { background: var(--mc-info-bg); border-color: #a5b4fc; }

.mc-btn--danger-ghost {
    background: var(--mc-surface);
    color: var(--mc-danger);
    border-color: #fecaca;
}

.mc-btn--danger-ghost:hover:not(:disabled) { background: var(--mc-danger-bg); }

.mc-btn--glass {
    background: rgba(255, 255, 255, .16);
    color: #fff;
    border-color: rgba(255, 255, 255, .32);
    backdrop-filter: blur(10px);
}

.mc-btn--glass:hover:not(:disabled) { background: rgba(255, 255, 255, .26); }

.mc-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--mc-border);
    background: var(--mc-surface);
    color: var(--mc-text-2);
    cursor: pointer;
    transition: all .15s var(--mc-ease);
}

.mc-icon-btn:hover:not(:disabled) { color: var(--mc-indigo); border-color: #a5b4fc; background: var(--mc-info-bg); }
.mc-icon-btn:disabled { opacity: .5; cursor: not-allowed; }


/* ─────────────────────────────────────────────────────────────────────
   5. TARJETAS, PILLS, AVATAR, MEDIDORES
   ───────────────────────────────────────────────────────────────────── */
.mc-card {
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    box-shadow: var(--mc-shadow);
    padding: 17px;
}

.mc-card--flush { padding: 0; overflow: hidden; }

.mc-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}

.mc-pill .material-symbols-outlined { font-size: 14px; }
.mc-pill--success { color: var(--mc-success); background: var(--mc-success-bg); border-color: #a7f3d0; }
.mc-pill--danger { color: var(--mc-danger); background: var(--mc-danger-bg); border-color: #fecaca; }
.mc-pill--warning { color: var(--mc-warning); background: var(--mc-warning-bg); border-color: #fde68a; }
.mc-pill--info { color: var(--mc-info); background: var(--mc-info-bg); border-color: #bfdbfe; }
.mc-pill--neutral { color: var(--mc-text-2); background: var(--mc-surface-2); border-color: var(--mc-border); }

.mc-avatar {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--mc-aurora);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .02em;
    box-shadow: 0 6px 14px -8px rgba(79, 70, 229, .7);
}

.mc-avatar--violet { background: linear-gradient(135deg, #7c3aed, #c026d3); }
.mc-avatar--lg { width: 56px; height: 56px; border-radius: 16px; font-size: 16px; }
.mc-avatar--sm { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; box-shadow: none; }

.mc-customer { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mc-customer > div { display: flex; flex-direction: column; min-width: 0; }
.mc-customer strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-customer small { color: var(--mc-text-3); font-size: 11.5px; }

.mc-amount-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    background: var(--mc-aurora-soft);
    color: var(--mc-indigo);
    font-weight: 600;
}

.mc-refs { display: inline-flex; align-items: center; gap: 4px; color: var(--mc-text-2); font-weight: 600; font-size: 12.5px; }
.mc-refs .material-symbols-outlined { font-size: 15px; color: var(--mc-indigo); }
.mc-refs .material-symbols-outlined:nth-of-type(2) { margin-left: 8px; color: var(--mc-success); }

.mc-meter {
    display: flex;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: #e0e7ff;
}

.mc-meter--lg { height: 10px; }
.mc-meter__used { background: var(--mc-aurora); transition: width .6s var(--mc-ease); }
.mc-meter__reserved {
    background: repeating-linear-gradient(45deg, #a78bfa, #a78bfa 4px, #c4b5fd 4px, #c4b5fd 8px);
    transition: width .6s var(--mc-ease);
}

.mc-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #e0e7ff; margin-right: 6px; }
.mc-dot--used { background: var(--mc-indigo); }


/* ─────────────────────────────────────────────────────────────────────
   6. KPIs
   ───────────────────────────────────────────────────────────────────── */
.mc-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.mc-kpi {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 15px;
    border-radius: var(--mc-radius);
    border: 1px solid var(--mc-border);
    background: var(--mc-glass);
    backdrop-filter: blur(12px);
    box-shadow: var(--mc-shadow);
    text-align: left;
    font-family: var(--mc-font);
    color: var(--mc-text);
    animation: mc-rise .5s var(--mc-ease) both;
}

.mc-kpi:nth-child(2) { animation-delay: .04s; }
.mc-kpi:nth-child(3) { animation-delay: .08s; }
.mc-kpi:nth-child(4) { animation-delay: .12s; }
.mc-kpi:nth-child(5) { animation-delay: .16s; }
.mc-kpi:nth-child(6) { animation-delay: .20s; }
.mc-kpi:nth-child(7) { animation-delay: .24s; }
.mc-kpi:nth-child(8) { animation-delay: .28s; }

.mc-kpi--link { cursor: pointer; transition: transform .2s var(--mc-ease), box-shadow .2s, border-color .2s; }
.mc-kpi--link:hover { transform: translateY(-2px); box-shadow: var(--mc-shadow-lg); border-color: #c7d2fe; }
.mc-kpi--link:focus-visible { outline: none; box-shadow: var(--mc-ring); }

.mc-kpi--alert { border-color: #fecaca; background: linear-gradient(180deg, #fff 0%, #fef2f2 100%); }

.mc-kpi--hero {
    background: var(--mc-aurora);
    color: #fff;
    border: 0;
    box-shadow: 0 18px 36px -18px rgba(79, 70, 229, .8);
}

.mc-kpi--hero .mc-kpi__label,
.mc-kpi--hero .mc-kpi__hint { color: rgba(255, 255, 255, .8); }

.mc-kpi__icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    margin-bottom: 4px;
}

.mc-kpi__icon--indigo { background: #eef2ff; color: var(--mc-indigo); }
.mc-kpi__icon--blue { background: #eff6ff; color: var(--mc-blue); }
.mc-kpi__icon--violet { background: #f5f3ff; color: var(--mc-violet); }
.mc-kpi__icon--cyan { background: #ecfeff; color: var(--mc-cyan); }
.mc-kpi__icon--green { background: var(--mc-success-bg); color: var(--mc-success); }
.mc-kpi__icon--red { background: var(--mc-danger-bg); color: var(--mc-danger); }
.mc-kpi__icon--amber { background: var(--mc-warning-bg); color: var(--mc-warning); }
.mc-kpi__icon--white { background: rgba(255, 255, 255, .18); color: #fff; }

.mc-kpi__label { font-size: 11.5px; font-weight: 600; color: var(--mc-text-2); text-transform: uppercase; letter-spacing: .05em; }
.mc-kpi__value { font-size: 19px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mc-kpi__hint { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--mc-text-3); }
.mc-kpi__hint .material-symbols-outlined { font-size: 14px; transition: transform .2s; }
.mc-kpi--link:hover .mc-kpi__hint .material-symbols-outlined { transform: translateX(3px); }


/* ─────────────────────────────────────────────────────────────────────
   7. PESTAÑAS, TOOLBAR, BÚSQUEDA, SEGMENTADO
   ───────────────────────────────────────────────────────────────────── */
.mc-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.mc-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    box-shadow: var(--mc-shadow-sm);
    flex-wrap: wrap;
}

.mc-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--mc-text-2);
    font: 600 14px var(--mc-font);
    cursor: pointer;
    transition: background .2s, color .2s;
}

.mc-tab:hover { color: var(--mc-indigo); background: var(--mc-surface-2); }

.mc-tab--active,
.mc-tab--active:hover { background: var(--mc-aurora); color: #fff; box-shadow: 0 6px 14px -8px rgba(79, 70, 229, .7); }

.mc-tab__count {
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--mc-surface-2);
    color: var(--mc-text-2);
    font-size: 11.5px;
    text-align: center;
}

.mc-tab--active .mc-tab__count { background: rgba(255, 255, 255, .22); color: #fff; }

.mc-tabs--underline {
    display: flex;
    padding: 0;
    gap: 0;
    border: 0;
    border-bottom: 1px solid var(--mc-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    margin: 18px 0 16px;
}

.mc-tabs--underline .mc-tab { border-radius: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.mc-tabs--underline .mc-tab--active { background: transparent; color: var(--mc-indigo); border-bottom-color: var(--mc-indigo); box-shadow: none; }
.mc-tabs--underline .mc-tab--active .mc-tab__count { background: #eef2ff; color: var(--mc-indigo); }

.mc-search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--mc-border);
    background: var(--mc-surface);
    min-width: 280px;
    color: var(--mc-text-3);
    transition: box-shadow .2s, border-color .2s;
}

.mc-search:focus-within { border-color: #a5b4fc; box-shadow: var(--mc-ring); }
.mc-search input { flex: 1; border: 0; outline: none; background: transparent; font: 14px var(--mc-font); color: var(--mc-text); min-width: 0; }
.mc-search--block { display: flex; width: 100%; min-width: 0; }

.mc-segmented {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: var(--mc-surface-2);
    border: 1px solid var(--mc-border);
    flex-wrap: wrap;
}

.mc-segmented button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--mc-text-2);
    font: 600 13px var(--mc-font);
    cursor: pointer;
    transition: all .15s;
}

.mc-segmented button:disabled { cursor: not-allowed; opacity: .6; }
.mc-segmented button.is-active { background: var(--mc-surface); color: var(--mc-indigo); box-shadow: var(--mc-shadow-sm); }
.mc-segmented button.is-active.is-success { color: var(--mc-success); background: var(--mc-success-bg); }
.mc-segmented button.is-active.is-danger { color: var(--mc-danger); background: var(--mc-danger-bg); }

.mc-segmented--lg { display: flex; }
.mc-segmented--lg button { flex: 1; justify-content: center; height: 46px; font-size: 13px; }

.mc-segmented--stack { display: flex; flex-direction: column; }
.mc-segmented--stack button { justify-content: flex-start; }


/* ─────────────────────────────────────────────────────────────────────
   8. TABLAS
   ───────────────────────────────────────────────────────────────────── */
.mc-table-wrap { width: 100%; overflow-x: auto; }
.mc-table-wrap--modal { max-height: calc(100vh - 450px); overflow-y: auto; border: 1px solid var(--mc-border); border-radius: var(--mc-radius-sm); }

.mc-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.mc-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 12px 12px;
    background: var(--mc-surface-2);
    border-bottom: 1px solid var(--mc-border);
    color: var(--mc-text-2);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-align: left;
    white-space: nowrap;
}

.mc-table thead th.mc-num { text-align: right; }

.mc-table td {
    padding: 12px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.mc-table tbody tr:last-child td { border-bottom: 0; }

.mc-table tfoot td {
    padding: 12px 12px;
    background: #eef2ff;
    font-weight: 600;
    border-top: 1px solid #c7d2fe;
    position: sticky;
    bottom: 0;
}

.mc-table--compact td,
.mc-table--compact thead th { padding: 9px 12px; }

.mc-row { cursor: pointer; transition: background .15s; }
.mc-row:hover td { background: #f5f7ff; }
.mc-row--danger td { background: #fff7f7; }
.mc-row--disabled td { color: var(--mc-text-3); background: var(--mc-surface-2); cursor: not-allowed; }

.mc-group-row td {
    background: var(--mc-aurora-soft);
    color: var(--mc-indigo);
    font-weight: 600;
    font-size: 12.5px;
}

.mc-group-row .material-symbols-outlined { font-size: 15px; margin-right: 6px; }

.mc-actions { text-align: right; white-space: nowrap; }

/* Búsqueda de clientes del wizard: nombre en una línea, montos alineados. */
/* Lista de microcréditos (/MicroCredits): compacta y legible.
   Cifras secundarias (facturado, cobrado, en cero) en gris; saldo y
   disponible resaltados; disponible negativo en rojo. */
.mc-table--micros { font-size: 12.5px; }
.mc-table--micros thead th { padding: 10px 10px; font-size: 10.5px; }
.mc-table--micros td { padding: 9px 10px; }
.mc-table--micros thead th:first-child, .mc-table--micros td:first-child { padding-left: 16px; }
.mc-table--micros thead th:last-child, .mc-table--micros td:last-child { padding-right: 14px; }

.mc-table--micros .mc-avatar { width: 32px; height: 32px; border-radius: 10px; font-size: 11px; box-shadow: none; }
.mc-table--micros .mc-customer { gap: 10px; }
.mc-table--micros .mc-customer > div { max-width: 280px; }
.mc-table--micros .mc-customer strong { font-size: 12.5px; color: #1e293b; }
.mc-table--micros .mc-customer small { font-size: 11px; }

.mc-cell-person { min-width: 130px; max-width: 190px; color: var(--mc-text-2); line-height: 1.3; }
.mc-cell-term { white-space: nowrap; color: var(--mc-text-2); }
.mc-cell-soft { color: var(--mc-text-2); }
.mc-cell-strong { font-weight: 600; color: #1e293b; }

.mc-table--micros .mc-amount-chip { padding: 3px 9px; font-size: 12.5px; white-space: nowrap; }
.mc-amount-chip--negative { background: var(--mc-danger-bg, #fef2f2); color: var(--mc-danger); }
.mc-table--micros .mc-num .mc-pill { margin-top: 4px; }
.mc-table--micros .mc-icon-btn { width: 30px; height: 30px; }

.mc-table--customers { table-layout: fixed; }
.mc-table--customers .mc-col-money { width: 108px; }
.mc-table--customers .mc-col-action { width: 44px; }
.mc-table--customers thead th { padding: 10px 12px; font-size: 11px; }
.mc-table--customers td { padding: 9px 12px; }
.mc-table--customers td:first-child { overflow: hidden; }
.mc-table--customers .mc-customer { gap: 10px; }
.mc-table--customers .mc-customer strong { font-size: 13px; font-weight: 600; color: var(--mc-text); }
.mc-table--customers .mc-customer small { font-size: 11px; letter-spacing: .02em; }
.mc-table--customers td.mc-num { color: var(--mc-text); }
.mc-table--customers .mc-actions { padding-left: 0; }

.mc-zero { color: var(--mc-border-strong) !important; }

.mc-row-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: var(--mc-text-3);
    transition: all .15s var(--mc-ease);
}

.mc-row-icon .material-symbols-outlined { font-size: 18px; }
.mc-row-icon--go { color: var(--mc-indigo); background: var(--mc-info-bg); }
.mc-row:hover .mc-row-icon--go { color: #fff; background: var(--mc-aurora); transform: translateX(2px); }
.mc-row--disabled .mc-customer strong { color: var(--mc-text-3); }
.mc-row--disabled .mc-avatar { background: var(--mc-border-strong); box-shadow: none; }
.mc-table--customers .mc-row--disabled td.mc-num { color: var(--mc-text-3); }
.mc-actions .mc-icon-btn + .mc-icon-btn { margin-left: 6px; }

.mc-input-amount {
    width: 150px;
    height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--mc-border-strong);
    font: 600 14px var(--mc-font);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.mc-input-amount:focus { outline: none; border-color: #a5b4fc; box-shadow: var(--mc-ring); }


/* ─────────────────────────────────────────────────────────────────────
   9. FORMULARIOS
   ───────────────────────────────────────────────────────────────────── */
.mc-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.mc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mc-field--grow { flex: 1; }
.mc-field--span2 { grid-column: span 2; }
.mc-field--span3 { grid-column: 1 / -1; }
.mc-field--inline { flex-direction: row; align-items: center; gap: 10px; }

.mc-field > span { font-size: 11.5px; font-weight: 600; color: var(--mc-text-2); }
.mc-field > span em { color: var(--mc-danger); font-style: normal; }

.mc-field input,
.mc-field select,
.mc-field textarea {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--mc-border-strong);
    background: var(--mc-surface);
    font: 14px var(--mc-font);
    color: var(--mc-text);
    transition: border-color .15s, box-shadow .15s;
}

.mc-field textarea { resize: vertical; }
.mc-field input:focus,
.mc-field select:focus,
.mc-field textarea:focus { outline: none; border-color: #a5b4fc; box-shadow: var(--mc-ring); }
.mc-field input:disabled,
.mc-field select:disabled,
.mc-field textarea:disabled { background: var(--mc-surface-2); color: var(--mc-text-2); }

.mc-field--inline input { width: 170px; text-align: right; font-weight: 600; }

.mc-fieldset {
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    padding: 15px;
    margin: 0;
    background: var(--mc-surface);
}

.mc-fieldset legend {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mc-indigo);
}

.mc-code-input { letter-spacing: .4em; text-transform: uppercase; font-weight: 600 !important; text-align: center; }

.mc-verified {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--mc-success-bg);
    color: var(--mc-success);
    font-weight: 600;
    font-size: 13px;
}

.mc-available {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 40px;
    padding: 6px 12px;
    border-radius: 10px;
    background: var(--mc-aurora-soft);
}

.mc-available span { font-size: 11px; font-weight: 600; color: var(--mc-text-2); text-transform: uppercase; letter-spacing: .04em; }
.mc-available strong { font-size: 16px; color: var(--mc-indigo); font-variant-numeric: tabular-nums; }

.mc-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--mc-radius-sm);
    border: 1px dashed #a5b4fc;
    background: #f5f7ff;
    font-size: 13px;
    cursor: pointer;
}

.mc-check input { width: 20px; height: 20px; accent-color: var(--mc-indigo); margin-top: 1px; flex: none; }

.mc-details { border-top: 1px dashed var(--mc-border); padding-top: 8px; }
.mc-details summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--mc-indigo); margin-bottom: 8px; }
.mc-details[open] { display: flex; flex-direction: column; gap: 8px; }


/* ─────────────────────────────────────────────────────────────────────
   10. MODAL (contenido)
   ───────────────────────────────────────────────────────────────────── */
.mc-modal {
    font-family: var(--mc-font);
    color: var(--mc-text);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mc-modal__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.mc-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--mc-border);
}

.mc-modal__footer .mc-muted { margin-right: auto; font-size: 12.5px; }

.mc-detail-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.mc-detail-head__copy { flex: 1; min-width: 220px; }
.mc-detail-head__copy h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.mc-detail-head__copy p { color: var(--mc-text-2); font-size: 12.5px; margin-top: 2px; }
.mc-detail-head__status { display: flex; gap: 8px; flex-wrap: wrap; }

.mc-detail-amounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.mc-detail-amounts > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 12px;
    border-radius: var(--mc-radius-sm);
    background: var(--mc-surface-2);
    border: 1px solid var(--mc-border);
    min-width: 0;
}

.mc-detail-amounts span { font-size: 11px; font-weight: 600; color: var(--mc-text-2); text-transform: uppercase; letter-spacing: .04em; }
.mc-detail-amounts strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }

.mc-detail-amounts__hero { background: var(--mc-aurora) !important; border: 0 !important; }
.mc-detail-amounts__hero span { color: rgba(255, 255, 255, .8); }
.mc-detail-amounts__hero strong { color: #fff; font-size: 16px; }

.mc-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }

.mc-info-card {
    padding: 15px;
    border-radius: var(--mc-radius);
    border: 1px solid var(--mc-border);
    background: var(--mc-surface);
}

.mc-info-card h4 { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mc-indigo); margin-bottom: 12px; }

.mc-info-card dl,
.mc-ref__data {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    margin: 0;
    font-size: 13px;
}

.mc-info-card dt,
.mc-ref__data dt { color: var(--mc-text-3); font-size: 11.5px; font-weight: 600; align-self: center; }
.mc-info-card dd,
.mc-ref__data dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* Modales anchos (detalle, facturas): MicroCreditUi.WideDialog en ModalOptions.CssClass. */
.md-panel.mc-dialog--wide { max-width: min(1180px, calc(100vw - 32px)); }

/* Cifras del detalle: la etiqueta en una línea */
.mc-detail-amounts { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.mc-detail-amounts span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Tablas dentro de los modales: más compactas */
.mc-modal .mc-table { font-size: 12.5px; }
.mc-modal .mc-table thead th { padding: 9px 10px; font-size: 10.5px; }
.mc-modal .mc-table td,
.mc-modal .mc-table tfoot td { padding: 8px 10px; }
.mc-modal .mc-table td:not(.mc-num) { line-height: 1.3; }

/* Cliente en dos líneas: nombre y NIT pequeño debajo */
.mc-doc-client { display: flex; flex-direction: column; min-width: 160px; }
.mc-doc-client strong { font-weight: 600; color: var(--mc-text); }
.mc-doc-client small { font-size: 10.5px; color: var(--mc-text-3); }

/* Facturas dentro del detalle: sin segundo scroll, el modal ya hace scroll. */
.mc-modal .mc-modal .mc-table-wrap--modal { max-height: none; }


/* ─────────────────────────────────────────────────────────────────────
   11. WIZARD
   ───────────────────────────────────────────────────────────────────── */
.mc-wizard { gap: 20px; }

.mc-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.mc-step { position: relative; }

.mc-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 21px;
    left: calc(50% + 26px);
    right: calc(-50% + 26px);
    height: 2px;
    background: var(--mc-border);
    border-radius: 2px;
}

.mc-step.is-done:not(:last-child)::after { background: var(--mc-aurora); }

.mc-step button {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: 0;
    padding: 0;
    font-family: var(--mc-font);
    cursor: pointer;
}

.mc-step button:disabled { cursor: not-allowed; }

.mc-step__dot {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--mc-surface-2);
    border: 2px solid var(--mc-border);
    color: var(--mc-text-3);
    font-weight: 700;
    transition: all .25s var(--mc-ease);
}

.mc-step__label { font-size: 11.5px; font-weight: 600; color: var(--mc-text-3); text-align: center; }

.mc-step.is-done .mc-step__dot { background: #eef2ff; border-color: #a5b4fc; color: var(--mc-indigo); }
.mc-step.is-current .mc-step__dot {
    background: var(--mc-aurora);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 22px -10px rgba(79, 70, 229, .8);
    transform: scale(1.06);
}

.mc-step.is-current .mc-step__label,
.mc-step.is-done .mc-step__label { color: var(--mc-text); }

.mc-wizard-customer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--mc-radius);
    background: var(--mc-aurora-soft);
    border: 1px solid #e0e7ff;
}

.mc-wizard-customer > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mc-wizard-customer small { color: var(--mc-text-2); }

.mc-wizard-section { display: flex; flex-direction: column; gap: 16px; animation: mc-rise .35s var(--mc-ease) both; }

.mc-search-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.mc-search-form .mc-field { min-width: 200px; }

.mc-doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.mc-doc {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 19px 12px;
    border-radius: var(--mc-radius);
    border: 1px solid var(--mc-border);
    background: linear-gradient(180deg, #fff, #f8faff);
}

.mc-doc .material-symbols-outlined {
    font-size: 26px;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--mc-aurora-soft);
    color: var(--mc-indigo);
    margin-bottom: 4px;
}

.mc-doc small { color: var(--mc-text-2); }


/* ─────────────────────────────────────────────────────────────────────
   12. REFERENCIAS Y LÍNEA DE TIEMPO
   ───────────────────────────────────────────────────────────────────── */
.mc-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}

.mc-ref {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: var(--mc-radius);
    border: 1px solid var(--mc-border);
    border-top: 4px solid var(--mc-border-strong);
    background: var(--mc-surface);
    box-shadow: var(--mc-shadow-sm);
}

.mc-ref--complete { border-top-color: var(--mc-blue); }
.mc-ref--incomplete { border-top-color: #fbbf24; }
.mc-ref--verified { border-top-color: var(--mc-success); background: linear-gradient(180deg, #f0fdf4 0%, #fff 40%); }

.mc-ref__head { display: flex; align-items: center; gap: 10px; }
.mc-ref__head strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mc-ref__number {
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: var(--mc-aurora);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
}

.mc-ref--verified .mc-ref__number { background: linear-gradient(135deg, #059669, #10b981); }
.mc-ref__data a { color: var(--mc-indigo); font-weight: 600; text-decoration: none; }
.mc-ref__note { font-size: 12.5px; color: var(--mc-text-2); font-style: italic; }

.mc-timeline {
    list-style: none;
    margin: 4px 0 0;
    padding: 0 0 0 14px;
    border-left: 2px solid var(--mc-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mc-timeline__item { position: relative; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }

.mc-timeline__item::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mc-text-3);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--mc-border);
}

.mc-timeline__item--recognized::before { background: var(--mc-success); }
.mc-timeline__item--notrecognized::before { background: var(--mc-danger); }
.mc-timeline__item--noanswer::before { background: var(--mc-warning); }

.mc-timeline__title { font-weight: 600; }
.mc-timeline__meta { font-size: 11px; color: var(--mc-text-3); }
.mc-timeline__item p { color: var(--mc-text-2); }


/* Wizard · datos bloqueados hasta validar el correo */
.mc-gate-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--mc-warning);
    background: var(--mc-warning-bg);
    color: var(--mc-warning);
}

.mc-gate-notice p { margin: 0; font-size: 12.5px; color: var(--mc-text-2); }
.mc-gated { display: flex; flex-direction: column; gap: inherit; }
.mc-gated.is-locked { opacity: .5; pointer-events: none; user-select: none; }

/* Contacto reemplazado (historial) */
.mc-ref--replaced { border-top-color: var(--mc-border); background: var(--mc-surface-2); opacity: .75; }
.mc-ref--replaced .mc-ref__number { background: var(--mc-text-3); }

/* Wizard · 2 contactos con llamada */
.mc-ref-grid--two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.mc-call {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed var(--mc-border-strong);
    background: var(--mc-surface-2);
}

.mc-call > a.mc-btn { text-decoration: none; justify-content: center; }
.mc-call__label { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--mc-text-3); }
.mc-call__actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.mc-call__hint { font-size: 12px; color: var(--mc-text-3); font-style: italic; }

.mc-segmented--sm { display: flex; }
.mc-segmented--sm button { flex: 1; justify-content: center; font-size: 12px; padding: 0 8px; }
.mc-segmented button.is-active.is-warning { color: var(--mc-warning); background: var(--mc-warning-bg); }

.mc-call-log {
    list-style: none;
    margin: 0;
    padding: 8px 0 0;
    border-top: 1px solid var(--mc-border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mc-call-log li { display: flex; flex-direction: column; gap: 1px; font-size: 12px; }
.mc-call-log strong { font-weight: 600; }
.mc-call-log small { font-size: 11px; color: var(--mc-text-3); }
.mc-call-log p {
    margin: 0;
    font-size: 11px;
    color: var(--mc-text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Wizard · tipo de persona según SAP */
.mc-person-type {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--mc-border);
    background: var(--mc-aurora-soft);
    color: var(--mc-indigo);
}

.mc-person-type strong { font-size: 13.5px; font-weight: 600; }
.mc-person-type small { margin-left: auto; font-size: 11px; color: var(--mc-text-3); text-transform: uppercase; letter-spacing: .04em; }

/* =============================================================================
   Wizard · paso 1 · tabla de clientes de SAP
   Columnas: Cliente | Compras (3 meses en una tira) | Cupo SAP | Estado | Acción
   ============================================================================= */

/* ── Resumen + filtro rápido sobre la tabla ── */
.mc-cust-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 10px;
}

.mc-cust-toolbar__count {
    font-size: 12.5px;
    color: var(--mc-text-2);
}

    .mc-cust-toolbar__count strong { color: var(--mc-text); }

.mc-cust-filter {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--mc-border);
    border-radius: 999px;
    background: var(--mc-surface-2);
}

.mc-cust-filter__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--mc-text-2);
    cursor: pointer;
    transition: background .15s, color .15s;
}

    /* Contador dentro de cada botón */
    .mc-cust-filter__btn span {
        min-width: 20px;
        padding: 1px 6px;
        border-radius: 999px;
        background: var(--mc-border);
        font-size: 11px;
        text-align: center;
    }

    .mc-cust-filter__btn:hover { color: var(--mc-text); }

    .mc-cust-filter__btn.is-active {
        background: #fff;
        color: var(--mc-indigo);
        box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
    }

    .mc-cust-filter__btn--ok.is-active span { background: var(--mc-success-bg); color: var(--mc-success); }
    .mc-cust-filter__btn--blocked.is-active span { background: var(--mc-warning-bg); color: var(--mc-warning); }

/* ── Anchos de columna ── */
.mc-table--customers .mc-col-months { width: 236px; }
.mc-table--customers .mc-col-money { width: 104px; }
.mc-table--customers .mc-col-status { width: 178px; }
.mc-table--customers .mc-col-action { width: 92px; }

.mc-table--customers td { vertical-align: middle; }

/* ── Cliente: nombre completo hasta 2 líneas (no se corta con "…") ── */
.mc-cust-name {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

    .mc-cust-name strong {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.3;
        white-space: normal;
        word-break: break-word;
    }

    .mc-cust-name small {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        color: var(--mc-text-3);
    }

/* Chip "Natural" / "Jurídica" */
.mc-cust-type {
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--mc-surface-2);
    border: 1px solid var(--mc-border);
    font-size: 10.5px;
    color: var(--mc-text-2);
}

/* ── Compras por mes: tira de 3 casillas ── */
.mc-month-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}

.mc-month {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 4px 2px;
    border-radius: 8px;
    border: 1px solid var(--mc-border);
    background: var(--mc-surface-2);
    line-height: 1.15;
}

    .mc-month small {
        font-size: 9.5px;
        font-weight: 700;
        letter-spacing: .05em;
        color: var(--mc-text-3);
    }

    .mc-month strong {
        font-size: 12px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }

    /* Cumple el mínimo del mes */
    .mc-month.is-ok { background: var(--mc-success-bg); border-color: #a7f3d0; }
    .mc-month.is-ok strong { color: var(--mc-success); }

    /* Compró, pero menos del mínimo */
    .mc-month.is-short { background: var(--mc-danger-bg); border-color: #fecaca; }
    .mc-month.is-short strong { color: var(--mc-danger); }

    /* Sin compras */
    .mc-month.is-empty strong { color: var(--mc-border-strong); }

/* ── Estado ── */
.mc-cust-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

    .mc-cust-status .material-symbols-outlined { font-size: 15px; }

.mc-cust-status--ok { color: var(--mc-success); background: var(--mc-success-bg); border: 1px solid #a7f3d0; }
.mc-cust-status--blocked { color: var(--mc-warning); background: var(--mc-warning-bg); border: 1px solid #fde68a; }

/* Asesor bajo el estado */
.mc-cust-seller {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11.5px;
    color: var(--mc-text-2);
}

.mc-cust-seller--own { color: var(--mc-indigo); font-weight: 600; }

/* ── Acción "Elegir" (solo filas disponibles) ── */
.mc-cust-select {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 5px 8px 5px 12px;
    border-radius: 999px;
    background: var(--mc-info-bg);
    color: var(--mc-indigo);
    font-size: 12px;
    font-weight: 600;
    transition: background .15s, color .15s, transform .15s;
}

    .mc-cust-select .material-symbols-outlined { font-size: 18px; }

.mc-row:hover .mc-cust-select {
    background: var(--mc-aurora);
    color: #fff;
    transform: translateX(2px);
}

/* Cupo SAP mayor que cero: es la razón del bloqueo */
.mc-table--customers td.mc-num--short { color: var(--mc-danger); font-weight: 600; }

/* Filas bloqueadas: más tenues, pero el estado se sigue leyendo */
.mc-row--disabled .mc-month,
.mc-row--disabled .mc-cust-type { opacity: .75; }

/* Texto solo para lectores de pantalla */
.mc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Pantallas angostas: se oculta el cupo SAP (el estado ya dice si tiene cupo) */
@media (max-width: 820px) {
    .mc-table--customers .mc-col-money,
    .mc-table--customers th:nth-child(3),
    .mc-table--customers td:nth-child(3) { display: none; }
}


/* ─────────────────────────────────────────────────────────────────────
   13. CUPOS (BUDGETS)
   ───────────────────────────────────────────────────────────────────── */
.mc-budget-list { display: flex; flex-direction: column; gap: 18px; }

.mc-budget { display: flex; flex-direction: column; gap: 18px; animation: mc-rise .45s var(--mc-ease) both; }

.mc-budget__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mc-budget__title { display: flex; align-items: center; gap: 12px; }
.mc-budget__title .mc-kpi__icon { margin: 0; width: 44px; height: 44px; }
.mc-budget__title h3 { font-size: 16px; font-weight: 700; }
.mc-budget__amount { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.mc-budget__bar { display: flex; flex-direction: column; gap: 8px; }
.mc-budget__legend { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--mc-text-2); flex-wrap: wrap; }
.mc-budget__legend span { display: inline-flex; align-items: center; }

.mc-budget__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }

.mc-assign {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border-radius: var(--mc-radius);
    background: var(--mc-aurora-soft);
    border: 1px solid #e0e7ff;
}

.mc-assign h4 { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mc-indigo); }
.mc-assign p { font-size: 12.5px; }

.mc-location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 14px;
    padding: 14px;
}

.mc-location-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    border-radius: var(--mc-radius);
    border: 1px solid var(--mc-border);
    background: linear-gradient(180deg, #fff, #f8faff);
    text-align: left;
    font-family: var(--mc-font);
    color: var(--mc-text);
    cursor: pointer;
    transition: transform .2s var(--mc-ease), box-shadow .2s, border-color .2s;
}

.mc-location-card:hover { transform: translateY(-2px); box-shadow: var(--mc-shadow-lg); border-color: #c7d2fe; }
.mc-location-card__head { display: flex; align-items: center; gap: 8px; color: var(--mc-indigo); }
.mc-location-card__head strong { color: var(--mc-text); font-size: 14px; }
.mc-location-card__amount { font-size: 21px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mc-location-card small { font-size: 11.5px; }

.mc-location-card__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 0; }
.mc-location-card__stats div { display: flex; flex-direction: column; }
.mc-location-card__stats dt { font-size: 11px; color: var(--mc-text-3); font-weight: 600; }
.mc-location-card__stats dd { margin: 0; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }


/* ─────────────────────────────────────────────────────────────────────
   14. VERIFICACIÓN (CARTERA)
   ───────────────────────────────────────────────────────────────────── */
.mc-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 15px;
    border-radius: var(--mc-radius);
    flex-wrap: wrap;
}

.mc-banner--danger { background: var(--mc-danger-bg); border: 1px solid #fecaca; color: #991b1b; }
.mc-banner > .material-symbols-outlined { font-size: 24px; }
.mc-banner__copy { display: flex; flex-direction: column; flex: 1; min-width: 240px; font-size: 12.5px; }
.mc-banner__copy strong { font-size: 13px; }
.mc-banner__list { display: flex; gap: 8px; flex-wrap: wrap; }

.mc-verify-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }

.mc-verify-list {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.mc-verify-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    font-family: var(--mc-font);
    color: var(--mc-text);
    text-align: left;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.mc-verify-item:hover { background: var(--mc-surface-2); }
.mc-verify-item.is-selected { background: var(--mc-aurora-soft); border-color: #c7d2fe; }

.mc-verify-item__copy { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mc-verify-item__copy strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-verify-item__copy small { font-size: 11.5px; color: var(--mc-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-verify-item__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 11.5px; }

.mc-verify-detail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.mc-approval-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 12px;
    border-radius: var(--mc-radius-sm);
    background: var(--mc-surface-2);
    font-size: 13px;
    font-weight: 600;
}

.mc-approval-progress__slot { color: var(--mc-text-3); }
.mc-approval-progress__slot.is-done { color: var(--mc-success); }
.mc-approval-progress__slot .material-symbols-outlined { font-size: 22px; }

.mc-followup {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: var(--mc-radius-sm);
    background: var(--mc-surface-2);
    border: 1px solid var(--mc-border);
}

.mc-followup__actions { display: flex; justify-content: flex-end; gap: 8px; }

.mc-decision { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mc-decision > p { font-size: 12.5px; }
.mc-decision__actions { display: flex; gap: 10px; margin-left: auto; }
.mc-decision textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #fecaca;
    font: 14px var(--mc-font);
    resize: vertical;
}

.mc-decision textarea:focus { outline: none; box-shadow: 0 0 0 4px rgba(220, 38, 38, .12); }


/* ─────────────────────────────────────────────────────────────────────
   15. ESTADOS VACÍOS Y SKELETON
   ───────────────────────────────────────────────────────────────────── */
.mc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 34px 17px;
    color: var(--mc-text-2);
    text-align: center;
    font-size: 13px;
}

.mc-empty .material-symbols-outlined {
    font-size: 26px;
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--mc-aurora-soft);
    color: var(--mc-indigo);
}

.mc-empty--large {
    padding: 54px 17px;
    background: var(--mc-surface);
    border: 1px dashed var(--mc-border-strong);
    border-radius: var(--mc-radius-lg);
}

.mc-empty--large h3 { font-size: 16px; color: var(--mc-text); }

.mc-skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }

.mc-skeleton {
    height: 120px;
    border-radius: var(--mc-radius);
    background: linear-gradient(90deg, #eef2ff 0%, #f8fafc 40%, #eef2ff 80%);
    background-size: 200% 100%;
    animation: mc-shimmer 1.4s linear infinite;
}

.mc-skeleton--tall { height: 360px; }


/* ─────────────────────────────────────────────────────────────────────
   ANIMACIONES
   ───────────────────────────────────────────────────────────────────── */
@keyframes mc-rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@keyframes mc-shimmer {
    to { background-position: -200% 0; }
}

@keyframes mc-pulse {
    0% { box-shadow: 0 0 0 0 rgba(103, 232, 249, .7); }
    70% { box-shadow: 0 0 0 8px rgba(103, 232, 249, 0); }
    100% { box-shadow: 0 0 0 0 rgba(103, 232, 249, 0); }
}


/* ─────────────────────────────────────────────────────────────────────
   16. RESPONSIVE Y MOVIMIENTO REDUCIDO
   ───────────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .mc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mc-verify-layout { grid-template-columns: 1fr; }
    .mc-verify-list { position: static; max-height: 320px; }
    .mc-budget__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .mc-kpis { grid-template-columns: 1fr; }
    .mc-hero { padding: 20px 17px; }
    .mc-form-grid { grid-template-columns: 1fr; }
    .mc-field--span2, .mc-field--span3 { grid-column: auto; }
    .mc-doc-grid { grid-template-columns: 1fr; }
    .mc-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .mc-step__label { font-size: 11px; }
    .mc-step:not(:last-child)::after { display: none; }
    .mc-search { min-width: 0; width: 100%; }
    .mc-toolbar { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
    .mc-page *, .mc-modal * { animation: none !important; transition: none !important; }
}


/* ─────────────────────────────────────────────────────────────────────
   17. CREAR CUPO DE SEDE (Budgets)
   ───────────────────────────────────────────────────────────────────── */
.mc-new-location {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    border: 1px dashed #a5b4fc;
    background: linear-gradient(135deg, #fff 0%, #f5f3ff 100%);
}

.mc-new-location__copy { display: flex; align-items: center; gap: 12px; }
.mc-new-location__copy .mc-kpi__icon { margin: 0; width: 44px; height: 44px; }
.mc-new-location__copy h3 { font-size: 15px; font-weight: 700; }
.mc-new-location__form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.mc-new-location__form .mc-field { min-width: 200px; }


/* ─────────────────────────────────────────────────────────────────────
   18. ESTADÍSTICAS (/MicroCredits/Statistics) · prefijo mc-st-
   ───────────────────────────────────────────────────────────────────── */
.mc-st { gap: 18px; }

/* Filtros */
.mc-st-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.mc-st-filters .mc-field { flex: 1 1 160px; min-width: 150px; }
.mc-st-filters .mc-st-filters__date { flex: 0 1 150px; }
.mc-st-filters__actions { display: flex; gap: 8px; margin-left: auto; }

.mc-st-applied {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--mc-text-2);
    max-width: 100%;
}

.mc-st-applied .material-symbols-outlined { font-size: 16px; color: var(--mc-indigo); }

/* KPIs */
.mc-st-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
    gap: 14px;
}

.mc-st-kpis .mc-kpi__value { font-size: 22px; }
.mc-st-kpis .mc-kpi__hint { color: var(--mc-text-2); flex-wrap: wrap; }
.mc-st-kpis .mc-meter { margin-top: 2px; }

.mc-st-up { color: var(--mc-success); font-weight: 600; }
.mc-st-down { color: var(--mc-danger); font-weight: 600; }
.mc-st-muted { color: var(--mc-text-3); }

/* Rejillas de tarjetas */
.mc-st-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
    gap: 14px;
}

.mc-st-grid--three { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.mc-st-grid > .mc-card { min-width: 0; }

.mc-st-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.mc-st-head > .material-symbols-outlined { color: var(--mc-indigo); font-size: 20px; }
.mc-st-head h2 { margin: 0; font-size: 15px; font-weight: 600; color: #1e293b; }
.mc-st-head small { margin-left: auto; font-size: 12px; color: var(--mc-text-2); }
.mc-st-head--padded { padding: 17px 17px 0; }

.mc-st-note { margin: 4px 0 0; font-size: 12px; color: var(--mc-text-2); }
.mc-st-note--padded { padding: 12px 17px 16px; margin: 0; }

/* Leyendas */
.mc-st-legend { display: inline-flex; gap: 12px; flex-wrap: wrap; }
.mc-st-legend > span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mc-text-2); }
.mc-st-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; background: var(--mc-indigo); }
.mc-st-legend i.is-light { background: #c7d2fe; }
.mc-st-legend i.is-gray { background: #cbd5e1; }
.mc-st-legend i.is-green { background: var(--mc-success); }
.mc-st-legend i.is-amber { background: #f59e0b; }
.mc-st-legend i.is-red { background: var(--mc-danger); }
.mc-st-legend--block { display: flex; margin: 16px 0 10px; }

/* Embudo */
.mc-st-funnel { display: flex; flex-direction: column; gap: 10px; }

.mc-st-funnel__row {
    display: grid;
    grid-template-columns: minmax(130px, 190px) 1fr 110px;
    gap: 10px;
    align-items: center;
    font-size: 13px;
}

.mc-st-funnel__track { height: 26px; border-radius: 8px; background: var(--mc-surface-2); overflow: hidden; }
.mc-st-funnel__bar { height: 100%; border-radius: 8px; background: var(--mc-indigo); transition: width .6s var(--mc-ease); }
.mc-st-funnel__bar--0 { background: #4338ca; }
.mc-st-funnel__bar--1 { background: #4f46e5; }
.mc-st-funnel__bar--2 { background: #2563eb; }
.mc-st-funnel__bar--3 { background: #0891b2; }
.mc-st-funnel__bar--4 { background: #059669; }
.mc-st-funnel__bar--5 { background: #047857; }

/* Tiempos */
.mc-st-stages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.mc-st-stage {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--mc-border);
    background: var(--mc-surface-2);
}

.mc-st-stage small { font-size: 12px; color: var(--mc-text-2); }
.mc-st-stage strong { font-size: 20px; font-weight: 700; color: #1e293b; }
.mc-st-stage span { font-size: 11px; color: var(--mc-text-3); }

.mc-st-total {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0 8px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--mc-aurora-soft);
    color: #312e81;
}

.mc-st-total .material-symbols-outlined { font-size: 28px; color: var(--mc-indigo); }
.mc-st-total small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--mc-indigo); }
.mc-st-total strong { font-size: 22px; font-weight: 700; }

/* Barras mensuales */
.mc-st-bars {
    display: grid;
    gap: 8px;
    align-items: end;
    height: 190px;
    padding: 0 4px;
    border-bottom: 1px solid var(--mc-border);
}

.mc-st-bars__group { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 100%; }
.mc-st-bars__bar { width: 42%; max-width: 18px; border-radius: 4px 4px 0 0; background: var(--mc-indigo); transition: height .6s var(--mc-ease); }
.mc-st-bars__bar.is-light { background: #c7d2fe; }

.mc-st-axis { display: grid; gap: 8px; padding: 6px 4px 0; font-size: 11px; color: var(--mc-text-2); text-align: center; }
.mc-st-axis span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Línea de mora */
.mc-st-line { width: 100%; height: auto; display: block; font-family: var(--mc-font); }
.mc-st-line__grid { stroke: #f1f5f9; }
.mc-st-line__label { font-size: 11px; fill: var(--mc-text-2); }
.mc-st-line__target { stroke: var(--mc-warning); stroke-dasharray: 5 5; }
.mc-st-line__target-label { font-size: 11px; fill: #b45309; }
.mc-st-line__path { fill: none; stroke: var(--mc-danger); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.mc-st-line__dot { fill: #fff; stroke: var(--mc-danger); stroke-width: 2; }

/* Barras horizontales */
.mc-st-hbars { display: flex; flex-direction: column; gap: 12px; font-size: 13px; }

.mc-st-hbars__row { display: grid; grid-template-columns: minmax(90px, 140px) 1fr; gap: 10px; align-items: center; }
.mc-st-hbars__row--value { grid-template-columns: minmax(90px, 150px) 1fr 60px; }

.mc-st-hbars__track { position: relative; height: 22px; border-radius: 6px; background: var(--mc-surface-2); }
.mc-st-hbars__bar { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--mc-indigo); transition: width .6s var(--mc-ease); }
.mc-st-hbars__bar.is-light { background: #c7d2fe; }
.mc-st-hbars__bar.is-danger { background: var(--mc-danger); }
.mc-st-hbars__bar.is-warning { background: #f97316; }
.mc-st-hbars__target { position: absolute; top: -4px; bottom: -4px; border-left: 2px dashed var(--mc-warning); }

.mc-st-pair { display: flex; flex-direction: column; gap: 3px; }
.mc-st-pair__bar { height: 9px; border-radius: 4px; transition: width .6s var(--mc-ease); }
.mc-st-pair__bar.is-gray { background: #cbd5e1; }
.mc-st-pair__bar.is-green { background: var(--mc-success); }

.mc-st-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tablas
   Compactas para que quepan en el ancho sin scroll horizontal: letra más
   pequeña y menos relleno. Las cifras van en una línea; los textos (cliente,
   sede, asesor, encabezados) pueden partirse en dos. */
.mc-st-table { font-size: 11.5px; }

.mc-st-table thead th {
    padding: 8px 7px;
    font-size: 10px;
    letter-spacing: .03em;
    line-height: 1.25;
    white-space: normal;
    vertical-align: bottom;
}

.mc-st-table td,
.mc-st-table tfoot td { padding: 7px 7px; line-height: 1.3; white-space: normal; }

.mc-st-table td.mc-num { white-space: nowrap; }
.mc-st-table thead th:first-child, .mc-st-table td:first-child { padding-left: 14px; }
.mc-st-table thead th:last-child, .mc-st-table td:last-child { padding-right: 14px; }

.mc-st-table strong { font-weight: 600; }
.mc-st-table .mc-pill { padding: 2px 7px; font-size: 10.5px; }
.mc-st-table .mc-pill + .mc-pill { margin: 2px 0 0 3px; }
.mc-st-table .mc-icon-btn { width: 28px; height: 28px; border-radius: 8px; }
.mc-st-table .mc-icon-btn .material-symbols-outlined { font-size: 16px; }
.mc-st-table .mc-st-sort.is-active::after { font-size: 8px; }

.mc-st-meter { display: flex; align-items: center; gap: 6px; min-width: 90px; }
.mc-st-meter .mc-meter { flex: 1; min-width: 34px; }
.mc-st-meter span { font-size: 10.5px; color: var(--mc-text-2); white-space: nowrap; }

.mc-st-client { display: flex; flex-direction: column; min-width: 130px; }
.mc-st-client strong { font-weight: 600; }
.mc-st-client small { font-size: 10px; color: var(--mc-text-3); }

/* Pantallas medianas (portátiles): un poco más compacto todavía. */
@media (max-width: 1440px) {
    .mc-st-table { font-size: 11px; }
    .mc-st-table thead th { padding: 7px 5px; font-size: 9.5px; letter-spacing: .02em; }
    .mc-st-table td, .mc-st-table tfoot td { padding: 6px 5px; }
    .mc-st-table thead th:first-child, .mc-st-table td:first-child { padding-left: 10px; }
    .mc-st-table thead th:last-child, .mc-st-table td:last-child { padding-right: 10px; }
    .mc-st-table .mc-pill { padding: 1px 6px; font-size: 10px; }
}

.mc-st-sort {
    border: 0;
    padding: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.mc-st-sort:hover { color: var(--mc-indigo); }
.mc-st-sort.is-active { color: var(--mc-indigo); }
.mc-st-sort.is-active::after { content: " ▼"; font-size: 9px; }

/* Cartera */
.mc-st-stack { display: flex; height: 30px; border-radius: 10px; overflow: hidden; background: var(--mc-surface-2); }
.mc-st-stack__part { height: 100%; transition: width .6s var(--mc-ease); }
.mc-st-stack__part.is-green { background: var(--mc-success); }
.mc-st-stack__part.is-amber { background: #f59e0b; }
.mc-st-stack__part.is-red { background: var(--mc-danger); }

.mc-st-age--0 { background: var(--mc-success) !important; }
.mc-st-age--1 { background: #f59e0b !important; }
.mc-st-age--2 { background: #f97316 !important; }
.mc-st-age--3 { background: var(--mc-danger) !important; }
.mc-st-age--4 { background: #7f1d1d !important; }

.mc-st-ages { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }

.mc-st-age {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--mc-border);
}

.mc-st-age strong { font-size: 18px; font-weight: 700; color: #1e293b; }
.mc-st-age small { font-size: 12px; color: var(--mc-text-2); }

/* Ventas */
.mc-st-impact { display: flex; flex-wrap: wrap; gap: 12px; }

.mc-st-impact > div {
    flex: 1 1 150px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--mc-border);
    background: var(--mc-surface-2);
}

.mc-st-impact small { font-size: 12px; color: var(--mc-text-2); }
.mc-st-impact strong { font-size: 24px; font-weight: 700; color: #1e293b; }
.mc-st-impact .is-after { background: var(--mc-success-bg); border-color: #a7f3d0; }
.mc-st-impact .is-after strong { color: #065f46; }
.mc-st-impact .is-growth { background: var(--mc-success); border-color: var(--mc-success); }
.mc-st-impact .is-growth small, .mc-st-impact .is-growth strong { color: #fff; }

/* Verificación */
.mc-st-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mc-st-list li { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }

/* Detalle */
.mc-st-search { margin-left: auto; min-width: 260px; }

.mc-st-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 17px;
    border-top: 1px solid var(--mc-border);
    font-size: 12px;
    color: var(--mc-text-2);
}

.mc-st-pager span { margin-right: auto; }

@media (max-width: 768px) {
    .mc-st-grid, .mc-st-grid--three { grid-template-columns: 1fr; }
    .mc-st-filters__actions { margin-left: 0; width: 100%; }
    .mc-st-filters__actions .mc-btn { flex: 1; }
    .mc-st-funnel__row { grid-template-columns: 1fr 90px; }
    .mc-st-funnel__row > span:first-child { grid-column: 1 / -1; }
    .mc-st-stages { grid-template-columns: 1fr; }
    .mc-st-head small { margin-left: 0; width: 100%; }
    .mc-st-search { margin-left: 0; min-width: 0; width: 100%; }
    .mc-st-hbars__row, .mc-st-hbars__row--value { grid-template-columns: 1fr; }
}
