@charset "utf-8";

/* ==========================================================================
   비급여 안내 및 관리 스타일시트 (unpaid.css)
   ========================================================================== */

/* 기본 컨테이너 및 폰트 */
.unpaid-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 15px;
    font-family: 'Noto Sans KR', sans-serif;
    color: #333;
    box-sizing: border-box;
}

/* 상단 타이틀 영역 */
.unpaid-header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}
.unpaid-header .sub-en-tit {
    font-size: 15px;
    color: #8c7657;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.unpaid-header .main-title {
    font-size: 32px;
    color: #222;
    font-weight: 700;
    margin-bottom: 15px;
}
.unpaid-header .sub-desc {
    font-size: 14px;
    color: #777;
    line-height: 1.6;
}

/* 상단 관리자 툴바 */
.unpaid-admin-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}
.unpaid-admin-bar .admin-badge {
    font-size: 13px;
    color: #495057;
    font-weight: 600;
}
.unpaid-admin-bar .btn-admin-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: #4a419c;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.unpaid-admin-bar .btn-admin-nav:hover {
    background: #39317e;
    color: #fff;
}

/* 탭 메뉴 */
.unpaid-tab-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 35px;
    padding: 0;
    list-style: none;
}
.unpaid-tab-nav li {
    flex: 1 1 auto;
    max-width: 200px;
    min-width: 120px;
    text-align: center;
    padding: 12px 15px;
    background: #f8f9fa;
    color: #555;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.unpaid-tab-nav li:hover {
    background: #edf2f7;
    color: #222;
}
.unpaid-tab-nav li.current {
    background: #4a419c;
    color: #fff;
    border-color: #4a419c;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(74, 65, 156, 0.25);
}

/* 안내 문구 */
.unpaid-notice-box {
    background: #faf8f5;
    border-left: 4px solid #8c7657;
    padding: 12px 18px;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
    border-radius: 0 6px 6px 0;
}
.unpaid-notice-box strong {
    color: #8c7657;
}

/* 전체 탭일 때 각 분류 타이틀 태그 */
.unpaid-tab-block {
    margin-bottom: 50px;
}
.unpaid-tab-title-tag {
    display: inline-block;
    background: #4a419c;
    color: #fff;
    padding: 8px 18px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 6px 6px 0 0;
    margin-bottom: 0px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

/* 테이블 래퍼 (반응형 가로 스크롤) */
.unpaid-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 30px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

/* 테이블 기본 스타일 */
.unpaid-table {
    width: 100%;
    min-width: 950px;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.5;
}
.unpaid-table th, 
.unpaid-table td {
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #e9ecef;
}
.unpaid-table thead th {
    background: #4a419c;
    color: #fff;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: -0.3px;
}
.unpaid-table thead tr:first-child th {
    border-bottom: 1px solid rgba(255,255,255,0.2);
}
.unpaid-table tbody tr:hover td {
    background: #f8faff;
}
.unpaid-table tbody td {
    color: #444;
}
.unpaid-table td.text-left { text-align: left; padding-left: 12px; }
.unpaid-table td.text-right { text-align: right; padding-right: 12px; }
.unpaid-table td.col-mid {
    background: #fafbfd;
    font-weight: 600;
    color: #333;
}
.unpaid-table td.col-price {
    color: #2b4380;
    font-weight: 700;
}
.unpaid-table td.no-data {
    padding: 60px 20px;
    color: #999;
    font-size: 15px;
    text-align: center;
}

/* 이미지 모드 뷰 (다중 이미지 연속 나열) */
.unpaid-image-wrap {
    text-align: center;
    padding: 15px 0;
    width: 100%;
}
.unpaid-img-item {
    margin: 0 auto 15px;
    display: block;
    width: 100%;
}
.unpaid-view-img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    display: block;
    margin: 0 auto;
}
.no-image-notice {
    padding: 60px 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #ced4da;
    color: #888;
    font-size: 14px;
}

/* ==========================================================================
   관리자 전용 설정 페이지 스타일 (unpaid_set.php)
   ========================================================================== */
