/**
 * 🎨 지출 관리 - 파스telyor 디자인 (v2.0 - 프리픽스 변경 + 손익계산 통합)
 * 파일: 23-expenses.css
 * 버전: v2.0
 * 생성일: 2026-04-24
 * 
 * ✅ v2.0 변경:
 * - 모든 클래스 프리픽스 .expense-* → .ssmx-* (기존 profit-loss UI와 충돌 방지)
 * - 손익계산 탭에 영수증 섹션용 추가 스타일
 */

/* ============================================ */
/*  1. 루트 컨테이너 (지출 관리 탭 전용)          */
/* ============================================ */
.ssmx-page {
    padding: 20px 24px;
    background: #f8f9fa;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ssmx-page * {
    box-sizing: border-box;
}

/* ============================================ */
/*  2. 헤더                                       */
/* ============================================ */
.ssmx-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    flex-wrap: wrap;
    gap: 12px;
}

.ssmx-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: #212529;
}

.ssmx-header-sub {
    font-size: 13px;
    color: #868e96;
    margin-top: 4px;
    display: block;
}

/* ============================================ */
/*  3. 월 선택                                    */
/* ============================================ */
.ssmx-month-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 10px;
}

.ssmx-month-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    color: #495057;
    transition: all .15s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.ssmx-month-btn:hover {
    background: #e9ecef;
}

.ssmx-year-select,
.ssmx-month-select {
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    cursor: pointer;
}

/* ============================================ */
/*  4. 탭                                         */
/* ============================================ */
.ssmx-tabs {
    display: flex;
    gap: 8px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ssmx-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #868e96;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ssmx-tab:hover {
    background: #f8f9fa;
    color: #495057;
}

.ssmx-tab.active {
    background: #6c5ce7;
    color: white;
}

