/* =====================================================
   layout.css — 공통 레이아웃 (네비바, 드로어, 하단네비)
===================================================== */

/* ── Admin 페이지 래퍼 ── */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-page);
}

/* ── Admin 상단 네비바 ── */
.admin-navbar {
    background: var(--primary);
    padding: 0 24px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-navbar .brand {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-navbar .brand span { color: #c8900a; }

.admin-navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.admin-navbar .nav-link {
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.15s;
}

.admin-navbar .nav-link:hover,
.admin-navbar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* ── 페이지 헤더 (breadcrumb) ── */
.page-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header h5 {
    margin: 0;
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

/* ── 콘텐츠 영역 ── */
.content-area {
    padding: 20px 24px;
    flex: 1;
}

@media (max-width: 767px) {
    .content-area {
        padding: 12px;
    }

    .admin-navbar .nav-links {
        display: none;
    }
}

/* =====================================================
   Mobile 레이아웃 — 앱형 화면용
===================================================== */

/* 래퍼 */
.app-wrap {
    max-width: 480px;
    margin: 0 auto;
    background: #f8faff;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 앱 헤더 */
.app-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1;
}

.logo-wrap .logo-icon {
    width: 60px;
    height: auto;
    display: block;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.app-logo {
    font-family: 'DM Sans', 'Noto Sans KR', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #8a8a8a;
    letter-spacing: -0.5px;
}

.app-logo span {
    color: #c8900a;
    font-family: 'DM Sans', 'Noto Sans KR', sans-serif;
    font-weight: 700;
}

.app-greeting {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.header-icons {
    display: flex;
    gap: 8px;
}

.icon-btn {
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}

/* 하단 네비 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    display: flex;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    z-index: 100;
}

.bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 4px;
    font-size: 9px;
    cursor: pointer;
    gap: 3px;
    color: var(--text-muted);
    font-weight: 600;
    transition: color 0.15s;
    background: none;
    border: none;
    font-family: inherit;
}

.bn-item:hover  { color: var(--primary-light); }
.bn-item.active {
    color: var(--primary-light);
    position: relative;
}
.bn-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary-light);
    border-radius: 2px;
}
.bn-icon { font-size: 18px; }

/* ── 드로어 오버레이 ── */
.drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s;
}

.drawer-overlay.open {
    display: block;
    opacity: 1;
}

/* ── 드로어 ── */
.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 55%;
    max-width: 260px;
    height: 100dvh;
    background: var(--bg-card);
    z-index: 300;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer.open { transform: translateX(0); }

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.drawer-logo {
    font-family: 'DM Sans', 'Noto Sans KR', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #8a8a8a;
    letter-spacing: -0.5px;
}

.drawer-logo span {
    color: #c8900a;
    font-family: 'DM Sans', 'Noto Sans KR', sans-serif;
    font-weight: 700;
}

.drawer-close {
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.drawer-close:hover { background: var(--border); }

.drawer-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #f8faff;
    border-bottom: 1px solid #f1f5f9;
}

.drawer-avatar {
    width: 36px;
    height: 36px;
    background: var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.drawer-username {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.drawer-email {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.drawer-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.drawer-section-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 16px 4px;
}

.drawer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.drawer-item:hover {
    background: #f8faff;
    color: var(--primary-light);
}

.drawer-item.active {
    color: var(--primary-light);
    background: #eff6ff;
    border-left-color: var(--primary-light);
}

.di-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.drawer-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 8px 0;
}

.drawer-footer {
    padding: 14px 16px;
    font-size: 10px;
    color: #cbd5e1;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

/* ── 태블릿 (768px+) ── */
@media (min-width: 768px) {
    .app-wrap {
        max-width: 768px;
        box-shadow: 0 0 40px rgba(0,0,0,0.08);
    }

    .bottom-nav {
        max-width: 768px;
    }

    .app-header {
        padding: 16px 28px;
    }

    .bn-item {
        padding: 12px 6px;
        font-size: 10px;
    }

    .bn-icon { font-size: 20px; }

    .drawer { max-width: 260px; }
}

/* 헤더 네비 — 모바일/태블릿에서 숨김 */
.header-nav { display: none; }

/* 헤더 메뉴 버튼 — 모바일/태블릿에서 숨김 */
.desktop-menu-btn { display: none; }

/* ── 데스크탑 (1200px+) — 헤더 수평 네비 레이아웃 ── */
@media (min-width: 1200px) {
    .app-wrap {
        max-width: 1280px;
        box-shadow: 0 0 40px rgba(0,0,0,0.08);
    }

    .app-header {
        padding: 0 40px;
        height: 64px;
    }

    .app-logo    { font-size: 22px; }
    .app-greeting { font-size: 12px; }
    .icon-btn    { font-size: 22px; }

    /* 데스크탑: 로고 아이콘+텍스트 가로 배치 */
    .logo-wrap {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .logo-wrap .logo-icon {
        width: 48px;
    }

    /* 헤더 네비 표시 */
    .header-nav {
        display: flex;
        align-items: center;
        gap: 4px;
        flex: 1;
        justify-content: center;
    }

    .hn-item {
        padding: 8px 18px;
        font-size: 14px;
        font-weight: 600;
        color: var(--text-sub);
        background: none;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.15s;
        font-family: inherit;
    }

    .hn-item:hover { color: var(--primary-light); background: #eff6ff; }
    .hn-item.active { color: var(--primary-light); background: #eff6ff; }

    /* 하단 네비 숨김 */
    .bottom-nav { display: none; }

    /* 헤더 메뉴 버튼 표시 */
    .desktop-menu-btn { display: inline; }

    /* 하단 네비 공간 여백 해제 */
    .pb-bottom { padding-bottom: 40px; }

    .body-content {
        max-width: 960px;
        width: 100%;
        margin: 0 auto;
        padding: 0 0 40px;
    }

    .drawer { max-width: 300px; }
}

/* ── 페이지 플레이스홀더 ── */
.page-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: #94a3b8;
}

.placeholder-icon { font-size: 48px; }

.placeholder-title {
    font-size: 18px;
    font-weight: 700;
    color: #64748b;
}

.placeholder-desc {
    font-size: 13px;
    color: #94a3b8;
}
