:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #60A5FA;
    --secondary: #06B6D4;
    --secondary-dark: #0891B2;
    --accent: #06B6D4;
    --danger: #EF4444;
    --base-bg: #F8FAFC;
    --glass-white: rgba(255, 255, 255, 0.7);
    --glass-white-high: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #1E293B;
    --text-secondary: #475569;
    --text-glass: #64748B;
    --border: rgba(255, 255, 255, 0.3);
    --sidebar-width: 280px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--base-bg);
    min-height: 100vh;
    color: var(--text-primary);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(37, 99, 235, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--glass-white);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 2.5rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    height: 80px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    filter: brightness(1.1);
}

.logo-text {
    text-align: center;
}

.app-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.95;
}

.sidebar-nav {
    padding: 1.5rem 0;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section-title {
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-glass);
    letter-spacing: 0.05em;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
    color: var(--primary);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.page-header {
    background: var(--glass-white);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

.card {
    background: var(--glass-white);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-white);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.2) 100%);
    color: var(--primary);
}

.stat-icon.success {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(6, 182, 212, 0.2) 100%);
    color: var(--secondary);
}

.stat-icon.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.2) 100%);
    color: #F59E0B;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: var(--glass-white);
    backdrop-filter: blur(12px);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.9);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%);
    color: white;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: #FAFAFA;
    backdrop-filter: blur(12px);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.3);
    background: rgba(255, 255, 255, 0.9);
}

.form-control-file {
    padding: 0.5rem;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: #FAFAFA;
    backdrop-filter: blur(12px);
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    background: #F1F5F9;
}

.form-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #E2E8F0;
    border-radius: 4px;
    background: #FAFAFA;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.form-checkbox:checked {
    background: var(--secondary);
    border-color: var(--secondary);
}

.form-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
}

.checkbox-text {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 1rem;
    background: rgba(248, 250, 252, 0.85);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.table tr:hover {
    background: rgba(37, 99, 235, 0.03);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(6, 182, 212, 0.1);
    color: var(--secondary);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.badge-secondary {
    background: rgba(6, 182, 212, 0.1);
    color: var(--secondary);
}

.badge-info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(12px);
}

.alert-success {
    background: rgba(6, 182, 212, 0.1);
    color: var(--secondary-dark);
    border-left: 3px solid var(--secondary);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-left: 3px solid var(--danger);
}

.alert-info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.login-card {
    background: var(--glass-white);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 24px;
    opacity: 0.1;
    z-index: -1;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
}

.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.login-logo img {
    height: 80px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.login-app-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.9;
}

.mobile-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    padding: 0.75rem;
    background: var(--glass-white);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
}

.glass-panel {
    background: var(--glass-white);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.text-muted {
    color: #94A3B8;
}

.table-responsive {
    overflow-x: auto;
}

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

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}