@font-face {
    font-family: 'LotteMartDream';
    src: url('//cdn.jsdelivr.net/korean-webfonts/1/corps/lottemart/LotteMartDream/LotteMartDreamMedium.woff2') format('woff2'),
         url('//cdn.jsdelivr.net/korean-webfonts/1/corps/lottemart/LotteMartDream/LotteMartDreamMedium.woff') format('woff');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'LotteMartDream';
    src: url('//cdn.jsdelivr.net/korean-webfonts/1/corps/lottemart/LotteMartDream/LotteMartDreamBold.woff2') format('woff2'),
         url('//cdn.jsdelivr.net/korean-webfonts/1/corps/lottemart/LotteMartDream/LotteMartDreamBold.woff') format('woff');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'LotteMartDream';
    src: url('//cdn.jsdelivr.net/korean-webfonts/1/corps/lottemart/LotteMartDream/LotteMartDreamLight.woff2') format('woff2'),
         url('//cdn.jsdelivr.net/korean-webfonts/1/corps/lottemart/LotteMartDream/LotteMartDreamLight.woff') format('woff');
    font-weight: 300;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    min-height: 100vh;
    font-family: 'LotteMartDream', sans-serif;
    background: #f0f4fa;
}

/* ───── 사이드바 ───── */
.sidebar {
    width: 220px;
    min-width: 220px;
    background: linear-gradient(180deg, #0d2b5e 0%, #1a5296 60%, #1e6ab8 100%);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 200;
    box-shadow: 3px 0 12px rgba(0, 0, 0, 0.25);
}

.sidebar-logo {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.sidebar-logo img {
    width: 100%;
    max-width: 160px;
    height: auto;
    display: block;
    object-fit: contain;
    filter:
        drop-shadow(0 0 1px white)
        drop-shadow(0 0 1px white)
        drop-shadow(0 0 1px white);
    transition: opacity 0.2s;
}

.sidebar-logo:hover img {
    opacity: 0.85;
}

.sidebar-menu {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.sidebar-menu ul {
    list-style: none;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.sidebar-menu li a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.sidebar-menu li.active a {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-left: 3px solid #7ecef4;
    padding-left: 19px;
}

.sidebar-footer {
    padding: 16px 20px;
    font-size: 11px;
    opacity: 0.45;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ───── 메인 공통 ───── */
.main {
    margin-left: 220px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ───── 서브페이지 공통 레이아웃 ───── */
.page-header {
    background: linear-gradient(135deg, #0d2b5e 0%, #1a5296 100%);
    color: #fff;
    padding: 40px 36px 36px;
}

.page-header h1 {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.page-header p {
    font-size: 14px;
    opacity: 0.7;
    letter-spacing: 0.5px;
}

.page-body {
    padding: 32px 32px 48px;
}

.section-label {
    font-size: 12px;
    color: #7a8a9a;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.card-grid {
    display: grid;
    gap: 20px;
}

.card-grid.col-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.col-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.col-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: #fff;
    border-radius: 10px;
    padding: 24px 22px;
    box-shadow: 0 2px 10px rgba(0, 30, 80, 0.07);
    border-top: 3px solid #1a5296;
    transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    box-shadow: 0 6px 20px rgba(0, 30, 80, 0.13);
    transform: translateY(-2px);
}

.card h3 {
    font-size: 15px;
    font-weight: 700;
    color: #0d2b5e;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8eef5;
}

.card p, .card li {
    font-size: 13px;
    color: #555e6b;
    line-height: 1.8;
}

.card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card ul li {
    padding: 5px 8px;
    background: #f5f8fc;
    border-radius: 4px;
    border-left: 2px solid #b8d0ee;
}

/* ───── 모바일 상단바 ───── */
.mobile-nav-bar {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: linear-gradient(135deg, #0d2b5e 0%, #1a5296 100%);
    z-index: 300;
    align-items: center;
    padding: 0 16px;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.mobile-hamburger {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.mobile-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}
.mobile-nav-logo img {
    height: 26px;
    width: auto;
    filter: brightness(0) invert(1);
    display: block;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 199;
}
.sidebar-overlay.active { display: block; }

/* ───── 반응형 ───── */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.28s ease;
    }
    .sidebar.open { transform: translateX(0); }
    .mobile-nav-bar { display: flex; }
    .main {
        margin-left: 0;
        padding-top: 56px;
    }
    .page-header { padding: 24px 20px 20px; }
    .page-header h1 { font-size: 26px; }
    .page-body { padding: 20px 16px 40px; }
    .card-grid.col-2,
    .card-grid.col-3,
    .card-grid.col-4 { grid-template-columns: 1fr; }
}

@media (min-width: 600px) and (max-width: 1023px) {
    .card-grid.col-2 { grid-template-columns: repeat(2, 1fr); }
    .card-grid.col-3 { grid-template-columns: repeat(2, 1fr); }
    .card-grid.col-4 { grid-template-columns: repeat(2, 1fr); }
}