.ssmx-tab-count {
    padding: 1px 8px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.ssmx-tab:not(.active) .ssmx-tab-count {
    background: #e9ecef;
    color: #868e96;
}

/* ============================================ */
/*  5. 요약 카드                                  */
/* ============================================ */
.ssmx-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.ssmx-summary-card {
    padding: 20px 24px;
    border-radius: 14px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ssmx-card-purple {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}
.ssmx-card-teal {
    background: linear-gradient(135deg, #0ca678 0%, #20c997 100%);
}
.ssmx-card-blue {
    background: linear-gradient(135deg, #4dabf7 0%, #74c0fc 100%);
}

.ssmx-summary-label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 500;
}

.ssmx-summary-value {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.ssmx-summary-meta {
    font-size: 11px;
    opacity: 0.8;
}

/* ============================================ */
/*  6. 필터                                       */
/* ============================================ */
.ssmx-filters {
    display: flex;
    gap: 12px;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    flex-wrap: wrap;
    align-items: center;
}

.ssmx-search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    transition: border .15s;
}
.ssmx-search-input:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.ssmx-category-select {
    padding: 10px 14px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

/* ============================================ */
/*  7. 버튼                                       */
/* ============================================ */
.ssmx-btn-primary,
.ssmx-btn-secondary {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .15s;
    white-space: nowrap;
}

.ssmx-btn-primary {
    background: #6c5ce7;
    color: white;
}
.ssmx-btn-primary:hover {
    background: #5b4bdb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.ssmx-btn-secondary {
    background: white;
    color: #495057;
    border: 1px solid #dee2e6;
}
.ssmx-btn-secondary:hover {
    background: #f8f9fa;
}

.ssmx-btn-full {
    width: 100%;
    margin-top: 12px;
}

/* ============================================ */
/*  8. 테이블                                     */
/* ============================================ */
.ssmx-table-wrap {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow-x: auto;
}

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

.ssmx-table thead {
    background: #f8f9fa;
}

.ssmx-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #868e96;
    font-size: 12px;
    border-bottom: 1px solid #e9ecef;
    white-space: nowrap;
}

.ssmx-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
}

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

.ssmx-row:hover {
    background: #f8f9fa;
}

.ssmx-row-warn {
    background: #fff9db;
}
.ssmx-row-warn:hover {
    background: #fff3bf;
}

.ssmx-col-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ssmx-col-total {
    font-weight: 700;
    color: #212529;
}

.ssmx-date {
    font-weight: 600;
    color: #212529;
    font-size: 13px;
}
.ssmx-time {
    font-size: 11px;
    color: #adb5bd;
    margin-top: 2px;
}

.ssmx-store {
    font-weight: 600;
    color: #212529;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ssmx-memo {
    font-size: 11px;
    color: #868e96;
    margin-top: 2px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ssmx-items {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #495057;
    font-size: 12px;
}

.ssmx-badge {
    display: inline-block;
    padding: 3px 10px;
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.ssmx-pay-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #e7f5ff;
    color: #1971c2;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.ssmx-card4 {
    font-size: 10px;
    color: #adb5bd;
    margin-top: 2px;
    font-family: 'SF Mono', Consolas, monospace;
}

.ssmx-receipt-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f8f9fa;
    border-radius: 6px;
    text-decoration: none;
    font-size: 16px;
    transition: background .15s;
}
.ssmx-receipt-link:hover {
    background: #e9ecef;
}

.ssmx-no-receipt {
    color: #ced4da;
}

.ssmx-btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background .15s;
}
.ssmx-btn-icon:hover {
    background: #fff5f5;
}

/* ============================================ */
/*  9. 업로드 존                                  */
/* ============================================ */
.ssmx-upload-tab {
    background: white;
    padding: 40px 24px;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ssmx-upload-zone {
    max-width: 480px;
    margin: 0 auto;
    padding: 48px 32px;
    border: 2px dashed #dee2e6;
    border-radius: 16px;
    background: #f8f9fa;
    text-align: center;
    transition: all .2s;
}

.ssmx-upload-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.ssmx-upload-title {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 6px;
}

.ssmx-upload-desc {
    font-size: 14px;
    color: #868e96;
    margin-bottom: 24px;
}

.ssmx-upload-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.ssmx-upload-btn {
    flex: 1 1 auto;
    min-width: 140px;
    max-width: 200px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ssmx-upload-btn-camera {
    background: #6c5ce7;
    color: #fff;
    box-shadow: 0 2px 6px rgba(108, 92, 231, 0.25);
}

.ssmx-upload-btn-camera:hover {
    background: #5a4de0;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.35);
}

.ssmx-upload-btn-camera:active {
    transform: translateY(0);
}

.ssmx-upload-btn-gallery {
    background: #fff;
    color: #495057;
    border: 2px solid #dee2e6;
}

.ssmx-upload-btn-gallery:hover {
    border-color: #6c5ce7;
    color: #6c5ce7;
    background: #f8f7ff;
    transform: translateY(-1px);
}

.ssmx-upload-btn-gallery:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .ssmx-upload-actions {
        flex-direction: column;
        gap: 10px;
    }
    .ssmx-upload-btn {
        width: 100%;
        max-width: none;
    }
}

.ssmx-upload-tips {
    max-width: 480px;
    margin: 32px auto 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ssmx-tip {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 13px;
    color: #495057;
    line-height: 1.5;
}

.ssmx-tip-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* ============================================ */
/*  10. 파싱 진행                                 */
/* ============================================ */
.ssmx-parsing {
    text-align: center;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.ssmx-parsing-img {
    max-height: 240px;
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    margin-bottom: 8px;
}

.ssmx-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e9ecef;
    border-top-color: #6c5ce7;
    border-radius: 50%;
    animation: ssmx-spin .8s linear infinite;
}

@keyframes ssmx-spin {
    to { transform: rotate(360deg); }
}

.ssmx-parsing-title {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
}

.ssmx-parsing-status {
    font-size: 14px;
    font-weight: 500;
    color: #6c5ce7;
    margin: 4px 0 2px;
    min-height: 20px;
    transition: all .2s;
}

.ssmx-parsing-sub {
    font-size: 13px;
    color: #868e96;
}

.ssmx-loading {
    padding: 40px 20px;
    text-align: center;
}
.ssmx-loading-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: ssmx-pulse 1.5s ease-in-out infinite;
}
.ssmx-loading-title {
    font-size: 15px;
    color: #495057;
}
@keyframes ssmx-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================ */
/*  11. 검토 폼                                   */
/* ============================================ */
.ssmx-review {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 2fr;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .ssmx-review {
        grid-template-columns: 1fr;
    }
}

.ssmx-review-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ssmx-review-img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    object-fit: contain;
    max-height: 600px;
    background: #f8f9fa;
}

.ssmx-review-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* 신뢰도 배지 */
.ssmx-confidence {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}
.ssmx-confidence-high {
    background: #d3f9d8;
    color: #2b8a3e;
}
.ssmx-confidence-medium {
    background: #fff3bf;
    color: #e67700;
}
.ssmx-confidence-low {
    background: #ffe3e3;
    color: #c92a2a;
}

/* 중복 경고 */
.ssmx-dup-warn {
    padding: 12px 14px;
    background: #fff3bf;
    border: 1px solid #ffe066;
    border-radius: 8px;
    font-size: 13px;
    color: #e67700;
}
.ssmx-dup-warn small {
    opacity: 0.8;
}

/* 폼 필드 */
.ssmx-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ssmx-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ssmx-field label {
    font-size: 12px;
    font-weight: 600;
    color: #868e96;
}

.ssmx-field input,
.ssmx-field select,
.ssmx-field textarea {
    padding: 9px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: border .15s;
}
.ssmx-field input:focus,
.ssmx-field select:focus,
.ssmx-field textarea:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

/* 품목 */
.ssmx-items-section {
    padding: 14px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ssmx-items-header {
    display: grid;
    grid-template-columns: 2fr 60px 100px 32px;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #868e96;
    padding: 0 4px 6px;
}

.ssmx-item-row {
    display: grid;
    grid-template-columns: 2fr 60px 100px 32px;
    gap: 8px;
    align-items: center;
}

.ssmx-item-row input {
    padding: 6px 10px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 13px;
    background: white;
}

.ssmx-item-remove {
    width: 30px;
    height: 30px;
    border: none;
    background: white;
    color: #868e96;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all .15s;
}
.ssmx-item-remove:hover {
    background: #ffe3e3;
    color: #c92a2a;
}

.ssmx-btn-add-item {
    padding: 8px;
    border: 1px dashed #ced4da;
    background: white;
    border-radius: 6px;
    font-size: 12px;
    color: #495057;
    cursor: pointer;
    margin-top: 4px;
    transition: all .15s;
}
.ssmx-btn-add-item:hover {
    border-color: #6c5ce7;
    color: #6c5ce7;
}

/* 금액 합계 */
.ssmx-totals {
    padding: 14px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ssmx-total-row {
    display: grid;
    grid-template-columns: 1fr 160px;
    align-items: center;
    gap: 12px;
}

.ssmx-total-row > span {
    font-size: 13px;
    color: #868e96;
    font-weight: 500;
}

.ssmx-total-row input {
    padding: 7px 12px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 14px;
}

.ssmx-total-final {
    padding-top: 10px;
    border-top: 1px dashed #ced4da;
    margin-top: 4px;
}
.ssmx-total-final > span {
    color: #212529;
    font-weight: 700;
    font-size: 14px;
}
.ssmx-total-final input {
    font-weight: 700;
    font-size: 16px;
    color: #6c5ce7;
    border-color: #d0bfff;
}

/* 검토 액션 */
.ssmx-review-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.ssmx-review-actions > button {
    flex: 1;
    padding: 12px;
}

/* ============================================ */
/*  12. 분석 탭                                   */
/* ============================================ */
.ssmx-analysis-tab {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ssmx-analysis-card {
    background: white;
    padding: 20px 24px;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ssmx-analysis-title {
    font-size: 15px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 16px;
}

.ssmx-category-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ssmx-cat-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ssmx-cat-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
}

.ssmx-cat-label {
    color: #495057;
    font-weight: 500;
}

.ssmx-cat-amount {
    color: #212529;
}
.ssmx-cat-amount strong {
    font-weight: 700;
}
.ssmx-cat-amount small {
    color: #868e96;
    margin-left: 6px;
}

.ssmx-cat-bar-track {
    height: 8px;
    background: #f1f3f5;
    border-radius: 4px;
    overflow: hidden;
}

.ssmx-cat-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .3s ease;
}

.ssmx-pay-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.ssmx-pay-stat {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
}

.ssmx-pay-stat-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.ssmx-pay-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.ssmx-pay-stat-meta {
    font-size: 11px;
    color: #868e96;
}

/* ============================================ */
/*  13. 빈 상태 / 에러                            */
/* ============================================ */
.ssmx-empty {
    padding: 80px 20px;
    text-align: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ssmx-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.ssmx-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.ssmx-empty-sub {
    font-size: 13px;
    color: #868e96;
    margin-bottom: 24px;
}

.ssmx-error {
    padding: 60px 20px;
    text-align: center;
    background: white;
    border-radius: 12px;
}
.ssmx-error-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.ssmx-error-title {
    font-size: 16px;
    font-weight: 700;
    color: #c92a2a;
    margin-bottom: 8px;
}
.ssmx-error-msg {
    font-size: 13px;
    color: #868e96;
    margin-bottom: 20px;
}

/* ============================================ */
/*  14. 🆕 손익계산 영수증 섹션 (profit-loss 내)   */
/*      - 기존 .expense-* 클래스 확장            */
/* ============================================ */

/* 섹션 헤더 (고정비 / 영수증 구분) */
.expense-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    margin-top: 16px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #6c5ce7;
}

.expense-section-receipts {
    border-left-color: #20c997;
}

.expense-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #495057;
}

.expense-section-total {
    font-size: 14px;
    font-weight: 700;
    color: #212529;
    font-variant-numeric: tabular-nums;
}

/* 영수증 아이템 (손익계산 운영지출 리스트) */
.expense-item-receipt {
    background: #f0fff4 !important;
    border-left: 3px solid #20c997;
}

.expense-item-receipt:hover {
    background: #d3f9d8 !important;
}

/* 영수증 아이콘 */
.expense-receipt-icon {
    display: inline-block;
    margin-right: 4px;
}

/* 카테고리 배지 (영수증 아이템 내부) */
.expense-receipt-cat {
    display: inline-block;
    padding: 2px 8px;
    background: #e7f5ff;
    color: #1971c2;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

/* 영수증 메타 정보 (날짜, 메모, 부가세) */
.expense-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
    font-size: 11px;
    color: #868e96;
}

.expense-receipt-date,
.expense-receipt-memo,
.expense-receipt-vat {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.expense-receipt-vat {
    color: #ff6b6b;
    font-weight: 500;
}

/* 영수증 원본 보기 버튼 */
.btn-expense-view {
    background: #e7f5ff !important;
    color: #1971c2 !important;
    text-decoration: none;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
}
.btn-expense-view:hover {
    background: #d0ebff !important;
}

/* ============================================ */
/*  15. 반응형                                    */
/* ============================================ */
@media (max-width: 768px) {
    .ssmx-page {
        padding: 16px 12px;
        gap: 14px;
    }
    
    .ssmx-header {
        padding: 16px 20px;
    }
    
    .ssmx-header h1 {
        font-size: 18px;
    }
    
    .ssmx-summary-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .ssmx-summary-value {
        font-size: 22px;
    }
    
    .ssmx-filters {
        padding: 12px 14px;
    }
    
    .ssmx-tabs {
        padding: 6px;
    }
    
    .ssmx-tab {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .ssmx-table {
        font-size: 11px;
    }
    
    .ssmx-table th,
    .ssmx-table td {
        padding: 8px 6px;
    }
    
    /* 모바일에서는 일부 컬럼 숨김 */
    .ssmx-table th:nth-child(4),
    .ssmx-table td:nth-child(4),
    .ssmx-table th:nth-child(5),
    .ssmx-table td:nth-child(5),
    .ssmx-table th:nth-child(6),
    .ssmx-table td:nth-child(6) {
        display: none;
    }
    
    .ssmx-upload-zone {
        padding: 40px 20px;
    }
    
    .ssmx-upload-icon {
        font-size: 48px;
    }
    
    .ssmx-field-grid {
        grid-template-columns: 1fr;
    }
    
    .ssmx-total-row {
        grid-template-columns: 1fr 130px;
    }
    
    /* 손익계산 내 섹션 헤더도 반응형 */
    .expense-section-header {
        flex-wrap: wrap;
        gap: 4px;
    }
}

/* ============================================ */
/*  16. 🆕 세금신고 버튼 & 모달 (v1.0)            */
/* ============================================ */

/* 헤더 영역의 세금신고 버튼 */
.ssmx-btn-tax {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, #fa5252 0%, #ff6b6b 100%);
    color: white;
    transition: all .15s;
    white-space: nowrap;
}
.ssmx-btn-tax:hover {
    background: linear-gradient(135deg, #e03131 0%, #fa5252 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(250, 82, 82, 0.3);
}

/* 세금신고 모달 overlay */
.ssmx-tax-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: ssmx-tax-fadein .2s ease;
}

@keyframes ssmx-tax-fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ssmx-tax-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 880px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: ssmx-tax-slideup .25s ease;
}

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

/* 모달 헤더 */
.ssmx-tax-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 28px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.ssmx-tax-modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px 0;
}

.ssmx-tax-modal-header small {
    font-size: 13px;
    opacity: 0.9;
}

.ssmx-tax-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ssmx-tax-close:hover {
    background: rgba(255,255,255,0.35);
}

/* 기간 섹션 */
.ssmx-tax-period {
    padding: 24px 28px;
    background: #f8f9fa;
}

.ssmx-tax-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #495057;
    margin-bottom: 12px;
}

.ssmx-tax-period-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.ssmx-tax-period-btn {
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all .15s;
}
.ssmx-tax-period-btn:hover {
    border-color: #6c5ce7;
    color: #6c5ce7;
    background: #f3f0ff;
}
.ssmx-tax-period-btn.active {
    background: #6c5ce7;
    color: white;
    border-color: #6c5ce7;
}

.ssmx-tax-custom-range {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    margin-bottom: 12px;
}

.ssmx-tax-custom-range input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    flex: 1;
}

