/* =====================================================
   SMB Society Dashboard — dashboard.css
   Estética: Premium · Club privado · Minimal
   ===================================================== */

/* ── CSS Custom Properties ─────────────────────────── */
.smb-dash {
    --smb-accent:      var(--smb-accent,      #2A6BFF);
    --smb-accent-soft: var(--smb-accent-soft,  #EAF0FF);

    --smb-bg:          #F7F7F9;
    --smb-surface:     #FFFFFF;
    --smb-border:      #E4E4E9;
    --smb-text-1:      #0C0C0F;
    --smb-text-2:      #4B4B57;
    --smb-text-3:      #9898A6;

    --smb-font:        'Inter', 'Helvetica Neue', Arial, sans-serif;

    font-family: var(--smb-font);
    color: var(--smb-text-1);
    background: var(--smb-bg);
    padding: 0;

    /* Full width */
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    box-sizing: border-box;
}

.smb-dash *, .smb-dash *::before, .smb-dash *::after {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

/* ── Inner content width ───────────────────────────── */
.smb-dash__header,
.smb-dash__cards {
    max-width: 1160px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
}

/* ── LOGIN ─────────────────────────────────────────── */
.smb-dash-login-notice {
    font-family: var(--smb-font);
    color: var(--smb-text-2);
    padding: 32px;
    text-align: center;
    font-size: 0.9rem;
}

/* ══════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════ */
.smb-dash__header {
    padding-top: 56px;
    padding-bottom: 48px;
}

.smb-dash__date {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--smb-text-3);
    margin: 0 0 14px;
}

.smb-dash__greeting {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0 0 10px;
    color: var(--smb-text-1);
}

.smb-dash__name {
    font-weight: 700;
    color: var(--smb-accent);
}

.smb-dash__sub {
    font-size: 0.95rem;
    color: var(--smb-text-2);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* ══════════════════════════════════════════════════
   STAT CARDS
══════════════════════════════════════════════════ */
.smb-dash__cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding-bottom: 64px;
}

.smb-dash__card {
    background: var(--smb-accent);
    border-radius: 16px;
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
    animation: smb-card-glow 8s ease-in-out infinite;
    /* Stagger glow per card via CSS custom counter */
}

/* Stagger glow animation so cards pulse at different phases */
.smb-dash__card:nth-child(1) { animation-delay: 0s; }
.smb-dash__card:nth-child(2) { animation-delay: 2s; }
.smb-dash__card:nth-child(3) { animation-delay: 4s; }
.smb-dash__card:nth-child(4) { animation-delay: 6s; }

/* Subtle inner shimmer overlay */
.smb-dash__card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.12) 0%,
        rgba(255,255,255,0.04) 50%,
        rgba(0,0,0,0.06) 100%
    );
    pointer-events: none;
}

@keyframes smb-card-glow {
    0%, 100% {
        box-shadow:
            0 4px 20px color-mix(in srgb, var(--smb-accent) 30%, transparent),
            0 1px 4px color-mix(in srgb, var(--smb-accent) 20%, transparent);
    }
    50% {
        box-shadow:
            0 8px 40px color-mix(in srgb, var(--smb-accent) 50%, transparent),
            0 2px 8px color-mix(in srgb, var(--smb-accent) 30%, transparent),
            0 0 0 1px color-mix(in srgb, var(--smb-accent) 40%, transparent);
    }
}

/* ── Card top row (label + icon) ──────────────────── */
.smb-dash__card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.smb-dash__card-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1;
}

.smb-dash__card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.smb-dash__card-icon svg {
    display: block;
}

/* ── Card value ────────────────────────────────────── */
.smb-dash__card-value {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    color: #ffffff;
    line-height: 1;
}

.smb-dash__card-unit {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — TABLET
══════════════════════════════════════════════════ */
@media (max-width: 960px) {
    .smb-dash__header,
    .smb-dash__cards {
        padding-left: 24px;
        padding-right: 24px;
    }

    .smb-dash__cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .smb-dash__header,
    .smb-dash__cards {
        padding-left: 16px;
        padding-right: 16px;
    }

    .smb-dash__header {
        padding-top: 36px;
        padding-bottom: 32px;
    }

    .smb-dash__cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding-bottom: 40px;
    }

    .smb-dash__card {
        padding: 20px 16px 18px;
        border-radius: 14px;
    }

    .smb-dash__card-top {
        margin-bottom: 12px;
    }
}

/* ══════════════════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .smb-dash__card {
        animation: none;
        box-shadow:
            0 4px 20px color-mix(in srgb, var(--smb-accent) 30%, transparent);
    }
}
