/* 기본 스타일 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 개선된 파란색 팔레트 */
    --primary-blue: #1d4ed8;
    --primary-blue-light: #3b82f6;
    --primary-blue-dark: #1e40af;
    --primary-blue-darker: #1e3a8a;
    --secondary-blue: #0ea5e9;
    --accent-blue: #06b6d4;
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --blue-900: #1e3a8a;
    
    /* 그레이 팔레트 */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* 기타 색상 */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--gray-700);
    background: linear-gradient(135deg, var(--blue-50) 0%, var(--gray-50) 100%);
    min-height: 100vh;
}

/* 레이아웃 */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* 사이드바 개선 */
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    backdrop-filter: blur(10px);
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 4px 0 20px rgba(59, 130, 246, 0.15);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 60%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 60% 90%, rgba(14, 165, 233, 0.10) 0%, transparent 50%);
    pointer-events: none;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 0 0 20px 0;
    margin-bottom: 8px;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    pointer-events: none;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    transition: all 0.3s ease;
}

.logo-container:hover {
    transform: translateY(-2px);
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    padding: 8px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(139, 92, 246, 0.8) 100%);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 32px rgba(59, 130, 246, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s ease;
}

.logo:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 1) 0%, rgba(139, 92, 246, 0.9) 100%);
    transform: scale(1.08) rotate(5deg);
    box-shadow: 
        0 12px 40px rgba(59, 130, 246, 0.4),
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.logo:hover::before {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

.app-name {
    font-size: 24px;
    font-weight: 900;
    color: white;
    white-space: normal;
    line-height: 1.1;
    letter-spacing: -0.04em;
    text-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 20px rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        rgba(255, 255, 255, 0.98) 20%,
        rgba(255, 255, 255, 0.9) 40%,
        rgba(255, 255, 255, 0.95) 60%,
        rgba(255, 255, 255, 0.98) 80%,
        #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    word-break: keep-all;
    text-align: left;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.app-name::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(59, 130, 246, 0.6) 20%, 
        rgba(139, 92, 246, 0.8) 50%, 
        rgba(59, 130, 246, 0.6) 80%, 
        transparent 100%);
    border-radius: 2px;
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-container:hover .app-name::after {
    opacity: 1;
    transform: scaleX(1);
}

.app-name::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -8px;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        rgba(139, 92, 246, 0.05) 100%);
    border-radius: 12px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.logo-container:hover .app-name::before {
    opacity: 1;
}

/* 네비게이션 개선 */
.sidebar-nav {
    padding: 12px 0 20px 0;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 3px;
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 16px 18px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 0 28px 28px 0;
    margin-right: 12px;
    font-weight: 600;
    font-size: 15px;
    backdrop-filter: blur(10px);
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.8) 0%, rgba(139, 92, 246, 0.9) 100%);
    border-radius: 0 4px 4px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.nav-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, 
        rgba(59, 130, 246, 0.08) 0%, 
        rgba(139, 92, 246, 0.04) 50%,
        transparent 100%);
    border-radius: 0 28px 28px 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav-link:hover {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(139, 92, 246, 0.12) 60%,
        rgba(255, 255, 255, 0.08) 100%);
    color: white;
    transform: translateX(6px);
    box-shadow: 
        0 8px 32px rgba(59, 130, 246, 0.25),
        0 4px 16px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.nav-link:hover::before {
    height: 28px;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

.nav-link:hover::after {
    opacity: 1;
}

.nav-link.active {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(139, 92, 246, 0.18) 60%,
        rgba(255, 255, 255, 0.1) 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 12px 40px rgba(59, 130, 246, 0.3),
        0 6px 20px rgba(255, 255, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

.nav-link.active::before {
    height: 32px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 1) 0%, rgba(139, 92, 246, 1) 100%);
    box-shadow: 
        0 0 24px rgba(59, 130, 246, 0.8),
        0 0 12px rgba(139, 92, 246, 0.6);
}

.nav-link.active::after {
    opacity: 1;
}

.nav-link i {
    width: 26px;
    margin-right: 14px;
    text-align: center;
    font-size: 17px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.nav-link:hover i {
    transform: scale(1.15) rotate(3deg);
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.4));
}

