/* ===== LAYOUT STRUCTURE ===== */

.app-layout {
    display: flex;
    height: 100vh;
}

/* ===== SIDEBAR ===== */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
    transition: var(--transition);
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--bg-hover);
}

.sidebar-header {
    padding: 20px 16px 16px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-title .material-icons-round {
    font-size: 18px;
}

.sidebar-menu {
    list-style: none;
    padding: 8px 0;
}

.sidebar-item {
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    margin: 0 8px;
    position: relative;
    overflow: hidden;
}

.sidebar-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent-blue);
    transform: translateX(-3px);
    transition: var(--transition);
}

.sidebar-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateX(4px);
}

.sidebar-item:hover::before {
    transform: translateX(0);
}

.sidebar-item.active {
    background: var(--bg-hover);
    color: var(--accent-blue);
    font-weight: 500;
}

.sidebar-item.active::before {
    transform: translateX(0);
}

.sidebar-icon {
    font-size: 20px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-section {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

/* ===== MAIN CONTENT ===== */

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* ===== TOP HEADER ===== */

.top-header {
    height: var(--header-height);
    background: rgba(28, 28, 30, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.search-container {
    flex: 1;
    max-width: 400px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--accent-blue-light);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 18px;
    pointer-events: none;
}

/* ===== CONTENT SCROLL AREA ===== */

.content-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.content-scroll::-webkit-scrollbar {
    width: 12px;
}

.content-scroll::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.content-scroll::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 6px;
    border: 3px solid var(--bg-primary);
}

.content-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--bg-hover);
}

/* ===== SECTIONS ===== */

.section {
    padding: 32px 32px 24px;
    animation: slideInFade 0.5s ease-out;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .material-icons-round {
    font-size: 28px;
}

/* ===== OVERLAY FOR MOBILE SIDEBAR ===== */

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 90;
}

.sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* ===== ANIMATIONS ===== */

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatBg {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}
