/* ═══════════════════════════════════════════
   Mi Club Dashboard — Premium Styles
   Chupatel © 2026
   ═══════════════════════════════════════════ */

:root {
    --mc-bg: #F5F5F7;
    --mc-card: #FFFFFF;
    --mc-text: #1A1A2E;
    --mc-dim: #6B7280;
    --mc-border: #E5E7EB;
    --mc-accent: #E31B4E;
    --mc-accent2: #C2173F;
    --mc-gold: #F59E0B;
    --mc-green: #10B981;
    --mc-radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--mc-bg);
    color: var(--mc-text);
    -webkit-font-smoothing: antialiased;
}

/* ── Login Gate ── */
.mc-login-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
    padding: 20px;
}

.mc-login-card {
    background: var(--mc-card);
    border-radius: 24px;
    padding: 48px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0,0,0,.06);
}

.mc-login-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FEE2E2, #FECDD3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.mc-login-card h2 {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: -.02em;
}

.mc-login-card p {
    font-size: 14px;
    color: var(--mc-dim);
    line-height: 1.5;
    margin-bottom: 24px;
}

.mc-login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--mc-accent), var(--mc-accent2));
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .25s;
    margin-bottom: 10px;
}

.mc-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(227,27,78,.35);
}

.mc-login-btn.secondary {
    background: #F3F4F6;
    color: var(--mc-text);
}

.mc-login-btn.secondary:hover {
    background: #E5E7EB;
    box-shadow: none;
}

.mc-login-perks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 24px;
    text-align: left;
}

.mc-perk {
    font-size: 12px;
    color: var(--mc-dim);
    font-weight: 500;
}

/* ── Dashboard Layout ── */
.mc-dashboard {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* ── Hero Card ── */
.mc-hero {
    background: linear-gradient(135deg, #1A1A2E 0%, #2D2B55 100%);
    border-radius: var(--mc-radius);
    padding: 24px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.mc-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(227,27,78,.15) 0%, transparent 70%);
    border-radius: 50%;
}

.mc-hero-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    z-index: 1;
}

.mc-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mc-accent), #FF4D6D);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(227,27,78,.3);
}

.mc-hero-info h1 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
}

.mc-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,.15);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
}

.mc-hero-wallet {
    text-align: right;
    z-index: 1;
    flex-shrink: 0;
}

.mc-wallet-label {
    font-size: 11px;
    opacity: .6;
    margin-bottom: 2px;
}

.mc-wallet-amount {
    font-size: 24px;
    font-weight: 900;
    color: var(--mc-gold);
    letter-spacing: -.5px;
}

.mc-wallet-sub {
    font-size: 10px;
    opacity: .4;
    margin-top: 2px;
}

/* ── Savings Tracker ── */
.mc-savings {
    background: var(--mc-card);
    border-radius: var(--mc-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.mc-savings-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.mc-savings-icon {
    font-size: 28px;
}

.mc-savings-title {
    font-size: 14px;
    font-weight: 700;
}

.mc-savings-subtitle {
    font-size: 11px;
    color: var(--mc-dim);
}

.mc-savings-amount {
    font-size: 32px;
    font-weight: 900;
    color: var(--mc-green);
    margin-bottom: 12px;
    letter-spacing: -.5px;
}

.mc-progress-bar {
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.mc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mc-green), #34D399);
    border-radius: 4px;
    transition: width 1s ease;
}

.mc-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--mc-dim);
}

/* ── Level Card ── */
.mc-level-card {
    background: var(--mc-card);
    border-radius: var(--mc-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.mc-level-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.mc-levels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.mc-lv {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.mc-lv-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #E5E7EB;
    border: 3px solid #E5E7EB;
    transition: all .3s;
}

.mc-lv.active .mc-lv-dot {
    background: var(--mc-accent);
    border-color: var(--mc-accent);
    box-shadow: 0 0 0 3px rgba(227,27,78,.2);
}

.mc-lv-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--mc-dim);
}

.mc-lv.active .mc-lv-name {
    color: var(--mc-accent);
}

.mc-lv-req {
    font-size: 9px;
    color: var(--mc-dim);
    opacity: .6;
}

.mc-lv-line {
    flex: 1;
    height: 3px;
    background: #E5E7EB;
    margin: 0 -4px;
    margin-top: -20px;
    transition: background .3s;
}

.mc-lv-line.filled {
    background: var(--mc-accent);
}

.mc-level-info {
    font-size: 12px;
    color: var(--mc-dim);
    text-align: center;
    padding: 10px;
    background: #F9FAFB;
    border-radius: 10px;
    font-weight: 500;
}