.nav-link.active i {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 6px rgba(59, 130, 246, 0.6));
}

/* 서브메뉴 개선 */
.has-submenu .nav-link {
    justify-content: flex-start;
}

.has-submenu .nav-link .toggle-icon {
    margin-left: auto;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.nav-link span {
    flex: 1;
    font-weight: 600;
}

.toggle-icon {
    font-size: 14px !important;
    width: auto !important;
    margin-right: 0 !important;
}

.has-submenu.active .toggle-icon {
    transform: rotate(180deg);
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.4));
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, 
        rgba(30, 58, 138, 0.8) 0%, 
        rgba(37, 99, 235, 0.7) 50%,
        rgba(59, 130, 246, 0.6) 100%);
    list-style: none;
    border-radius: 0 20px 20px 0;
    margin-right: 12px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.has-submenu.active .submenu {
    max-height: 600px;
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 4px 20px rgba(59, 130, 246, 0.2);
}

.submenu-item {
    margin-bottom: 2px;
}

.submenu-link {
    display: flex;
    align-items: center;
    padding: 14px 18px 14px 52px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 600;
    position: relative;
    border-radius: 0 18px 18px 0;
    margin-right: 8px;
    backdrop-filter: blur(10px);
}

.submenu-link::before {
    content: '';
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.6) 0%, 
        rgba(139, 92, 246, 0.7) 100%);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.submenu-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, 
        rgba(59, 130, 246, 0.06) 0%, 
        rgba(139, 92, 246, 0.03) 50%,
        transparent 100%);
    border-radius: 0 18px 18px 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.submenu-link:hover {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.18) 0%, 
        rgba(139, 92, 246, 0.1) 60%,
        rgba(255, 255, 255, 0.06) 100%);
    color: white;
    transform: translateX(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 6px 24px rgba(59, 130, 246, 0.2),
        0 3px 12px rgba(255, 255, 255, 0.1);
}

.submenu-link:hover::before {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 1) 0%, 
        rgba(139, 92, 246, 1) 100%);
    transform: translateY(-50%) scale(1.4);
    box-shadow: 
        0 0 16px rgba(59, 130, 246, 0.8),
        0 0 8px rgba(139, 92, 246, 0.6);
}

.submenu-link:hover::after {
    opacity: 1;
}

.submenu-link.active {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.22) 0%, 
        rgba(139, 92, 246, 0.15) 60%,
        rgba(255, 255, 255, 0.08) 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 8px 32px rgba(59, 130, 246, 0.25),
        0 4px 16px rgba(255, 255, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-weight: 700;
}

.submenu-link.active::before {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 1) 0%, 
        rgba(139, 92, 246, 1) 100%);
    transform: translateY(-50%) scale(1.6);
    box-shadow: 
        0 0 20px rgba(59, 130, 246, 1),
        0 0 12px rgba(139, 92, 246, 0.8);
}

.submenu-link.active::after {
    opacity: 1;
}

.submenu-link i {
    width: 18px;
    margin-right: 12px;
    text-align: center;
    font-size: 13px;
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.submenu-link:hover i {
    transform: scale(1.1) rotate(2deg);
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.4));
}

.submenu-link.active i {
    transform: scale(1.05);
    filter: drop-shadow(0 2px 6px rgba(59, 130, 246, 0.6));
}

/* 메인 컨텐츠 개선 */
.main-content {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--blue-50) 0%, var(--gray-50) 100%);
}

/* 헤더 개선 */
.header {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(255, 255, 255, 0.95) 50%,
        rgba(248, 250, 252, 0.98) 100%);
    backdrop-filter: blur(25px) saturate(1.8);
    -webkit-backdrop-filter: blur(25px) saturate(1.8);
    padding: 12px 12px 12px 16px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 
        0 2px 12px rgba(59, 130, 246, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: fixed;
    top: 0;
    left: 240px;
    right: 0;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 0 0 20px;
    min-height: 64px;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.02) 0%, 
        transparent 30%,
        rgba(139, 92, 246, 0.01) 70%,
        rgba(59, 130, 246, 0.02) 100%);
    pointer-events: none;
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.3) 20%,
        rgba(139, 92, 246, 0.4) 50%,
        rgba(59, 130, 246, 0.3) 80%,
        transparent 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.header-left {
    position: relative;
    z-index: 1;
    margin-left: 6px;
}

