/* ===== Base ===== */
:root {
    --header-bg: #1a1e2e;
    --nav-bg: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --nav-solid: #4facfe;
    --nav-active: rgba(0, 0, 0, 0.18);
    --sub-nav-bg: #fff;
    --content-bg: #f4f6fb;
    --border: #e3e8ef;
    --text: #2d3748;
    --text-light: #8492a6;
    --accent: #4facfe;
    --accent-dark: #3b8de0;
    --danger: #ff6b6b;
    --success: #51cf66;
    --warning: #fcc419;
    --info: #339af0;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --radius: 8px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--content-bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

::selection {
    background: var(--accent);
    color: #fff;
}

/* ===== 스크롤바 ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #c1c9d6;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aab8;
}

/* ===== 상단 헤더 (다크 바) ===== */
.top-header {
    background: var(--header-bg);
    color: #fff;
    height: 42px;
    font-size: 12px;
    position: relative;
    z-index: 100;
}

.top-header-inner {
    max-width: 1440px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-info {
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: -0.2px;
}

.header-info strong {
    color: #fff;
    font-weight: 600;
}

.header-divider {
    color: rgba(255, 255, 255, 0.15);
}

.header-link {
    color: rgba(255, 255, 255, 0.55);
    transition: var(--transition);
    font-weight: 400;
}

.header-link:hover {
    color: #fff;
}

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-logo {
    height: 22px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: opacity 0.2s;
}

.header-logo:hover {
    opacity: 1;
}

/* ===== 아이콘 네비게이션 (그라데이션 바) ===== */
.icon-nav {
    background: var(--nav-bg);
    position: relative;
    box-shadow: 0 4px 20px rgba(79, 172, 254, 0.25);
}

.icon-nav-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    padding: 0 24px;
}

.icon-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 32px 14px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: -0.2px;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
    text-align: center;
    min-width: 110px;
}

.icon-nav-item:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.icon-nav-item.active {
    background: var(--nav-active);
    color: #fff;
}

.icon-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--content-bg);
}

.icon-nav-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 8px;
    transition: var(--transition);
}

.icon-nav-item:hover .icon-nav-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.icon-nav-item.active .icon-nav-icon {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== 서브 네비게이션 ===== */
.sub-nav {
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.sub-nav-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    padding: 0 24px;
    gap: 4px;
}

.sub-nav-item {
    padding: 12px 20px;
    font-size: 13px;
    color: var(--text-light);
    border-bottom: 2.5px solid transparent;
    transition: var(--transition);
    font-weight: 400;
}

.sub-nav-item:hover {
    color: var(--text);
    background: rgba(79, 172, 254, 0.04);
}

.sub-nav-item.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

/* ===== 브레드크럼 ===== */
.breadcrumb-bar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    font-size: 12px;
}

.breadcrumb-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bc-item {
    color: var(--text-light);
}

.bc-item a {
    color: var(--text-light);
    transition: color 0.15s;
}

.bc-item a:hover {
    color: var(--accent);
}

.bc-sep {
    color: #d0d5dd;
    font-size: 11px;
}

.bc-current {
    color: var(--text);
    font-weight: 600;
}

/* ===== 메인 콘텐츠 ===== */
.main-content {
    min-height: calc(100vh - 200px);
}

.content-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 24px;
}

/* ===== 카드 ===== */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    background: #fff;
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-body {
    padding: 20px;
}

.card-body.p-0 {
    padding: 0;
}

.card-header-dark {
    background: var(--header-bg);
    color: #fff;
    border-bottom: none;
}

/* ===== 통계 카드 (대시보드) ===== */
.stat-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--nav-bg);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-value {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 6px;
    font-weight: 500;
}

.stat-card .stat-sub {
    font-size: 11px;
    color: #b0bec5;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ===== 테이블 ===== */
.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.table thead th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-light);
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    border-top: 2px solid var(--text);
    text-align: center;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.table tbody td {
    padding: 12px 14px;
    font-size: 13px;
    border-bottom: 1px solid #f1f3f5;
    text-align: center;
    vertical-align: middle;
}

.table tbody tr {
    transition: background 0.15s;
}

.table tbody tr:hover {
    background: #f0f7ff;
}

.table-striped tbody tr:nth-child(even) {
    background: #fafbfd;
}

.table-striped tbody tr:nth-child(even):hover {
    background: #f0f7ff;
}

/* ===== 뱃지 ===== */
.badge-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.badge-notice {
    background: #e7f5ff;
    color: #1971c2;
}

.badge-event {
    background: #fff4e6;
    color: #e8590c;
}

.badge.bg-light {
    background: #f1f3f5 !important;
    color: var(--text) !important;
    font-weight: 500;
}

.badge.bg-primary {
    background: var(--accent) !important;
}

/* ===== 검색 필터 ===== */
.filter-bar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

/* ===== 페이지네이션 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
    list-style: none;
    padding: 0;
}

.page-item .page-link,
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    text-decoration: none;
    transition: var(--transition);
}

.page-item.active .page-link,
.page-link.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}

.page-link:hover {
    background: #f0f7ff;
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== 차트 ===== */
.chart-container {
    position: relative;
    height: 300px;
}

.chart-btn-group .btn {
    font-size: 12px;
    padding: 4px 14px;
    border-radius: 20px;
}

.chart-btn-group .btn-primary {
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}

