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

/* 💡 === 다크 모드 색상 변수 === 💡 */
:root {
    --primary-color: #DAA520; /* 짙은 황금색 (포인트) */
    --primary-color-dark: #c4911c;
    --bg-dark-primary: #121212;  /* 가장 어두운 배경 (페이지 전체) */
    --bg-dark-secondary: #1E1E1E; /* 카드, 헤더, 모달 등 (조금 더 밝음) */
    --bg-dark-tertiary: #333333;  /* 호버, 테두리 등 */
    --text-light-primary: #F9FAFB; /* 기본 흰색 텍스트 */
    --text-light-secondary: #9CA3AF; /* 연한 회색 텍스트 */
    --text-dark-primary: #111111;   /* 노란 버튼 위의 검은색 텍스트 */
    --border-color: #333333; /* 구분선 및 테두리 */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark-primary); /* 💡 배경색 수정 */
    color: var(--text-light-primary); /* 💡 글자색 수정 */
    line-height: 1.6;
}

/* 헤더 스타일 */
.header {
    background: var(--bg-dark-secondary); /* 💡 배경색 수정 */
    box-shadow: none; /* 💡 그림자 제거 */
    border-bottom: 1px solid var(--border-color); /* 💡 테두리 추가 */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color); /* 💡 노란색으로 변경 */
}

.logo i {
    font-size: 28px;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light-secondary); /* 💡 글자색 수정 */
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-light-primary); /* 💡 글자색 수정 */
    background-color: var(--bg-dark-tertiary); /* 💡 배경색 수정 */
}

.nav-link.active {
    color: var(--text-dark-primary); /* 💡 검은색 글씨로 변경 */
    background-color: var(--primary-color); /* 💡 노란색으로 변경 */
}

.user-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.notification {
    position: relative;
    padding: 8px;
    cursor: pointer;
    color: var(--text-light-secondary); /* 💡 글자색 수정 */
    transition: color 0.2s ease;
}

.notification:hover {
    color: var(--primary-color); /* 💡 노란색으로 변경 */
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.user-info:hover {
    background-color: var(--bg-dark-tertiary); /* 💡 배경색 수정 */
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-color); /* 💡 노란색으로 변경 */
    color: var(--text-dark-primary); /* 💡 검은색 글씨로 변경 */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
}

.user-name {
    color: var(--text-light-primary); /* 💡 흰색 글씨로 변경 */
    font-weight: 500;
}

/* 메인 콘텐츠 */
.main-content {
    margin-top: 70px;
    padding: 32px 24px;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 페이지 헤더 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-light-primary); /* 💡 흰색 글씨로 변경 */
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-light-secondary); /* 💡 연한 회색으로 변경 */
    font-size: 16px;
}

.page-actions {
    display: flex;
    gap: 12px;
}

/* 버튼 스타일 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color); /* 💡 노란색으로 변경 */
    color: var(--text-dark-primary); /* 💡 검은색 글씨로 변경 */
}

.btn-primary:hover {
    background: var(--primary-color-dark); /* 💡 어두운 노란색으로 변경 */
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-light-secondary); /* 💡 연한 회색으로 변경 */
    border: 1px solid var(--border-color); /* 💡 어두운 테두리로 변경 */
}

.btn-outline:hover {
    border-color: var(--text-light-secondary); /* 💡 연한 회색으로 변경 */
    background: var(--bg-dark-tertiary); /* 💡 어두운 배경으로 변경 */
}

/* 통계 카드 그리드 (dashboard.css에서 덮어쓸 예정) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-dark-secondary); /* 💡 어두운 배경으로 변경 */
    padding: 24px;
    border-radius: 12px;
    box-shadow: none; /* 💡 그림자 제거 */
    border: 1px solid var(--border-color); /* 💡 테두리 추가 */
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}
.stat-icon.yellow {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}
.stat-icon.green {
    background: linear-gradient(135deg, #10b981, #059669);
}
.stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
.stat-icon.orange {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.stat-content h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light-secondary); /* 💡 연한 회색으로 변경 */
    margin-bottom: 8px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-light-primary); /* 💡 흰색으로 변경 */
    margin-bottom: 4px;
}

