/* ============================================
   SMM FITNESS — DESIGN SYSTEM DEFINITIVO
   Tema: Black Premium + Gold & Silver Metallic
   Versão: 3.0 (Final)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── VARIÁVEIS ─────────────────────────────── */
:root {
    --bg:            #060606;
    --surface:       #0e0e0e;
    --surface-2:     #141414;
    --border:        rgba(255,255,255,0.07);
    --border-silver: rgba(255,255,255,0.12);

    /* LARANJA FITNESS */
    --gold:          #ff6b00;
    --gold-grad:     linear-gradient(135deg, #ff4500 0%, #ff8c00 60%, #ff6b00 100%);
    --silver-grad:   linear-gradient(135deg, #6a6a6a 0%, #e8e8e8 50%, #7a7a7a 100%);

    --text:          #ffffff;
    --text-muted:    #5a5a5a;
    --danger:        #ff4d4d;
    --success:       #22c55e;

    --sidebar-w:     270px;
    --mobile-header: 65px;
    --mobile-nav-h:  70px;
}

/* ── RESET ─────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
body::-webkit-scrollbar { display: none; }

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: 'Inter', sans-serif; }

/* Global Scrollbar Hide */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }

/* ══════════════════════════════════════════════
   1. TELA DE LOGIN / AUTH
══════════════════════════════════════════════ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(ellipse at top, #1a0a00 0%, #060606 55%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--border-silver);
    border-radius: 28px;
    padding: 40px 36px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}

/* Glow dourado giratório */
.auth-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 30px;
    background: conic-gradient(
        transparent 0deg,
        rgba(255,107,0,0.2) 60deg,
        transparent 120deg
    );
    animation: spin 8s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.auth-inner { position: relative; z-index: 1; }

/* Logo */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

.auth-logo-mark {
    width: 72px;
    height: 72px;
    background: var(--gold-grad);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 8px 24px rgba(255,107,0,0.35);
    letter-spacing: 1px;
}

.auth-title {
    font-size: 1.9rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 6px;
}

.auth-title span { color: var(--gold); }

.auth-subtitle {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

/* ── FORMULÁRIOS ────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.75);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 13px 16px;
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.form-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.08);
}

.form-row {
    display: flex;
    gap: 14px;
}

.form-row .form-group { flex: 1; }

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Strength bar */
.strength-meter {
    height: 4px;
    background: var(--surface-2);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.4s, background 0.4s;
}

/* Auth link row */
.auth-link-row {
    text-align: center;
    margin-top: 20px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.auth-link-row a {
    color: var(--gold);
    font-weight: 700;
    cursor: pointer;
}

/* ── BOTÕES ─────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    text-decoration: none;
}

.btn-gold {
    background: var(--gold-grad);
    color: #fff;
    box-shadow: 0 6px 20px rgba(255,107,0,0.25);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255,107,0,0.4);
    filter: brightness(1.08);
}

.btn-full { width: 100%; margin-top: 10px; }

.btn-icon {
    width: 38px; height: 38px;
    padding: 0;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.btn-icon:hover { color: var(--text); border-color: var(--gold); }

/* ══════════════════════════════════════════════
   2. LAYOUT PRINCIPAL (DESKTOP + MOBILE)
══════════════════════════════════════════════ */

/* ── SIDEBAR (DESKTOP) ─────────────────────── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    height: 100vh;
    position: sticky;
    top: 0;
    background: #000;
    border-right: 1px solid var(--border-silver);
    display: flex;
    flex-direction: column;
    padding: 28px 18px;
    flex-shrink: 0;
    z-index: 3000;
}

.sidebar-brand {
    font-size: 1.7rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 36px;
    padding-left: 8px;
}

.sidebar-brand span { color: var(--gold); }

.sidebar-nav { flex: 1; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    border-radius: 14px;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
    transition: all 0.2s;
    cursor: pointer;
    letter-spacing: 0.2px;
}

.nav-item i {
    font-size: 1.15rem;
    min-width: 22px;
    text-align: center;
}

.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.nav-item.active {
    background: rgba(255,107,0,0.12);
    color: var(--gold);
    font-weight: 700;
    border-right: 3px solid var(--gold);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.user-avatar {
    width: 38px; height: 38px;
    min-width: 38px;
    background: var(--gold-grad);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 900;
    color: #fff;
}

.user-info { flex: 1; overflow: hidden; }
.user-name { font-weight: 700; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.72rem; color: var(--text-muted); }

/* ── CONTENT ───────────────────────────────── */
.main { flex: 1; padding: 40px 44px; min-height: 100vh; overflow-y: auto; }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title { font-size: 2rem; font-weight: 900; }
.page-title span { color: var(--gold); }
.page-subtitle { font-size: 0.9rem; color: var(--text-muted); margin-top: 4px; }

/* ── CARDS STATS ───────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 36px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border-silver);
    border-radius: 18px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.25s;
}

.stat-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.stat-icon {
    width: 46px; height: 46px;
    min-width: 46px;
    border-radius: 13px;
    background: rgba(212,175,55,0.08);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-value { font-size: 1.45rem; font-weight: 900; }
.stat-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin-top: 2px; }

/* ── TABELA / LISTAGEM ─────────────────────── */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
}

.data-card {
    background: var(--surface);
    border: 1px solid var(--border-silver);
    border-radius: 18px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.25s;
}

.data-card:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
}

.data-card-photo {
    width: 56px; height: 56px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--border-silver);
    background: var(--surface-2);
}

