/* ===========================================
   NECIA.MKT - DESIGN MODERNO E TECNOLÓGICO
   =========================================== */

/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores principais - Tema Tecnológico */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Cores de fundo - Tema Escuro Moderno */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    
    /* Cores de texto */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Cores de status */
    --success: #10b981;
    --success-bg: #065f46;
    --warning: #f59e0b;
    --warning-bg: #92400e;
    --error: #ef4444;
    --error-bg: #991b1b;
    --info: #3b82f6;
    --info-bg: #1e40af;
    
    /* Sombras e efeitos */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    
    /* Bordas e raios */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Transições */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-sidebar: 1001;
    --z-header: 1002;
    --z-modal: 1050;
    --z-tooltip: 1100;
}

/* Configurações globais */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
}

/* ===========================================
   PÁGINA DE LOGIN - DESIGN MODERNO
   =========================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 49%, rgba(99, 102, 241, 0.1) 50%, transparent 51%),
        linear-gradient(-45deg, transparent 49%, rgba(139, 92, 246, 0.1) 50%, transparent 51%);
    background-size: 20px 20px;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
}

.logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* ===========================================
   LAYOUT PRINCIPAL - DESIGN MODERNO
   =========================================== */

.main-layout {
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
}

.main-layout::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ===========================================
   SIDEBAR - DESIGN MODERNO E TECNOLÓGICO
   =========================================== */

.sidebar {
    width: 280px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: var(--z-sidebar);
    transition: all var(--transition-normal);
    overflow-y: auto;
    overflow-x: hidden;
}

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

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

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

.sidebar-header {
    padding: 32px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: var(--primary-gradient);
    opacity: 0.5;
}

.sidebar-logo {
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-normal);
    padding: 8px;
    border-radius: var(--radius-md);
}

.sidebar-logo:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.05);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.logo-icon::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 var(--transition-slow);
}

.sidebar-logo:hover .logo-icon::before {
    left: 100%;
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar-logo .necia {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-logo .dot {
    color: var(--primary-color);
    font-size: 1.25rem;
    animation: pulse 2s infinite;
}

.sidebar-logo .mkt {
    color: var(--text-secondary);
    font-weight: 600;
}

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

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

.nav-section {
    margin-bottom: 32px;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding: 0 24px;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 4px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    position: relative;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-right: 16px;
    overflow: hidden;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--primary-gradient);
    transition: width var(--transition-normal);
    z-index: -1;
}

.nav-menu a:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-menu a:hover::before {
    width: 3px;
}

.nav-menu a.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.nav-menu a.active::before {
    width: 3px;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

.nav-menu i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* Submenu */
.nav-submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-normal);
    background: rgba(0, 0, 0, 0.2);
    margin-top: 4px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-right: 16px;
}

.nav-submenu.expanded {
    max-height: 200px;
}

.nav-submenu li {
    margin-bottom: 2px;
}

.nav-submenu a {
    padding: 8px 24px 8px 56px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.nav-submenu a:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-secondary);
}

.nav-submenu a.active {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
}

.has-submenu {
    position: relative;
}

.dropdown-arrow {
    margin-left: auto;
    transition: transform var(--transition-fast);
    font-size: 0.75rem;
}

.has-submenu.expanded .dropdown-arrow {
    transform: rotate(90deg);
}

/* ===========================================
   HEADER - DESIGN MODERNO E CONSISTENTE
   =========================================== */

