/* ==================================================
   PAGE LAYOUT
================================================== */
.page-wrap {
    min-height: 100vh;
    margin-left: 140px;
    padding: 28px 32px;
    color: #f9fafb;
}

.page-inner {
    max-width: 1800px;
    margin: 0 auto;
}
/* ==================================================
   SIDEBAR
================================================== */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 140px;
    height: 100vh;
    background: linear-gradient(
        180deg,
        #0f0f12 0%,
        #14141a 45%,
        #0b0b0e 100%
    );
    border-right: 1px solid #27272f;
    z-index: 2000;
}

.topbar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ==================================================
   LOGO
================================================== */
.topbar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 20px;
}

.topbar-logo-mark {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.topbar-logo-text {
    font-size: 14px;
    font-weight: 700;
    color: #f9fafb;
}

/* ==================================================
   MENU AREA
================================================== */
.topbar-left {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar-menu {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ==================================================
   MENU ITEM
================================================== */
.topbar-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    padding:20px 10px;
}

/* 아이콘 고정 규격 */
.topbar-item a i {
    width: 18px;
    font-size: 15px;
    color: #9ca3af;
    text-align: center;
    flex-shrink: 0;
}

/* 텍스트 */
.topbar-item a span {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

/* hover */
.topbar-item a:hover {
    background-color: #1f2937;
}

.topbar-item a:hover i {
    color: #e5e7eb;
}

/* ACTIVE */
.topbar-item.is-active a {
    background-color: #ec4899;
}

.topbar-item.is-active a span {
    color:white;
    font-weight: 700;
}

.topbar-item.is-active a i {
    color: white;
}

/* ==================================================
   LOGOUT (BOTTOM)
================================================== */
.topbar-right {
    border-top: 1px solid #27272f;
    padding: 8px 0;
}

.topbar-right .topbar-item a {
    font-size: 13px;
}

/* ==================================================
   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;
        background: url(/static/style/2/main-bg.jpg) top center / 100% 80vh no-repeat, #f5f6f8;
    }

    .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;
}