/* Reset e Variáveis */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6b7280;
    --gray-light: #e5e7eb;
    --white: #ffffff;
    --text: #1f2937;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

/* Mobile - Tema Premium Escuro */
@media (max-width: 768px) {
    /* Fundo premium escuro (cor do site) - não preto */
    html {
        background: #111827 !important;
    }
    
    body {
        background: #111827 !important;
    }
    
    /* REMOVER TODOS OS OVERLAYS */
    body::before,
    body::after {
        display: none !important;
        content: none !important;
    }
}

/* Garantir que no desktop não há overlay */
@media (min-width: 769px) {
    body::before,
    body::after {
        display: none !important;
    }
    
    html {
        background: var(--light) !important;
    }
    
    body {
        background: var(--light) !important;
    }
}

/* Páginas de Autenticação */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-box {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: var(--primary);
    font-size: 32px;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--gray);
    font-size: 14px;
}

.auth-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--dark);
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
}

.auth-footer p {
    color: var(--gray);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Botões Premium */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    text-decoration: none;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--gray) 0%, #4b5563 100%);
    color: var(--white);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, var(--gray) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: var(--white);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, var(--danger) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary) 0%, #059669 100%);
    color: var(--white);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, var(--secondary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

/* Alertas Premium */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-left-color: var(--danger);
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-left-color: var(--secondary);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
    border-left-color: var(--primary);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-left-color: var(--warning);
}