.ssmx-tax-custom-range span {
    color: #868e96;
    font-size: 14px;
}

/* 미리보기 */
.ssmx-tax-preview {
    padding: 14px 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-size: 13px;
    color: #495057;
    min-height: 46px;
    display: flex;
    align-items: center;
}

.ssmx-tax-preview-content {
    width: 100%;
}

.ssmx-tax-preview-label {
    font-size: 13px;
    color: #495057;
    margin-bottom: 6px;
}

.ssmx-tax-preview-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #495057;
}

.ssmx-tax-preview-stats strong {
    color: #6c5ce7;
    font-weight: 700;
}

.ssmx-tax-divider {
    height: 1px;
    background: #e9ecef;
    margin: 0;
}

/* 출력 옵션 그리드 */
.ssmx-tax-options {
    padding: 24px 28px;
}

.ssmx-tax-output-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.ssmx-tax-output-card {
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: white;
    transition: all .2s;
}
.ssmx-tax-output-card:hover {
    border-color: #6c5ce7;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.15);
}

.ssmx-tax-output-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.ssmx-tax-output-title {
    font-size: 15px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 6px;
}

.ssmx-tax-output-desc {
    font-size: 12px;
    color: #495057;
    line-height: 1.5;
    margin-bottom: 14px;
    min-height: 44px;
}

