:root {
    --sidebar-width: 260px;
    --topbar-height: 60px;
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --bg-light: #f8f9fc;
}

body {
    background-color: var(--bg-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#wrapper {
    display: flex;
    min-height: 100vh;
}

#sidebar {
    width: var(--sidebar-width);
    background-color: #2c3e50;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-x: hidden;
    white-space: nowrap;
}

#sidebar.collapsed {
    width: 70px;
}

#sidebar.collapsed .sidebar-header span,
#sidebar.collapsed ul li a span {
    display: none;
}

#sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0;
}

#sidebar.collapsed .sidebar-header img {
    margin-right: 0 !important;
}

#sidebar.collapsed ul li a {
    text-align: center;
    padding: 15px 0;
    justify-content: center;
}

#sidebar.collapsed ul li a i {
    margin-right: 0 !important;
    font-size: 1.2rem;
}

#sidebar .sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 15px;
    font-weight: bold;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
}

#sidebar ul.components {
    padding: 10px 0;
}

#sidebar ul li a {
    padding: 12px 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.2s;
}

#sidebar ul li a i {
    width: 30px;
    text-align: center;
}

#sidebar ul li a:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.1);
}

#sidebar ul li.active > a {
    color: #fff;
    background-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#topbar {
    height: var(--topbar-height);
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    z-index: 999;
}

.main-container {
    padding: 20px;
    flex: 1;
}

.x-small { font-size: 0.7rem; }
.tracking-widest { letter-spacing: 0.15em; }

.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175);
}

.card {
    border-radius: 8px;
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e3e6f0;
    font-weight: bold;
    color: #4e73df;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
        position: fixed;
        height: 100vh;
        width: var(--sidebar-width) !important;
    }
    #sidebar.active {
        margin-left: 0;
    }
    #sidebar.collapsed {
        margin-left: calc(-1 * var(--sidebar-width));
    }
}