/* ── Bento Stats ── */
.mc-bento {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.mc-bento-card {
    background: var(--mc-card);
    border-radius: var(--mc-radius);
    padding: 18px 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
    text-align: center;
}

.mc-bc-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.mc-bc-value {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -.5px;
    margin-bottom: 2px;
}

.mc-bc-label {
    font-size: 11px;
    color: var(--mc-dim);
    font-weight: 500;
}

.mc-bento-card.streak {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border: 1px solid #F59E0B33;
}

/* ── Chart ── */
.mc-chart-section {
    background: var(--mc-card);
    border-radius: var(--mc-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.mc-chart-section h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.mc-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 160px;
    padding-top: 20px;
}

.mc-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.mc-bar {
    width: 100%;
    max-width: 48px;
    background: linear-gradient(180deg, var(--mc-accent), #FF4D6D);
    border-radius: 6px 6px 2px 2px;
    min-height: 4px;
    transition: height .8s cubic-bezier(.4,0,.2,1);
}

.mc-bar-val {
    font-size: 10px;
    font-weight: 700;
    color: var(--mc-dim);
    white-space: nowrap;
}

.mc-bar-label {
    font-size: 11px;
    color: var(--mc-dim);
    font-weight: 500;
}

/* ── Favorites ── */
.mc-favs-section {
    background: var(--mc-card);
    border-radius: var(--mc-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.mc-favs-section h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
}

.mc-fav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--mc-border);
}

.mc-fav-item:last-child {
    border-bottom: none;
}

.mc-fav-rank {
    font-size: 18px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.mc-fav-name {
    font-size: 13px;
    font-weight: 600;
}

.mc-fav-qty {
    font-size: 11px;
    color: var(--mc-dim);
}

.mc-fav-empty, .mc-ticket-empty, .mc-de-empty, .mc-reco-empty {
    padding: 24px;
    text-align: center;
    color: var(--mc-dim);
    font-size: 13px;
}

/* ── Tickets ── */
.mc-tickets-section {
    background: var(--mc-card);
    border-radius: var(--mc-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.mc-tickets-section h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
}

.mc-ticket {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--mc-border);
}

.mc-ticket:last-child {
    border-bottom: none;
}

.mc-ticket-id {
    font-size: 13px;
    font-weight: 700;
    color: var(--mc-text);
}

.mc-ticket-date {
    font-size: 11px;
    color: var(--mc-dim);
}

.mc-ticket-amount {
    font-size: 14px;
    font-weight: 800;
    color: var(--mc-accent);
}

/* ── D.E. Movements ── */
.mc-de-section {
    background: var(--mc-card);
    border-radius: var(--mc-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.mc-de-section h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
}

.mc-de-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--mc-border);
}

.mc-de-item:last-child {
    border-bottom: none;
}

.mc-de-type {
    font-size: 13px;
    font-weight: 600;
}

.mc-de-date {
    font-size: 11px;
    color: var(--mc-dim);
}

.mc-de-amount {
    font-size: 14px;
    font-weight: 800;
}

.mc-de-amount.positive {
    color: var(--mc-green);
}

.mc-de-amount.negative {
    color: var(--mc-accent);
}

/* ── Recommendations ── */
.mc-reco-section {
    background: var(--mc-card);
    border-radius: var(--mc-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.mc-reco-section h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.mc-reco-sub {
    font-size: 12px;
    color: var(--mc-dim);
    margin-bottom: 14px;
}

/* ── Referral ── */
.mc-referral {
    background: linear-gradient(135deg, #E31B4E 0%, #FF4D6D 100%);
    border-radius: var(--mc-radius);
    padding: 28px 24px;
    text-align: center;
    color: #fff;
    margin-bottom: 16px;
}

.mc-ref-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.mc-referral h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
}

.mc-referral p {
    font-size: 13px;
    opacity: .85;
    line-height: 1.4;
    margin-bottom: 16px;
}

.mc-ref-btn {
    background: #fff;
    color: var(--mc-accent);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all .25s;
}

.mc-ref-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

/* ── Logout ── */
.mc-logout {
    text-align: center;
    margin-bottom: 20px;
}

.mc-logout button {
    background: none;
    border: 1px solid var(--mc-border);
    color: var(--mc-dim);
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: .2s;
}

.mc-logout button:hover {
    border-color: var(--mc-accent);
    color: var(--mc-accent);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .mc-dashboard {
        padding: 12px 12px 40px;
    }

    .mc-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 20px;
    }

    .mc-hero-wallet {
        text-align: left;
        width: 100%;
        padding-top: 12px;
        border-top: 1px solid rgba(255,255,255,.1);
    }

    .mc-hero-info h1 {
        font-size: 16px;
    }

    .mc-wallet-amount {
        font-size: 20px;
    }

    .mc-savings-amount {
        font-size: 26px;
    }

    .mc-bento {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .mc-bc-value {
        font-size: 18px;
    }

    .mc-lv-name {
        font-size: 9px;
    }

    .mc-lv-dot {
        width: 16px;
        height: 16px;
    }

    .mc-login-card {
        padding: 32px 20px;
    }
}
