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

:root {
    --primary-color: #f97316; /* Vibrant Orange */
    --primary-hover: #ea580c;
    --secondary-color: #64748b;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --sidebar-width: 260px;
    --navbar-height: 64px;
    --transition-speed: 0.3s;
    --box-shadow: 0 4px 20px -2px rgba(249, 115, 22, 0.05), 0 2px 4px -2px rgba(249, 115, 22, 0.03);
    --box-shadow-hover: 0 10px 25px -3px rgba(249, 115, 22, 0.15), 0 4px 6px -4px rgba(249, 115, 22, 0.05);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* ==============================================================
   Bootstrap Color Overrides
   ============================================================== */
.bg-primary { background-color: var(--primary-color) !important; }
.text-primary { color: var(--primary-color) !important; }
.border-primary { border-color: var(--primary-color) !important; }
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
.alert-primary {
    background-color: rgba(249, 115, 22, 0.1);
    color: #c2410c;
    border-color: rgba(249, 115, 22, 0.2);
}
.badge.bg-primary {
    background-color: rgba(249, 115, 22, 0.1) !important;
    color: var(--primary-color) !important;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

/* ==============================================================
   Typography & Utilities
   ============================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--primary-hover);
}

.text-muted { color: var(--text-muted) !important; }

/* ==============================================================
   Cards & Containers
   ============================================================== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    margin-bottom: 24px;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Glassmorphism Auth Card */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative background circles */
.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    opacity: 0.1;
    z-index: 0;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    border-radius: 50%;
    bottom: -50px;
    left: -100px;
    opacity: 0.1;
    z-index: 0;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(249, 115, 22, 0.25);
    z-index: 1;
}

.auth-card .card-body {
    padding: 3rem 2.5rem;
}

/* ==============================================================
   Forms & Inputs
   ============================================================== */
.form-control {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: #334155;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all var(--transition-speed);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(249, 115, 22, 0.3);
}

/* ==============================================================
   Layout (Sidebar & Navbar)
   ============================================================== */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    min-height: 100vh;
    transition: all var(--transition-speed);
    z-index: 1000;
}

#sidebar.collapsed {
    margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar-header {
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand:hover {
    color: var(--primary-hover);
}

.sidebar-nav {
    padding: 1rem 0;
    list-style: none;
    margin: 0;
}

.sidebar-nav li {
    padding: 0.2rem 1rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.2rem;
    color: var(--text-muted);
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.2rem;
}

.sidebar-link i {
    font-size: 1.25rem;
    margin-right: 14px;
    width: 24px;
    text-align: center;
    transition: transform 0.3s ease;
}

.sidebar-link:hover {
    background-color: rgba(249, 115, 22, 0.05);
    color: var(--primary-color);
    transform: translateX(4px);
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.1) 0%, rgba(249, 115, 22, 0.02) 100%);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
    font-weight: 600;
}

.sidebar-link.active i {
    color: var(--primary-color);
}

.nav-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #94a3b8;
    margin: 1.5rem 1rem 0.5rem 1.5rem;
    letter-spacing: 0.05em;
}

/* Page Content */
#page-content-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar */
.top-navbar {
    height: var(--navbar-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
}

.navbar-toggler-icon {
    width: 1.2em;
    height: 1.2em;
}

/* User Dropdown */
.user-profile-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.dropdown-menu {
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color) !important;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.2s;
    margin-bottom: 2px;
}

.dropdown-item:hover {
    background-color: rgba(249, 115, 22, 0.08);
    color: var(--primary-color);
}

.dropdown-item.text-danger:hover {
    background-color: rgba(239, 68, 68, 0.08);
    color: #ef4444 !important;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 2rem 1.5rem;
}

/* ==============================================================
   Stat Cards (Dashboard)
   ============================================================== */
.stat-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
}

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

.stat-icon.primary { background: rgba(249, 115, 22, 0.1); color: var(--primary-color); }
.stat-icon.success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.stat-icon.danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.stat-content h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
        position: fixed;
        height: 100vh;
    }
    #sidebar.show {
        margin-left: 0;
    }
    .main-content {
        padding: 1rem;
    }
}
