﻿* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    background: #f5f6fa;
}

.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.sidebar {
    width: 280px;
    min-width: 280px;
    background: #1e293b;
    color: white;
    padding: 15px 8px;
    flex-shrink: 0;
    overflow-y: auto;
}

.sidebar-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 25px;
}

.sidebar .nav-link {
    color: #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 4px;
    transition: 0.2s;
    white-space: nowrap;
}

.sidebar .nav-link:hover {
    background: #334155;
    color: white;
}

.sidebar .nav-link.active {
    background-color: #0d6efd;
    color: #fff !important;
    font-weight: 600;
}

.sidebar .submenu {
    margin-right: 0;
    padding-right: 8px;
    border-right: 2px solid #475569;
}

.sidebar .submenu .nav-link {
    font-size: 14px;
    padding: 8px 10px;
}

.sidebar .submenu .nav-link.active {
    background-color: #2563eb transparent;
    color: white !important;
}

.menu-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.nav-link[aria-expanded="true"] .menu-arrow {
    transform: rotate(180deg);
}

.main-wrapper {
    flex: 1;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.topbar {
    height: 60px;
    background: white;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    padding: 0 24px;
    flex-shrink: 0;
}

.content {
    flex: 1;
    padding: 24px;
    min-width: 0;
    overflow-x: auto;
}

.footer {
    background: white;
    border-top: 1px solid #dee2e6;
    padding: 12px 24px;
    flex-shrink: 0;
}

.menu-icon {
    font-size: 18px;
    margin-left: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {

    .app-layout {
        flex-direction: column;
        width: 100%;
        min-height: 100vh;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: auto;
        position: relative;
        padding: 10px;
    }

    .sidebar-title {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .main-wrapper {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .topbar {
        width: 100%;
        height: auto;
        min-height: 55px;
        padding: 12px 15px;
    }

    .content {
        width: 100%;
        max-width: 100%;
        padding: 12px;
        overflow-x: auto;
    }

    .footer {
        width: 100%;
        padding: 10px 15px;
        font-size: 13px;
    }

    .sidebar .nav-link {
        white-space: normal;
        font-size: 14px;
    }

    .submenu {
        padding-right: 5px;
    }
}