.data-card-info { flex: 1; min-width: 0; }
.data-card-name { font-weight: 800; font-size: 1rem; }
.data-card-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.badge-gold {
    display: inline-block;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.25);
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 6px;
    margin-top: 6px;
    letter-spacing: 0.6px;
}

/* ── SEARCH ────────────────────────────────── */
.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border-silver);
    border-radius: 14px;
    padding: 4px 16px;
    margin-bottom: 26px;
}

.search-bar i { color: var(--text-muted); }
.search-bar input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    padding: 12px 0;
    font-size: 0.95rem;
}

/* ── MODAL ─────────────────────────────────── */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(16px);
    z-index: 200000;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-backdrop.open { display: flex; }

.modal {
    background: var(--surface);
    border: 1px solid var(--gold);
    border-radius: 24px;
    padding: 34px;
    width: 100%;
    max-width: 620px;
    margin: auto 0; /* Centraliza verticalmente se couber */
    flex-shrink: 0;
    box-shadow: 0 0 60px rgba(212,175,55,0.1);
    /* Scrollbar invisível mas funcional */
    scrollbar-width: none;  /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.modal::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.modal-title { font-size: 1.5rem; font-weight: 900; color: var(--gold); }

.modal-close {
    background: none; border: none; color: var(--text-muted);
    font-size: 1.6rem; cursor: pointer; line-height: 1;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }

/* ══════════════ DRAWERS ══════════════ */
.drawer-backdrop {
    position: fixed;
    top: 0; left: var(--sidebar-w); right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 2500;
    display: none;
}
@media (max-width: 1023px) {
    .drawer-backdrop { left: 0; }
}
.drawer-backdrop.open { display: block; }


.drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: calc(100vw - var(--sidebar-w));
    background: var(--surface);
    border-left: 1px solid var(--border-silver);
    z-index: 2600;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100dvh;
}
.drawer.open { transform: translateX(0); }

.drawer-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-silver);
    flex-shrink: 0;
}
.drawer-title { font-size: 1.25rem; font-weight: 800; color: var(--gold); }

.drawer-close {
    background: none; border: 1px solid var(--border-silver); color: var(--text-muted); padding: 0;
    width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.drawer-close:hover { border-color: var(--gold); color: var(--gold); }

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    padding-bottom: 110px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.drawer-body::-webkit-scrollbar { display: none; }

.drawer-footer {
    padding: 20px 24px;
    background: var(--surface);
    border-top: 1px solid var(--border-silver);
    flex-shrink: 0;
    display: flex;
    gap: 12px;
}

@media (max-width: 1023px) {
    .drawer {
        width: 100%;
        border-left: none;
    }
}

/* Photo uploader */
.photo-uploader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 24px;
    transition: transform 0.2s;
}
.photo-uploader:hover { transform: scale(1.02); }

.photo-preview {
    width: 220px; height: 220px; /* Bem maior no mobile */
    border-radius: 40px;
    background: var(--surface-2);
    border: 2px dashed var(--border-silver);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: all 0.3s;
    box-shadow: 0 15px 45px rgba(0,0,0,0.4);
}

.photo-uploader:hover .photo-preview {
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(255,107,0,0.3);
    background: #000;
}

/* Versão enorme para desktop */
@media (min-width: 1024px) {
    .photo-preview-lg {
        width: 260px; height: 260px;
    }
}

.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview i { font-size: 2rem; color: var(--text-muted); transition: 0.2s; }
.photo-uploader:hover i { color: var(--gold); transform: scale(1.1); }
.photo-label { font-size: 0.82rem; color: var(--gold); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }

/* ══════════════════════════════════════════════
   3. MOBILE
══════════════════════════════════════════════ */
.mobile-header { display: none; }
.mobile-nav    { display: none; }

