:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-family: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.1), transparent 25%);
}

h1, h2, h3, h4 { font-weight: 600; }
a { color: var(--primary-color); text-decoration: none; cursor: pointer; }

.hidden { display: none !important; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.p-1 { padding: 0.25rem; }
.p-4 { padding: 1.5rem; }
.w-100 { width: 100%; }
.w-50 { width: 50%; }
.mw-600 { max-width: 600px; margin: 0 auto; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-color); }
.text-warning { color: var(--warning-color); }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.d-grid-2 { display: grid; grid-template-columns: 1fr 1fr; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1.5rem; }
.border-bottom { border-bottom: 1px solid var(--glass-border); }

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.5rem 1rem; border-radius: 6px; font-weight: 500; font-size: 0.875rem;
    cursor: pointer; transition: var(--transition); border: none; outline: none;
}
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-1px); }
.btn-secondary { background-color: rgba(255, 255, 255, 0.1); color: var(--text-color); }
.btn-secondary:hover { background-color: rgba(255, 255, 255, 0.2); }
.btn-danger { background-color: var(--danger-color); color: white; }
.btn-danger:hover { background-color: var(--danger-hover); }
.btn-warning { background-color: var(--warning-color); color: white; }
.btn-warning:hover { background-color: #d97706; }

.btn-group { display: flex; gap: 0.25rem; }

.chart-container { position: relative; height: 300px; width: 100%; }

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; color: var(--text-muted); }
.form-group input, .form-group textarea, .form-input {
    width: 100%; padding: 0.625rem; background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border); border-radius: 6px; color: var(--text-color);
    font-family: var(--font-family); transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-input:focus {
    outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.error-text { color: var(--danger-color); font-size: 0.875rem; margin-bottom: 1rem; min-height: 1.25rem; }

.overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; animation: fadeIn 0.3s ease;
}

.login-modal, .modal { width: 100%; max-width: 400px; padding: 2rem; animation: slideUp 0.3s ease; }
.modal { max-width: 500px; max-height: 90vh; overflow-y: auto; }
.login-modal h2, .modal h2 { margin-bottom: 1.5rem; text-align: center; }
.modal-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 1.5rem; }

.dashboard { display: flex; height: 100vh; }
.sidebar {
    width: 260px; border-radius: 0; border-top: none; border-bottom: none; border-left: none;
    display: flex; flex-direction: column;
}
.sidebar-header { padding: 1.5rem; border-bottom: 1px solid var(--glass-border); }
.sidebar-nav { padding: 1rem 0; display: flex; flex-direction: column; flex: 1; }
.sidebar-nav a { padding: 0.75rem 1.5rem; color: var(--text-muted); transition: var(--transition); }
.sidebar-nav a:hover, .sidebar-nav a.active { background-color: rgba(255, 255, 255, 0.05); color: var(--text-color); border-left: 3px solid var(--primary-color); }
.sidebar-footer { padding: 1.5rem; border-top: 1px solid var(--glass-border); }
.sidebar-footer a { color: var(--text-muted); } .sidebar-footer a:hover { color: var(--danger-color); }

.content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.content-header { padding: 1.5rem 2rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--glass-border); }
.content-body { padding: 2rem; overflow-y: auto; flex: 1; }

.table-container { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--glass-border); }
.data-table th { font-size: 0.875rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background-color: rgba(255, 255, 255, 0.03); }

.action-links { display: flex; gap: 0.75rem; }
.action-links a.edit { color: var(--primary-color); }
.action-links a.delete { color: var(--danger-color); }
.action-links a.view { color: var(--success-color); }

.badge { padding: 0.25rem 0.5rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 500; }
.badge-success { background-color: rgba(16, 185, 129, 0.2); color: #10b981; }
.badge-danger { background-color: rgba(239, 68, 68, 0.2); color: #ef4444; }

.notification-container { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 2000; }
.notification {
    padding: 1rem 1.5rem; border-radius: 8px; color: white; font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    background: var(--glass-bg); backdrop-filter: blur(8px); border: 1px solid var(--glass-border);
}
.notification.success { border-left: 4px solid var(--success-color); }
.notification.error { border-left: 4px solid var(--danger-color); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
