:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #f59e0b;
    --secondary-dark: #d97706;
    --success: #10b981;
    --success-dark: #059669;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --info: #3b82f6;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --bg-light: #f8fafc;
    --bg-dark: #1e293b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-full: 50%;
    --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    font-family: var(--font-family);
    background: var(--bg-light);
    color: var(--text-primary);
}

.navbar {
    background: var(--gradient) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.btn-primary {
    background: var(--gradient);
    border: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--gradient-secondary);
    border: none;
}

.btn-success {
    background: var(--gradient-success);
    border: none;
}

.card {
    border: none;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: var(--gradient);
    color: white;
    border-radius: var(--radius) var(--radius) 0 0 !important;
    font-weight: 600;
}

.badge-premium {
    background: var(--gradient-secondary);
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.sidebar {
    min-height: calc(100vh - 76px);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 2px 0 15px rgba(0,0,0,0.1);
    padding: 1.5rem 0;
}

.sidebar .sidebar-header {
    padding: 0 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
}

.sidebar .sidebar-header h5 {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

.sidebar .nav-section {
    padding: 0.5rem 1.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.4);
    margin-top: 0.75rem;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    margin: 2px 0.75rem;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.sidebar .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar .nav-link.active {
    background: var(--gradient);
    color: #fff;
    font-weight: 500;
}

.sidebar .nav-link i {
    width: 22px;
    font-size: 0.9rem;
}

.sidebar hr {
    border-color: rgba(255,255,255,0.1);
    margin: 0.75rem 1rem;
}

.admin-content {
    background: #f8fafc;
    min-height: calc(100vh - 76px);
}

.stat-card {
    background: var(--gradient);
    color: white;
    border-radius: var(--radius);
}

.stat-card.secondary {
    background: var(--gradient-secondary);
}

.stat-card.success {
    background: var(--gradient-success);
}

.progress {
    height: 8px;
    border-radius: var(--radius-sm);
    background: var(--border-color);
}

.progress-bar {
    background: var(--gradient);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 96px; height: 96px; }

.hero {
    background: var(--gradient);
    color: white;
    padding: 80px 0;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.feature-icon.secondary { background: var(--gradient-secondary); }
.feature-icon.success { background: var(--gradient-success); }

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

.bg-gradient-primary { background: var(--gradient); }
.bg-gradient-secondary { background: var(--gradient-secondary); }
.bg-gradient-success { background: var(--gradient-success); }

.border-primary { border-color: var(--primary) !important; }
.border-secondary { border-color: var(--secondary) !important; }

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

.table th {
    background: var(--bg-light);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.alert {
    border: none;
    border-radius: var(--radius-sm);
}

.modal-content {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1,
.page-header h2 {
    color: var(--text-primary);
    font-weight: 700;
}

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

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.fade-in {
    animation: fadeIn 0.3s ease;
}

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

.impersonation-banner {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.impersonation-banner .btn-light {
    background: rgba(255,255,255,0.9);
    border: none;
    font-weight: 600;
}

.impersonation-banner .btn-light:hover {
    background: #fff;
    transform: translateY(-1px);
}

@media (max-width: 991px) {
    .hero { padding: 50px 0; }
    .sidebar { 
        min-height: auto; 
        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        height: 100%;
        z-index: 1050;
        transition: left 0.3s ease;
        padding-top: 70px;
    }
    .sidebar.show { left: 0; }
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
    }
    .sidebar-overlay.show { display: block; }
    .admin-sidebar-col { display: none; }
    .admin-content-col { flex: 0 0 100%; max-width: 100%; }
}

@media (max-width: 768px) {
    .hero { padding: 40px 0; }
    
    .display-3 { font-size: 2rem; }
    .display-4 { font-size: 1.75rem; }
    .display-5 { font-size: 1.5rem; }
    .lead { font-size: 1rem; }
    
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
    
    .card { margin-bottom: 1rem; }
    
    .stat-box { padding: 15px; }
    .stat-number { font-size: 2rem; }
    
    .feature-icon-lg {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .table-responsive { font-size: 0.875rem; }
    .table th, .table td { padding: 0.5rem; white-space: nowrap; }
    
    .navbar-brand { font-size: 1.2rem; }
    .navbar-brand img { height: 28px !important; }
    
    .dropdown-menu { position: static !important; width: 100%; }
    
    .footer .row > div { margin-bottom: 1.5rem; text-align: center; }
    .footer .d-flex { justify-content: center; }
    
    .modal-dialog { margin: 0.5rem; }
    .modal-body { padding: 1rem; }
    
    .page-header { margin-bottom: 1rem; }
    .page-header h1, .page-header h2 { font-size: 1.5rem; }
    
    .avatar-xl { width: 64px; height: 64px; }
    .avatar-lg { width: 48px; height: 48px; }
    
    .form-control, .form-select, .btn { 
        font-size: 16px;
    }
    
    .g-4 { --bs-gutter-y: 1rem; }
    .py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
    .mb-5 { margin-bottom: 2rem !important; }
    
    .pricing-card .card-body { padding: 1.5rem; }
    
    .experience-card img { height: 180px; }
    
    .testimonial-card { padding: 20px; }
    .testimonial-card::before { font-size: 50px; top: 5px; left: 10px; }
}

@media (max-width: 576px) {
    .container { padding-left: 15px; padding-right: 15px; }
    
    .hero-landing { min-height: 60vh; }
    
    .d-flex.gap-3 { flex-direction: column; gap: 0.75rem !important; }
    .d-flex.gap-3 .btn { width: 100%; }
    
    .d-flex.gap-4 { flex-direction: column; gap: 0.5rem !important; }
    
    .col-6 { flex: 0 0 50%; max-width: 50%; }
    
    .badge-popular { font-size: 0.75rem; padding: 4px 12px; }
    
    .floating-cards { display: none !important; }
    
    input[type="text"], input[type="email"], input[type="password"], 
    input[type="number"], textarea, select {
        font-size: 16px !important;
    }
}

.touch-target {
    min-height: 44px;
    min-width: 44px;
}

.mobile-full-width {
    width: 100%;
}

@media (min-width: 768px) {
    .mobile-full-width { width: auto; }
}

.permission-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.permission-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.permission-toast-success { background: #059669; }
.permission-toast-warning { background: #d97706; }
.permission-toast-error { background: #dc2626; }

.mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(99,102,241,0.4);
    z-index: 1030;
    font-size: 1.25rem;
}

@media (max-width: 991px) {
    .mobile-menu-toggle { display: flex; align-items: center; justify-content: center; }
}

.safe-area-padding {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.ios-input-fix:focus {
    font-size: 16px !important;
}
