/* 관리자 페이지 스타일 */

:root {
    --primary-color: #4A5FC1;
    --secondary-color: #6C7AC9;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --sidebar-bg: #34495e;
    --sidebar-hover: #2c3e50;
    --header-bg: #4A5FC1;
    --border-color: #dee2e6;
    --text-color: #333;
    --text-light: #6c757d;
}

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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: var(--text-color);
    background-color: #f5f7fa;
}

/* 헤더 */
.admin-header {
    background: var(--header-bg);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    transition: background 0.3s;
}

.menu-toggle:hover {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.admin-title {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-name {
    font-size: 14px;
    margin-right: 10px;
}

.btn-md-admin,
.btn-home,
.btn-settings,
.btn-logout {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-md-admin:hover,
.btn-home:hover,
.btn-settings:hover,
.btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

/* 컨테이너 */
.admin-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* 사이드바 */
.admin-sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    color: white;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.admin-sidebar.collapsed {
    transform: translateX(-250px);
}

.sidebar-nav {
    padding: 20px 0;
}

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

.nav-title {
    padding: 15px 20px;
    font-size: 13px;
    font-weight: bold;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.nav-list li {
    position: relative;
}

.nav-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 12px 35px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
}

.nav-list li a i {
    width: 20px;
    font-size: 16px;
}

.nav-list li a:hover {
    background: var(--sidebar-hover);
    padding-left: 40px;
}

.nav-list li.active a {
    background: var(--primary-color);
    border-left: 4px solid #fff;
    padding-left: 31px;
}

/* 메인 콘텐츠 */
.admin-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.content-page {
    display: none;
}

.content-page.active {
    display: block;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 28px;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.page-description {
    color: var(--text-light);
    font-size: 14px;
}

.page-description strong {
    color: var(--primary-color);
    font-size: 16px;
}

/* 검색 패널 */
.search-panel {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.search-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.form-control {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

/* 토큰 관리 페이지 */
.token-manage-panels {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.token-manage-panel {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.token-manage-panel .panel-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0 0 8px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}
.token-manage-panel .panel-desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 16px 0;
}
.token-manage-panel .table-container {
    margin-top: 12px;
}
.token-manage-panel .wallet-cell {
    max-width: 200px;
    word-break: break-all;
    font-size: 13px;
}
.token-manage-panel .status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}
.token-manage-panel .btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.token-history-pagination {
    justify-content: center;
}

.token-deposits-panel .panel-title { border-left: 4px solid #28a745; padding-left: 12px; }
.token-withdrawals-panel .panel-title { border-left: 4px solid #dc3545; padding-left: 12px; }

/* 버튼 */
.btn {
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #17a2b8;
    color: white;
}

.btn-primary:hover {
    background: #138496;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

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

.btn-default:hover {
    background: #d3d9df;
}

/* 테이블 */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    background: #5a6c7d;
    color: white;
}

.data-table th {
    padding: 15px 12px;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

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

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

.data-table td {
    padding: 12px;
    text-align: center;
    color: var(--text-color);
}

/* 상품목록 페이징 */
.product-list-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.product-list-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}
.product-list-page-btn:hover {
    background: #f0f0f0;
}
.product-list-page-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.product-list-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 게시판 관리 테이블의 관리 컬럼 너비 조정 */
#board-manage .data-table th:last-child,
#board-manage .data-table td:last-child {
    width: 150px;
    min-width: 150px;
}

/* 구매요청 및 승인대기 페이지: 제목(h3)만 25px로 확대 */
#purchase-request .table-container h3 {
    font-size: 25px !important;
}

/* 배지 */
.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* 상태 선택 셀렉트 박스 */
.status-select {
    padding: 6px 10px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
    background: white !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    min-width: 80px !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.status-select:hover {
    border-color: var(--primary-color) !important;
}

.status-select:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 2px rgba(74, 95, 193, 0.1) !important;
}

/* 버튼 크기 */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* 이미지 업로드 섹션 */
.image-upload-section {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.image-upload-box {
    border: 2px dashed #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: all 0.3s;
}

.image-upload-box:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.image-upload-box.small {
    width: 120px;
    height: 120px;
}

.upload-label {
    display: block;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.image-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #999;
    min-height: 250px;
}

.image-upload-box.small .image-preview {
    padding: 10px;
    min-height: auto;
    height: 100%;
}

.image-preview i {
    margin-bottom: 10px;
    color: #007bff;
}

.image-preview p {
    margin: 10px 0 5px 0;
    font-size: 14px;
    color: #666;
}

.image-preview small {
    font-size: 12px;
    color: #999;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.additional-images {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.form-help-text {
    margin-top: 15px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 13px;
    color: #856404;
}

.form-help-text i {
    margin-right: 5px;
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.remove-image:hover {
    background: rgba(200, 0, 0, 1);
    transform: scale(1.1);
}

.image-upload-box {
    position: relative;
}

.image-preview {
    position: relative;
}

/* 정보 텍스트 */
.info-text {
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #17a2b8;
    margin-bottom: 20px;
    font-size: 14px;
    color: #333;
}

/* 빈 메시지 */
.empty-message {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
}

/* 관리자 추가 모달 - 회원 검색 */
.admin-member-search-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}
.admin-search-desc {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
}
.admin-search-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 8px;
}
.admin-search-results .empty-message {
    padding: 16px;
    margin: 0;
    text-align: left;
}
.admin-search-result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}
.admin-search-result-row:last-child {
    border-bottom: none;
}
.admin-search-result-row:hover {
    background: #f0f4ff;
}
.admin-search-result-row-selected,
.admin-search-result-row-selected:hover {
    background: #e0e8ff;
    border-left: 3px solid var(--primary-color);
}
.admin-search-result-row .admin-search-name {
    font-weight: 600;
    min-width: 80px;
}
.admin-search-result-row .admin-search-id {
    color: var(--text-light);
    min-width: 100px;
}
.admin-search-result-row .admin-search-extra {
    color: var(--text-light);
    font-size: 12px;
}

/* 통계 패널 */
.stats-panel {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.stats-panel h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

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

.stats-table th,
.stats-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
}

.stats-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.stats-summary {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 20px;
}

.stats-summary p {
    margin: 0;
    font-size: 14px;
}

.stats-summary strong {
    color: #17a2b8;
    font-size: 16px;
}

/* 총 정산 블록: 검색 결과와 구분 */
.settlement-total-block {
    margin-bottom: 24px;
    border: 1px solid #dee2e6;
    background: #fff;
}
.settlement-total-block h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: #495057;
}

/* 아이콘 버튼 */
.btn-icon {
    background: white;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.btn-edit {
    color: var(--info-color);
    border-color: #bee5eb;
}

.btn-edit:hover {
    background: #d1ecf1;
    border-color: #17a2b8;
}

.btn-delete {
    color: var(--danger-color);
    border-color: #f5c6cb;
}

.btn-delete:hover {
    background: #f8d7da;
    border-color: #dc3545;
}

.btn-add {
    color: #28a745;
    border-color: #c3e6cb;
}

.btn-add:hover {
    background: #d4edda;
    border-color: #28a745;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 25px;
}

.page-btn,
.page-num {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 13px;
}

.page-btn:hover:not(:disabled),
.page-num:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-num.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 준비 중 */
.coming-soon {
    text-align: center;
    padding: 100px 20px;
    color: var(--text-light);
}

.coming-soon i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.coming-soon p {
    font-size: 18px;
}

/* 반응형 */
@media (max-width: 1024px) {
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 60px;
        height: calc(100vh - 60px);
        z-index: 99;
        transform: translateX(-250px);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-content {
        padding: 20px;
    }

    .search-row {
        grid-template-columns: 1fr;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .stats-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ranking-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-header {
        padding: 10px 15px;
    }

    .admin-title {
        font-size: 16px;
    }

    .header-right {
        gap: 8px;
    }

    .admin-name {
        display: none;
    }

    .btn-md-admin,
    .btn-home,
    .btn-settings,
    .btn-logout {
        padding: 6px 10px;
        font-size: 12px;
    }

    .admin-content {
        padding: 15px;
    }

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

    .search-panel {
        padding: 15px;
    }

    .table-container {
        overflow-x: scroll;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .stats-summary-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .board-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }

    .board-tab {
        padding: 10px 16px;
        font-size: 13px;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .icon-selector {
        grid-template-columns: repeat(4, 1fr);
    }

    .product-form-container {
        padding: 20px;
    }
}

/* 대시보드 통계 카드 */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-info h3 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.stat-number {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.stat-change {
    font-size: 12px;
    color: #666;
}

.stat-change.positive {
    color: #28a745;
}

/* 대시보드 그리드 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

.panel-header {
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-link {
    color: #17a2b8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.panel-link:hover {
    color: #138496;
}

.panel-content {
    padding: 20px;
}

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

.simple-table th,
.simple-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.simple-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
}

.stat-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.stat-value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.quick-btn {
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.quick-btn:hover {
    background: #4A5FC1;
    border-color: #4A5FC1;
    color: white;
    transform: translateY(-3px);
}

.quick-btn i {
    font-size: 24px;
}

.quick-btn span {
    font-size: 14px;
    font-weight: 600;
}

/* 설정 패널 */
.settings-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 30px;
}

.settings-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.settings-section:last-of-type {
    border-bottom: none;
}

.settings-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.settings-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding-top: 20px;
}

.permission-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.permission-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #17a2b8;
}

.permission-item p {
    margin: 10px 0 0 0;
    font-size: 14px;
    color: #666;
}

/* 통계 요약 그리드 */
.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.summary-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.summary-content h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.summary-number {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.summary-period {
    font-size: 12px;
    color: #999;
}

/* 게시판 탭 */
.board-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.board-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.board-tab:hover {
    color: #4A5FC1;
}

.board-tab.active {
    color: #4A5FC1;
    border-bottom-color: #4A5FC1;
}

/* 랭킹 컨테이너 */
.ranking-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.ranking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.ranking-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid #ddd;
    transition: all 0.3s;
}

.ranking-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.ranking-card.rank-1 {
    border-left-color: #FFD700;
    background: linear-gradient(135deg, #fff9e6 0%, #f8f9fa 100%);
}

.ranking-card.rank-2 {
    border-left-color: #C0C0C0;
    background: linear-gradient(135deg, #f5f5f5 0%, #f8f9fa 100%);
}

.ranking-card.rank-3 {
    border-left-color: #CD7F32;
    background: linear-gradient(135deg, #fff4e6 0%, #f8f9fa 100%);
}

.rank-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #4A5FC1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.rank-1 .rank-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.rank-2 .rank-badge {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
}

.rank-3 .rank-badge {
    background: linear-gradient(135deg, #CD7F32, #B8860B);
}

.product-info h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: #333;
}

.product-info p {
    margin: 3px 0;
    font-size: 13px;
    color: #666;
}

.sales-count {
    font-weight: 600;
}

.sales-amount {
    color: #28a745;
    font-weight: bold;
}

.rank-badge-small {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    color: white;
    background: #6c757d;
}

.rank-badge-small.gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.rank-badge-small.silver {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
}

.rank-badge-small.bronze {
    background: linear-gradient(135deg, #CD7F32, #B8860B);
}

/* 상품 폼 컨테이너 */
.product-form-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* 체크박스 그룹 */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    font-size: 14px;
    font-weight: 500;
}

.checkbox-label:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.checkbox-label input[type="checkbox"]:checked + span {
    color: #4A5FC1;
    font-weight: 600;
}

.checkbox-label:has(input[type="checkbox"]:checked) {
    background: #e8f0ff;
    border-color: #4A5FC1;
    box-shadow: 0 2px 4px rgba(74, 95, 193, 0.2);
}

.required {
    color: #dc3545;
    font-weight: bold;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
}

.btn-lg {
    padding: 12px 40px;
    font-size: 16px;
}

/* 상품 이미지 */
.product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
}

/* 카테고리 관리 */
.category-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.category-list-panel-full {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
}

.category-tree {
    margin-top: 20px;
}


.category-list-panel,
.category-form-panel {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.category-tree {
    padding: 10px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    border-left: 4px solid #4A5FC1;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.category-item.level-1 {
    border-left-color: #4A5FC1;
    margin-left: 0;
}

.category-item.level-2 {
    border-left-color: #7B68EE;
    margin-left: 30px;
    background: #fafbff;
}

.category-item.level-3 {
    border-left-color: #9370DB;
    margin-left: 60px;
    background: #f5f7ff;
}

.category-item:hover {
    background: #f8f9fa;
    transform: translateX(3px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    border-color: #dee2e6;
}

.category-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    flex: 1;
}

.category-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.category-level-label {
    font-size: 11px;
    font-weight: 600;
    color: #4A5FC1;
    background: #e8f0ff;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

.category-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
}

/* 카테고리 이동 버튼 */
.btn-move {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.2);
}

.btn-move:hover {
    background-color: #138496;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.3);
}

.btn-move i {
    font-size: 11px;
}

/* 카테고리 이동 옵션 */
.category-move-options {
    background: white;
    border: 2px solid #17a2b8;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.move-options-header {
    background: #17a2b8;
    color: white;
    padding: 12px 15px;
    font-weight: bold;
    font-size: 14px;
    border-radius: 6px 6px 0 0;
}

.move-options-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.move-option-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: all 0.2s;
}

.move-option-btn:hover {
    background: #e9ecef;
    border-color: #17a2b8;
    transform: translateX(5px);
}

.move-option-btn.cancel {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
    text-align: center;
    margin-top: 5px;
}

.move-option-btn.cancel:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateX(0);
}

/* 카테고리 숨김 체크박스 */
.category-hidden-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    transition: all 0.2s;
    white-space: nowrap;
}

.category-hidden-checkbox:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.category-hidden-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 15px;
    height: 15px;
    margin: 0;
}

.category-hidden-checkbox span {
    user-select: none;
}

/* 숨김 배지 */
.hidden-badge {
    font-size: 11px;
    font-weight: bold;
    color: #dc3545;
    background: #ffe5e8;
    padding: 3px 8px;
    border-radius: 3px;
    margin-left: 8px;
}

/* 숨겨진 카테고리 스타일 */
.category-item.hidden-category {
    opacity: 0.6;
    background: #f8f9fa;
}

.category-item.hidden-category .category-name {
    text-decoration: line-through;
    color: #999;
}

/* 카테고리 순서 변경 모드 */
.panel-header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-outline {
    background: transparent;
    color: #4A5FC1;
    border: 1.5px solid #4A5FC1;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: #4A5FC1;
    color: #fff;
}

.btn-outline.active {
    background: #4A5FC1;
    color: #fff;
}

.category-item.sort-mode {
    border: 1.5px dashed #4A5FC1;
    background: #f0f3ff;
}

.category-item.sort-mode:hover {
    background: #e4e9ff;
}

.sort-order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #4A5FC1;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.btn-sort-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1.5px solid #4A5FC1;
    background: #fff;
    color: #4A5FC1;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}

.btn-sort-arrow:hover:not(:disabled) {
    background: #4A5FC1;
    color: #fff;
}

.btn-sort-arrow:disabled,
.btn-sort-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #ccc;
    color: #ccc;
}

