/**
 * ============================================================
 * NEXLEAD SaaS - Design System Moderno
 * ============================================================
 * Visual premium com glassmorphism, gradientes,
 * animações suaves e responsividade completa.
 * Google Fonts: Inter
 * ============================================================
 */

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

/* ============================================================
   VARIÁVEIS CSS (Design Tokens)
   ============================================================ */
:root {
    /* Cores Primárias */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-50: rgba(99, 102, 241, 0.05);
    --primary-100: rgba(99, 102, 241, 0.1);
    --primary-200: rgba(99, 102, 241, 0.2);

    /* Cores de Acento */
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;

    /* Cores Neutras */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Sidebar */
    --sidebar-width: 272px;
    --sidebar-bg: #0f172a;
    --sidebar-surface: rgba(255, 255, 255, 0.03);
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active-bg: var(--primary);
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --sidebar-border: rgba(255, 255, 255, 0.06);

    /* Layout */
    --navbar-height: 64px;
    --content-bg: #f1f5f9;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.04);
    --card-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --card-shadow-hover: 0 10px 25px rgba(0,0,0,0.07), 0 4px 10px rgba(0,0,0,0.05);
    --card-radius: 16px;

    /* Transições */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Tipografia */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--content-bg);
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-slow);
    border-right: 1px solid var(--sidebar-border);
}

/* Gradiente sutil no sidebar */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.sidebar > * {
    position: relative;
    z-index: 1;
}

/* Brand / Logo */
.sidebar-brand {
    padding: 24px 24px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.sidebar-brand-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--sidebar-text);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Navegação */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar-section-label {
    padding: 16px 12px 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray-500);
}

.sidebar-nav-item {
    list-style: none;
    margin-bottom: 2px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 10px;
    color: var(--sidebar-text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-base);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.sidebar-nav-link i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    transition: transform var(--transition-base);
}

.sidebar-nav-link:hover {
    background: var(--sidebar-hover);
    color: #e2e8f0;
    text-decoration: none;
}

.sidebar-nav-link:hover i {
    transform: scale(1.1);
}

.sidebar-nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.sidebar-nav-link.active i {
    color: #fff;
}

/* ============================================================
   SIDEBAR — NAV GROUPS (collapsible sections)
   ============================================================ */
.nav-group {
    margin-bottom: 2px;
}

.nav-group-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--gray-500);
    transition: color var(--transition-fast);
    margin-top: 8px;
}

.nav-group-header:hover {
    color: var(--sidebar-text);
}

.nav-group-header.open {
    color: rgba(255,255,255,0.45);
}

.nav-group-chevron {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
    opacity: 0.5;
}

.nav-group-chevron.rotated {
    transform: rotate(-180deg);
}

.nav-group-items {
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
    max-height: 600px;
    opacity: 1;
}

.nav-group-items.collapsed {
    max-height: 0 !important;
    opacity: 0;
}

/* Usuário no rodapé do sidebar */
.sidebar-user {
    padding: 16px 16px 20px;
    border-top: 1px solid var(--sidebar-border);
    background: rgba(0, 0, 0, 0.15);
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    transition: background var(--transition-base);
}

.sidebar-user-card:hover {
    background: var(--sidebar-hover);
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.7rem;
    color: var(--sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-actions {
    display: flex;
    gap: 2px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-user-actions a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border-radius: 8px;
    color: var(--sidebar-text);
    font-size: 0.75rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.sidebar-user-actions a:hover {
    background: var(--sidebar-hover);
    color: #e2e8f0;
}

.sidebar-user-actions a.logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

/* Overlay mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1035;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================================
   CONTEÚDO PRINCIPAL
   ============================================================ */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-slow);
}

/* Topbar */
.topbar {
    height: var(--navbar-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 1020;
}

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

.topbar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: 10px;
    font-size: 1.2rem;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.topbar-toggle:hover {
    background: var(--gray-200);
}

.topbar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.3px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Dropdown do usuário na topbar */
.topbar-user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: var(--gray-700);
}

.topbar-user-btn:hover {
    border-color: var(--gray-300);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    color: var(--gray-700);
}

.topbar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
}

.topbar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.topbar-user-chevron {
    font-size: 0.7rem;
    color: var(--gray-400);
    transition: transform var(--transition-fast);
}

/* Conteúdo da página */
.page-content {
    flex: 1;
    padding: 28px;
}

/* Footer */
.main-footer {
    padding: 20px 28px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-400);
    border-top: 1px solid var(--gray-200);
    background: #fff;
}

/* ============================================================
   ALERTAS / FLASH MESSAGES
   ============================================================ */
.flash-container {
    margin-bottom: 20px;
}

.flash-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideInDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    margin-bottom: 10px;
}

.flash-alert i.flash-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.flash-alert.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #065f46;
    border-left: 4px solid var(--accent-green);
}

.flash-alert.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: #991b1b;
    border-left: 4px solid var(--accent-red);
}

.flash-alert.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: #92400e;
    border-left: 4px solid var(--accent-orange);
}

.flash-alert.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    color: #1e40af;
    border-left: 4px solid var(--accent-blue);
}

/* ============================================================
   CARDS
   ============================================================ */