.header-left h1 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, 
        var(--primary-blue) 0%, 
        var(--secondary-blue) 40%,
        var(--accent-blue) 80%,
        var(--primary-blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.04em;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    cursor: default;
    margin: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 12px;
}

#page-icon {
    font-size: 24px;
    background: linear-gradient(135deg, 
        var(--primary-blue) 0%, 
        var(--secondary-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 6px rgba(59, 130, 246, 0.3));
    min-width: 24px;
}

#page-name {
    display: inline-block;
}

.header-left h1::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.4) 20%,
        rgba(139, 92, 246, 0.6) 50%,
        rgba(59, 130, 246, 0.4) 80%,
        transparent 100%);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

/* 알림 아이콘 개선 */
.notification-icon {
    position: relative;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.12);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 2px 6px rgba(59, 130, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    overflow: hidden;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        transparent 50%,
        rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-icon:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.25);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 6px 20px rgba(59, 130, 246, 0.15),
        0 3px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.notification-icon:hover::before {
    opacity: 1;
}

.notification-icon:active {
    transform: translateY(-1px) scale(1.02);
    transition: transform 0.15s ease;
}

.notification-icon i {
    font-size: 18px;
    color: var(--primary-blue);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(59, 130, 246, 0.2));
}

.notification-icon:hover i {
    color: var(--primary-blue-dark);
    transform: scale(1.1) rotate(8deg);
    filter: drop-shadow(0 2px 6px rgba(59, 130, 246, 0.4));
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, 
        var(--error-color) 0%, 
        #f87171 100%);
    border-radius: 50%;
    box-shadow: 
        0 2px 6px rgba(239, 68, 68, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
    border: 2px solid white;
    transform-origin: center;
    z-index: 10;
    pointer-events: none;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1);
    }
    100% {
        transform: scale(0.8);
    }
}

/* 알림 드롭다운 */
.notification-menu {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(25px) saturate(1.8);
    -webkit-backdrop-filter: blur(25px) saturate(1.8);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(59, 130, 246, 0.15),
        0 8px 25px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    min-width: 380px;
    max-height: 500px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    overflow: hidden;
}

.notification-menu.active .notification-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.notification-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mark-all-read:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.05);
}

.notification-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 4px;
    position: relative;
}

.notification-item:hover {
    background: rgba(59, 130, 246, 0.05);
    transform: translateX(4px);
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.04);
    border-left: 3px solid var(--primary-blue);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    width: 8px;
    height: 8px;
    background: var(--primary-blue);
    border-radius: 50%;
    transform: translateY(-50%);
}

.notification-icon-small {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notification-icon-small.success {
    background: rgba(16, 185, 129, 0.1);
}

.notification-icon-small.warning {
    background: rgba(245, 158, 11, 0.1);
}

.notification-icon-small.info {
    background: rgba(59, 130, 246, 0.1);
}

.notification-icon-small .fa-chart-line {
    color: #10b981;
}

.notification-icon-small .fa-exclamation-triangle {
    color: #f59e0b;
}

.notification-icon-small .fa-user-plus {
    color: var(--primary-blue);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
    line-height: 1.3;
}

.notification-desc {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.4;
    margin-bottom: 6px;
}

.notification-time {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}

/* 사용자 정보 섹션 */
.user-info-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.03) 0%, 
        rgba(139, 92, 246, 0.02) 100%);
    border-radius: 16px;
    margin: 8px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, 
        var(--primary-blue) 0%, 
        rgba(139, 92, 246, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name-grade {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.user-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
}

.grade-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.grade-badge.premium {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    color: white;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.grade-badge.basic {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    color: white;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

.grade-badge.pro {
    background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue-darker));
    color: white;
    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.35);
}