.admin-mode-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 18px 24px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.admin-mode-selector .mode-label {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.admin-mode-selector .mode-sub-info {
    font-size: 12px;
    color: #8c7657;
    font-weight: 500;
    background: #faf8f5;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #ebd9c8;
}
.admin-mode-selector .mode-radios {
    display: flex;
    gap: 20px;
}
.admin-mode-selector .radio-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
}
.admin-mode-selector .radio-item input[type="radio"] {
    accent-color: #4a419c;
    width: 17px;
    height: 17px;
    cursor: pointer;
}

/* 이미지 업로드 관리 영역 (다중 이미지 리스트) */
.admin-image-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}
.admin-image-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.admin-image-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-image-card .card-tip {
    font-size: 12px;
    color: #888;
    font-weight: normal;
}

/* 다중 이미지 목록 컨테이너 */
.multi-img-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 120px;
    max-height: 480px;
    overflow-y: auto;
    padding: 10px;
    background: #fdfdfd;
    border: 2px dashed #ced4da;
    border-radius: 6px;
    margin-bottom: 15px;
}
.multi-img-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.multi-img-item .img-thumb-wrap {
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
    border-radius: 4px;
    overflow: hidden;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
}
.multi-img-item .img-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.multi-img-item .img-info {
    flex: 1;
    min-width: 0;
}
.multi-img-item .img-name-txt {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.multi-img-item .img-order-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 6px;
    background: #e7f5ff;
    color: #1c7ed6;
    border-radius: 3px;
    font-weight: 500;
}
.multi-img-item .img-ctrl-btns {
    display: flex;
    gap: 4px;
    flex: 0 0 auto;
}
.multi-img-empty {
    text-align: center;
    padding: 40px 10px;
    color: #adb5bd;
    font-size: 13px;
}

.upload-btn-wrap {
    display: flex;
    gap: 8px;
}
.upload-btn-wrap input[type="file"] {
    display: none;
}
.btn-upload {
    flex: 1;
    padding: 10px 12px;
    background: #4a419c;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-upload:hover { background: #39317e; }

/* 데이터 편집 관리 테이블 */
.admin-table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.admin-table-controls .info-txt {
    font-size: 13px;
    color: #666;
}
.admin-table-controls .btn-group {
    display: flex;
    gap: 8px;
}
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-action-add { background: #2b8a3e; color: #fff; }
.btn-action-add:hover { background: #237032; }
.btn-action-save { background: #1971c2; color: #fff; }
.btn-action-save:hover { background: #1864ab; }

.admin-unpaid-table {
    width: 100%;
    min-width: 1250px;
    border-collapse: collapse;
    font-size: 12px;
}
.admin-unpaid-table th {
    background: #343a40;
    color: #fff;
    padding: 8px 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    border: 1px solid #495057;
}
.admin-unpaid-table td {
    padding: 4px;
    border: 1px solid #dee2e6;
    background: #fff;
    vertical-align: middle;
}
.admin-unpaid-table td.td-control {
    width: 75px;
    text-align: center;
}
.row-btn-group {
    display: flex;
    justify-content: center;
    gap: 2px;
}
.btn-ctrl {
    width: 24px;
    height: 24px;
    line-height: 22px;
    padding: 0;
    font-size: 11px;
    border-radius: 3px;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-ctrl:hover { opacity: 0.85; }
.btn-del { background: #fa5252; }
.btn-up { background: #4dabf7; }
.btn-down { background: #4dabf7; }

.form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 5px 6px;
    font-size: 12px;
    border: 1px solid #ced4da;
    border-radius: 3px;
    outline: none;
    transition: border-color 0.2s;
}
.form-input:focus {
    border-color: #4a419c;
    box-shadow: 0 0 0 2px rgba(74, 65, 156, 0.15);
}
.form-input.text-right { text-align: right; }
.form-input.text-center { text-align: center; }

/* 로딩 스피너 오버레이 */
.unpaid-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}
.unpaid-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4a419c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