.card-modern {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card-modern:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-modern .card-header-modern {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.card-modern .card-header-modern h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.card-modern .card-body-modern {
    padding: 24px;
}

/* ============================================================
   STAT CARDS (Dashboard)
   ============================================================ */
.stat-card-modern {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 24px;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: 0.05;
    transform: translate(30%, -30%);
    transition: transform var(--transition-base);
}

.stat-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.stat-card-modern:hover::before {
    transform: translate(20%, -20%);
}

.stat-card-modern.blue::before { background: var(--accent-blue); }
.stat-card-modern.green::before { background: var(--accent-green); }
.stat-card-modern.orange::before { background: var(--accent-orange); }
.stat-card-modern.purple::before { background: var(--accent-purple); }

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.stat-card-modern.blue .stat-card-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.stat-card-modern.green .stat-card-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

.stat-card-modern.orange .stat-card-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-orange);
}

.stat-card-modern.purple .stat-card-icon {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-500);
}

/* ============================================================
   TABELAS
   ============================================================ */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead th {
    padding: 14px 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-500);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.table-modern tbody td {
    padding: 16px 20px;
    font-size: 0.875rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.table-modern tbody tr {
    transition: background var(--transition-fast);
}

.table-modern tbody tr:hover {
    background: var(--gray-50);
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================================
   BADGES MODERNOS
   ============================================================ */
.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge-modern.success { background: rgba(16,185,129,0.1); color: #059669; }
.badge-modern.danger { background: rgba(239,68,68,0.1); color: #dc2626; }
.badge-modern.warning { background: rgba(245,158,11,0.1); color: #d97706; }
.badge-modern.info { background: rgba(59,130,246,0.1); color: #2563eb; }
.badge-modern.primary { background: rgba(99,102,241,0.1); color: #4f46e5; }
.badge-modern.secondary { background: rgba(107,114,128,0.1); color: #4b5563; }

/* ============================================================
   BOTÕES
   ============================================================ */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-family);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    line-height: 1.4;
}

.btn-modern:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-modern:active {
    transform: translateY(0);
}

.btn-modern.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-modern.primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    color: #fff;
}

.btn-modern.secondary {
    background: #fff;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-modern.secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-700);
}

.btn-modern.danger {
    background: linear-gradient(135deg, var(--accent-red) 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-modern.sm {
    padding: 7px 14px;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* ============================================================
   FORMULÁRIOS
   ============================================================ */
.form-group-modern {
    margin-bottom: 20px;
}

.form-label-modern {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.form-input-modern {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: var(--font-family);
    color: var(--gray-800);
    background: #fff;
    transition: all var(--transition-fast);
    outline: none;
}

.form-input-modern:hover {
    border-color: var(--gray-300);
}

.form-input-modern:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-100);
    background: #fff;
}

.form-input-modern::placeholder {
    color: var(--gray-400);
}

/* ============================================================
   PAGINAÇÃO
   ============================================================ */
.pagination-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 0;
}

.pagination-modern .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    background: #fff;
    border: 1px solid var(--gray-200);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.pagination-modern .page-link:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-800);
}

.pagination-modern .page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.pagination-modern .page-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ============================================================
   WELCOME BANNER (Dashboard)
   ============================================================ */
.welcome-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    border-radius: var(--card-radius);
    padding: 32px;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 60%);
    pointer-events: none;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 60%);
    pointer-events: none;
}

.welcome-banner h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.welcome-banner p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state-modern {
    text-align: center;
    padding: 60px 30px;
}

.empty-state-modern i {
    font-size: 3rem;
    color: var(--gray-300);
    margin-bottom: 16px;
    display: block;
}

.empty-state-modern p {
    color: var(--gray-400);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ============================================================
   AUTH LAYOUT
   ============================================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    top: -200px;
    right: -100px;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 60%);
    pointer-events: none;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    bottom: -200px;
    left: -100px;
    background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.auth-brand-section {
    text-align: center;
    margin-bottom: 32px;
}

.auth-brand-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.auth-brand-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.auth-brand-subtitle {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 400;
}

.auth-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-900);
    text-align: center;
    margin-bottom: 4px;
}

.auth-card-subtitle {
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 28px;
}

.auth-footer-text {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: #64748b;
}

.auth-footer-text a {
    color: #fff;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.auth-footer-text a:hover {
    color: var(--primary-light);
}

/* ============================================================
   ANIMAÇÕES
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease;
}

.animate-fade-up {
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Staggered animation para cards */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .topbar-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 20px 16px;
    }

    .topbar {
        padding: 0 16px;
    }

    .welcome-banner {
        padding: 24px 20px;
    }

    .welcome-banner h2 {
        font-size: 1.25rem;
    }

    .stat-card-value {
        font-size: 1.6rem;
    }

    .topbar-user-name {
        display: none;
    }

    .auth-card {
        padding: 28px 24px;
    }
}

@media (max-width: 576px) {
    .page-content {
        padding: 16px 12px;
    }

    .stat-card-modern {
        padding: 20px;
    }

    .card-modern .card-body-modern {
        padding: 16px;
    }

    .table-modern thead th,
    .table-modern tbody td {
        padding: 12px 14px;
    }

    .auth-card {
        padding: 24px 20px;
        border-radius: 16px;
    }
}