.ssmx-tax-output-desc small {
    color: #868e96;
    font-size: 11px;
}

.ssmx-tax-btn-primary {
    width: 100%;
    padding: 10px;
    background: #6c5ce7;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.ssmx-tax-btn-primary:hover {
    background: #5b4bdb;
}

.ssmx-tax-footer {
    padding: 16px 28px;
    background: #fff9db;
    border-top: 1px solid #ffe066;
    font-size: 12px;
    color: #826a00;
    border-radius: 0 0 16px 16px;
}

/* 모바일 */
@media (max-width: 768px) {
    .ssmx-tax-modal-content {
        max-height: 95vh;
    }
    
    .ssmx-tax-modal-header {
        padding: 18px 20px;
    }
    
    .ssmx-tax-modal-header h2 {
        font-size: 18px;
    }
    
    .ssmx-tax-period,
    .ssmx-tax-options {
        padding: 18px 20px;
    }
    
    .ssmx-tax-period-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ssmx-tax-output-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================ */
/*  17. 🆕 v4 배지 / 힌트 / 세무 정보              */
/* ============================================ */

/* 소스 배지 (일괄/카드PDF/수동) */
.ssmx-src-badge {
    display: inline-block;
    padding: 1px 8px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 10px;
    margin-top: 4px;
}
.ssmx-src-card {
    background: #e7f5ff;
    color: #1971c2;
}
.ssmx-src-batch {
    background: #fff3bf;
    color: #e67700;
}

.ssmx-row-badges {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

/* 매입공제 배지 */
.ssmx-vat-badge {
    display: inline-block;
    margin-left: 6px;
    font-size: 14px;
    cursor: help;
}

/* 투어 배지 */
.ssmx-tour-btn {
    background: none;
    border: none;
    padding: 4px 0;
    cursor: pointer;
    display: block;
    margin-top: 6px;
}

.ssmx-tour-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    background: #d0bfff;
    color: #5f3dc4;
    transition: all .15s;
}
.ssmx-tour-badge.ssmx-tour-none {
    background: #f1f3f5;
    color: #868e96;
}
.ssmx-tour-btn:hover .ssmx-tour-badge {
    background: #9775fa;
    color: white;
}

/* 뜨거운 버튼 (일괄/PDF) */
.ssmx-btn-hot {
    background: linear-gradient(135deg, #fff3bf 0%, #ffd43b 100%) !important;
    color: #664d03 !important;
    font-weight: 700 !important;
    border: 1px solid #ffd43b !important;
}
.ssmx-btn-hot:hover {
    background: linear-gradient(135deg, #ffd43b 0%, #fab005 100%) !important;
    color: #212529 !important;
}

/* 학습 힌트 */
.ssmx-learned-hint {
    padding: 10px 14px;
    background: linear-gradient(135deg, #d3f9d8 0%, #b2f2bb 100%);
    border-radius: 8px;
    font-size: 13px;
    color: #2f9e44;
    margin: 6px 0;
}

/* 세무 힌트 */
.ssmx-tax-hint {
    padding: 10px 14px;
    background: #fff3bf;
    border: 1px solid #ffe066;
    border-radius: 8px;
    font-size: 13px;
    color: #826a00;
    margin: 6px 0;
}

.ssmx-tax-exempt {
    background: #e7f5ff;
    border-color: #74c0fc;
    color: #1864ab;
}

.ssmx-tax-warn {
    padding: 10px 14px;
    background: #ffe3e3;
    border: 1px solid #ffa8a8;
    border-radius: 8px;
    font-size: 13px;
    color: #c92a2a;
    margin: 6px 0;
}

.ssmx-tax-ok {
    padding: 10px 14px;
    background: #d3f9d8;
    border: 1px solid #8ce99a;
    border-radius: 8px;
    font-size: 13px;
    color: #2f9e44;
    margin: 6px 0;
}

/* ============================================ */
/*  18. 투어 선택 모달                            */
/* ============================================ */
.ssmx-tour-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ssmx-tour-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.ssmx-tour-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #5f3dc4 0%, #7048e8 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}
.ssmx-tour-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}
.ssmx-tour-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

.ssmx-tour-modal-body {
    padding: 16px 24px;
    overflow-y: auto;
}

.ssmx-tour-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #495057;
    margin: 12px 0 8px;
    text-transform: uppercase;
}

.ssmx-tour-search {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 8px;
}
.ssmx-tour-search:focus {
    outline: none;
    border-color: #7048e8;
    box-shadow: 0 0 0 3px rgba(112, 72, 232, 0.1);
}

.ssmx-tour-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 300px;
    overflow-y: auto;
}

.ssmx-tour-item {
    padding: 10px 14px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    transition: all .15s;
    width: 100%;
}
.ssmx-tour-item:hover {
    background: #f3f0ff;
    border-color: #7048e8;
}
.ssmx-tour-item.active {
    background: #7048e8;
    border-color: #7048e8;
    color: white;
}
.ssmx-tour-item-date {
    font-size: 11px;
    color: #868e96;
    margin-bottom: 2px;
}
.ssmx-tour-item.active .ssmx-tour-item-date {
    color: rgba(255,255,255,0.8);
}
.ssmx-tour-item-name {
    font-size: 14px;
    font-weight: 600;
}
.ssmx-tour-item-meta {
    font-size: 11px;
    color: #868e96;
    margin-top: 2px;
}
.ssmx-tour-item.active .ssmx-tour-item-meta {
    color: rgba(255,255,255,0.8);
}
.ssmx-tour-item-none {
    background: #f8f9fa;
}
.ssmx-tour-empty {
    text-align: center;
    padding: 20px;
    color: #868e96;
    font-size: 13px;
}

/* ============================================ */
/*  19. 일괄 업로드 모달                          */
/* ============================================ */
.ssmx-batch-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ssmx-batch-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.ssmx-batch-modal-header {
    padding: 20px 28px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #fa5252 0%, #ff922b 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}
.ssmx-batch-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.ssmx-batch-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
}

.ssmx-batch-modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    flex: 1;
}