.btn-change {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-change:hover {
    background-color: #138496;
    transform: scale(1.05);
}

.btn-add {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add:hover {
    background-color: #218838;
    transform: scale(1.05);
}

/* 카테고리 추가 폼 */
.category-add-form {
    background: #f0f8ff;
    border: 2px solid #4A5FC1;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-add-form .form-content {
    display: flex;
    gap: 10px;
    align-items: center;
}

.category-add-form .form-control {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.category-add-form .form-buttons {
    display: flex;
    gap: 8px;
}

.category-info i {
    font-size: 18px;
    color: #4A5FC1;
}

.category-name {
    font-weight: 600;
    color: #333;
}

.category-count {
    color: #999;
    font-size: 13px;
}

.category-actions {
    display: flex;
    gap: 8px;
}

.icon-selector {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
}

.icon-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
}

.icon-btn:hover {
    border-color: #4A5FC1;
    color: #4A5FC1;
}

.icon-btn.active {
    border-color: #4A5FC1;
    background: #4A5FC1;
    color: white;
}

/* 추첨 설정 패널 */
.lottery-settings-panel {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.settings-row {
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item small {
    color: #999;
    font-size: 12px;
}

/* 추첨 현황 그리드 */
.lottery-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.lottery-product-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.lottery-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.lottery-product-card.selected {
    border-color: #4A5FC1;
    background: #f8f9ff;
}

.product-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.product-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.product-card-price {
    font-size: 18px;
    font-weight: bold;
    color: #4A5FC1;
}

.product-card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
}

.info-label {
    font-weight: 500;
}

.info-value {
    font-weight: 600;
    color: #333;
}

.info-value.highlight {
    color: #28a745;
    font-size: 16px;
}

.info-value.ready {
    color: #dc3545;
}

.product-card-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* 추첨 섹션 */
.lottery-product-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-actions {
    display: flex;
    gap: 10px;
}

/* 추첨 결과 모달 */
.lottery-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lottery-result-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 22px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

.result-section {
    margin-bottom: 30px;
}

.winner-title {
    color: #28a745;
    font-size: 18px;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.loser-title {
    color: #17a2b8;
    font-size: 18px;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.winners-list,
.losers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.result-person {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #4A5FC1;
}

.result-person.winner {
    border-left-color: #28a745;
    background: #d4edda;
}

.result-person.loser {
    border-left-color: #17a2b8;
    background: #d1ecf1;
}

.person-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.person-phone {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.person-amount {
    font-size: 14px;
    color: #333;
}

.person-support {
    font-size: 14px;
    color: #28a745;
    font-weight: 600;
}

.result-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.result-summary p {
    margin: 8px 0;
    font-size: 15px;
    color: #333;
}

.result-summary strong {
    color: #666;
}

.result-summary span {
    color: #4A5FC1;
    font-weight: 600;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 지급 요약 패널 */
.payment-summary-panel {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.summary-card-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.summary-info-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s;
}

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

.summary-info-card .summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
}

.summary-info-card .summary-content {
    flex: 1;
}

.summary-info-card .summary-content h4 {
    margin: 0 0 5px 0;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.summary-info-card .summary-value {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

/* 테이블 헤더 액션 */
.table-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.table-header-actions .info-text {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

/* 지급 상태 배지 */
.payment-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.payment-status.paid {
    background: #d4edda;
    color: #155724;
}

.payment-status.pending {
    background: #fff3cd;
    color: #856404;
}

/* 스크롤바 스타일 */
.admin-sidebar::-webkit-scrollbar,
.admin-content::-webkit-scrollbar {
    width: 8px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: #2c3e50;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: #4A5FC1;
    border-radius: 4px;
}

.admin-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.admin-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.admin-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 검색 결과 영역 */
.search-results-container {
    margin-top: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-results-container .page-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.search-results-container .page-header h3 {
    font-size: 18px;
    color: var(--text-color);
    margin: 0;
}

.search-results-container .page-header h3 strong {
    color: var(--primary-color);
    font-size: 20px;
}


/* 모달 ?��???*/
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow: auto;
    padding: 20px;
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    margin: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

/* 게시글 작성 모달의 입력 필드 간격 */
#boardPostModal .modal-body .form-group {
    margin-bottom: 20px;
}

#boardPostModal .modal-body .form-group:last-child {
    margin-bottom: 0;
}

/* Inquiry 모달 스타일 (관리자 페이지용) */
#boardPostModal .inquiry-modal-content {
    max-width: 800px;
    width: 90%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#boardPostModal .inquiry-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 28px;
    border-bottom: none;
}

#boardPostModal .inquiry-modal-title-wrap {
    display: flex;
    align-items: center;
}

#boardPostModal .inquiry-modal-header h3 {
    color: white;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

#boardPostModal .inquiry-modal-header .modal-close {
    color: white;
    font-size: 24px;
    opacity: 0.9;
}

#boardPostModal .inquiry-modal-header .modal-close:hover {
    opacity: 1;
    color: white;
}

#boardPostModal .inquiry-modal-body {
    padding: 32px;
    background: #fafbfc;
}

#boardPostModal .inquiry-form-group {
    margin-bottom: 28px;
}

#boardPostModal .inquiry-form-group:last-of-type {
    margin-bottom: 0;
}

#boardPostModal .inquiry-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

#boardPostModal .label-text {
    color: #2d3748;
}

