/* 통합 프리미엄 UI 스타일 시트 (상단 네비게이션 적용) */
:root {
    --primary-color: #2563EB;
    /* Blue */
    --primary-hover: #1D4ED8;
    --secondary-color: #10B981;
    /* Emerald */
    --accent-color: #F59E0B;
    /* Amber */
    --bg-color: #F8FAFC;
    /* Light Gray Background */
    --nav-bg: #1E293B;
    /* Dark Slate Nav */
    --text-dark: #0F172A;
    --text-muted: #64748B;
    --white: #FFFFFF;
    --border-color: #E2E8F0;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* -------------------------------------
   상단 네비게이션 바 (Top Navbar)
   ------------------------------------- */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--nav-bg);
    color: var(--white);
    padding: 0 32px;
    height: 70px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand i {
    color: #60A5FA;
    /* Light Blue Icon */
    font-size: 1.5rem;
}

.brand h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* 중앙 메뉴 바 및 드롭다운 */
.nav-links {
    display: flex;
    gap: 8px;
    height: 100%;
}

.dropdown {
    height: 100%;
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.85);
    padding: 0 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-family: inherit;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.dropbtn i {
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.dropdown:hover .dropbtn {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.dropdown:hover .dropbtn i {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 8px 8px;
    top: 70px;
    /* nav height */
    z-index: 1;
    overflow: hidden;
    left: 50%;
    transform: translateX(-50%);
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 14px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #F1F5F9;
    color: var(--primary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* 우측 실시간 시계 위젯 */
.clock-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #E2E8F0;
}

.clock-widget i {
    color: var(--secondary-color);
}


/* -------------------------------------
   메인 콘텐츠 영역
   ------------------------------------- */
.main-content {
    flex: 1;
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

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

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-muted);
}

/* 알림 시스템 */
.alerts .alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background-color: #ECFDF5;
    color: #065F46;
    border-left: 4px solid #10B981;
}

.alert-error {
    background-color: #FEF2F2;
    color: #991B1B;
    border-left: 4px solid #EF4444;
}


/* 테이블 공통 디자인 (기존 스타일 유지/개선) */
.table-card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.table-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    background-color: #F8FAFC;
}

.table-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.notice-table {
    width: 100%;
    border-collapse: collapse;
}

.notice-table th {
    background-color: #F1F5F9;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.notice-table td {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.notice-table tbody tr {
    transition: var(--transition);
}

.notice-table tbody tr:hover {
    background-color: #F8FAFC;
}

.title-cell a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: var(--transition);
}

.title-cell a:hover {
    color: var(--primary-color);
}

.date-cell {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* 배지 시스템 */
.badge {
    background-color: #EFF6FF;
    color: var(--primary-color);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.user-badge {
    background-color: #ECFDF5;
    color: #059669;
}

.admin-badge {
    background-color: #FEF2F2;
    color: #DC2626;
}

.status.pending {
    background-color: #FEF3C7;
    color: #D97706;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.ai-summary {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-dark);
    background-color: #F8FAFC;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    color: #CBD5E1;
    margin-bottom: 16px;
}

/* 버튼 모음 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #F8FAFC;
    border-color: #CBD5E1;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.8rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* 모달 컴포넌트 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--white);
    margin: 8% auto;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.close {
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modal-footer {
    padding: 20px 24px;
    background-color: #F8FAFC;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}