@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #10b981;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --sidebar-bg: #1e1e2f;
    --sidebar-text: #e2e8f0;
    --sidebar-hover: #ffffff;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Sidebar */
#sidebar {
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: all 0.3s;
    z-index: 1000;
}

#sidebar.toggled {
    left: -250px;
}

#sidebar .sidebar-header {
    padding: 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.1);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 1px;
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li a {
    padding: 12px 20px;
    font-size: 1rem;
    display: block;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

#sidebar ul li a:hover,
#sidebar ul li.active>a {
    color: var(--sidebar-hover);
    background: var(--sidebar-hover-bg);
    border-left: 4px solid var(--primary-color);
}

/* Main Content */
#content {
    width: calc(100% - 250px);
    margin-left: 250px;
    min-height: 100vh;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

#content.toggled {
    width: 100%;
    margin-left: 0;
}

/* Top Navbar */
.top-navbar {
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-navbar .btn-toggle {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-main);
}

/* Dashboard Cards */
.metric-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid var(--primary-color);
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.metric-card .icon-box {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.metric-card .metric-info h5 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 600;
}

.metric-card .metric-info h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

/* Data Tables & Cards */
.card-custom {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: none;
    margin-bottom: 20px;
}

.card-custom .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-custom .card-body {
    padding: 20px;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Auth Page */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.auth-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.auth-card h2 {
    text-align: center;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-main);
}

.auth-card .form-control {
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e5e7eb;
}

.auth-card .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    padding: 10px 0;
    justify-content: space-around;
    border-top: 1px solid #eee;
}

.mobile-bottom-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.mobile-bottom-nav a.active {
    color: var(--primary-color);
}

.mobile-bottom-nav i {
    font-size: 1.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        left: -250px;
    }

    #sidebar.toggled {
        left: 0;
    }

    #content {
        width: 100%;
        margin-left: 0;
        padding-bottom: 70px;
        /* Space for bottom nav */
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .top-navbar {
        padding: 10px 15px;
    }
}