/* 드롭 영역 */
.ssmx-batch-droparea {
    padding: 60px 32px;
    border: 3px dashed #dee2e6;
    border-radius: 16px;
    background: #f8f9fa;
    text-align: center;
    transition: all .2s;
}
.ssmx-batch-droparea.dragover {
    border-color: #6c5ce7;
    background: #f3f0ff;
    transform: scale(1.01);
}

.ssmx-batch-drop-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.ssmx-batch-drop-title {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 6px;
}

.ssmx-batch-drop-desc {
    font-size: 14px;
    color: #495057;
    margin-bottom: 20px;
}

.ssmx-batch-tips {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 진행 상태 */
.ssmx-batch-progress {
    padding: 20px;
}

.ssmx-batch-progress-header {
    font-size: 14px;
    margin-bottom: 12px;
}
.ssmx-batch-failed {
    color: #c92a2a;
}

.ssmx-batch-progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}
.ssmx-batch-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4dabf7, #6c5ce7);
    transition: width .3s ease;
}

.ssmx-batch-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

.ssmx-batch-thumb {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e9ecef;
    background: #f8f9fa;
}
.ssmx-batch-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ssmx-batch-thumb-status {
    position: absolute;
    top: 4px;
    right: 4px;
    background: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.ssmx-batch-thumb-done { border-color: #8ce99a; }
.ssmx-batch-thumb-failed { border-color: #ff8787; opacity: 0.6; }
.ssmx-batch-thumb-processing { border-color: #74c0fc; }
.ssmx-batch-thumb-pending { border-color: #dee2e6; opacity: 0.7; }

/* 검토 화면 */
.ssmx-batch-review {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ssmx-batch-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 14px;
}

.ssmx-batch-review-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 500px;
    overflow-y: auto;
    padding: 4px;
}

.ssmx-batch-review-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
    transition: all .15s;
}
.ssmx-batch-review-item:hover {
    border-color: #6c5ce7;
    background: #f3f0ff;
}

.ssmx-batch-review-thumb {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #dee2e6;
}

.ssmx-batch-review-info {
    flex: 1;
}

.ssmx-batch-review-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}
.ssmx-batch-review-amount {
    font-size: 14px;
    font-weight: 700;
    color: #5f3dc4;
}

.ssmx-batch-review-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: #495057;
}

.ssmx-batch-deductible {
    color: #2f9e44;
    font-weight: 600;
}
.ssmx-batch-learned {
    color: #1971c2;
    font-weight: 600;
}
.ssmx-batch-warn {
    color: #c92a2a;
}

.ssmx-batch-failed-section {
    padding: 12px;
    background: #fff5f5;
    border: 1px solid #ffe3e3;
    border-radius: 8px;
}
.ssmx-batch-failed-section summary {
    cursor: pointer;
    font-weight: 600;
    color: #c92a2a;
}
.ssmx-batch-failed-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 12px;
}
.ssmx-batch-failed-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.ssmx-batch-review-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.ssmx-batch-empty {
    text-align: center;
    padding: 40px;
}
.ssmx-batch-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.ssmx-batch-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: #c92a2a;
    margin-bottom: 6px;
}
.ssmx-batch-empty-desc {
    font-size: 13px;
    color: #868e96;
    margin-bottom: 20px;
}