@media (max-width: 1023px) {
    /* Esconde desktop */
    .sidebar { display: none; }

    /* Ajusta conteúdo */
    .layout { flex-direction: column; }
    .main { padding: 20px 16px; padding-bottom: calc(var(--mobile-nav-h) + 30px); }
    .mobile-header ~ .main { padding-top: calc(var(--mobile-header) + 20px); }

    /* Header mobile */
    .mobile-header {
        display: flex;
        position: fixed;
        top: 0; left: 0; right: 0;
        height: var(--mobile-header);
        background: rgba(0,0,0,0.92);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-silver);
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        z-index: 1200;
    }

    .mobile-brand { font-weight: 900; font-size: 1.15rem; }
    .mobile-brand span { color: var(--gold); }

    /* ── NOVO MOBILE NAVIGATION DOCK (Premium & Moderno) ── */
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 15px; left: 15px; right: 15px;
        height: 70px;
        background: rgba(18,18,18,0.95);
        backdrop-filter: blur(25px);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 20px;
        align-items: center;
        justify-content: flex-start;
        padding: 0 10px;
        z-index: 2000;
        box-shadow: 0 15px 40px rgba(0,0,0,0.6);
        overflow-x: auto;
        scrollbar-width: none;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
    }
    .mobile-nav::-webkit-scrollbar { display: none; }

    .nav-mobile-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 65px;
        height: 50px;
        color: #777;
        text-decoration: none;
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 12px;
        flex-shrink: 0;
    }
    .nav-mobile-item i { font-size: 1.2rem; margin-bottom: 2px; }
    .nav-mobile-item span { font-size: 0.55rem; font-weight: 800; text-transform: uppercase; }
    
    .nav-mobile-item.active {
        color: var(--gold);
        background: rgba(255,107,0,0.08);
    }
    .nav-mobile-item:active { transform: scale(0.9); }

    @media (max-width: 768px) {
        :root { 
            --sidebar-w: 0px;
            --header-h: 70px;
            --mobile-nav-h: 65px;
        }
        
        body { font-size: 16px; } /* Aumentando base mobile */

        .sidebar { display: none; }
        .layout { grid-template-columns: 1fr; padding-bottom: 80px; }
        .main { padding: 20px 15px; }

        .mobile-header { display: flex; }
        
        .page-title { font-size: 1.8rem; }
        .page-subtitle { font-size: 1rem; }

        .form-label { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
        .form-input { font-size: 1rem; padding: 14px; }
        
        .btn { font-size: 1rem; padding: 14px 24px; font-weight: 800; }
        
        /* Cards */
        .plan-st-name { font-size: 1.3rem; }
        .plan-info-row { font-size: 1rem; margin-bottom: 12px; }
        .info-label { font-size: 0.9rem; }
        .info-val { font-size: 1rem; }

        .card-title { font-size: 1.25rem; }
        .card-val { font-size: 1.8rem; }

        .st-name { font-size: 1.25rem; }
        .st-status { font-size: 0.85rem; }

        /* Nav Mobile Items */
        .nav-mobile-item i { font-size: 1.4rem; }
        .nav-mobile-item span { font-size: 0.65rem; }
    }

    /* Floating Plus Button */
    .nav-mobile-fab {
        width: 54px; height: 54px;
        background: var(--gold-grad);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1.4rem;
        border: 4px solid var(--bg);
        position: relative;
        top: -18px;
        box-shadow: 0 8px 24px rgba(255,107,0,0.45);
        cursor: pointer;
        flex-shrink: 0;
    }

    /* Reset Dial IDs if any */
    .dial-container, .dial-indicator, .dial-wheel, .dial-center-btn { display: none !important; }

    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    border: 4px solid var(--bg);
    position: relative;
    top: -18px;
    box-shadow: 0 8px 24px rgba(255,107,0,0.45);
    cursor: pointer;
    flex-shrink: 0;
}

    /* Auth em mobile */
    .auth-card { padding: 30px 24px; }
    .form-row { flex-direction: column; gap: 0; }
    .modal { padding: 24px 20px; border-radius: 20px; }
    .modal-backdrop { padding: 0; align-items: flex-end; }
    .modal {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        max-height: 92vh;
    }

    /* Stats */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .data-grid { grid-template-columns: 1fr; }

    .page-header { flex-direction: column; align-items: flex-start; }
    .page-title { font-size: 1.5rem; }
}

/* ══════════════════════════════════════════════
   4. UTILITÁRIOS
══════════════════════════════════════════════ */
.gold  { color: var(--gold); }
.muted { color: var(--text-muted); }
.gap-8  { gap: 8px; }
.mt-4   { margin-top: 4px; }
.mt-16  { margin-top: 16px; }

/* Visibilidade por dispositivo */
.mobile-only  { display: none; }
.desktop-only { display: flex; }

@media (max-width: 1023px) {
    .mobile-only  { display: flex; }
    .desktop-only { display: none; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate { animation: fadeUp 0.4s ease both; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.pagination a, .pagination span { 
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border-silver);
    color: #fff; font-weight: 800; transition: 0.3s; text-decoration: none;
}
.pagination a:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.pagination .active { background: var(--gold-grad); color: #000; border: none; pointer-events: none; }

/* Photo Placeholder Initials */
.initials-placeholder {
    width: 65px; height: 65px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gold);
    text-transform: uppercase;
}

.data-card .initials-placeholder {
    width: 56px; height: 56px;
    font-size: 1rem;
}