.stat-unit {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-light-secondary); /* 💡 연한 회색으로 변경 */
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
}

.stat-change.positive {
    color: #059669;
}

.stat-change i {
    font-size: 10px;
}

.stat-info {
    font-size: 12px;
    color: var(--text-light-secondary); /* 💡 연한 회색으로 변경 */
}

/* 빠른 액션 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.action-card {
    background: var(--bg-dark-secondary); /* 💡 어두운 배경으로 변경 */
    padding: 24px;
    border-radius: 12px;
    box-shadow: none; /* 💡 그림자 제거 */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color); /* 💡 테두리 추가 */
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--bg-dark-tertiary);
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    margin-bottom: 16px;
}

.action-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light-primary); /* 💡 흰색으로 변경 */
    margin-bottom: 8px;
}

.action-card p {
    font-size: 14px;
    color: var(--text-light-secondary); /* 💡 연한 회색으로 변경 */
    margin-bottom: 16px;
    line-height: 1.5;
}

.action-btn {
    background: none;
    border: none;
    color: var(--primary-color); /* 💡 노란색으로 변경 */
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.action-btn:hover {
    color: var(--primary-color-dark); /* 💡 어두운 노란색으로 변경 */
}

/* 대시보드 하단 */
.dashboard-bottom {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

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

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-light-primary); /* 💡 흰색으로 변경 */
}

.view-all {
    color: var(--primary-color); /* 💡 노란색으로 변경 */
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.view-all:hover {
    color: var(--primary-color-dark);
}

/* 테이블 스타일 */
.orders-table {
    background: var(--bg-dark-secondary); /* 💡 어두운 배경으로 변경 */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none; /* 💡 그림자 제거 */
    border: 1px solid var(--border-color); /* 💡 테두리 추가 */
}

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

.orders-table th {
    background: var(--bg-dark-primary); /* 💡 배경색 수정 */
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-light-secondary); /* 💡 연한 회색으로 변경 */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color); /* 💡 테두리 색상 변경 */
}

.orders-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color); /* 💡 테두리 색상 변경 */
    font-size: 14px;
    color: var(--text-light-primary); /* 💡 흰색 글씨로 변경 */
}

.orders-table tbody tr:hover {
    background: var(--bg-dark-tertiary); /* 💡 호버 색상 변경 */
}

.orders-table tbody tr:last-child td {
    border-bottom: none;
}

.order-number {
    color: var(--primary-color); /* 💡 노란색으로 변경 */
    font-weight: 500;
    cursor: pointer;
}

.order-number:hover {
    text-decoration: underline;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-width: 80px;
    display: inline-block;
}

/* 💡 [수정] 다크 모드에 어울리도록 색상 반전 */
.status-제작중, .status-In-Progress {
    background: #92400e; /* 어두운 노랑/갈색 */
    color: #fef3c7; /* 밝은 노랑 */
}
.status-배송중, .status-Shipping {
    background: #065f46; /* 어두운 초록 */
    color: #d1fae5; /* 밝은 초록 */
}
/* 💡 [유지] '.status-접수대기' (파란색) - 옛날 데이터용 */
.status-접수대기, .status-Pending {
    background: #1e40af; /* 어두운 파랑 */
    color: #dbeafe; /* 밝은 파랑 */
}
.status-디자인-중, .status-designing {
    background: #1e40af; /* 어두운 파랑 */
    color: #dbeafe; /* 밝은 파랑 */
}
.status-완료, .status-Completed {
    background: var(--bg-dark-tertiary); /* 어두운 회색 */
    color: var(--text-light-secondary); /* 연한 회색 */
}
/* 💡 [추가] "수정 요청" 뱃지 (주황색) */
.status-수정-요청, .status-Correction-Request {
    background: #9a3412; /* 짙은 주황색 */
    color: #fed7aa; /* 밝은 주황색 */
}
/* 💡 [추가] "컨펌 대기" 뱃지 (보라색) */
.status-컨펌-대기, .status-Confirm-Wait {
    background: #581c87; /* 짙은 보라색 */
    color: #e9d5ff; /* 밝은 보라색 */
}
.status-취소요청, .status-Cancellation-Requested {
    background: #991b1b; /* 어두운 빨강 */
    color: #fecaca; /* 밝은 빨강 */
}