.remaining-days {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-600);
}

.remaining-days i {
    color: var(--primary-blue);
    font-size: 12px;
}

.remaining-days strong {
    color: var(--primary-blue);
    font-weight: 700;
}

/* 사용자 메뉴 개선 */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.08) 0%, 
        rgba(139, 92, 246, 0.06) 50%,
        rgba(59, 130, 246, 0.04) 100%);
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--gray-700);
    font-weight: 600;
    font-size: 15px;
    backdrop-filter: blur(15px);
    box-shadow: 
        0 2px 12px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
    min-width: auto;
}

.user-menu-trigger::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        transparent 50%,
        rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.user-menu-trigger:hover {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.15) 0%, 
        rgba(139, 92, 246, 0.12) 50%,
        rgba(59, 130, 246, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.25);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(59, 130, 246, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    color: var(--primary-blue);
}

.user-menu-trigger:hover::before {
    opacity: 1;
}

.user-menu-trigger:active {
    transform: translateY(0) scale(1);
    transition: transform 0.15s ease;
}

.user-menu-trigger i:first-child {
    font-size: 22px;
    color: var(--primary-blue);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 1px 3px rgba(59, 130, 246, 0.3));
    position: relative;
    z-index: 1;
}

.user-menu-trigger:hover i:first-child {
    transform: scale(1.1) rotate(-5deg);
    filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.5));
}

.user-menu-trigger span {
    display: none;
}

.user-menu-trigger i:last-child {
    font-size: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--gray-500);
    position: relative;
    z-index: 1;
}

.user-menu.active .user-menu-trigger {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.18) 0%, 
        rgba(139, 92, 246, 0.15) 50%,
        rgba(59, 130, 246, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 6px 20px rgba(59, 130, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.user-menu.active .user-menu-trigger i:last-child {
    transform: rotate(180deg);
    color: var(--primary-blue);
}

/* 드롭다운 개선 */
.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(25px) saturate(1.8);
    -webkit-backdrop-filter: blur(25px) saturate(1.8);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(59, 130, 246, 0.15),
        0 8px 25px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    overflow: visible;
    padding: 8px;
}

.user-dropdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.02) 0%, 
        transparent 50%,
        rgba(139, 92, 246, 0.01) 100%);
    pointer-events: none;
}

.user-menu.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--gray-700);
    font-weight: 600;
    position: relative;
    border-radius: 14px;
    margin-bottom: 2px;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(59, 130, 246, 0.08) 0%, 
        rgba(139, 92, 246, 0.06) 50%,
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        rgba(139, 92, 246, 0.06) 100%);
    color: var(--primary-blue);
    transform: translateX(4px);
    box-shadow: 
        0 4px 15px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.dropdown-item:hover::before {
    opacity: 1;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--gray-500);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.dropdown-item:hover i {
    color: var(--primary-blue);
    transform: scale(1.1) rotate(3deg);
}

.dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(59, 130, 246, 0.15) 20%,
        rgba(139, 92, 246, 0.1) 50%,
        rgba(59, 130, 246, 0.15) 80%,
        transparent 100%);
    margin: 8px 12px;
    position: relative;
}

.dropdown-divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.8) 50%,
        transparent 100%);
    transform: translateY(1px);
}

.dropdown-item.logout {
    color: var(--error-color);
    margin-top: 4px;
}

.dropdown-item.logout:hover {
    background: linear-gradient(90deg, 
        rgba(239, 68, 68, 0.08) 0%, 
        rgba(248, 113, 113, 0.05) 100%);
    color: var(--error-color);
}

.dropdown-item.logout i {
    color: var(--error-color);
}

.dropdown-item.logout:hover i {
    color: var(--error-color);
    transform: scale(1.1) rotate(-3deg);
}

/* 컨텐츠 영역 개선 */
.content {
    flex: 1;
    padding: 12px;
    padding-top: 88px;
    background: transparent;
}

