@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4f46e5;
    --primary-soft: rgba(79, 70, 229, 0.1);
    --secondary-color: #f59e0b;
    --bg-light: #f8fafc;
    --sidebar-bg: #ffffff;
    --navbar-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-light: #0f172a;
    --sidebar-bg: #1e293b;
    --navbar-bg: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    transition: var(--transition);
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    padding: 1.5rem;
}

.auth-card {
    border: none !important;
    border-radius: 1.5rem !important;
    box-shadow: var(--card-shadow) !important;
    background: white !important;
    padding: 2.5rem !important;
    width: 100% !important;
    max-width: 480px !important;
    color: #1e293b !important;
}

/* Sidebar */
.sidebar {
    width: 280px;
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    padding: 1.5rem;
    z-index: 1060;
    transition: var(--transition);
}

.main-wrapper {
    margin-left: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.top-navbar {
    height: 70px;
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.content-body {
    padding: 2rem;
    flex-grow: 1;
}

/* Branding & Labels */
.brand-logo {
    width: 42px;
    height: 42px;
    background: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--text-muted);
    margin: 1.5rem 0 0.75rem 1rem;
}

/* Nav Links */
.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.nav-link i { font-size: 1.1rem; }

.nav-link:hover, .nav-link.active {
    background: var(--primary-soft);
    color: var(--primary-color);
}

.breadcrumb {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2rem;
    vertical-align: middle;
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Icons & Avatars */
.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text-muted);
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--primary-soft);
    color: var(--primary-color);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Components Overrides */
.card-premium {
    background-color: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    box-shadow: var(--card-shadow);
}

.btn-premium {
    background: var(--primary-color);
    color: white !important;
    border: none;
    border-radius: 0.75rem;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-premium:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Theme Utilities - Scoped to Dashboard */
.main-wrapper .bg-white,
[data-theme="dark"] .main-wrapper .bg-white {
    background-color: var(--sidebar-bg) !important;
}

[data-theme="dark"] .main-wrapper .card:not(.auth-card) {
    background-color: var(--sidebar-bg);
    border-color: var(--border-color);
    color: var(--text-main);
}

.text-muted { color: var(--text-muted) !important; }
.border-top, .border-bottom { border-color: var(--border-color) !important; }

/* Overlay & Scrollbar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1050;
}

.sidebar-overlay.show { display: block; }

.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

/* Landing Page Fixes */
.hero-section { overflow: hidden; }
.backdrop-blur { backdrop-filter: blur(10px); }

/* Form Styles */
[data-theme="dark"] .form-control {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .breadcrumb { display: none !important; }
}

/* Utilities */
.p-2-5 { padding: 0.625rem !important; }
.fs-7 { font-size: 0.875rem !important; }
.fs-8 { font-size: 0.75rem !important; }

[data-theme="dark"] .bg-light { background-color: #1e293b !important; color: var(--text-main); }
[data-theme="dark"] .table-light { background-color: #1e293b !important; color: var(--text-main); }
.table-hover tbody tr:hover { background-color: var(--primary-soft); }
[data-theme="dark"] .table-hover tbody tr:hover { background-color: rgba(79, 70, 229, 0.1) !important; }