.detail-btn {
    color: var(--primary-color); /* 💡 노란색으로 변경 */
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.detail-btn:hover {
    background: var(--bg-dark-tertiary); /* 💡 배경색 수정 */
}

/* 차트 컨테이너 */
.statistics-chart {
    background: var(--bg-dark-secondary); /* 💡 어두운 배경으로 변경 */
    padding: 24px;
    border-radius: 12px;
    box-shadow: none; /* 💡 그림자 제거 */
    border: 1px solid var(--border-color); /* 💡 테두리 추가 */
}

.chart-controls {
    display: flex;
    gap: 8px;
}

.chart-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color); /* 💡 테두리 색상 변경 */
    background: transparent; /* 💡 배경색 수정 */
    color: var(--text-light-secondary); /* 💡 글자색 수정 */
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-btn:hover {
    border-color: var(--primary-color); /* 💡 노란색으로 변경 */
    color: var(--primary-color); /* 💡 노란색으로 변경 */
}

.chart-btn.active {
    background: var(--primary-color); /* 💡 노란색으로 변경 */
    color: var(--text-dark-primary); /* 💡 검은색 글씨로 변경 */
    border-color: var(--primary-color); /* 💡 노란색으로 변경 */
}

.chart-container {
    margin-top: 16px;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .dashboard-bottom {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
    }
    .nav-menu {
        display: none;
    }
    .main-content {
        padding: 24px 16px;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .quick-actions {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .orders-table {
        overflow-x: auto;
    }
    .orders-table table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .user-name {
        display: none;
    }
    .page-header h1 {
        font-size: 24px;
    }
    .stat-number {
        font-size: 24px;
    }
}
/*
=================================
PRINT STYLES (인쇄 전용)
=================================
*/

/* 💡 용지 크기 정의 (기본 A4) */
@page {
    size: A4 portrait; /* A4 세로 */
    margin: 1cm;
}

/* 💡 13x18cm 용지 크기 정의 */
@page print-13x18 {
    size: 13cm 18cm;
    margin: 0.5cm;
}

/* 💡 .print-13x18 클래스가 body에 붙었을 때 13x18cm 용지 설정 적용 */
body.print-13x18 {
    page: print-13x18;
}

/* 💡 인쇄 시 화면 스타일 */
@media print {
    /* 1. 모든 불필요한 요소 숨기기 */
    body > *:not(.modal-content-wrapper) {
        display: none !important;
        visibility: hidden !important;
    }

    /* 2. 인쇄할 래퍼만 보이도록 설정 */
    body > .modal-content-wrapper {
        display: block !important;
        visibility: visible !important;
        position: static !important;
        width: 100% !important;
        height: auto !important;
    }

    /* 3. 인쇄용 컨텐츠 스타일 */
    .print-content {
        visibility: visible !important;
        display: block !important;
        width: 100% !important;
        color: #000 !important;
        background: #fff !important;
    }

    /* 💡 [추가] body.print-13x18일 때 폰트 더 작게 (한 장에 맞추기 위함) */
    body.print-13x18 .print-content {
        font-size: 8pt;
    }

    /* 4. 💡 복제된 인쇄용 섹션 스타일 강제 적용 */
    .print-content .detail-section {
        display: block !important;
        visibility: visible !important;
        padding: 10px 0 !important;
        margin: 0 !important;
        border-bottom: none !important; /* 내부 hr 대신 spacer 사용 */
        background: #fff !important;
        color: #000 !important;
    }

    .print-content .detail-section h3 {
        color: #000 !important;
        font-size: 16pt !important;
        font-weight: bold;
        border-bottom: 2px solid #333 !important;
        padding-bottom: 5px;
        margin-bottom: 10px;
    }
    
    .print-content .detail-section p {
        color: #000 !important;
        font-size: 11pt !important;
        margin-bottom: 5px;
    }
    
    .print-content .detail-section p strong {
         color: #333 !important;
         font-weight: bold;
         width: 110px !important; /* 인쇄용 너비 고정 */
    }
    
    .print-content .special-requests-box {
        background: #f9f9f9 !important;
        color: #000 !important;
        border: 1px solid #ccc !important;
        padding: 10px !important;
        min-height: auto !important;
    }

    /* 5. 기타 요소 숨기기 (혹시 포함될 경우 대비) */
    .print-content hr,
    .print-content .modal-actions,
    .print-content .admin-file-upload-section,
    .print-content .comment-section {
        display: none !important;
        visibility: hidden !important;
    }

    /* 6. 페이지 나누기 방지 */
    h3, p, .detail-section {
        page-break-inside: avoid;
    }
    
    a {
        text-decoration: none;
        color: #000 !important;
    }
    /* 고객 첨부 파일 링크 표시 (선택 사항) */
    #modal-admin-customer-file a[href]::after {
        content: " (파일 첨부됨)";
        font-style: italic;
        font-size: 9pt;
        color: #555;
    }
}

/* * ======================================
 * ===== 8. 모달 (상세보기, 라이트박스) =====
 * ======================================
 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    justify-content: center;
    align-items: center;
    background-color: rgba(0,0,0,0.7); /* 💡 배경 더 어둡게 */
    padding: 20px;
}