/* 반응형 개선 */
@media (max-width: 768px) {
    .content {
        padding: 8px;
        padding-top: 88px; /* 모바일에서도 헤더와 여유있는 간격 유지 */
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 240px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        padding: 12px 12px 12px 16px;
        left: 0; /* 모바일에서는 헤더가 전체 폭 차지 */
        border-radius: 0; /* 모바일에서는 모서리 둥글기 제거 */
    }
    
    .header-left {
        margin-left: 6px;
    }
    
    .header-left h1 {
        font-size: 24px;
    }
    
    .content h1 {
        font-size: 28px;
    }
    
    /* 모바일에서 드롭다운 위치 조정 - 화면 우측으로 확실히 정렬하고 폭 증가 */
    .notification-dropdown,
    .user-dropdown {
        position: fixed !important;
        top: 70px !important;
        right: 12px !important;
        left: auto !important;
        width: calc(100vw - 24px) !important;
        max-width: 320px !important;
        min-width: 280px !important;
        margin: 0 !important;
        transform-origin: top right !important;
    }
    
    .notification-dropdown {
        min-width: 300px !important;
        max-width: 340px !important;
    }
    
    .user-dropdown {
        min-width: 260px !important;
        max-width: 300px !important;
    }
    
    /* 모바일에서 드롭다운 내용 패딩 조정 */
    .notification-header {
        padding: 18px 20px 14px;
    }
    
    .notification-list {
        padding: 6px 8px;
    }
    
    .notification-item {
        padding: 14px 16px;
    }
    
    .dropdown-item {
        padding: 14px 18px;
    }
}

@media (max-width: 480px) {
    .content h1 {
        font-size: 24px;
    }
}

.content h1 {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.content p {
    color: var(--gray-600);
    font-size: 18px;
    line-height: 1.7;
    max-width: 600px;
}

/* 스크롤바 스타일 개선 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.3) 100%);
}

/* 애니메이션 개선 */
.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Font Awesome 아이콘 폴백 처리 */
.submenu-link[data-page="키워드 대량 조회"] i::before {
    content: "\f00e" !important;
}

.submenu-link[data-page="키워드 조회"] i::before {
    content: "\f084" !important;
}

/* 로딩 상태 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 추가 유틸리티 클래스 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    box-shadow: var(--shadow-lg);
}

.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* 아이콘 로딩 실패 시 대체 텍스트 */
.submenu-link i {
    position: relative;
}

.submenu-link i::after {
    content: attr(data-fallback);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: none;
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 10px;
    line-height: 16px;
}

/* Font Awesome이 로드되지 않았을 때 폴백 표시 */
@supports not (font-family: "Font Awesome 6 Free") {
    .submenu-link i::after {
        display: block;
    }
    
    .submenu-link i::before {
        display: none;
    }
}

/* Font Awesome 아이콘 설정 강화 */
.submenu-link[data-page="키워드 대량 조회"] i,
.submenu-link[data-page="키워드 조회"] i,
.fas, .fa-solid {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block !important;
}

.nav-link i,
.submenu-link i {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block !important;
    line-height: 1 !important;
}

/* API 사용량 섹션 */
.api-usage-section {
    padding: 16px 20px;
    margin-bottom: 4px;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.04) 0%, 
        rgba(139, 92, 246, 0.02) 100%);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.08);
}

.api-usage-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 14px;
}

.api-usage-header i {
    font-size: 16px;
    color: var(--primary-blue);
}

.api-usage-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.usage-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.usage-label {
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 500;
}

.usage-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-weight: 700;
    color: var(--gray-800);
}

.usage-value span:first-child {
    font-size: 18px;
    color: var(--primary-blue);
}

.usage-unit {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}

.usage-bar {
    width: 100%;
    height: 6px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.usage-progress {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--primary-blue) 0%, 
        var(--secondary-blue) 100%);
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.usage-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

.usage-progress.monthly {
    background: linear-gradient(90deg, 
        var(--accent-blue) 0%, 
        var(--secondary-blue) 100%);
}

.usage-remaining {
    padding-top: 8px;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    text-align: center;
}

.usage-remaining small {
    font-size: 11px;
    color: var(--gray-600);
}

.usage-remaining strong {
    color: var(--primary-blue);
    font-weight: 700;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
} 