/* Font-Awesome */
@import url('/shared/fontawesome/css/all.min.css');

/* 프리텐다드 – Full Weight Set(100~900) */
/* 100 Thin */
@font-face {
    font-family: 'Pretendard';
    font-weight: 100;
    font-style: normal;
    font-display: swap;
    src: url('/shared/fonts/Pretendard/woff2/Pretendard-Thin.woff2') format('woff2');
}

/* 200 ExtraLight */
@font-face {
    font-family: 'Pretendard';
    font-weight: 200;
    font-style: normal;
    font-display: swap;
    src: url('/shared/fonts/Pretendard/woff2/Pretendard-ExtraLight.woff2') format('woff2');
}

/* 300 Light */
@font-face {
    font-family: 'Pretendard';
    font-weight: 300;
    font-style: normal;
    font-display: swap;
    src: url('/shared/fonts/Pretendard/woff2/Pretendard-Light.woff2') format('woff2');
}

/* 400 Regular */
@font-face {
    font-family: 'Pretendard';
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    src: url('/shared/fonts/Pretendard/woff2/Pretendard-Regular.woff2') format('woff2');
}

/* 500 Medium */
@font-face {
    font-family: 'Pretendard';
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    src: url('/shared/fonts/Pretendard/woff2/Pretendard-Medium.woff2') format('woff2');
}

/* 600 SemiBold */
@font-face {
    font-family: 'Pretendard';
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    src: url('/shared/fonts/Pretendard/woff2/Pretendard-SemiBold.woff2') format('woff2');
}

/* 700 Bold */
@font-face {
    font-family: 'Pretendard';
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    src: url('/shared/fonts/Pretendard/woff2/Pretendard-Bold.woff2') format('woff2');
}

/* 800 ExtraBold */
@font-face {
    font-family: 'Pretendard';
    font-weight: 800;
    font-style: normal;
    font-display: swap;
    src: url('/shared/fonts/Pretendard/woff2/Pretendard-ExtraBold.woff2') format('woff2');
}

/* 900 Black */
@font-face {
    font-family: 'Pretendard';
    font-weight: 900;
    font-style: normal;
    font-display: swap;
    src: url('/shared/fonts/Pretendard/woff2/Pretendard-Black.woff2') format('woff2');
}

/* 고려대학교 백주년기념체 (단일 폰트) */
@font-face {
    font-family: 'KUCentennial';
    src: url('/shared/fonts/KUCentennial/KUCentennial.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* 고려대학교 전용서체 (Weight 300, 500, 700) */
/* Light */
@font-face {
    font-family: 'KUExclusive';
    src: url('/shared/fonts/KUExclusive/KUL.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

/* Medium */
@font-face {
    font-family: 'KUExclusive';
    src: url('/shared/fonts/KUExclusive/KUM.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

/* Bold */
@font-face {
    font-family: 'KUExclusive';
    src: url('/shared/fonts/KUExclusive/KUB.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* global.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --ku-crimson: #862633;
    --ku-crimson-dark: #6d1f2b;
    --ku-crimson-light: #fbeee9;
    --text: #1f2a44;
    --sidebar-width: 260px;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #F3F6F9;
    color: #333333;
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.25s ease;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    margin-left: 8px;
}

.card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

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

.card-title {
    font-size: 18px;
    font-weight: 700;
}
 
/* --- 헤더 --- */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.search-box {
    background: #FFFFFF;
    padding: 12px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    width: 350px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    position: relative;
}

.search-box input {
    border: none;
    outline: none;
    width: 100%;
    margin-left: 10px;
    font-size: 14px;
    color: #333333;
}

.search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    max-height: 320px;
    overflow: auto;
    z-index: 50;
    padding: 8px 0;
}

.search-result-item {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: #222222;
    border-bottom: 1px solid #f1f1f1;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f7f7f7;
}

.search-title {
    font-weight: 700;
    font-size: 14px;
}

.search-snippet {
    font-size: 12px;
    color: #666666;
    margin-top: 4px;
    line-height: 1.4;
}

.search-empty {
    padding: 12px 16px;
    color: #888888;
    font-size: 13px;
}

.search-highlight {
    background: #fff2a8;
    color: #222222;
    padding: 0 2px;
    border-radius: 3px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    text-align: right;
}
.user-info .name {
    font-weight: 700;
    font-size: 16px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--ku-crimson);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.avatar-wrapper {
    position: relative;
}

.avatar-dropdown {
    position: absolute;
    top: 55px;
    right: -65px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(15,23,42,0.18);
    border: 1px solid rgba(134, 38, 51, 0.25);
    width: 200px;
    padding: 12px;
    transform-origin: top right;
    transform: scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.15s ease, opacity 0.15s ease;
    z-index: 100;
}

.avatar-wrapper.open .avatar-dropdown {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.avatar-dropdown-body {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.avatar-dropdown-name {
    font-weight: 700;
    color: #1f2a44;
}

.avatar-dropdown-role {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.avatar-dropdown-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ku-crimson);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 8px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.avatar-dropdown-link i {
    font-size: 13px;
}

.avatar-dropdown-link:hover {
    background: #f1f5f9;
}

/* --- 사이드바 --- */
.sidebar {
    width: var(--sidebar-width);
    background: #FFFFFF;
    padding: 24px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #eee;
    position: fixed;
    height: 100%;
    overflow-y: auto;
    transform: translateX(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    z-index: 1100;
}

.sidebar-toggle {
    position: fixed;
    left: 20px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
    cursor: pointer;
    z-index: 1200;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #1f2a44;
    border-radius: 2px;
}

.sidebar-toggle:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1050;
}

body.sidebar-collapsed .sidebar {
    transform: translateX(calc(var(--sidebar-width) * -1));
    box-shadow: none;
}

body.sidebar-collapsed .main-content {
    margin-left: 0;
}

body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

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

body.sidebar-open {
    overflow: hidden;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-left: 10px;
}

.brand .logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--ku-crimson);
}

.nav-section {
    margin-bottom: 20px;
}

.nav-title {
    font-size: 12px;
    color: #aaa;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding-left: 14px;
}


.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    color: #888888;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    cursor: pointer;
    font-size: 14px;
    gap: 10px;
}

.nav-item i {
    width: 24px;
    margin-right: 10px;
    font-size: 12px;
}

.nav-item .nav-label {
    flex: 1;
    display: block;
}

.nav-item.active {
    background-color: var(--ku-crimson);
    color: #fff;
    box-shadow: 0 4px 12px rgba(134, 38, 51, 0.3);
}

.nav-item.has-sub {
    justify-content: space-between;
}
.nav-item.has-sub .nav-label {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-item.active-sub {
    background-color: var(--ku-crimson-light);
    color: var(--ku-crimson);
    font-weight: 700;
}

.nav-sub {
    padding-left: 20px;
    margin-bottom: 12px;
    display: none;
    flex-direction: column;
    gap: 4px;
}

.nav-item.has-sub.active-sub + .nav-sub {
    display: flex;
}

.nav-item.nav-item-sub {
    font-size: 13px;
    padding: 8px 12px;
}

.sidebar .ver {
    margin-top: auto;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    padding: 24px 0 8px;
}

@media (max-width: 1600px) {
    .sidebar-toggle {
        display: inline-flex;
    }
}

/* --- 푸터 --- */
footer {
    margin-top: auto;
    padding: 24px 0 32px;
    border-top: 1px solid #e6e9ef;
    color: #6b7280;
    font-size: 13px;
}

footer p {
    margin: 0;
    text-align: center;
    line-height: 1.6;
}