.modal.is-visible, .modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.modal-content {
    position: relative;
    background: var(--bg-dark-secondary); /* 💡 모달 배경 */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3); /* 💡 그림자 수정 */
    border: 1px solid var(--border-color); /* 💡 테두리 추가 */
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
    animation: fadeIn 0.3s ease-out;
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light-secondary); /* 💡 글자색 수정 */
    font-weight: bold;
    padding: 0;
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--text-light-primary); /* 💡 글자색 수정 */
}

.modal h2 {
    font-size: 28px;
    color: var(--text-light-primary); /* 💡 글자색 수정 */
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color); /* 💡 테두리 색상 변경 */
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal h2 span {
    font-size: 20px;
    font-weight: normal;
    color: var(--text-light-secondary); /* 💡 글자색 수정 */
    margin-left: 10px;
}

.modal .detail-section {
    margin-bottom: 20px;
    padding: 10px 0;
}

.modal .detail-section h3 {
    font-size: 20px;
    color: var(--text-light-primary); /* 💡 글자색 수정 */
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px dashed var(--border-color); /* 💡 테두리 색상 변경 */
}

.modal .detail-section p {
    margin-bottom: 8px;
    font-size: 15px;
    color: var(--text-light-primary); /* 💡 글자색 수정 */
}

.modal .detail-section p strong {
    color: var(--text-light-secondary); /* 💡 글자색 수정 */
    font-weight: 600;
    width: 120px;
    display: inline-block;
}

.modal .special-requests-box {
    background-color: var(--bg-dark-primary); /* 💡 배경색 수정 */
    border: 1px solid var(--border-color); /* 💡 테두리 색상 변경 */
    border-radius: 8px;
    padding: 15px;
    min-height: 80px;
    color: var(--text-light-primary); /* 💡 글자색 수정 */
    line-height: 1.6;
    font-size: 14px;
}

/* Admin File Upload Section */
.admin-file-upload-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color); /* 💡 테두리 색상 변경 */
}

.file-upload-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.file-upload-box input[type="file"] {
    border: 1px solid var(--border-color); /* 💡 테두리 색상 변경 */
    padding: 10px;
    border-radius: 8px;
    background-color: var(--bg-dark-primary); /* 💡 배경색 수정 */
    cursor: pointer;
    color: var(--text-light-primary); /* 💡 글자색 수정 */
}

