/* ============================================================
   Dashboard de muestra (alta fidelidad, réplica de Shaar)
   Usado en el hero y en "El portal por dentro".
   Sin bordes de color: relleno + sombra + tono.
   ============================================================ */

.dash-window {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.dash-chrome {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.95rem;
    background: #e4e4e4;
}
.dash-chrome i { width: 11px; height: 11px; border-radius: 50%; background: #d8dbe1; display: block; }
.dash-chrome i:nth-child(1) { background: #ff6a13; }
.dash-chrome i:nth-child(2) { background: #f0b429; }
.dash-chrome i:nth-child(3) { background: #2bb673; }
.dash-url { margin: 0 auto; display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; color: var(--muted); background: #fff; border-radius: 20px; padding: 0.22rem 0.85rem; box-shadow: 0 1px 2px rgba(16,24,40,0.035); }
.dash-url svg { width: 11px; height: 11px; opacity: 0.6; }

/* ---- Grid: sidebar + main ---- */
.dash {
    display: grid;
    grid-template-columns: 210px 1fr;
    text-align: left;
    color: var(--ink);
    font-family: var(--font-body);
    background: #fff;
}

/* ---- Sidebar ---- */
.dash-side {
    background: #fbfbfc;
    padding: 1rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    box-shadow: 1px 0 0 rgba(16, 24, 40, 0.035);
}
.dash-brand { display: flex; align-items: center; gap: 0.55rem; padding: 0.1rem 0.45rem 0.9rem; box-shadow: 0 1px 0 rgba(16, 24, 40, 0.035); }
.dash-brand img { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.dash-brand b { font-family: var(--font-display); font-size: 0.92rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1; }
.dash-brand span { display: block; font-size: 0.58rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 3px; }

.dash-search { display: flex; align-items: center; gap: 0.45rem; font-size: 0.74rem; color: var(--faint); background: #fff; border-radius: 8px; padding: 0.5rem 0.6rem; box-shadow: inset 0 0 0 1px rgba(16,24,40,0.045); }
.dash-search svg { width: 13px; height: 13px; }
.dash-search kbd { margin-left: auto; font-size: 0.6rem; background: var(--bg-soft); border-radius: 5px; padding: 0.05rem 0.32rem; color: var(--muted); }

.dash-nav { display: flex; flex-direction: column; gap: 0.05rem; }
.dash-nav a { display: flex; align-items: center; gap: 0.65rem; font-size: 0.82rem; font-weight: 500; color: #586173; padding: 0.5rem 0.65rem; border-radius: 8px; }
.dash-nav a svg { width: 16px; height: 16px; opacity: 0.65; flex-shrink: 0; }
.dash-nav a .badge { margin-left: auto; font-size: 0.6rem; font-weight: 700; background: var(--color-primary); color: #fff; min-width: 16px; height: 16px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0 0.25rem; }
.dash-nav a.on { background: rgba(var(--color-primary-rgb), 0.09); color: var(--color-primary); font-weight: 600; }
.dash-nav a.on svg { opacity: 1; color: var(--color-primary); }

.dash-user { margin-top: auto; display: flex; align-items: center; gap: 0.55rem; padding-top: 0.85rem; box-shadow: 0 -1px 0 rgba(16,24,40,0.035); }
.dash-user .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #ffb27a, var(--color-primary)); color: #fff; font-size: 0.72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dash-user b { font-size: 0.78rem; line-height: 1.2; display: block; }
.dash-user span { font-size: 0.66rem; color: var(--faint); display: block; }

/* ---- Main ---- */
.dash-main { padding: 1.4rem 1.6rem 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; background: #fff; }

.dash-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.dash-hi { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; }
.dash-date { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.dash-top-r { display: flex; align-items: center; gap: 0.5rem; }
.dash-pill { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; color: var(--text); background: #fff; border-radius: 8px; padding: 0.42rem 0.6rem; box-shadow: inset 0 0 0 1px rgba(16,24,40,0.05); }
.dash-pill svg { width: 13px; height: 13px; color: var(--muted); }
.dash-ico { position: relative; width: 32px; height: 32px; border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--muted); box-shadow: inset 0 0 0 1px rgba(16,24,40,0.05); }
.dash-ico svg { width: 16px; height: 16px; }
.dash-ico .nd { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--color-primary); box-shadow: 0 0 0 2px #fff; }

/* Banner de acción requerida */
.dash-banner { display: flex; align-items: center; gap: 1rem; background: linear-gradient(90deg, rgba(var(--color-primary-rgb), 0.08), rgba(var(--color-primary-rgb), 0.02)); border-radius: 12px; padding: 1rem 1.15rem; }
.dash-banner-ic { width: 34px; height: 34px; border-radius: 9px; background: rgba(var(--color-primary-rgb), 0.16); color: var(--color-primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dash-banner-ic svg { width: 17px; height: 17px; }
.dash-banner .bt { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-primary); display: block; margin-bottom: 0.1rem; }
.dash-banner p { font-size: 0.83rem; color: var(--text); line-height: 1.4; }
.dash-banner b { font-weight: 700; color: var(--ink); }
.dash-banner .bbtn { margin-left: auto; font-size: 0.78rem; font-weight: 600; color: #fff; background: var(--color-primary); padding: 0.5rem 0.95rem; border-radius: 8px; white-space: nowrap; box-shadow: 0 6px 14px -6px rgba(var(--color-primary-rgb), 0.5); }

/* Fila de tarjetas: balance + distribución */
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.1rem; }

.dash-balance {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    padding: 1.3rem 1.4rem 1.2rem;
    color: #fff;
    background:
        radial-gradient(130% 100% at 15% -25%, rgba(255,255,255,0.10) 0%, transparent 48%),
        radial-gradient(90% 90% at 100% 120%, rgba(var(--color-primary-rgb), 0.24) 0%, transparent 52%),
        #18140f;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.dash-bal-l { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.45); }
.dash-bal-amt { font-family: var(--font-display); font-size: 1.85rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin-top: 0.2rem; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 0.55rem; flex-wrap: wrap; }
.dash-bal-amt .cents { color: rgba(255,255,255,0.4); }
.dash-bal-chip { font-size: 0.66rem; font-weight: 700; padding: 0.16rem 0.5rem; border-radius: 20px; background: rgba(43,182,115,0.22); color: #57d39e; letter-spacing: 0; }
.dash-bal-sub { font-size: 0.74rem; color: rgba(255,255,255,0.5); margin-top: 0.3rem; }
.dash-bal-act { display: flex; gap: 0.45rem; margin-top: 0.85rem; }
.dash-bal-btn { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 600; padding: 0.42rem 0.75rem; border-radius: 8px; }
.dash-bal-btn svg { width: 12px; height: 12px; }
.dash-bal-btn.primary { background: var(--color-primary); color: #fff; box-shadow: 0 6px 14px -6px rgba(var(--color-primary-rgb), 0.6); }
.dash-bal-btn.ghost { background: rgba(255,255,255,0.10); color: rgba(255,255,255,0.85); }
.dash-bal-cl { font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.32); margin: 1rem 0 0.35rem; }
.dash-bal-chart svg { width: 100%; height: 56px; display: block; }

.dash-card { border-radius: 14px; padding: 1.2rem 1.3rem; background: var(--bg-soft); display: flex; flex-direction: column; }
.dash-card-h { display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; font-weight: 700; color: var(--ink); margin-bottom: 0.9rem; }
.dash-card-h span { font-size: 0.68rem; font-weight: 500; color: var(--muted); }
.dash-dist { display: flex; align-items: center; gap: 1rem; }
.dash-donut { position: relative; width: 92px; height: 92px; border-radius: 50%; flex-shrink: 0; background: conic-gradient(var(--color-primary) 0 50%, #ffb27a 50% 79%, #2c2a33 79% 100%); }
.dash-donut::after { content: ''; position: absolute; inset: 26%; border-radius: 50%; background: var(--bg-soft); }
.dash-donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1; }
.dash-donut-c b { font-family: var(--font-display); font-size: 1.05rem; font-weight: 800; line-height: 1; }
.dash-donut-c span { font-size: 0.56rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.dash-legend { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; flex: 1; }
.dash-legend li { display: flex; align-items: center; gap: 0.45rem; font-size: 0.74rem; color: var(--muted); }
.dash-legend li i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dash-legend li b { margin-left: auto; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Tabla de movimientos */
.dash-tbl-h { display: flex; align-items: center; justify-content: space-between; }
.dash-tbl-h b { font-size: 0.85rem; font-weight: 700; }
.dash-tbl-h a { font-size: 0.74rem; font-weight: 600; color: var(--color-primary); }
.dash-table { width: 100%; border-collapse: collapse; font-size: 0.79rem; margin-top: 0.7rem; }
.dash-table th { text-align: left; font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); font-weight: 700; padding: 0 0.45rem 0.75rem; }
.dash-table th.r, .dash-table td.r { text-align: right; }
.dash-table td { padding: 0.72rem 0.45rem; box-shadow: 0 -1px 0 rgba(16,24,40,0.04); vertical-align: middle; }
.dash-table tbody tr:first-child td { box-shadow: none; }
.dash-table .c-name { font-weight: 600; color: var(--ink); }
.dash-table .c-sub { font-size: 0.68rem; color: var(--faint); }
.dash-table .c-method { color: var(--muted); }
.dash-amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-amt.pos { color: #15915f; }
.dash-amt.neg { color: var(--ink); }
.dash-badge { display: inline-flex; align-items: center; gap: 0.32rem; font-size: 0.66rem; font-weight: 600; padding: 0.15rem 0.55rem 0.15rem 0.45rem; border-radius: 20px; }
.dash-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.dash-badge.ok { background: #e7f7ef; color: #157a52; }
.dash-badge.ok::before { background: #1fa971; }
.dash-badge.pend { background: #fff3d6; color: #8a6200; }
.dash-badge.pend::before { background: #e0a000; }

@media (max-width: 900px) {
    .dash { grid-template-columns: 1fr; }
    .dash-side { display: none; }
    .dash-grid { grid-template-columns: 1fr; }
    .dash-table .h-method, .dash-table .c-method { display: none; }
}

/* ============================================================
   Móvil (≤640px): el mockup de dashboard se siente una "captura
   encogida" en pantalla chica. Se oculta y se sustituye por
   tarjetas de features nativas (.feat-cards), compartidas por el
   hero y el portal. En tablet (641–900px) sigue el mockup apilado.
   ============================================================ */
.feat-cards { display: none; }

@media (max-width: 640px) {
    .hero-stage { display: none; }

    .feat-cards {
        display: grid;
        gap: 0.7rem;
        max-width: 460px;
        margin: 0 auto;
    }
    .feat-card {
        display: flex;
        align-items: flex-start;
        gap: 0.85rem;
        text-align: left;
        background: var(--bg-soft);
        border-radius: 14px;
        padding: 1rem 1.05rem;
    }
    .feat-ic {
        flex-shrink: 0;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: rgba(var(--color-primary-rgb), 0.12);
        color: var(--color-primary);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .feat-ic svg { width: 18px; height: 18px; }
    .feat-card b {
        display: block;
        font-family: var(--font-display);
        font-size: 0.98rem;
        font-weight: 700;
        color: var(--ink);
        margin-bottom: 0.12rem;
    }
    .feat-card p { font-size: 0.83rem; line-height: 1.5; color: var(--muted); }
}