/* ============================================ */
/*  20. PDF 카드명세서 검토                        */
/* ============================================ */
.ssmx-batch-pdf-processing {
    text-align: center;
    padding: 60px 20px;
}
.ssmx-batch-pdf-processing .ssmx-spinner {
    margin: 0 auto 20px;
}
.ssmx-batch-pdf-title {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 8px;
}
.ssmx-batch-pdf-desc {
    font-size: 14px;
    color: #495057;
}

.ssmx-batch-pdf-review {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ssmx-batch-pdf-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #f3f0ff 0%, #e7f5ff 100%);
    border-radius: 12px;
}
.ssmx-batch-pdf-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ssmx-batch-pdf-summary-item span {
    font-size: 11px;
    color: #868e96;
    font-weight: 600;
}
.ssmx-batch-pdf-summary-item strong {
    font-size: 16px;
    color: #212529;
    font-variant-numeric: tabular-nums;
}

.ssmx-batch-pdf-actions {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
}
.ssmx-batch-pdf-actions > div {
    display: flex;
    gap: 6px;
}

.ssmx-batch-pdf-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.ssmx-batch-pdf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.ssmx-batch-pdf-table thead {
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 1;
}
.ssmx-batch-pdf-table th {
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    font-size: 12px;
    border-bottom: 1px solid #dee2e6;
}
.ssmx-batch-pdf-table td {
    padding: 10px;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: top;
}
.ssmx-batch-pdf-table tr:hover {
    background: #f8f9fa;
}
.ssmx-pdf-refund {
    background: #fff5f5;
    color: #868e96;
}
.ssmx-pdf-refund strong {
    color: #c92a2a;
}