.header {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    right: 0;
    left: 280px;
    height: 70px;
    z-index: var(--z-header);
    transition: all var(--transition-normal);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 32px;
}

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

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.header-title-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.header-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.user-info.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(99, 102, 241, 0.3);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.dropdown-arrow {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.user-info:hover .dropdown-arrow {
    transform: translateY(1px);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 220px;
    display: none;
    z-index: var(--z-dropdown);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.user-dropdown-item:last-child {
    border-bottom: none;
}

.user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: translateX(4px);
}

.user-dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.user-dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 0.875rem;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

/* ===========================================
   CONTEÚDO PRINCIPAL
   =========================================== */

.main-content {
    margin-left: 280px;
    margin-top: 70px;
    padding: 32px;
    min-height: calc(100vh - 70px);
    transition: all var(--transition-normal);
}

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title i {
    color: var(--primary-color);
    font-size: 1.75rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

/* ===========================================
   CARDS - DESIGN MODERNO
   =========================================== */

.card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title i {
    color: var(--primary-color);
    font-size: 1.125rem;
}

.card-content {
    padding: 32px;
}

/* ===========================================
   CARDS DE ESTATÍSTICAS
   =========================================== */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-icon {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* ===========================================
   FORMULÁRIOS - DESIGN MODERNO
   =========================================== */

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

/* ===========================================
   BOTÕES - DESIGN MODERNO
   =========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-normal);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

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

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: var(--text-primary);
}

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

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

.btn-full {
    width: 100%;
}

/* ===========================================
   TABELAS - DESIGN MODERNO
   =========================================== */

.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

.table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-align: left;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

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

/* ===========================================
   BADGES - DESIGN MODERNO
   =========================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-error {
    background: var(--error-bg);
    color: var(--error);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
}

.badge-active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge-inactive {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

/* ===========================================
   ALERTAS - DESIGN MODERNO
   =========================================== */

.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ===========================================
   MODAIS - DESIGN MODERNO
   =========================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-body {
    padding: 32px;
}

/* ===========================================
   DASHBOARD - RESPONSIVIDADE ESPECÍFICA
   =========================================== */

@media (max-width: 1200px) {
    .dashboard-main-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .dashboard-secondary-cards {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 16px;
    }
    
    .charts-grid,
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .dashboard-main-cards {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .main-stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .dashboard-secondary-cards {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 24px;
    }
    
    .secondary-stat-card {
        padding: 16px;
    }
    
    .secondary-stat-number {
        font-size: 1.5rem;
    }
    
    .secondary-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .charts-header,
    .content-header {
        margin-bottom: 24px;
    }
    
    .charts-title,
    .content-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .charts-subtitle,
    .content-subtitle {
        font-size: 0.875rem;
    }
    
    .chart-card,
    .content-card {
        padding: 20px;
    }
    
    .chart-header,
    .content-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .chart-stats {
        text-align: left;
    }
    
    .content-action-btn {
        align-self: flex-start;
    }
    
    .recent-item {
        padding: 12px;
    }
    
    .recent-item-icon {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .recent-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .dashboard-main-cards {
        gap: 12px;
    }
    
    .main-stat-card {
        padding: 16px;
    }
    
    .stat-card-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }
    
    .stat-info {
        width: 100%;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .stat-trend {
        justify-content: center;
    }
    
    .dashboard-secondary-cards {
        gap: 8px;
    }
    
    .secondary-stat-card {
        padding: 12px;
    }
    
    .secondary-card-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }
    
    .secondary-stat-info {
        width: 100%;
    }
    
    .secondary-stat-number {
        font-size: 1.25rem;
    }
    
    .secondary-stat-label {
        font-size: 0.75rem;
    }
    
    .charts-title,
    .content-title {
        font-size: 1.25rem;
    }
    
    .chart-card,
    .content-card {
        padding: 16px;
    }
    
    .content-card-header {
        padding: 16px 16px 12px;
    }
    
    .content-card-body {
        padding: 0 16px 16px;
    }
    
    .empty-state {
        padding: 24px 16px;
    }
    
    .empty-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 16px;
    }
    
    .empty-title {
        font-size: 1rem;
    }
    
    .empty-description {
        font-size: 0.75rem;
    }
    
    .empty-action-btn {
        padding: 10px 20px;
        font-size: 0.875rem;
    }
}

/* ===========================================
   RESPONSIVIDADE
   =========================================== */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .header {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    /* Melhorar a experiência do dropdown no mobile */
    .user-info {
        padding: 6px 12px;
        gap: 8px;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .user-name {
        font-size: 0.8rem;
    }
    
    .user-role {
        font-size: 0.7rem;
    }
    
    .header-subtitle {
        display: none;
    }
}
    
@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .table-container {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 12px 8px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 16px;
    }
    
    .page-title {
        font-size: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .header-content {
        padding: 0 16px;
    }
    
    .header-title {
        font-size: 1.25rem;
    }
    
    .header-left {
        gap: 12px;
    }
    
    /* Sidebar mobile otimizado */
    .sidebar {
        width: 100%;
        max-width: 280px;
    }
    
    .sidebar-header {
        padding: 20px 16px;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .nav-section {
        margin-bottom: 24px;
    }
    
    .nav-section-title {
        padding: 0 16px;
        font-size: 0.7rem;
    }
    
    .nav-menu a {
        padding: 10px 16px;
        margin-right: 12px;
        font-size: 0.8rem;
    }
    
    .nav-menu i {
        margin-right: 10px;
        width: 18px;
        font-size: 0.9rem;
    }
    
    /* Cards responsivos */
    .card-content {
        padding: 16px;
    }
    
    .card-header {
        padding: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* Formulários mobile */
    .form-group {
        margin-bottom: 20px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    /* Tabelas mobile */
    .table-container {
        font-size: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 8px 6px;
    }
    
    /* Modal mobile */
    .modal-content {
        width: 95%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body {
        padding: 16px;
    }
    
    /* Dropdown mobile */
    .user-dropdown {
        right: -10px;
        left: -10px;
        min-width: auto;
        width: auto;
    }
    
    .user-dropdown-item {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    /* Login mobile */
    .login-container {
        padding: 16px;
    }
    
    .login-box {
        padding: 32px 24px;
    }
    
    .logo {
        font-size: 2rem;
    }
}

/* ===========================================
   DASHBOARD - DESIGN ESPECÍFICO
   =========================================== */

/* Cards Principais do Dashboard */
.dashboard-main-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.main-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: blur(20px);
}

.main-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.main-stat-primary {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        rgba(147, 51, 234, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

.main-stat-success {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.1) 0%, 
        rgba(34, 197, 94, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.main-stat-warning {
    background: linear-gradient(135deg, 
        rgba(245, 158, 11, 0.1) 0%, 
        rgba(251, 191, 36, 0.1) 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

.main-stat-info {
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.1) 0%, 
        rgba(139, 92, 246, 0.1) 100%);
    border-color: rgba(99, 102, 241, 0.3);
}

.stat-card-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.stat-trend i {
    font-size: 0.875rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

.main-stat-card:hover .stat-icon {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.15);
}

.stat-card-background {
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    opacity: 0.1;
    z-index: 1;
}

.stat-bg-pattern {
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="white"/><circle cx="20" cy="20" r="1" fill="white"/><circle cx="80" cy="30" r="1.5" fill="white"/><circle cx="30" cy="80" r="1" fill="white"/><circle cx="70" cy="70" r="1.5" fill="white"/></svg>') repeat;
    animation: float 6s ease-in-out infinite;
}

/* Cards Secundários do Dashboard */
.dashboard-secondary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.secondary-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.secondary-stat-purple {
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.08) 0%, 
        rgba(124, 58, 237, 0.08) 100%);
    border-color: rgba(139, 92, 246, 0.2);
}

.secondary-stat-pink {
    background: linear-gradient(135deg, 
        rgba(236, 72, 153, 0.08) 0%, 
        rgba(219, 39, 119, 0.08) 100%);
    border-color: rgba(236, 72, 153, 0.2);
}

.secondary-stat-blue {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.08) 0%, 
        rgba(37, 99, 235, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.2);
}

.secondary-stat-green {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.08) 0%, 
        rgba(5, 150, 105, 0.08) 100%);
    border-color: rgba(16, 185, 129, 0.2);
}

.secondary-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.secondary-stat-info {
    flex: 1;
}

.secondary-stat-number {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.secondary-stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.secondary-stat-subtitle {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.secondary-stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.secondary-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.secondary-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    transition: width var(--transition-normal);
}

.secondary-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--success-color);
    font-weight: 600;
}

.secondary-trend i {
    font-size: 0.875rem;
}

/* Seção de Gráficos */
.dashboard-charts-section {
    margin-bottom: 32px;
}

.charts-header {
    text-align: center;
    margin-bottom: 32px;
}

.charts-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.charts-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.chart-primary {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.08) 0%, 
        rgba(147, 51, 234, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.2);
}

.chart-secondary {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.08) 0%, 
        rgba(34, 197, 94, 0.08) 100%);
    border-color: rgba(16, 185, 129, 0.2);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.chart-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.chart-stats {
    text-align: right;
}

.chart-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.chart-stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-content {
    position: relative;
    height: 200px;
}

/* Seção de Conteúdo */
.dashboard-content-section {
    margin-bottom: 32px;
}

.content-header {
    text-align: center;
    margin-bottom: 32px;
}

.content-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.content-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.content-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.content-card-primary {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.08) 0%, 
        rgba(147, 51, 234, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.2);
}

.content-card-secondary {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.08) 0%, 
        rgba(34, 197, 94, 0.08) 100%);
    border-color: rgba(16, 185, 129, 0.2);
}