.file-upload-box .btn-primary {
    align-self: flex-start;
    padding: 10px 20px;
    font-size: 14px;
}

.file-upload-note {
    font-size: 12px;
    color: var(--text-light-secondary); /* 💡 글자색 수정 */
    margin-top: -5px;
}

.uploaded-files-list {
    border: 1px solid var(--border-color); /* 💡 테두리 색상 변경 */
    border-radius: 8px;
    padding: 10px;
    min-height: 50px;
    background-color: var(--bg-dark-primary); /* 💡 배경색 수정 */
}

.uploaded-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color); /* 💡 테두리 색상 변경 */
}

.uploaded-file-item:last-child {
    border-bottom: none;
}

.uploaded-file-item a {
    color: var(--primary-color); /* 💡 노란색으로 변경 */
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.uploaded-file-item a i {
    color: var(--text-light-secondary); /* 💡 글자색 수정 */
}

/* 💡 [수정] 삭제 버튼 색상 변경 */
.uploaded-file-item .delete-file-btn {
    background: none;
    border: none;
    color: #ef4444; /* 더 밝은 빨간색 */
    cursor: pointer;
    font-size: 18px;
    padding: 0 5px;
}

.uploaded-file-item .delete-file-btn:hover {
    color: #dc2626; /* 호버 시 더 밝은 빨간색 */
}

/* Image preview in modal */
.file-preview {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.file-preview img {
    max-width: 100px;
    height: auto;
    border: 1px solid var(--border-color); /* 💡 테두리 색상 변경 */
    border-radius: 4px;
    object-fit: cover;
    cursor: zoom-in; /* 💡 커서 추가 */
}

.file-preview .no-preview-text, .no-preview-text {
    color: var(--text-light-secondary); /* 💡 글자색 수정 */
    font-size: 13px;
    padding: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    .modal h2 {
        font-size: 24px;
    }
    .modal .detail-section p strong {
        width: 100%;
        display: block;
        margin-bottom: 5px;
    }
}
/* --- 관리자 첨부 이미지 및 파일 스타일 --- */
.admin-image-preview-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px; /* 💡 [오타 수정] _gap -> gap */
}
.responsive-admin-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    border: 1px solid var(--border-color); /* 💡 테두리 색상 변경 */
    cursor: zoom-in; /* 💡 커서 추가 */
}
.admin-file-links-container {
    margin-top: 15px;
}
.uploaded-file-item a:hover {
    text-decoration: underline;
}

/* --- 이미지 라이트박스 스타일 --- */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}
.lightbox-modal.active {
    display: flex;
    animation: zoomIn 0.3s ease-out;
}
.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}
.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
}
@keyframes zoomIn {
    from {transform: scale(0.8);}
    to {transform: scale(1);}
}

.prev-btn, .next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -30px;
    color: white; /* 💡 [오타 수정] T color -> color */
    font-weight: bold;
    font-size: 24px;
    transition: 0.4s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
}
.prev-btn {
    left: 10px;
    border-radius: 3px 0 0 3px;
}
.next-btn {
    right: 10px;
    border-radius: 3px 0 0 3px;
}
.prev-btn:hover, .next-btn:hover {
    background-color: rgba(0,0,0,0.6);
}
.lightbox-caption {
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    font-size: 14px;
}