/* ===== 폼 ===== */
.form-label {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 6px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-control,
.form-select {
    border-radius: 6px;
    border: 1px solid var(--border);
    padding: 8px 12px;
    font-size: 13px;
    transition: var(--transition);
    background: #fff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.15);
}

.form-control::placeholder {
    color: #c1c9d6;
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

/* ===== 버튼 ===== */
.btn {
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 16px;
    transition: var(--transition);
    letter-spacing: -0.2px;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 5px;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.btn-outline-primary {
    color: var(--accent);
    border-color: var(--accent);
    background: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.btn-secondary {
    background: #e9ecef;
    border-color: #e9ecef;
    color: var(--text);
}

.btn-secondary:hover {
    background: #dee2e6;
    border-color: #dee2e6;
    color: var(--text);
}

.btn-outline-secondary {
    color: var(--text-light);
    border-color: var(--border);
}

.btn-outline-secondary:hover {
    background: #f8f9fa;
    color: var(--text);
    border-color: #ced4da;
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #fa5252;
    border-color: #fa5252;
}

.btn-outline-danger {
    color: var(--danger);
    border-color: var(--danger);
    background: transparent;
}

.btn-outline-danger:hover {
    background: var(--danger);
    color: #fff;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
}

/* ===== 대시보드 그리드 ===== */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dash-grid .card {
    margin-bottom: 0;
}

/* ===== 페이지 헤더 ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--text);
}

.page-header h2 {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

/* ===== 로그인 ===== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--header-bg);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(79, 172, 254, 0.08) 60deg, transparent 120deg, rgba(0, 242, 254, 0.05) 180deg, transparent 240deg, rgba(79, 172, 254, 0.08) 300deg, transparent 360deg);
    animation: loginBgRotate 30s linear infinite;
}

@keyframes loginBgRotate {
    to {
        transform: rotate(360deg);
    }
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 52px 44px;
    width: 100%;
    max-width: 430px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 1;
}

.login-card .logo {
    text-align: center;
    margin-bottom: 36px;
}

.login-card .logo img {
    height: 38px;
}

.login-card h3 {
    text-align: center;
    font-weight: 800;
    margin-bottom: 6px;
    font-size: 22px;
    letter-spacing: -0.5px;
}

.login-card p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 36px;
    font-size: 14px;
}

.login-card .form-label {
    text-transform: none;
    font-size: 13px;
    color: var(--text);
}

.login-card .form-control {
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
}

.login-card .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(79, 172, 254, 0.12);
}

.login-card .btn-primary {
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    border: none;
    letter-spacing: 0.5px;
}

.login-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

/* ===== 모달 ===== */
.modal-content {
    border-radius: var(--radius);
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
}

.modal-title {
    font-weight: 700;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 14px 20px;
}

/* ===== 썸네일 ===== */
.thumb-img {
    width: 80px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ===== 이벤트 리스트 ===== */
.event-card {
    display: flex;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f3f5;
    align-items: center;
    transition: background 0.15s;
}

.event-card:hover {
    background: #f8fafc;
}

.event-card:last-child {
    border-bottom: none;
}

.event-card .event-thumb {
    width: 200px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-card .event-info {
    flex: 1;
}

.event-card .event-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
}

.event-card .event-date {
    font-size: 12px;
    color: var(--text-light);
}

.event-card .event-views {
    font-size: 13px;
    color: var(--accent);
    font-weight: 700;
}

/* ===== 상태 select ===== */
.status-select {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
}

.status-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.15);
}

/* ===== SweetAlert2 커스텀 ===== */
.swal2-popup {
    border-radius: 12px !important;
    font-family: 'Noto Sans KR', sans-serif !important;
}

.swal2-confirm {
    border-radius: 8px !important;
    font-weight: 600 !important;
}

/* ===== Summernote 커스텀 ===== */
.note-editor.note-frame {
    border-radius: var(--radius);
    border-color: var(--border);
}

.note-editor .note-toolbar {
    background: #f8fafc;
    border-bottom-color: var(--border);
}

/* ===== 유틸리티 ===== */
.text-accent {
    color: var(--accent);
}

.text-danger {
    color: var(--danger) !important;
}

.fw-600 {
    font-weight: 600;
}

.fw-medium {
    font-weight: 500;
}

.cursor-pointer {
    cursor: pointer;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 15px;
}

/* ===== 애니메이션 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card {
    animation: fadeInUp 0.4s ease-out both;
}

.stat-card:nth-child(1) {
    animation-delay: 0s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.2s;
}

.card {
    animation: fadeInUp 0.4s ease-out both;
}

.dash-grid .card:nth-child(1) {
    animation-delay: 0.1s;
}

.dash-grid .card:nth-child(2) {
    animation-delay: 0.2s;
}

.dash-grid .card:nth-child(3) {
    animation-delay: 0.3s;
}

.dash-grid .card:nth-child(4) {
    animation-delay: 0.4s;
}

/* ===== 반응형 ===== */
@media (max-width: 991px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .icon-nav-inner {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .icon-nav-item {
        padding: 12px 18px 10px;
        min-width: 90px;
        font-size: 11px;
    }

    .icon-nav-icon {
        width: 36px;
        height: 36px;
        font-size: 17px;
        border-radius: 10px;
    }

    .stat-cards {
        flex-direction: column;
    }

    .content-inner {
        padding: 20px 14px;
    }

    .header-left,
    .header-right {
        font-size: 11px;
        gap: 6px;
    }

    .top-header-inner {
        position: relative;
    }

    .sub-nav-inner {
        gap: 0;
    }

    .sub-nav-item {
        padding: 10px 14px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .icon-nav-item {
        min-width: 70px;
        padding: 10px 12px 8px;
    }

    .icon-nav-icon {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .header-left {
        display: none;
    }

    .stat-card .stat-value {
        font-size: 28px;
    }

    .page-header h2 {
        font-size: 17px;
    }
}


.modal-backdrop.show {
    display: none !important;
    pointer-events: none !important;
}