.content-card-header {
    padding: 24px 24px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.content-card-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-card-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.content-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.content-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.content-card-body {
    padding: 0 24px 24px;
}

/* Estados Vazios */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--text-tertiary);
}

.empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.empty-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-normal);
}

.empty-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Lista de Itens Recentes */
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition-normal);
}

.recent-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.recent-item-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-primary);
    flex-shrink: 0;
}

.recent-item-content {
    flex: 1;
    min-width: 0;
}

.recent-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
}

.recent-item-date {
    color: var(--text-tertiary);
}

.recent-item-status {
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.status-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

/* ===========================================
   ANIMAÇÕES E EFEITOS MODERNOS
   =========================================== */

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

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(99, 102, 241, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.4), 0 0 30px rgba(99, 102, 241, 0.1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }
    51%, 100% {
        border-color: var(--primary-color);
    }
}

/* Classes de animação */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease-out;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease-out;
}

.animate-scaleIn {
    animation: scaleIn 0.6s ease-out;
}

.animate-bounceIn {
    animation: bounceIn 0.8s ease-out;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Efeitos de hover modernos */
.hover-lift {
    transition: all var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.hover-scale {
    transition: all var(--transition-normal);
}

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

.hover-glow {
    transition: all var(--transition-normal);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Efeitos de loading modernos */
.loading-shimmer {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.05) 25%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Efeitos de entrada sequencial */
.animate-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.5s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.6s; }

/* Efeitos de texto */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-glow {
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Efeitos de glassmorphism */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-xl);
}

/* Efeitos de partículas */
.particle-bg {
    position: relative;
    overflow: hidden;
}

.particle-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(99, 102, 241, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(139, 92, 246, 0.3), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(99, 102, 241, 0.2), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(139, 92, 246, 0.2), transparent);
    background-repeat: repeat;
    background-size: 150px 100px;
    animation: float 20s linear infinite;
    opacity: 0.3;
}

