/* ==================================================
   PAGE LAYOUT
================================================== */
.page-wrap {
    min-height: 100vh;
    margin-left: 220px;
    padding: 28px 32px;
    color: #f9fafb;
}

.page-inner {
    max-width: 1800px;
    margin: 0 auto;
}
/* =========================
   SIDEBAR (NEW STYLE)
========================= */

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    background: #f4f4f5;
    border-right: none;
    z-index: 2000;
    padding: 16px 25px;
}

.topbar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* =========================
   LOGO
========================= */
.topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 12px;
    margin-bottom: 16px;
}

.topbar-logo-mark {
    width: 26px;
    height: 26px;
    border-radius: 6px;
}

.topbar-logo-text {
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

/* =========================
   MENU
========================= */
.topbar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* =========================
   ITEM
========================= */
.topbar-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* 아이콘 */
.topbar-item a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: #9ca3af;
}

/* hover */
.topbar-item a:hover {
    background: #ececec;
}

/* ACTIVE (이미지 핵심 스타일) */
.topbar-item.is-active a {
    background: linear-gradient(90deg, #d88a92, #c77983);
    color: #fff;
    font-weight: 600;
}

.topbar-item.is-active a i {
    color: #fff;
}

/* =========================
   BOTTOM
========================= */
.topbar-right {
    margin-top: auto;
    padding-top: 12px;
}

/* 로그아웃 */
.topbar-right .topbar-item a {
    font-size: 13px;
    color: #999;
}
/* ==================================================
   RESPONSIVE
================================================== */
@media (max-width: 1024px) {
    .page-wrap {
        margin-left: 200px;
        padding: 24px;
    }

    .topbar {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .page-wrap {
        margin-left: 180px;
        padding: 20px;
    }

    .topbar {
        width: 180px;
    }
}

@media (max-width: 640px) {
    .page-wrap {
        margin-left: 0;
        padding: 16px;
    }
}
/* =========================
   RESPONSIVE
========================= */
.topbar {
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .topbar {
        width: 180px;
    }

    .page-wrap {
        margin-left: 180px;
    }
}
.topbar-toggle{
    display:none;
}
@media (max-width: 640px) {
    .topbar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 120px;
        transform: translateX(-100%);
        z-index: 1000;
    }

    .topbar.is-open {
        transform: translateX(0);
    }

    .page-wrap {
        margin-left: 0;
        padding-top:60px;
    }

    .topbar-toggle {
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 1100;
        background: #fff;
        border: none;
        font-size: 20px;
        padding: 8px 10px;
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        display:block;
    }
}

.topbar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* topbar 열렸을 때 */
.topbar.is-open + .topbar-overlay {
    opacity: 1;
    pointer-events: auto;
}