.ssmx-batch-pdf-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 0 0;
    border-top: 1px solid #e9ecef;
}

/* 모바일 */
@media (max-width: 768px) {
    .ssmx-batch-modal-content {
        max-width: 100%;
        max-height: 95vh;
    }
    .ssmx-batch-modal-body {
        padding: 16px;
    }
    .ssmx-batch-droparea {
        padding: 40px 20px;
    }
    .ssmx-batch-pdf-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    .ssmx-tour-modal-content {
        max-width: 100%;
    }
}

/* ============================================ */
/*  21. 최상위 모달 래퍼 (safety)                 */
/* ============================================ */
.ssmx-tour-modal,
.ssmx-batch-modal,
.ssmx-tax-modal {
    position: relative;
    z-index: 10000;
}

/* v4: 세금 미리보기 공제 가능 부가세 표시 */
.ssmx-tax-deductible {
    color: #2f9e44;
    font-weight: 600;
}
.ssmx-tax-not-deductible {
    color: #e67700;
    font-size: 12px;
}


/* =====================================================================
   ⬇️⬇️⬇️ 아래는 v2.1에서 추가된 부분입니다 (가이드 환급 연동) ⬇️⬇️⬇️
   ===================================================================== */

/* ──────────────────────────────────────
   1. 검토 화면 - 가이드 선택 필드
   ────────────────────────────────────── */