/* Efeitos de cursor */
.cursor-pointer {
    cursor: pointer;
}

.cursor-grab {
    cursor: grab;
}

.cursor-grabbing {
    cursor: grabbing;
}

/* Efeitos de transição suave */
.smooth-transition {
    transition: all var(--transition-normal);
}

.fast-transition {
    transition: all var(--transition-fast);
}

.slow-transition {
    transition: all var(--transition-slow);
}

/* ===========================================
   UTILITÁRIOS
   =========================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.cursor-pointer { cursor: pointer; }

/* ===========================================
   ESTADOS VAZIOS
   =========================================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ===========================================
   LOADING E SPINNERS
   =========================================== */

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-xl);
}

/* ===========================================
   MELHORIAS ESPECÍFICAS PARA O SISTEMA
   =========================================== */

/* Ajustes para páginas específicas */
.seo-layout {
    padding-top: 130px;
}

.company-selector {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Melhorias no formulário de login */
.login-form input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.login-form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Overlay para sidebar em mobile */
#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
}

/* Melhorias nos cards de estatísticas */
.stat-card:nth-child(1) .stat-icon { background: rgba(99, 102, 241, 0.1); color: var(--primary-color); }
.stat-card:nth-child(2) .stat-icon { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-card:nth-child(3) .stat-icon { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.stat-card:nth-child(4) .stat-icon { background: rgba(59, 130, 246, 0.1); color: var(--info); }

/* Melhorias na tabela */
.table-container::-webkit-scrollbar {
    height: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

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

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