@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    --accent-gradient: linear-gradient(135deg, #2af598 0%, #009efd 100%);
    --glass: rgba(255, 255, 255, 0.1);
    --glass-dark: rgba(0, 0, 0, 0.2);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --bg-dark: #0a0a0b;
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --panel-bg: var(--glass-dark);
}

[data-theme="light"] {
    --bg-dark: #f0f2f5;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-dark: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
    --text-white: #1a1a1b;
    --text-muted: #65676b;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --panel-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 40%);
    z-index: -1;
}

/* Glassmorphism Components */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
}

.btn-outline:hover {
    background: var(--glass);
    border-color: white;
    transform: translateY(-3px);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 450px;
}

.auth-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-align: center;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    outline: none;
    font-size: 16px; /* Prevents auto-zoom on mobile devices */
    transition: border 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
}

/* Dashboard Sidebar & Layout */
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 2rem 1rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    left: 0;
    transition: all 0.3s ease;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    transition: all 0.3s ease;
}

/* Sidebar Toggle State */
.sidebar.closed {
    left: -260px;
}

.main-content.full {
    margin-left: 0;
}

@media (max-width: 992px) {
    .sidebar {
        left: -260px;
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar.open {
        left: 0;
    }
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.nav-item.active, .nav-item:hover {
    background: var(--glass);
    color: var(--text-white);
}

.nav-item i {
    margin-right: 12px;
    font-size: 1.2rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Mobile Responsiveness */
.menu-toggle {
    display: inline-block;
    font-size: 1.5rem;
    color: var(--text-white);
    cursor: pointer;
    margin-right: 1.5rem;
}

/* Utility classes */
.responsive-grid {
    display: grid;
    gap: 2rem;
}
@media (max-width: 768px) {
    .responsive-grid {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
    }
}

.text-center { text-align: center; }
.mb-2 { margin-bottom: 1rem; }
.mt-2 { margin-top: 1rem; }
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}
.badge-success { background: rgba(42, 245, 152, 0.2); color: #2af598; }
.badge-pending { background: rgba(255, 193, 7, 0.2); color: #ffc107; }
.badge-danger { background: rgba(255, 82, 82, 0.2); color: #ff5252; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Button Pulsing */
@keyframes pulse-btn {
    0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(102, 126, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

.btn-pulse {
    animation: pulse-btn 2s infinite;
}

/* Glassmorphism Hover Info */
.btn-info {
    position: relative;
}

.btn-info::before {
    content: attr(data-info);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-dark);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
    color: white;
    z-index: 100;
}

.btn-info:hover::before {
    opacity: 1;
    visibility: visible;
    bottom: 110%;
}
