@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-light: #f9fafb;
    --bg-dark: #0f172a;
    --card-light: #ffffff;
    --card-dark: #1e293b;
    --text-light: #1f2937;
    --text-dark: #f1f5f9;
    --border-light: #e5e7eb;
    --border-dark: #334155;
}

[data-theme="dark"] {
    --bg: var(--bg-dark);
    --card: var(--card-dark);
    --text: var(--text-dark);
    --border: var(--border-dark);
}

[data-theme="light"] {
    --bg: var(--bg-light);
    --card: var(--card-light);
    --text: var(--text-light);
    --border: var(--border-light);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: all 0.3s ease;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.quantum-logo {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(45deg, #fff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Glass morphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .glass {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Cards com hover effect */
.stat-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .stat-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 300px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.toast.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.toast.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

/* Theme Toggle */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background: var(--border);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.theme-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .theme-toggle {
    background: var(--primary);
}

[data-theme="dark"] .theme-toggle-slider {
    transform: translateX(30px);
}

/* Tabelas modernas */
table {
    border-collapse: separate;
    border-spacing: 0;
}

tbody tr {
    transition: all 0.2s;
}

tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: scale(1.01);
}

/* Botões com ripple effect */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Progress bar */
.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    animation: progress 2s infinite;
}

/* ... seus estilos existentes ... */

/* Estilos para Toast Notifications */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast-notification {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-notification.toast-success {
    background-color: #28a745; /* Verde */
}

.toast-notification.toast-error {
    background-color: #dc3545; /* Vermelho */
}

.toast-notification i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

/* Estilos para Modal */
.modal-backdrop {
    transition: opacity 0.3s ease-in-out;
}
.modal-content {
    transition: transform 0.3s ease-in-out;
}

@keyframes progress {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