/* ====================================== */
/* ===== 코멘트 창 스타일 ===== */
/* ====================================== */
.comment-history {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color); /* 💡 색상 변경 */
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
    background-color: var(--bg-dark-primary); /* 💡 배경색 변경 */
}
.comment-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color); /* 💡 색상 변경 */
}
.comment-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.comment-author {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-light-primary); /* 💡 글자색 수정 */
}
.comment-item.comment-by-customer .comment-author {
    color: var(--primary-color); /* 💡 노란색으로 변경 */
}
.comment-timestamp {
    font-size: 12px;
    color: var(--text-light-secondary); /* 💡 글자색 수정 */
}
.comment-text {
    font-size: 14px;
    color: var(--text-light-primary); /* 💡 글자색 수정 */
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}
.no-comment-text {
    color: var(--text-light-secondary); /* 💡 글자색 수정 */
    font-size: 14px;
    text-align: center;
    padding: 10px;
}
.comment-section {
    display: flex;
    flex-direction: column; /* 💡 [오타 수정] _flex-direction -> flex-direction */
    gap: 10px;
}
.comment-textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    border: 1px solid var(--border-color); /* 💡 색상 변경 */
    border-radius: 8px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    box-sizing: border-box;
    resize: none;
    overflow-y: hidden;
    transition: height 0.1s ease;
    background-color: var(--bg-dark-primary); /* 💡 배경색 수정 */
    color: var(--text-light-primary); /* 💡 [오타 수정] loc color -> color */
}
.comment-textarea:focus {
    border-color: var(--primary-color); /* 💡 노란색으로 변경 */
    box-shadow: 0 0 0 2px rgba(218, 165, 32, 0.3); /* 💡 노란색으로 변경 */
    outline: none;
}
.comment-section .btn-primary {
    align-self: flex-end;
    width: auto;
    padding: 8px 16px;
}
/*
=================================
ADMIN PAGE (admin.html)
=================================
*/

/* 관리자 페이지 - 필터 여백 */
.history-filters {
    margin-bottom: 20px;
}
/*
=================================
ORDER FORM - TEETH CHART
(주문서 - 치아 차트 반응형 수정)
=================================
*/

/* 치아 차트 컨테이너 */
.teeth-chart {
    display: flex;
    flex-direction: column;
    gap: 5px; /* 위아래 줄 간격 */
    
    /* 💡 [수정] 모바일 반응형 대응: 가로 스크롤 적용 */
    overflow-x: auto; /* 내용이 넘칠 경우 가로 스크롤바 생성 */
    
    /* 💡 기존 스타일과 통일 (style.css 변수 사용) */
    background-color: var(--bg-dark-primary, #121212);
    border: 1px solid var(--border-color, #333333);
    border-radius: 8px;
    padding: 12px 8px; /* 스크롤을 위한 약간의 안쪽 여백 */
    
    /* 스크롤바 디자인 (선택 사항 - 크롬/사파리 등 웹킷 브라우저용) */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color, #DAA520) var(--bg-dark-primary, #121212);
}

.teeth-chart::-webkit-scrollbar {
    height: 8px; /* 스크롤바 높이 */
}
.teeth-chart::-webkit-scrollbar-track {
    background: var(--bg-dark-primary, #121212);
    border-radius: 4px;
}
.teeth-chart::-webkit-scrollbar-thumb {
    background-color: var(--primary-color, #DAA520);
    border-radius: 4px;
    border: 2px solid var(--bg-dark-primary, #121212);
}

/* 치아 한 줄 (상악/하악) */
.teeth-row {
    display: flex;
    justify-content: center;
    gap: 4px; /* 치아 사이 간격 */
    
    /* 💡 [추가] 스크롤을 위해 최소 너비 지정 (줄바꿈 방지) */
    /* 16개 치아(약 35px) + 간격(4px*15) = 620px 근처 */
    min-width: 630px; 
}

/* 개별 치아 버튼 */
.tooth {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-dark-secondary, #1E1E1E);
    border: 1px solid var(--border-color, #333333);
    color: var(--text-light-secondary, #9CA3AF);
    border-radius: 50%; /* 원형 */
    cursor: pointer;
    font-weight: 500;
    font-size: 12px;
    user-select: none; /* 텍스트 선택 방지 */
    transition: all 0.2s ease;
    
    /* 💡 [추가] 모바일에서 찌그러지지 않도록 함 */
    flex-shrink: 0;
}

.tooth:hover {
    background-color: var(--bg-dark-tertiary, #333333);
    color: var(--text-light-primary, #F9FAFB);
}

.tooth.selected {
    background-color: var(--primary-color, #DAA520);
    color: var(--text-dark-primary, #111111);
    border-color: var(--primary-color-dark, #c4911c);
    font-weight: 700;
}