.ssmx-field-teacher {
    background: #f3f0ff;
    border: 1px solid #d0bfff;
    border-left: 3px solid #5f3dc4;
    padding: 14px 16px;
    border-radius: 8px;
    margin: 8px 0 12px;
    gap: 6px;
}

.ssmx-field-teacher label {
    color: #5f3dc4;
    font-weight: 600;
    font-size: 13px;
}

.ssmx-field-teacher label small {
    color: #868e96;
    font-weight: 400;
    font-size: 11px;
    margin-left: 4px;
}

.ssmx-field-teacher select {
    padding: 10px 14px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: all .15s;
}

.ssmx-field-teacher select:hover,
.ssmx-field-teacher select:focus {
    border-color: #5f3dc4;
    outline: none;
}


/* ──────────────────────────────────────
   2. 목록 행 - 가이드 인라인 드롭다운
   ────────────────────────────────────── */

.ssmx-teacher-select {
    padding: 4px 8px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 12px;
    background: white;
    max-width: 130px;
    cursor: pointer;
    transition: all .15s;
}

.ssmx-teacher-select.has-teacher {
    background: #f3f0ff;
    border-color: #b197fc;
    color: #5f3dc4;
    font-weight: 600;
}

.ssmx-teacher-select:hover {
    border-color: #5f3dc4;
}


/* ──────────────────────────────────────
   3. 가이드 지정 행 - 왼쪽 보더 강조
   ────────────────────────────────────── */

.ssmx-row-attributed > td:first-child {
    border-left: 3px solid #b197fc;
}


/* ──────────────────────────────────────
   4. 정산반영 배지
   기존 ssmx-src-badge와 동일 패턴
   ────────────────────────────────────── */

.ssmx-reflected-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 8px;
    background: #d3f9d8;
    color: #2b8a3e;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}


/* ──────────────────────────────────────
   5. 손익계산 - 가이드 환급 영수증
   기존 .expense-item-receipt 위에 보라톤 강조
   ────────────────────────────────────── */

.expense-item-reimbursable {
    background: linear-gradient(to right, #f3f0ff, #f0fff4) !important;
    border-left: 3px solid #b197fc !important;
}

.expense-item-reimbursable:hover {
    background: linear-gradient(to right, #e5dbff, #d3f9d8) !important;
}

.expense-receipt-teacher {
    display: inline-block;
    vertical-align: middle;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}


/* ──────────────────────────────────────
   6. 정산서 B항목 영수증 자동행 hover 보강
   ────────────────────────────────────── */

#additionalPaymentsTable tr[data-source-type="receipt"]:hover {
    background: #e5dbff !important;
}

#additionalPaymentsTable input[type="checkbox"][data-field="taxApplied"] {
    accent-color: #20c997;
    cursor: pointer;
}


/* ──────────────────────────────────────
   7. 반응형 - 모바일에서 필터 드롭다운 wrap
   ────────────────────────────────────── */

@media (max-width: 768px) {
    .ssmx-filters {
        flex-wrap: wrap;
    }
    .ssmx-teacher-select {
        max-width: 100%;
        width: 100%;
    }
}