#boardPostModal .required-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #fee;
    color: #e53e3e;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

#boardPostModal .inquiry-input,
#boardPostModal .inquiry-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #2d3748;
    background: white;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

#boardPostModal .inquiry-input:focus,
#boardPostModal .inquiry-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#boardPostModal .inquiry-input::placeholder,
#boardPostModal .inquiry-textarea::placeholder {
    color: #a0aec0;
}

#boardPostModal .inquiry-select-wrapper {
    position: relative;
}

#boardPostModal .inquiry-select {
    width: 100%;
    padding: 14px 40px 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #2d3748;
    background: white;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#boardPostModal .inquiry-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#boardPostModal .inquiry-select-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    pointer-events: none;
    font-size: 12px;
}

#boardPostModal .inquiry-textarea {
    resize: vertical;
    min-height: 180px;
    line-height: 1.6;
}

#boardPostModal .inquiry-modal-footer {
    padding: 20px 32px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

#boardPostModal .btn-inquiry-cancel,
#boardPostModal .btn-inquiry-submit {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#boardPostModal .btn-inquiry-cancel {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

#boardPostModal .btn-inquiry-cancel:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

#boardPostModal .btn-inquiry-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#boardPostModal .btn-inquiry-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

#boardPostModal .btn-inquiry-submit:active {
    transform: translateY(0);
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-footer .btn {
    min-width: 80px;
}

/* 상세 설명 항목 스타일 */
.detail-row {
    margin-bottom: 10px;
}

.detail-row-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.detail-row-inputs .form-group {
    margin-bottom: 0;
}

.detail-row-inputs input {
    height: 40px;
}

/* 상품 선택 옵션 행 */
.product-option-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.product-option-row input[type="text"],
.product-option-row input[type="number"] {
    height: 36px;
}

/* 이미지 업로드 박스 스타일 */
.image-upload-box {
    border: 2px dashed #ddd;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-upload-box:hover {
    border-color: #4A5FC1;
    background-color: #f8f9ff;
}

.image-upload-box.small {
    width: 150px;
    height: 150px;
}

.upload-label {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
}

.image-preview {
    width: 100%;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    text-align: center;
    padding: 20px;
}

.image-upload-box.small .image-preview {
    height: 150px;
    padding: 10px;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-preview i {
    margin-bottom: 10px;
    color: #4A5FC1;
}

.image-preview p {
    margin: 5px 0;
    font-size: 14px;
}

.image-preview small {
    font-size: 12px;
    color: #999;
}

.detail-image-upload {
    position: relative;
}