/* Layout Dashboard */
.dashboard {
    display: flex;
    min-height: 100vh;
}

        .sidebar {
            width: 280px;
            background: linear-gradient(180deg, #1a1f36 0%, #0f1419 100%);
            color: var(--white);
            position: fixed;
            height: 100vh;
            overflow-y: auto;
            box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 999;
            border-right: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .sidebar.collapsed {
            transform: translateX(-240px);
        }
        
        .sidebar.collapsed .sidebar-header h2,
        .sidebar.collapsed .nav-item span {
            opacity: 0;
            pointer-events: none;
            width: 0;
            overflow: hidden;
            margin: 0;
        }
        
        .sidebar.collapsed .nav-item svg {
            margin-right: 0;
        }
        
        .menu-toggle-desktop {
            display: none;
            position: fixed;
            top: 20px;
            left: 290px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            border: none;
            color: var(--white);
            font-size: 20px;
            cursor: pointer;
            padding: 12px 14px;
            border-radius: 12px;
            z-index: 1000;
            box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        /* Ocultar menu-toggle no desktop quando sidebar está visível */
        @media (min-width: 769px) {
            .menu-toggle {
                display: none !important;
            }
            
            .main-content .header .menu-toggle {
                display: none !important;
            }
        }
        
        .menu-toggle-desktop:hover {
            background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
            transform: scale(1.1) translateY(-2px);
            box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
        }
        
        .menu-toggle-desktop:active {
            transform: scale(0.95);
        }
        
        .sidebar.collapsed ~ .menu-toggle-desktop {
            left: 20px;
        }

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

        .sidebar-header {
            padding: 28px 24px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
            position: sticky;
            top: 0;
            z-index: 10;
            backdrop-filter: blur(15px);
        }

.sidebar-header h2 {
    font-size: 24px;
    color: var(--white);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin: 0;
}

.sidebar-nav {
    padding: 20px 0;
}

        .nav-item {
            display: flex;
            align-items: center;
            padding: 14px 24px;
            color: rgba(255, 255, 255, 0.85);
            text-decoration: none;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-size: 14px;
            font-weight: 500;
            position: relative;
            margin: 2px 8px;
            border-radius: 10px;
        }

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-item:hover::before,
.nav-item.active::before {
    transform: scaleY(1);
}

        .nav-item:hover,
        .nav-item.active {
            background: linear-gradient(90deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.1) 100%);
            color: var(--white);
            transform: translateX(4px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }
        
        .nav-item.active {
            background: linear-gradient(90deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.2) 100%);
            border-left: 3px solid var(--primary);
        }

.nav-item svg {
    margin-right: 14px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    vertical-align: middle;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.nav-item:hover svg,
.nav-item.active svg {
    opacity: 1;
    transform: scale(1.1);
}

/* Badge de notificação no menu */
.nav-badge {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: auto;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Item de suporte especial */
.nav-item-support {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.15) 0%, rgba(37, 211, 102, 0.05) 100%);
    border-left: 3px solid #25d366;
}

.nav-item-support:hover {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.25) 0%, rgba(37, 211, 102, 0.15) 100%);
    border-left-color: #128c7e;
}

        .main-content {
            flex: 1;
            margin-left: 280px;
            padding: 0;
            transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .sidebar.collapsed ~ .main-content {
            margin-left: 60px;
        }

.header {
    background: var(--white);
    padding: 20px 32px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Mobile - Header nunca sticky para não cortar conteúdo */
@media (max-width: 768px) {
    .header {
        position: relative !important;
        top: auto !important;
        z-index: 10;
    }
}

/* Garantir que header não sobreponha conteúdo no mobile - TEMA PREMIUM ESCURO */
@media (max-width: 768px) {
    .header,
    .header-premium {
        position: relative !important;
        z-index: 10;
        margin-bottom: 0 !important;
        background: rgba(17, 24, 39, 0.95) !important; /* Cor premium escura */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .header-premium.header-glass,
    .header-glass {
        background: rgba(17, 24, 39, 0.98) !important; /* Cor premium escura */
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
    }
    
    /* Menu e saldo com fundo transparente/premium */
    .menu-toggle {
        background: rgba(37, 99, 235, 0.85) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .balance-card,
    .balance-card-glass {
        background: rgba(37, 99, 235, 0.85) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .main-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    .main-content .content {
        padding-top: 20px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    /* GARANTIR espaçamento do primeiro grid */
    .main-content > .content > .grid:first-child,
    .main-content > .content > .grid-3:first-child {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* Garantir que cards não sejam cortados */
    .stat-card,
    .card {
        margin-top: 0;
        overflow: visible;
    }
}

/* Header Premium */
.header-premium {
    background: linear-gradient(135deg, var(--white) 0%, var(--light) 100%);
    border: 1px solid var(--gray-light);
    padding: 20px 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: relative; /* Sempre relative no mobile */
}

/* Mobile - Garantir header relativo */
@media (max-width: 768px) {
    .header-premium {
        position: relative !important;
        top: auto !important;
        z-index: 10;
    }
}

/* Glass Morphism Effect */
.header-glass {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    position: relative;
}

.header-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.balance-card-glass {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 
        0 4px 16px rgba(37, 99, 235, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* Ajustar glass morphism no mobile para não sobrepor */
@media (max-width: 768px) {
    .header-glass {
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .balance-card-glass {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }
}

/* Ajuste glass morphism para mobile muito pequeno será feito no @media (max-width: 480px) abaixo */

.header-premium .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 24px;
    transition: transform 0.3s ease;
}

.header-premium .logo-link:hover {
    transform: scale(1.05);
}

.header-premium .user-greeting {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.header-premium .greeting-text {
    font-size: 16px;
    color: var(--gray);
    font-weight: 400;
}

.header-premium .user-name {
    font-size: 20px;
    color: var(--dark);
    font-weight: 600;
}

.header-premium .header-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.header-premium .balance-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    cursor: default;
}

.header-premium .balance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.header-premium .balance-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.header-premium .balance-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-premium .balance-label {
    font-size: 11px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.header-premium .balance-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.header-premium .user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--light);
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.header-premium .user-card:hover {
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-premium .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.header-premium .user-email {
    font-size: 14px;
    color: var(--dark);
    font-weight: 500;
}

/* Settings Welcome */
.settings-welcome {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-light);
}

/* Responsividade Premium - Header */
@media (max-width: 1024px) {
    .header-premium {
        padding: 16px 24px;
    }
    
    .header-premium .balance-card {
        padding: 10px 16px;
    }
    
    .header-premium .balance-icon {
        width: 32px;
        height: 32px;
    }
    
    .header-premium .balance-value {
        font-size: 16px;
    }
    
    .header-premium .balance-label {
        font-size: 10px;
    }
    
    .header-premium .user-card {
        padding: 6px 12px;
    }
    
    .header-premium .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .header-premium .user-email {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .header-premium {
        padding: 12px 16px;
        justify-content: space-between;
        gap: 16px;
    }
    
    .header-premium .header-left {
        flex: 0 0 auto;
        order: 1;
    }
    
    .header-premium .logo-link {
        margin-right: 0;
    }
    
    .header-premium .site-logo {
        max-width: 140px;
        max-height: 50px;
    }
    
    .header-premium .header-right {
        flex: 0 0 auto;
        order: 2;
        justify-content: flex-end;
        margin-left: auto;
    }
    
    .header-premium .balance-card {
        padding: 10px 16px;
        gap: 10px;
        min-width: 140px;
    }
    
    .header-premium .balance-icon {
        width: 32px;
        height: 32px;
    }
    
    .header-premium .balance-info {
        flex: 1;
        min-width: 0;
    }
    
    .header-premium .balance-label {
        font-size: 10px;
    }
    
    .header-premium .balance-value {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    /* Header mobile - TEMA PREMIUM ESCURO */
    .header-premium {
        padding: 12px 16px !important;
        position: relative !important;
        height: auto !important;
        min-height: 56px;
        margin: 0 !important;
        background: rgba(17, 24, 39, 0.95) !important; /* Cor premium escura */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        overflow: visible;
    }
    
    .header-glass,
    .header-premium.header-glass {
        background: rgba(17, 24, 39, 0.98) !important; /* Cor premium escura */
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
    }
    
    /* Menu e saldo com fundo transparente/premium */
    .menu-toggle {
        background: rgba(37, 99, 235, 0.85) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .balance-card,
    .balance-card-glass {
        background: rgba(37, 99, 235, 0.85) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .balance-card-glass {
        background: rgba(37, 99, 235, 0.85) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4) !important;
    }
    
    .header-premium .header-left {
        flex: 0 0 auto;
        order: 1;
        margin-bottom: 0;
        text-align: left;
        width: auto;
        max-width: calc(100% - 150px);
        overflow: hidden;
    }
    
    .header-premium .site-logo {
        max-width: 90px;
        max-height: 38px;
        object-fit: contain;
    }
    
    .header-premium .header-right {
        flex: 0 0 auto;
        order: 2;
        justify-content: flex-end;
        margin-left: auto;
        width: auto;
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 11;
    }
    
    .header-premium .balance-card {
        width: auto;
        min-width: 115px;
        max-width: 140px;
        justify-content: flex-end;
        padding: 7px 11px;
        gap: 6px;
        flex-wrap: nowrap;
    }
    
    .header-premium .balance-icon {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
    }
    
    .header-premium .balance-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .header-premium .balance-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 1px;
    }
    
    .header-premium .balance-value {
        font-size: 13px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .header-premium .balance-label {
        font-size: 8px;
        line-height: 1;
        white-space: nowrap;
    }
    
    /* GARANTIR espaçamento adequado após header - SEM CORTAR */
    .main-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    .main-content .content {
        padding-top: 24px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        padding-bottom: 12px !important;
        margin-top: 0 !important;
    }
    
    /* GARANTIR que o primeiro grid tenha espaço */
    .main-content .content .grid:first-child,
    .main-content .content .grid-3:first-child {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* Evitar sobreposição dos stat cards */
    .grid.grid-3 {
        margin-top: 0;
        gap: 12px;
    }
    
    .stat-card {
        margin-top: 0;
        margin-bottom: 0;
    }
}

.header-left h1 {
    font-size: 24px;
    color: var(--dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.balance {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.balance::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
}

.balance:hover::before {
    animation: shine 1.5s infinite;
}

@keyframes shine {
    0% { left: -50%; }
    100% { left: 150%; }
}

.balance:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.content {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Cards Premium */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--gray-light);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-light);
}

.card-header h2 {
    font-size: 20px;
    color: var(--dark);
}

.card-body {
    padding: 0;
}

/* Grid */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Tabela */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.table th {
    background: var(--light);
    font-weight: 600;
    color: var(--dark);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    font-size: 14px;
}

.table tr {
    transition: all 0.2s ease;
    position: relative;
}

.table tr::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.table tr:hover::before {
    transform: scaleY(1);
}

.table tr:hover {
    background: var(--light);
    padding-left: 4px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #10b981 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
}

.badge-warning {
    background: #f59e0b !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

.badge-danger {
    background: #ef4444 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3) !important;
}

.badge-info {
    background: #3b82f6 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}

/* Pesquisa */
.search-box {
    position: relative;
    margin-bottom: 24px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 14px;
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

/* Filtros Modernos */
.filters-modern {
    margin-bottom: 0;
}

.filters-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 150px;
    gap: 16px;
    align-items: end;
}

.filter-item {
    display: flex;
    flex-direction: column;
}

.filter-item label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-input,
.modern-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    font-size: 14px;
    background: var(--white);
    color: var(--text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

/* Garantir que texto digitado seja visível */
.modern-input::placeholder {
    color: var(--gray);
}

/* Cores de input serão controladas pelo tema dinâmico em includes/header.php */
/* Removidas regras conflitantes que forçavam cores específicas */

.modern-input:focus,
.modern-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.modern-filter-btn {
    height: 100%;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 12px;
}

.search-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.search-card .card-header h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 1024px) {
    .filters-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .filter-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
}

/* Serviços Grid */
.servicos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.servico-card {
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.servico-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.servico-card:hover::before {
    left: 100%;
}

.servico-card:hover {
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.2);
    transform: translateY(-4px) scale(1.02);
    border-color: var(--primary);
}

.servico-card:active {
    transform: translateY(-2px) scale(1);
}

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

.servico-nome {
    font-weight: 600;
    color: var(--dark);
    font-size: 16px;
}

.servico-preco {
    color: var(--primary);
    font-weight: 700;
    font-size: 18px;
}

/* Ícone do Serviço */
.servico-icon-container {
    flex-shrink: 0;
}

.servico-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 12px;
    padding: 8px;
    background: var(--light);
    border: 1px solid var(--gray-light);
    transition: all 0.3s ease;
}

.servico-card:hover .servico-icon {
    transform: scale(1.1);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.servico-icon-default {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    color: var(--gray);
    transition: all 0.3s ease;
}

.servico-card:hover .servico-icon-default {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.1);
}

/* Serviço Destacado */
.servico-destaque {
    border: 2px solid #fbbf24 !important;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.15);
}

.servico-destaque:hover {
    box-shadow: 0 12px 32px rgba(251, 191, 36, 0.3);
    border-color: #f59e0b !important;
}

.servico-destaque::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

/* PIX Payment */
.pix-container {
    text-align: center;
    padding: 40px;
}

.pix-qrcode {
    margin: 30px auto;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    display: inline-block;
    box-shadow: var(--shadow);
}

.pix-code {
    background: var(--light);
    padding: 16px;
    border-radius: var(--radius);
    margin: 20px 0;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    border: 1px dashed var(--gray);
}

.copy-btn {
    margin-top: 10px;
}

/* Logo do Site */
.site-logo {
    max-width: 150px;
    max-height: 60px;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-left h1 {
    font-size: 24px;
    color: var(--dark);
    margin: 0;
}

/* Menu Mobile */
.menu-toggle {
    display: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 12px;
    margin-right: 16px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    position: fixed;
    top: 16px;
    left: 16px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.menu-toggle:active {
    transform: scale(0.95);
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

/* Responsivo */
@media (max-width: 1024px) {
    .content {
        padding: 24px;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .servicos-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

        @media (max-width: 768px) {
            .menu-toggle-desktop {
                display: none !important;
            }
            
            .menu-toggle {
                display: block;
                position: fixed;
                top: 16px;
                left: 16px;
                z-index: 1001;
                background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
                box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
            }
            
            .menu-toggle:hover {
                background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
                transform: scale(1.1) translateY(-2px);
                box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
            }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        width: 280px;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .header {
        margin-left: 0;
        padding: 12px 16px 12px 60px;
        flex-wrap: wrap;
        position: relative;
    }
    
    .header-left {
        flex: 1;
        min-width: 0;
    }
    
    .header-left h1 {
        font-size: 18px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .site-logo {
        max-width: 120px;
        max-height: 50px;
    }
    
    .header-right {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 12px;
    }
    
    .balance {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .content {
        padding: 16px;
        padding-top: 20px;
    }
    
    .card {
        padding: 16px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .servicos-grid {
        grid-template-columns: 1fr;
    }
    
    /* Tabela Últimas Ativações - Dashboard Mobile */
    .card .table-container {
        overflow-x: visible;
        margin: 0;
        padding: 0;
    }
    
    .card .table {
        display: block;
        width: 100%;
        min-width: unset;
        font-size: 14px;
    }
    
    .card .table thead {
        display: none;
    }
    
    .card .table tbody {
        display: block;
        width: 100%;
    }
    
    .card .table tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 16px;
        padding: 16px;
        background: var(--light);
        border-radius: var(--radius);
        border: 1px solid var(--gray-light);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }
    
    .card .table tbody tr:last-child {
        margin-bottom: 0;
    }
    
    .card .table tbody td {
        display: block;
        padding: 8px 0;
        text-align: left !important;
        border: none;
        white-space: normal;
    }
    
    .card .table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray);
        display: block;
        margin-bottom: 4px;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .card .table tbody td .badge {
        display: inline-block;
        margin-top: 4px;
    }
    
    .card .table tbody td .btn {
        margin-top: 8px;
        width: 100%;
    }
    
    /* Manter scroll horizontal apenas para tabelas específicas (fora do dashboard) */
    /* A tabela do dashboard já está tratada acima */
    
    /* Melhorias para cards em mobile */
    .card-body {
        padding: 20px;
    }
    
    .quick-start-card {
        padding: 20px !important;
    }
    
    .quick-start-icon {
        width: 48px !important;
        height: 48px !important;
        margin-bottom: 12px !important;
    }
    
    .quick-start-card h3 {
        font-size: 16px !important;
    }
    
    .quick-start-card p {
        font-size: 13px !important;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .auth-box {
        padding: 24px;
    }
    
    .pix-container {
        padding: 20px 16px;
    }
    
    .pix-qrcode {
        margin: 20px auto;
        padding: 16px;
    }
    
    .pix-qrcode img {
        max-width: 250px;
        width: 100%;
    }
    
    .pix-code {
        padding: 12px;
        font-size: 11px;
        margin: 16px 0;
    }
    
    .copy-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    /* Cards de pagamento pendente */
    .payment-pending-card {
        padding: 16px !important;
    }
    
    /* Formulários */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
        font-size: 14px;
    }
    
    /* Alertas */
    .alert {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    /* Badges */
    .badge {
        font-size: 11px;
        padding: 4px 10px;
    }
}

@media (max-width: 480px) {
    .menu-toggle {
        top: 12px;
        left: 12px;
        padding: 8px 10px;
        font-size: 20px;
    }
    
    .header {
        padding: 10px 12px 10px 50px;
    }
    
    .header-left h1 {
        font-size: 16px;
    }
    
    .site-logo {
        max-width: 100px;
        max-height: 40px;
    }
    
    .user-info span {
        display: none;
    }
    
    .balance {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .card {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 12px;
    }
    
    .card-header {
        padding: 16px 16px 12px 16px;
        margin: -16px -16px 16px -16px;
    }
    
    .card-header h2 {
        font-size: 18px;
    }
    
    .card-body {
        padding: 0;
    }
    
    .btn {
        padding: 12px 18px;
        font-size: 14px;
        width: 100%;
    }
    
    .btn-sm {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .sidebar {
        width: 260px;
    }
    
    .content {
        padding: 16px 12px;
        padding-top: 24px;
        margin-top: 0;
    }
    
    /* Garantir que stat cards não sejam cortados */
    .grid.grid-3 {
        gap: 16px;
        margin-top: 0;
    }
    
    .stat-card {
        margin-bottom: 0;
    }
    
    /* Grid em telas muito pequenas */
    .grid-2,
    .grid-3,
    .grid-4 {
        gap: 12px;
    }
    
    /* Tabelas em telas pequenas - layout vertical */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Configurações welcome */
    .settings-welcome {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
    
    .settings-welcome h1 {
        font-size: 22px !important;
    }
    
    .settings-welcome p {
        font-size: 12px !important;
    }
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.8s linear infinite;
}

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

/* Animações Premium */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.card {
    animation: fadeIn 0.4s ease-out;
}

.servico-card {
    animation: fadeIn 0.3s ease-out;
}

.nav-item {
    animation: slideIn 0.3s ease-out;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.2s; }
.nav-item:nth-child(3) { animation-delay: 0.3s; }
.nav-item:nth-child(4) { animation-delay: 0.4s; }
.nav-item:nth-child(5) { animation-delay: 0.5s; }

/* Badge com animação */
.badge {
    animation: fadeIn 0.3s ease-out;
    transition: all 0.2s ease;
}

.badge:hover {
    transform: scale(1.05);
}


/* Loading estados */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Stat Cards Premium - Dashboard */
.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: 16px;
    padding: 28px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.stat-card-primary .stat-card-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.stat-card-warning .stat-card-icon {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.stat-card-success .stat-card-icon {
    background: linear-gradient(135deg, var(--secondary) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.stat-card-info .stat-card-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.stat-card-info .stat-card-value {
    color: #3b82f6;
}

.stat-card-danger .stat-card-icon {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.stat-card-danger .stat-card-value {
    color: var(--danger);
}

.stat-card:hover .stat-card-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-card-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.stat-card-value {
    font-size: 36px;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.stat-card-primary .stat-card-value {
    color: var(--primary);
}

.stat-card-warning .stat-card-value {
    color: var(--warning);
}

.stat-card-success .stat-card-value {
    color: var(--secondary);
}

.stat-card-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    margin-top: 4px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stat-card-link:hover {
    color: var(--primary-dark);
    gap: 8px;
}

/* Responsividade Premium - Stat Cards */
@media (max-width: 1024px) {
    .stat-card {
        padding: 24px;
        gap: 18px;
    }
    
    .stat-card-icon {
        width: 52px;
        height: 52px;
    }
    
    .stat-card-value {
        font-size: 32px;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stat-card {
        padding: 20px;
        gap: 16px;
        flex-direction: row;
    }
    
    .stat-card-icon {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }
    
    .stat-card-value {
        font-size: 28px;
    }
    
    .stat-card-label {
        font-size: 12px;
    }
    
    .stat-card-link {
        font-size: 13px;
    }
    
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .settings-welcome h1 {
        font-size: 24px !important;
    }
    
    .settings-welcome p {
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .stat-card {
        padding: 16px;
        gap: 12px;
    }
    
    .stat-card-icon {
        width: 44px;
        height: 44px;
    }
    
    .stat-card-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .stat-card-value {
        font-size: 24px;
    }
    
    .stat-card-label {
        font-size: 11px;
    }
    
    .stat-card-link {
        font-size: 12px;
        margin-top: 6px;
    }
}

/* Melhorias Gerais Premium */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Admin Header Premium */
.admin-header-premium {
    background: linear-gradient(135deg, var(--white) 0%, var(--light) 100%);
    border: 1px solid var(--gray-light);
    padding: 20px 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.admin-header-premium .header-left h1 {
    font-size: 24px;
    color: var(--dark);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-header-premium .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--light);
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

/* Animações Suaves */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.4s ease-out;
}

.table tbody tr {
    animation: fadeIn 0.3s ease-out;
    animation-fill-mode: both;
}

.table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.table tbody tr:nth-child(5) { animation-delay: 0.25s; }

/* Transições suaves para inputs */
input, textarea, select {
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

/* Melhorias de Responsividade Global Premium */
@media (max-width: 1024px) {
    .main-content {
        width: 100%;
    }
    
    .content {
        padding: 20px;
    }
    
    .card {
        margin-bottom: 20px;
    }
    
    /* Grid tablet */
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .servicos-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Ajustes gerais para mobile */
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    /* Grids responsivos */
    .grid {
        gap: 16px;
    }
    
    /* Pagamento PIX mobile */
    .pix-container {
        padding: 24px 16px;
    }
    
    #statusContainer {
        padding: 16px !important;
    }
    
    /* Histórico mobile */
    .payment-pending-card {
        margin-bottom: 12px;
    }
    
    /* Admin mobile */
    .admin-header-premium .header-left h1 {
        font-size: 20px;
    }
    
    .admin-user-badge {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    /* Quick start cards mobile */
    .grid-2 .quick-start-card {
        padding: 18px !important;
    }
    
    /* Configurações welcome mobile */
    .settings-welcome {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
    
    .settings-welcome h1 {
        font-size: 24px !important;
    }
    
    .settings-welcome p {
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    /* Ajustes para telas muito pequenas */
    body {
        font-size: 13px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    h3 {
        font-size: 16px;
    }
    
    /* Espaçamentos reduzidos */
    .content {
        padding: 24px 12px 12px 12px;
    }
    
    /* Garantir espaçamento após header */
    .main-content .content {
        padding-top: 24px !important;
    }
    
    .card {
        margin-bottom: 12px;
    }
    
    .grid {
        gap: 12px;
    }
    
    /* Settings welcome em telas muito pequenas */
    .settings-welcome h1 {
        font-size: 22px !important;
    }
    
    .settings-welcome p {
        font-size: 12px !important;
    }
}

/* Formulário de Filtros Premium - Histórico */
.filters-form-premium {
    animation: fadeIn 0.4s ease-out;
}

@media (max-width: 1024px) {
    .filters-form-premium {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .filters-form-premium button,
    .filters-form-premium a {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .filters-form-premium {
        grid-template-columns: 1fr !important;
    }
}

/* Melhorias de toque para mobile */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-item,
    .quick-start-card,
    .stat-card-link,
    .servico-card {
        -webkit-tap-highlight-color: rgba(37, 99, 235, 0.2);
    }
    
    /* Aumentar área de toque */
    .btn-sm {
        min-height: 36px;
    }
    
    .nav-item {
        min-height: 44px;
    }
    
    /* Remover hover effects em mobile */
    .stat-card:hover,
    .quick-start-card:hover,
    .servico-card:hover {
        transform: none;
    }
}

/* Seleção de texto */
::selection {
    background: var(--primary);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary);
    color: var(--white);
}

/* Utilitários */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* Quick Start Cards - Premium Design */
.quick-start-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
    background: linear-gradient(135deg, var(--white) 0%, var(--light) 100%);
    border: 1px solid var(--gray-light);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.quick-start-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.quick-start-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
    border-color: var(--primary);
}

.quick-start-card:hover::before {
    transform: scaleX(1);
}

.quick-start-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 14px;
    margin-bottom: 16px;
    color: var(--white);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.quick-start-card:hover .quick-start-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.quick-start-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 8px 0;
    transition: color 0.3s ease;
}

.quick-start-card:hover h3 {
    color: var(--primary);
}

.quick-start-card p {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 768px) {
    .quick-start-card {
        padding: 20px;
    }
    
    .quick-start-icon {
        width: 48px;
        height: 48px;
    }
    
    .quick-start-card h3 {
        font-size: 16px;
    }
}

