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

html {
    height: 100%;
    overflow: visible;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    overflow-y: auto !important; /* 세로 스크롤 강제 허용 */
    overflow-x: hidden; /* 가로 스크롤 방지 */
    height: 100%;
    min-height: 100vh;
}

/* 스크롤바 스타일 */
body::-webkit-scrollbar {
    width: 12px;
}

body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
}

body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.container {
    display: flex;
    min-height: 100vh;
    height: auto;
}

/* 사이드바 */
.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow: visible; /* 서브메뉴가 표시되도록 변경 */
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo h2 {
    font-size: 1.2rem;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
    flex: 1; /* 남은 공간 모두 사용 */
    overflow-y: auto; /* 메뉴가 많아지면 스크롤 */
    padding-bottom: 150px; /* 하단 여유 공간 확보 */
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255,255,255,0.1);
    border-right: 3px solid #fff;
}

.nav-link i {
    margin-right: 10px;
    width: 20px;
}

/* 사이드바 하단 로고 (높이 축소) */
.sidebar-logo {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    padding: 12px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.1);
}

.sidebar-logo img {
    max-width: 100%;
    height: auto;
    max-height: 50px;
    object-fit: contain;
}

/* 사이드바 문의 정보 (높이 축소) */
.sidebar-contact {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 11px;
    color: rgba(255,255,255,0.9);
}

.sidebar-contact .contact-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-contact .contact-title i {
    font-size: 14px;
    color: #ffd700;
}

.sidebar-contact .contact-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-contact .contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
}

.sidebar-contact .contact-item i {
    width: 14px;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
}

.sidebar-contact .contact-item span {
    font-size: 11px;
    color: rgba(255,255,255,0.85);
}

/* 메인 콘텐츠 */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 0;
    height: 100vh;
    overflow-y: auto !important;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.main-content::-webkit-scrollbar {
    width: 14px;
}

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

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

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

.header {
    background: white;
    padding: 15px 30px; /* 패딩 줄임 */
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 70px; /* 고정 높이 설정 */
    box-sizing: border-box;
}

.header h1 {
    color: #333;
    font-size: 1.8rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #666;
}

/* 비밀번호 변경 버튼 */
.btn-change-password {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-change-password:hover {
    background-color: #f0f0f0;
    color: #5568d3;
    transform: scale(1.1);
}

/* 페이지 */
.page {
    display: none;
    padding: 20px; /* 적절한 패딩 추가 */
    height: calc(100vh - 70px); /* 헤더 고정 높이 제외 */
    overflow-y: auto; /* 스크롤 허용 */
    box-sizing: border-box; /* 패딩 포함하여 높이 계산 */
}

.page.active {
    display: block;
}

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

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

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card {
    cursor: pointer;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.5rem;
    color: white;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.stat-info h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: #333;
}

.stat-info p {
    color: #666;
    font-size: 0.9rem;
}

/* AS 접수 카드 특별 스타일 */
.as-reception-card {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

.as-reception-card .stat-icon {
    margin-right: 0;
}

.as-reception-card .stat-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
}

.as-reception-text {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #667eea !important;
    margin: 0 !important;
}

.as-reception-card:hover .as-reception-text {
    color: #764ba2 !important;
}

/* 렌탈관리 카드 특별 스타일 */
.rental-management-card {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

.rental-management-card .stat-icon {
    margin-right: 0;
}

.rental-management-card .stat-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
}

.rental-management-text {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #667eea !important;
    margin: 0 !important;
}

.rental-management-card:hover .rental-management-text {
    color: #764ba2 !important;
}

/* 판매관리 카드 특별 스타일 */
.sales-management-card {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

.sales-management-card .stat-icon {
    margin-right: 0;
}

.sales-management-card .stat-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
}

.sales-management-text {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #667eea !important;
    margin: 0 !important;
}

.sales-management-card:hover .sales-management-text {
    color: #764ba2 !important;
}

/* 자산추가 카드 특별 스타일 */
.asset-add-card {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

.asset-add-card .stat-icon {
    margin-right: 0;
}

.asset-add-card .stat-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
}

.asset-add-text {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #667eea !important;
    margin: 0 !important;
}

.asset-add-card:hover .asset-add-text {
    color: #764ba2 !important;
}

/* 고객 검색 모달 */
.search-container-modal {
    position: relative;
    margin-bottom: 20px;
}

.customer-search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.modal-customer-search-results {
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

.search-guide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #999;
    text-align: center;
}

.search-guide i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.search-guide p {
    font-size: 1rem;
}

.search-result-item {
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:first-child {
    border-radius: 8px 8px 0 0;
}

.search-result-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.search-result-item:hover {
    background: #f8f9ff;
    transform: translateX(5px);
}

.search-result-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 6px;
}

.search-result-info {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    gap: 10px;
}

.search-no-results {
    padding: 60px 20px;
    text-align: center;
    color: #999;
    font-size: 1rem;
}

/* 대시보드 콘텐츠 */
.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-sidebar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.recent-as,
.today-schedule,
.tomorrow-schedule,
.contract-expiry {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.recent-as h3,
.today-schedule h3,
.tomorrow-schedule h3,
.contract-expiry h3 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* 계약만료 배지 스타일 */
.expiry-badges {
    display: flex;
    gap: 6px;
    margin-left: auto;
    align-items: center;
}

.expiry-badge {
    font-size: 9px;
    padding: 3px 6px;
    border-radius: 10px;
    font-weight: 500;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.expiry-badge strong {
    font-size: 10px;
    font-weight: 700;
}

.expiry-badge.month-1 {
    background-color: #ff4444;
}

.expiry-badge.month-3 {
    background-color: #ff9800;
}

.expiry-badge.month-6 {
    background-color: #ffc107;
    color: #333;
}

.tomorrow-schedule h3 {
    border-bottom-color: #28a745;
}

.alert-count {
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.expiry-list {
    max-height: 300px;
    overflow-y: auto;
}

.expiry-item {
    padding: 12px;
    border: 1px solid #ffebee;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff5f5;
    border-left: 4px solid #ff4444;
}

.expiry-item.warning {
    background: #fffbf0;
    border-color: #fff3cd;
    border-left-color: #ffc107;
}

.expiry-item.critical {
    background: #ffebee;
    border-color: #f8d7da;
    border-left-color: #dc3545;
}

.expiry-item h4 {
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

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

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

/* 페이지 헤더 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-container {
    position: relative;
}

.search-container input {
    padding: 10px 40px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    width: 300px;
    font-size: 14px;
}

.search-container i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.filter-container {
    display: flex;
    gap: 15px;
    align-items: center;
}

.contract-period-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contract-period-filter label {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
}

.period-filter-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.period-shortcuts {
    display: flex;
    gap: 5px;
}

.period-btn {
    padding: 4px 8px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}

.period-btn:hover {
    background: #f0f0f0;
}

.period-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.custom-period-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-period-range input {
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.custom-period-range span {
    font-size: 12px;
    color: #666;
}

.filter-container select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* 버튼 */
.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin: 0 2px;
    min-width: 60px;
}

.btn-warning {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    margin: 0 2px;
    min-width: 60px;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-info {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    margin: 0 2px;
    min-width: 60px;
}

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

.btn-success {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    margin: 0 2px;
    min-width: 60px;
}

/* 새로고침 버튼 */
.btn-refresh {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-refresh:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #adb5bd;
}

.btn-refresh:active {
    transform: scale(0.98);
}

/* 새로고침 애니메이션 */
.btn-refresh.refreshing i {
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.btn-info {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    margin: 0 2px;
    min-width: 60px;
}

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

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin: 0 2px;
    min-width: 60px;
}

.btn-danger:hover {
    background: #c82333;
}

/* 액션 버튼 그룹 */
.action-buttons-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.action-buttons-group button {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
}

.action-buttons-group button i {
    font-size: 14px;
}

/* 테이블 */
.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

th, td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

/* 미수금 관리 테이블만 한 줄로 표시 */
#outstanding-table th,
#outstanding-table td {
    white-space: nowrap;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* 상태 배지 */
.status-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

/* 새로운 상태 스타일 */
.status-출장전 { background: #e3f2fd; color: #1976d2; }
.status-입고수리중 { background: #e8f5e8; color: #388e3c; }
.status-외부의뢰중 { background: #fff3e0; color: #f57c00; }
.status-기타 { background: #f3e5f5; color: #7b1fa2; }
.status-처리완료 { background: #e0e0e0; color: #424242; }

/* 상태 클래스 매핑 */
.status-pending { background: #e3f2fd; color: #1976d2; }
.status-in-progress { background: #e8f5e8; color: #388e3c; }
.status-scheduled { background: #fff3e0; color: #f57c00; }
.status-other { background: #f3e5f5; color: #7b1fa2; }
.status-completed { background: #e0e0e0; color: #424242; }

/* 기존 상태 호환성 유지 */
.status-접수중 { background: #e3f2fd; color: #1976d2; }
.status-방문예정 { background: #fff3e0; color: #f57c00; }
.status-서비스중 { background: #e8f5e8; color: #388e3c; }

.urgency-긴급 { background: #ffebee; color: #c62828; }
.urgency-보통 { background: #fff8e1; color: #ff8f00; }
.urgency-낮음 { background: #e8f5e8; color: #388e3c; }

.grade-렌탈 { background: #e3f2fd; color: #1976d2; }
.grade-판매 { background: #e8f5e8; color: #388e3c; }
.grade-렌탈-판매 { background: #fff3e0; color: #f57c00; }

/* A/S 액션 버튼 스타일 */
.as-action-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
    min-width: 32px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 제품 이력 테이블 액션 버튼 가로 정렬 */
#asset-history-content table td:last-child {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 5px !important;
    min-width: 120px;
    width: 120px;
    white-space: nowrap;
}

#asset-history-content table td:last-child .btn-sm {
    flex: none !important;
    display: inline-block !important;
    margin: 0 !important;
}

.status-action-container {
    display: inline-block;
}

.status-select {
    padding: 4px 8px;
    font-size: 0.75rem;
    border: 2px solid #667eea;
    border-radius: 4px;
    background: #f8f9ff;
    cursor: pointer;
    min-width: 90px;
    height: 28px;
    color: #333;
    font-weight: 500;
}

.status-select:hover {
    border-color: #667eea;
}

.status-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.status-select option:disabled {
    background-color: #f0f0f0;
    color: #666;
    font-weight: bold;
}

.status-select option[selected] {
    background-color: #e3f2fd;
    color: #1976d2;
}

/* 상태 드롭다운 (상태 컬럼용) */
.status-dropdown-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.status-dropdown {
    padding: 6px 10px;
    font-size: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    min-width: 120px;
    font-weight: 500;
    color: #333;
}

.status-dropdown:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.status-dropdown:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.status-dropdown option[selected] {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: bold;
}

.status-change-time {
    font-size: 0.65rem;
    color: #888;
    text-align: center;
}

/* 상태 표시 컨테이너 */
.status-display {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.status-change-info {
    font-size: 0.65rem;
    color: #888;
    font-style: italic;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.status-change-info:hover {
    color: #667eea;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

/* 모달 z-index 계층 구조 */
/* 기본 모달 */
.modal {
    z-index: 2000;
}

/* 상세 보기 모달 */
#as-detail-modal,
#quotation-detail-modal {
    z-index: 2050;
}

/* 수정/등록 모달은 상세 모달 위에 표시 */
#as-modal,
#quotation-modal {
    z-index: 2100 !important;
}

/* 수납 모달은 상세 모달 위에 표시 */
#payment-modal {
    z-index: 2150 !important;
}

/* 최상단으로 모달 띄우기 */
.modal.modal-top {
    z-index: 9999 !important;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* 모달 내 form도 스크롤 가능하도록 */
.modal-content form {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* 에러 모달 */
#error-modal .modal-content {
    animation: slideDown 0.3s ease-out;
    max-height: 80vh;
}

/* 에러 상세 목록 스크롤 */
#error-details-list {
    max-height: 300px;
    overflow-y: auto;
}

/* 삭제 확인 상세 목록 스크롤 */
#confirm-details-list {
    max-height: 300px;
    overflow-y: auto;
}

/* 삭제 확인 모달 - 세로 길이 자동 조정 */
#confirm-delete-modal {
    align-items: center;  /* modal-content가 세로로 stretch 되지 않게 */
    justify-content: center;  /* 가로 중앙 정렬 */
}

#confirm-delete-modal .modal-body {
    flex: none !important;  /* flex: 1 상속 방지 - 내용에 맞게 높이 조정 */
}

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

.error-detail-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 15px;
}

.error-detail-item:last-child {
    border-bottom: none;
}

.error-detail-item .icon {
    font-size: 20px;
    margin-right: 12px;
    width: 30px;
    text-align: center;
}

.error-detail-item .label {
    flex: 1;
    font-weight: 500;
    color: #495057;
}

.error-detail-item .count {
    font-weight: bold;
    color: #dc3545;
    font-size: 16px;
}

/* 폼 */
form {
    padding: 15px;
}

.form-section {
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.form-section-title {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

/* 사업자 정보 페이지 전용 스타일 */
#company-info-page .form-section {
    background: transparent;
    border: none;
    border-left: none;
    padding: 0;
    margin-bottom: 15px;
}

#company-info-page .form-section-title {
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 2px solid #e0e0e0;
    font-size: 1rem;
}

#company-info-page .form-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px;
}

#company-info-page .form-group label {
    min-width: 150px;
    font-weight: 600;
    color: #555;
    text-align: left;
    margin: 0;
}

#company-info-page .form-group input[readonly] {
    flex: 1;
    border: none;
    background: transparent;
    padding: 4px 0;
    font-size: 0.95rem;
    color: #333;
}

#company-info-page .form-row,
#company-info-page .form-row-2 {
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

/* 2개 컬럼 전용 클래스 */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 8px;
}

.form-group label {
    display: block;
    margin-bottom: 3px;
    font-weight: 500;
    color: #333;
    font-size: 0.9em;
}

/* 상세 정보 모달에서만 가로 레이아웃 적용 (고객 제외) */
#asset-detail-modal .form-group,
#asset-history-detail-modal .form-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
}

#asset-detail-modal .form-group label,
#asset-history-detail-modal .form-group label {
    display: inline-block !important;
    margin-bottom: 0 !important;
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
    min-width: 120px;
    flex-shrink: 0;
}

#asset-detail-modal .readonly-field,
#asset-history-detail-modal .readonly-field {
    display: inline-block !important;
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* 고객 상세 정보 가로 레이아웃 */
#customer-detail-modal .form-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 35px;
    row-gap: 12px;
    margin-bottom: 12px;
}

#customer-detail-modal .form-group,
#customer-detail-modal .form-row .form-group {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: fit-content;
}

#customer-detail-modal .form-group::after {
    content: '';
    display: inline-block;
    width: 20px;
}

#customer-detail-modal .form-group label,
#customer-detail-modal .form-row .form-group label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
    flex-shrink: 0;
    white-space: nowrap;
}

#customer-detail-modal .readonly-field,
#customer-detail-modal .form-row .readonly-field {
    display: inline !important;
    background: transparent;
    border: none;
    padding: 0;
    color: #333;
    font-size: 0.95rem;
    white-space: nowrap;
}

.readonly-field {
    display: inline-block;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    color: #333;
    min-height: auto;
    line-height: 1.6;
    font-size: 0.95rem;
    flex: 1;
}

.readonly-field:empty:before {
    content: "-";
    color: #999;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

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

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 5px;
}


.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
    background-color: white;
    margin-top: auto;
}

.modal-actions button {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    color: #333;
    font-size: 14px;
}

.modal-actions .btn-primary {
    background: #007bff;
    color: white;
    border: 1px solid #007bff;
}

.modal-actions .btn-primary:hover {
    background: #0056b3;
    border: 1px solid #0056b3;
}

.modal-actions .btn-secondary {
    background: #6c757d;
    color: white;
    border: 1px solid #6c757d;
}

.modal-actions .btn-secondary:hover {
    background: #545b62;
    border: 1px solid #545b62;
}

/* 일정 리스트 */
.schedule-list {
    max-height: 400px;
    overflow-y: auto;
}

.schedule-item {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fafafa;
}

.schedule-item h4 {
    margin-bottom: 5px;
    color: #333;
}

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

.no-data {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container input {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .filter-container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
}

/* A/S 상세 보기 모달 스타일 */
.as-detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* 모든 상세 정보 모달 섹션 스타일 통일 */
#as-detail-modal .section,
.as-detail-content .section,
#customer-detail-modal .section,
#asset-detail-modal .section,
#asset-history-detail-modal .section {
    margin-bottom: 30px !important;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.detail-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.detail-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 5px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

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

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
    min-width: 100px;
    flex-shrink: 0;
}

.detail-item span {
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    font-size: 0.95rem;
    color: #333;
    flex: 1;
}

.symptoms-text {
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    min-height: auto;
    line-height: 1.6;
    white-space: pre-wrap;
    color: #333;
}

.content-text {
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    min-height: auto;
    max-height: none;
    overflow-y: visible;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
    color: #333;
}

.total-cost {
    font-weight: bold;
    color: #e74c3c;
}

.status-badge.payment-완납 {
    background-color: #27ae60;
    color: white;
}

.status-badge.payment-미수 {
    background-color: #e74c3c;
    color: white;
}

.status-badge.payment-부분입금 {
    background-color: #f39c12;
    color: white;
}

/* AS 처리 완료된 행 스타일 */
.completed-row {
    background-color: #f8f9fa;
}

.completed-row:hover {
    background-color: #e9ecef;
}

/* AS 오늘 날짜 요청 행 스타일 */
.today-as-request {
    background: linear-gradient(135deg, #fffbf0 0%, #fff3cd 100%);
    border-left: 4px solid #ffc107;
}

.today-as-request:hover {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
}

/* 오늘 날짜이면서 완료된 AS 요청 */
.completed-row.today-as-request {
    background: linear-gradient(135deg, #fff9e6 0%, #ffe0b3 100%);
    border-left: 4px solid #ff8f00;
}

.completed-row.today-as-request:hover {
    background: linear-gradient(135deg, #fff3d9 0%, #ffd699 100%);
}

/* 대시보드 최근 AS요청 - 오늘 방문예약일 */
.today-visit-schedule {
    background: linear-gradient(135deg, #fffbf0 0%, #fff3cd 100%);
    border-left: 4px solid #ffc107;
}

.today-visit-schedule:hover {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
}

/* 대시보드 최근 AS요청 - 오늘 출장 전 (긴급 강조) */
.today-pre-visit-urgent {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 5px solid #ff9800;
    /* animation: urgent-pulse 2s ease-in-out infinite; */
}

.today-pre-visit-urgent:hover {
    background: linear-gradient(135deg, #ffe0b2 0%, #ffcc80 100%);
}

@keyframes urgent-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 10px 5px rgba(255, 152, 0, 0.2);
    }
}

/* 미수금 관리 - 미수금 있는 행 강조 */
.outstanding-row {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left: 4px solid #e74c3c;
}

.outstanding-row:hover {
    background: linear-gradient(135deg, #ffcdd2 0%, #ef9a9a 100%);
}

.repair-info {
    font-style: italic;
    border-left: 3px solid #28a745;
    padding-left: 5px;
}

.symptoms-main {
    margin-bottom: 2px;
}

/* 고객 상세에서 AS 이력 아이템 호버 효과 */
.history-item:hover {
    background-color: #f8f9fa;
    border-radius: 4px;
}

/* 장비 탭 페이드인 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.repair-summary {
    transition: background-color 0.2s;
    word-break: break-word;
    overflow-wrap: break-word;
}

.repair-summary:hover {
    background-color: #e9ecef !important;
}

/* 대시보드 액션 버튼 스타일 */
.dashboard-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.dashboard-actions .btn-sm {
    padding: 2px 6px;
    font-size: 11px;
    min-width: auto;
}

/* 일정 헤더 스타일 */
.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.schedule-header h4 {
    margin: 0;
    flex: 1;
}

.schedule-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.schedule-process-btn {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 3px;
}

.schedule-process-btn:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.schedule-process-btn i {
    margin-right: 2px;
}

.process-hint {
    font-size: 11px;
    color: #007bff;
    font-style: italic;
    margin-top: 5px;
    margin-bottom: 0;
}

.process-hint i {
    margin-right: 3px;
}

/* AS 상세 모달 상태 수정 스타일 */
.status-edit-container {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.detail-status-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.status-edit-container .btn-sm {
    padding: 2px 6px;
    font-size: 11px;
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.status-edit-container .btn-sm i {
    font-size: 10px;
}

.status-edit-container .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.status-edit-container .btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
}

.status-edit-container .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.status-edit-container .btn-secondary:hover {
    background-color: #545b62;
    border-color: #4e555b;
}

.detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
    background-color: white;
}

/* 테이블 행 호버 및 더블클릭 커서 */
#recent-as-table tbody tr,
#as-table tbody tr {
    cursor: pointer;
}

#recent-as-table tbody tr:hover,
#as-table tbody tr:hover {
    background-color: #e3f2fd !important;
}

@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-item.full-width {
        grid-column: 1;
    }
}

/* A/S 접수 모달 스타일 */
.as-modal .modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.sales-modal .modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.customer-search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item .company-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.search-result-item .contact-info {
    font-size: 13px;
    color: #666;
}

.customer-info {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* 가로 한줄 고객 정보 스타일 */
.customer-info-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px !important;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    font-size: 13px;
    color: #495057;
    margin-top: 10px !important;
    border-left: none !important;
}

.info-inline {
    white-space: nowrap;
    font-size: 13px;
}

.info-inline strong {
    color: #495057;
    font-weight: 600;
}

.info-separator {
    color: #6c757d;
    font-weight: normal;
    margin: 0 3px;
    font-size: 12px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.info-item {
    display: flex;
    align-items: center;
}

.info-item label {
    font-weight: 600;
    color: #666;
    margin-right: 8px;
    margin-bottom: 0;
    min-width: 60px;
}

.info-item span {
    color: #333;
    font-size: 14px;
}

.outstanding-info {
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    color: #856404;
}

.outstanding-amount {
    font-weight: bold;
    color: #dc3545;
    font-size: 16px;
}

.as-history-toggle,
.sales-history-toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.as-history-toggle:hover,
.sales-history-toggle:hover {
    color: #667eea;
}

.history-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-count {
    background: #667eea;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-left: 0;
    flex-shrink: 0;
}

.as-history-content {
    margin-top: 15px;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: auto;
}

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

.as-history-table th {
    background-color: #f8f9fa;
    padding: 8px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    white-space: nowrap;
}

.as-history-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.as-history-table tbody tr:hover {
    background-color: #f8f9fa;
}

.history-item {
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fafafa;
    word-break: break-word;
    overflow-wrap: break-word;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-item-header .as-number {
    font-weight: 600;
    color: #333;
}

.history-item-header .as-date {
    font-size: 13px;
    color: #666;
}

.history-item-body {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.history-item-body .device {
    font-weight: 500;
    margin-bottom: 5px;
}

.history-item-body .symptoms {
    color: #666;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 날짜시간 입력 컨테이너 */
.datetime-container {
    display: flex;
    align-items: center;
}

.datetime-container input[type="datetime-local"] {
    flex: 1;
}

#confirm-datetime {
    padding: 8px 16px;
    font-size: 14px;
    min-width: 60px;
}

/* 스케줄 항목 호버 효과 */
.schedule-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* 데이터 관리 섹션 */
.data-management {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-management h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    border-bottom: 2px solid #6c757d;
    padding-bottom: 8px;
}

.data-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.data-buttons button {
    padding: 10px 15px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.data-buttons .btn-primary {
    background: #007bff;
    color: white;
}

.data-buttons .btn-primary:hover {
    background: #0056b3;
}

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

.data-buttons .btn-secondary:hover {
    background: #545b62;
}


/* 테이블 반응형 개선 */
.table-container {
    overflow-x: auto;
    flex: 1; /* 남은 공간 모두 사용 */
    overflow-y: auto;
    min-height: 200px; /* 최소 높이 보장 */
}

.table-container table {
    width: 100%;
    min-width: 700px;
}



/* 반응형 디자인 */
@media (max-width: 768px) {
    .page {
        padding: 10px; /* 모바일 패딩 줄임 */
    }
    
    .table-container table {
        min-width: 600px;
    }

    .checkbox-group {
        flex-direction: column;
    }
}

/* 모달 크기 조정 */
#employee-modal .modal-content,
#item-modal .modal-content,
#category-modal .modal-content {
    max-width: 500px;
}

/* 직원 모달 이메일 필드 넓게 */
#employee-modal #employee-email {
    width: 100%;
    min-width: 300px;
}

/* 액션 버튼 그룹 */
.action-buttons {
    display: flex;
    gap: 10px;
}

/* 분류 관리 모달 스타일 */
.category-management {
    padding: 20px;
}

.category-add-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.category-add-section h4 {
    margin-bottom: 15px;
    color: #333;
}

.category-list-section h4 {
    margin-bottom: 15px;
    color: #333;
}

.category-list {
    height: 350px; /* 고정 높이로 설정 */
    overflow-y: scroll !important; /* 항상 스크롤바 표시 */
    overflow-x: hidden;
    padding: 10px;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

/* 낮은 해상도에서는 2열 그리드로 변경 */
@media (max-height: 1024px) {
    .category-list {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2열 */
        gap: 8px;
        height: 400px; /* 2열일 때도 고정 높이 */
    }
}

/* 분류 목록 스크롤바 스타일 */
.category-list::-webkit-scrollbar {
    width: 14px; /* 스크롤바를 더 잘 보이게 */
}

.category-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 7px;
}

.category-list::-webkit-scrollbar-thumb {
    background: #667eea; /* 보라색으로 더 잘 보이게 */
    border-radius: 7px;
}

.category-list::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

/* 작은 모니터에서 스크롤 가능하도록 */
@media (max-height: 900px) {
    .category-list {
        height: 300px !important;
    }
}

@media (max-height: 768px) {
    .category-list {
        height: 250px !important;
    }
}

@media (max-height: 600px) {
    .category-list {
        height: 200px !important;
    }
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    gap: 10px;
}

.category-item:hover {
    background: #e9ecef;
}

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

.category-order-controls {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.btn-order {
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    background: #6c757d;
    color: white;
    transition: all 0.2s;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-order:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-order:disabled {
    background: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-edit {
    background: #007bff;
    color: white;
}

.btn-edit:hover {
    background: #0056b3;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

/* 첫 번째 서브메뉴 스타일 제거됨 - 아래 개선된 버전 사용 */

/* 분류 배지 스타일 */
.category-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: white;
}

.category-복사기 {
    background-color: #007bff;
}

.category-프린터 {
    background-color: #28a745;
}

.category-세단기 {
    background-color: #ffc107;
    color: #333;
}

.category-팩스 {
    background-color: #6c757d;
}

.category-기타 {
    background-color: #dc3545;
}

/* 서브메뉴 스타일 (세로 확장 - 하단 영역 고려) */
.nav-item-with-submenu {
    position: relative;
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: rgba(255,255,255,0.1);
    border-radius: 0 0 8px 8px;
}

.nav-item-with-submenu.active .submenu {
    max-height: 180px; /* 고정 높이로 확실하게 제한 */
    padding: 8px 0;
    overflow-y: auto;
}

/* 화면 크기별 서브메뉴 위치 조정 */
@media (max-width: 1400px) {
    .submenu {
        width: 100%;
        font-size: 14px;
    }
}

/* 서브메뉴 반응형 스타일 */
@media (max-width: 1366px) {
    .submenu {
        font-size: 13px;
    }

    .submenu li a {
        padding: 10px 18px 10px 35px;
        font-size: 13px;
    }
}

/* 서브메뉴 스크롤바 스타일링 */
.submenu::-webkit-scrollbar {
    width: 4px;
}

.submenu::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.submenu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.submenu::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

.submenu li a {
    display: block;
    padding: 10px 20px 10px 40px;
    font-size: 15px;
    color: white;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.submenu li a:hover {
    background: rgba(255,255,255,0.15);
    border-left-color: #fff;
}

.submenu li a.active {
    background: rgba(255,255,255,0.25);
    border-left-color: #fff;
    font-weight: 500;
}

.submenu-arrow {
    font-size: 12px;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.nav-item-with-submenu.active .submenu-arrow {
    transform: rotate(180deg);
}

/* 개별 페이지 스타일 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px; /* 패딩 줄임 */
    background: white;
    border-bottom: 1px solid #eee;
    margin: 0; /* 마진 제거 */
    min-height: 60px; /* 최소 높이 설정 */
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-header h2 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem; /* 폰트 크기 조정 */
}

/* 페이지 제목 섹션 */
.page-title-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 카운트 표시 스타일 */
.count-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
}

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

.count-number {
    font-weight: bold;
    color: #667eea;
    background: #f8f9ff;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

.count-separator {
    color: #ddd;
    font-weight: bold;
}

.count-label.clickable,
.count-number.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.count-label.clickable:hover,
.count-number.clickable:hover {
    color: #4c63d2;
    transform: translateY(-1px);
}

.count-number.clickable:hover {
    background: #e8ebff;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.page-content {
    padding: 15px 20px; /* 패딩 줄임 */
    flex: 1; /* 남은 공간 모두 사용 */
    display: flex;
    flex-direction: column;
    overflow-y: visible; /* body에서 스크롤 */
    height: auto;
}

.filter-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 15px; /* 마진 줄임 */
    align-items: center;
}

.filter-controls .search-container {
    flex: 1;
    margin-bottom: 0; /* 개별 검색 컨테이너 마진 제거 */
}

.filter-controls .filter-container {
    min-width: 150px;
}

/* 개별 페이지의 검색 컨테이너 */
.page-content .search-container {
    margin-bottom: 15px; /* 마진 줄임 */
}

/* 개별 페이지의 테이블 컨테이너 */
.page-content .table-container {
    flex: 1; /* 남은 공간 모두 사용 */
    overflow-y: auto;
    min-height: 300px; /* 최소 높이 보장 */
}

@media (max-width: 768px) {
    .page-header {
        padding: 10px 15px; /* 모바일 패딩 줄임 */
        min-height: 50px;
    }
    
    .page-header h2 {
        font-size: 1.3rem; /* 모바일 폰트 크기 */
    }

    .page-title-section {
        gap: 5px;
    }

    .count-display {
        font-size: 0.8rem;
        gap: 6px;
        flex-wrap: wrap;
    }

    .count-number {
        padding: 1px 6px;
        font-size: 0.8rem;
    }
    
    .page-content {
        padding: 10px 15px; /* 모바일 패딩 줄임 */
        flex: 1; /* 남은 공간 모두 사용 */
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .filter-controls .filter-container {
        min-width: auto;
    }
    
    .as-modal .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .sales-modal .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* 입금 내역 스타일 */
.payment-history-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

.payment-history-header h4 {
    color: #007bff;
    font-size: 1.1em;
    margin: 0;
}

.payment-history-content {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.no-payment-history {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.payment-history-table {
    max-height: 300px;
    overflow-y: auto;
}

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

.payment-history-table th,
.payment-history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.payment-history-table th {
    background-color: #e9ecef;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 1;
}

.payment-history-table tr:hover {
    background-color: #f1f3f4;
}

.payment-history-table td:nth-child(2) {
    font-weight: 600;
    color: #28a745;
}

/* 더블클릭 효과 */
#outstanding-table tbody tr {
    transition: background-color 0.2s ease;
}

#outstanding-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 입금 내역 요약 스타일 */
.payment-history-summary {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.summary-row:last-child {
    border-bottom: none;
}

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

.summary-value {
    font-weight: 600;
    color: #212529;
}

.summary-value.paid {
    color: #28a745;
}

.summary-value.outstanding {
    color: #dc3545;
}

/* 결제방법 배지 스타일 */
.payment-method-badge {
    display: inline-block;
    padding: 4px 8px;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

/* 메모 스타일 */
.payment-memo {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: italic;
    color: #6c757d;
}

/* 잔금 표시 필드 스타일 */
#payment-remaining-amount {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
}

/* 고객 상세 정보 모달 스타일 */
.large-modal {
    width: 80%;
    max-width: 1000px;
}

/* 고객 상세 정보 전용 모달 (더 넓은 크기) */
.extra-large-modal {
    width: 95%;
    max-width: 1400px;
}

/* 렌탈 계약 상세 정보는 적당한 너비로 */
#rental-detail-modal .modal-content {
    width: 80%;
    max-width: 900px;
}

/* 모달 고정 하단 버튼 및 스크롤 설정 */
.modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
    margin-bottom: 20px;
}

.modal-actions {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: auto;
    z-index: 10;
}

/* 렌탈 상세 모달 특별 설정 */
#rental-detail-modal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

#rental-detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
    margin-bottom: 20px;
}

#rental-detail-modal .modal-actions {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: auto;
    z-index: 10;
}

/* 모달 z-index 계층 관리 */
#customer-modal {
    z-index: 1010;
}

#customer-detail-modal {
    z-index: 1015;
}

#as-modal {
    z-index: 1001;
}

#as-detail-modal {
    z-index: 2000;
}

#as-complete-modal {
    z-index: 2100;
}

#payment-modal {
    z-index: 2100;
}
#asset-detail-modal {
    z-index: 10000;
}
#customer-asset-modal {
    z-index: 1020;
}
#rental-contract-modal {
    z-index: 1005;
}

#reception-detail-modal {
    z-index: 1008;
}
#asset-history-detail-modal {
    z-index: 9999 !important;
}
#asset-history-modal {
    z-index: 99999 !important;
}
#rental-edit-modal {
    z-index: 9997 !important;
}

.customer-detail-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

#rental-detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.customer-info-section,
.customer-history-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
}

.section-title {
    color: #007bff;
    font-size: 1.2em;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 고객 정보 그룹 스타일 */
.info-group {
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    background-color: #fff;
}

.info-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.group-title {
    color: #495057;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #dee2e6;
}

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

.info-group-full {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item-full {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item-full label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
}

.info-item-full span {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    min-height: 20px;
}

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

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

/* 고객 상세 모달에서 정보 아이템 간격 조정 */
.extra-large-modal .info-item {
    gap: 2px;
}

.extra-large-modal .info-item label {
    font-size: 0.82em;
    margin-bottom: 2px;
    white-space: nowrap;
}

.extra-large-modal .info-item span {
    padding: 3px 6px;
    font-size: 0.88em;
    min-height: 14px;
}

/* 기본 정보 라벨 및 입력 필드 최적화 */
.extra-large-modal .form-group label {
    font-size: 0.85em;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.extra-large-modal .form-group .readonly-field {
    padding: 6px 8px;
    font-size: 0.9em;
    min-height: 18px;
    word-break: break-all;
    overflow-wrap: break-word;
}

/* 짧은 데이터 필드들의 택스트 중앙 정렬 */
.extra-large-modal .form-group:has(#customer-detail-grade) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-region) .readonly-field {
    text-align: center;
    font-weight: 500;
}

.info-item label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
}

.info-item span {
    padding: 6px 10px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    min-height: 18px;
}

.grade-badge {
    display: inline-block;
    padding: 6px 12px !important;
    border-radius: 12px !important;
    font-weight: 600;
    text-align: center;
}

.outstanding-amount {
    font-weight: 700;
    color: #dc3545;
}

.count-badge {
    background-color: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.history-content {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
}

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

.history-table th,
.history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.history-table th {
    background-color: #e9ecef;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 1;
}

.history-table tr:hover {
    background-color: #f1f3f4;
}

.history-table tbody tr {
    transition: background-color 0.2s ease;
}

.history-table tbody tr:hover {
    background-color: #e3f2fd;
}

.no-history {
    padding: 30px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* 고객 테이블 더블클릭 효과 */
#customers-table tbody tr {
    transition: background-color 0.2s ease;
}

#customers-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 고객 테이블 열 너비 조정 */
#customers-table th:nth-child(1),
#customers-table td:nth-child(1) {
    width: 35px; /* 체크박스 */
}

#customers-table th:nth-child(2),
#customers-table td:nth-child(2) {
    width: 180px; /* 회사명 */
}

#customers-table th:nth-child(3),
#customers-table td:nth-child(3) {
    width: 80px; /* 대표자명 */
}

#customers-table th:nth-child(4),
#customers-table td:nth-child(4) {
    width: 110px; /* 대표휴대폰 */
}

#customers-table th:nth-child(5),
#customers-table td:nth-child(5) {
    width: 80px; /* 담당자 */
}

#customers-table th:nth-child(6),
#customers-table td:nth-child(6) {
    width: 110px; /* 회사연락처 */
}

#customers-table th:nth-child(7),
#customers-table td:nth-child(7) {
    width: 110px; /* 담당자연락처 */
}

#customers-table th:nth-child(8),
#customers-table td:nth-child(8) {
    width: 70px; /* 지역 */
}

#customers-table th:nth-child(9),
#customers-table td:nth-child(9) {
    width: 70px; /* 등급 */
}

#customers-table th:nth-child(10),
#customers-table td:nth-child(10) {
    width: 160px; /* 계약기간 (2025-10-03 ~ 2026-10-03) */
}

#customers-table th:nth-child(11),
#customers-table td:nth-child(11) {
    width: 70px; /* 계약기간(개월) */
}

#customers-table th:nth-child(12),
#customers-table td:nth-child(12) {
    width: 120px; /* 관리 */
}

/* 고객 상세 정보 화면에서 테이블이 가로로 꽉 차도록 */
.extra-large-modal .table-container {
    width: 100%;
    overflow-x: auto;
}

.extra-large-modal .table-container table {
    width: 100%;
    min-width: 1000px;
}

/* 고객 상세 정보 화면에서 내역 섹션들 */
.extra-large-modal .customer-history-section {
    margin-bottom: 30px;
}

.extra-large-modal .history-content {
    overflow-x: hidden;
    max-height: 400px;
    overflow-y: auto;
}

.extra-large-modal .history-content table {
    width: 100%;
    font-size: 13px;
    table-layout: fixed;
}

.extra-large-modal .history-content th {
    padding: 8px 12px;
    white-space: nowrap;
}

.extra-large-modal .history-content td {
    padding: 8px 12px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* A/S 내역과 구매 내역 테이블 컬럼 너비 최적화 */
.extra-large-modal .history-content th:nth-child(1), /* 번호 */
.extra-large-modal .history-content td:nth-child(1) {
    width: 80px;
    min-width: 80px;
}

.extra-large-modal .history-content th:nth-child(2), /* 날짜 */
.extra-large-modal .history-content td:nth-child(2) {
    width: 120px;
    min-width: 120px;
}

.extra-large-modal .history-content th:nth-child(3), /* 제품명 또는 상태 */
.extra-large-modal .history-content td:nth-child(3) {
    width: 200px;
    min-width: 200px;
}

.extra-large-modal .history-content th:nth-child(4), /* 증상 또는 금액 */
.extra-large-modal .history-content td:nth-child(4) {
    width: 300px;
    min-width: 300px;
}

.extra-large-modal .history-content th:nth-child(5), /* 상태 또는 기타 */
.extra-large-modal .history-content td:nth-child(5) {
    width: 150px;
    min-width: 150px;
}

/* 고객 상세 모달의 기본 정보 섹션도 넓게 활용 */
.extra-large-modal .customer-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.extra-large-modal .info-group-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
}

/* 각 섹션의 최대 너비 제한으로 공간 효율성 증대 */
.extra-large-modal .customer-info-section {
    max-width: 100%;
}

.extra-large-modal .customer-detail-container {
    gap: 18px;
}

/* 각 항목의 최소/최대 너비 제한 */
.extra-large-modal .form-group {
    min-width: 0;
    flex-shrink: 1;
}

/* 짧은 데이터 항목들 */
.extra-large-modal .form-group:has(#customer-detail-grade),
.extra-large-modal .form-group:has(#customer-detail-region) {
    max-width: 90px;
}

/* 중간 데이터 항목들 */
.extra-large-modal .form-group:has(#customer-detail-contract-start),
.extra-large-modal .form-group:has(#customer-detail-contract-end),
.extra-large-modal .form-group:has(#customer-detail-registered-date) {
    width: 140px;
}

/* 계약기간 - 영역 추가 확장으로 1줄 표현 */
.extra-large-modal .form-group:has(#customer-detail-contract-period) {
    width: 350px;
}

/* 계약기간 데이터 표시 영역 확장 */
.extra-large-modal .form-group:has(#customer-detail-contract-period) .readonly-field {
    min-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 대표자명, 담당자명 등 이름 항목들 */
.extra-large-modal .form-group:has(#customer-detail-ceo-name) {
    width: 110px;
}

.extra-large-modal .form-group:has(#customer-detail-contact-person),
.extra-large-modal .form-group:has(#customer-detail-contact-person2) {
    width: 120px;
}

/* 업태, 업종 등 분류 항목들 - 영역 확장 */
.extra-large-modal .form-group:has(#customer-detail-business-type) {
    width: 120px;
}

.extra-large-modal .form-group:has(#customer-detail-business-category) {
    width: 180px;
}

/* 전화번호 항목들 */
.extra-large-modal .form-group:has(#customer-detail-ceo-phone),
.extra-large-modal .form-group:has(#customer-detail-company-phone),
.extra-large-modal .form-group:has(#customer-detail-contact-phone),
.extra-large-modal .form-group:has(#customer-detail-contact-phone2) {
    max-width: 140px;
}

/* 사업자번호 */
.extra-large-modal .form-group:has(#customer-detail-business-number) {
    max-width: 140px;
}

/* 미수금액 */
.extra-large-modal .form-group:has(#customer-detail-outstanding-balance) {
    max-width: 130px;
}

/* 고객 상세 정보 전체 섹션 최적화 */
.extra-large-modal .form-section {
    margin-bottom: 12px;
    padding: 10px;
}

.extra-large-modal .form-section-title {
    font-size: 1.05em;
    margin-bottom: 8px;
    padding-bottom: 4px;
}

.extra-large-modal .form-row {
    margin-bottom: 8px;
}

/* 고객 상세 정보 화면에서 내역 섹션들 */
.extra-large-modal .customer-history-section {
    margin-bottom: 20px;
}

.extra-large-modal .section-title {
    font-size: 1.1em;
    margin-bottom: 10px;
    padding-bottom: 6px;
}

/* 고객 상세 정보 화면에서 테이블이 가로로 꽉 차도록 */
.extra-large-modal .table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 8px;
}

.extra-large-modal .table-container table {
    width: 100%;
    min-width: 1000px;
    font-size: 13px;
}

.extra-large-modal .history-content th {
    padding: 6px 10px;
    white-space: nowrap;
    font-size: 12px;
}

.extra-large-modal .history-content td {
    padding: 6px 10px;
    overflow: hidden;
    font-size: 12px;
}

/* 고객 상세 모달에서 정보 그룹들을 더 최적화 */
.extra-large-modal .info-group {
    margin-bottom: 12px;
    padding: 8px;
}

.extra-large-modal .info-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

/* 기본 정보 라벨 및 입력 필드 세밀 조정 */
.extra-large-modal .form-group label {
    font-size: 0.86em !important;
    margin-bottom: 3px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.extra-large-modal .form-group .readonly-field {
    padding: 5px 8px !important;
    font-size: 0.92em !important;
    min-height: 18px !important;
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.3;
}

/* 데이터 특성별 텍스트 정렬 및 스타일링 */
.extra-large-modal .form-group:has(#customer-detail-grade) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-region) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-business-type) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-business-category) .readonly-field {
    text-align: center;
    font-weight: 500;
    padding: 4px 6px !important;
}

/* 날짜 필드들 - 숫자 폰트 크기 맞춤 */
.extra-large-modal .form-group:has(#customer-detail-contract-start) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-contract-end) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-contract-period) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-registered-date) .readonly-field {
    text-align: center;
    padding: 4px 6px !important;
    font-family: monospace;
    font-size: 0.92em !important;
}

/* 금액 필드 - 숫자 폰트 크기 맞춤 */
.extra-large-modal .form-group:has(#customer-detail-outstanding-balance) .readonly-field {
    text-align: right;
    padding: 4px 8px !important;
    font-weight: 600;
    color: #dc3545;
    font-size: 0.92em !important;
}

/* 이름 필드들 */
.extra-large-modal .form-group:has(#customer-detail-ceo-name) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-contact-person) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-contact-person2) .readonly-field {
    text-align: center;
    padding: 4px 6px !important;
    font-weight: 500;
}

/* 전화번호 필드들 - 숫자 폰트 크기 맞춤 */
.extra-large-modal .form-group:has(#customer-detail-ceo-phone) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-company-phone) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-contact-phone) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-contact-phone2) .readonly-field {
    text-align: center;
    padding: 4px 6px !important;
    font-family: monospace;
    font-size: 0.92em !important;
}

/* 사업자번호 필드 - 문자 통일성 개선 */
.extra-large-modal .form-group:has(#customer-detail-business-number) .readonly-field {
    text-align: left;
    padding: 4px 6px !important;
    font-family: inherit;
    font-size: 0.92em !important;
}

/* 회사명 필드 크기 조정 */
.extra-large-modal .form-group:has(#customer-detail-company-name) {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

/* 주소, 메모, 보유장비 필드 */
.extra-large-modal .form-group:has(#customer-detail-address),
.extra-large-modal .form-group:has(#customer-detail-memo),
.extra-large-modal .form-group:has(#customer-detail-devices) {
    flex: 1;
    min-width: 200px;
}

/* 모든 필드의 문자 통일성 개선 - monospace 제거 */
.extra-large-modal .form-group .readonly-field {
    font-family: inherit !important;
}

/* ===== 자산관리 읽기 전용 필드 스타일 ===== */
.readonly-field {
    display: inline-block;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    min-height: 16px;
    width: 100%;
    font-size: 14px;
    color: #495057;
    box-sizing: border-box;
}

.memo-field {
    min-height: 60px;
    padding: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 자산 상세 정보 모달 여백 개선 */
#asset-detail-modal .modal-content {
    padding: 30px 40px;
}

#asset-detail-modal .form-section {
    margin-bottom: 25px;
}

/* 지역 관리 페이지 너비 제한 */
#regions-page .content-area {
    max-width: 800px;
    margin: 0;
}

/* 자산 이력 테이블 스타일 개선 */
#asset-detail-modal .history-content {
    max-height: 350px;
    margin-top: 15px;
    overflow-y: auto;
    overflow-x: hidden; /* 가로 스크롤 제거 */
}

#asset-detail-modal .history-content table {
    width: 100%;
    font-size: 13px;
    table-layout: auto; /* 자동 레이아웃으로 변경 */
    border-collapse: collapse;
}

#asset-detail-modal .history-content th,
#asset-detail-modal .history-content td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

/* 자산 이력 테이블 컬럼 너비 최적화 - 반응형 */
#asset-detail-modal .history-content th:nth-child(1), /* 날짜 */
#asset-detail-modal .history-content td:nth-child(1) {
    width: 12%;
    min-width: 90px;
}

#asset-detail-modal .history-content th:nth-child(2), /* 유형 */
#asset-detail-modal .history-content td:nth-child(2) {
    width: 10%;
    min-width: 70px;
}

#asset-detail-modal .history-content th:nth-child(3), /* 고객 */
#asset-detail-modal .history-content td:nth-child(3) {
    width: 15%;
    min-width: 100px;
}

#asset-detail-modal .history-content th:nth-child(4), /* 위치 */
#asset-detail-modal .history-content td:nth-child(4) {
    width: 12%;
    min-width: 80px;
}

#asset-detail-modal .history-content th:nth-child(5), /* 내용 */
#asset-detail-modal .history-content td:nth-child(5) {
    width: 35%;
    min-width: 150px;
}

#asset-detail-modal .history-content th:nth-child(6), /* 수정자 */
#asset-detail-modal .history-content td:nth-child(6) {
    width: 10%;
    min-width: 70px;
}

#asset-detail-modal .history-content th:nth-child(7), /* 관리 */
#asset-detail-modal .history-content td:nth-child(7) {
    width: 6%;
    min-width: 60px;
    text-align: center;
}

/* 텍스트 줄임 처리 */
#asset-detail-modal .history-content td:nth-child(1),
#asset-detail-modal .history-content td:nth-child(2),
#asset-detail-modal .history-content td:nth-child(3),
#asset-detail-modal .history-content td:nth-child(4),
#asset-detail-modal .history-content td:nth-child(6) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 내용 컬럼은 줄바꿈 허용 */
#asset-detail-modal .history-content td:nth-child(5) {
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
    max-height: 60px;
    overflow: hidden;
}

/* 관리 버튼 컬럼 스타일 개선 */
#asset-detail-modal .history-content td:nth-child(7) {
    white-space: nowrap;
    padding: 5px;
}

#asset-detail-modal .history-content td:nth-child(7) .btn-sm {
    font-size: 11px;
    padding: 2px 6px;
    margin: 1px;
    border-radius: 3px;
    min-width: 25px;
    height: 22px;
    display: inline-block;
    text-align: center;
    line-height: 1.2;
}

/* 계약 만료 알림 시스템 스타일 */
.expiration-alert {
    background: linear-gradient(135deg, #ff9800, #ff7043);
    color: white;
    padding: 15px 20px;
    margin: 10px 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    animation: slideIn 0.5s ease-out;
    z-index: 1000;
}

.expiration-alert .alert-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
}

.expiration-alert .alert-content i {
    margin-right: 10px;
    font-size: 18px;
    animation: pulse 2s infinite;
}

.expiration-alert .alert-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.expiration-alert .alert-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes slideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 계약 만료 예정 목록 개선 */
.expiry-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.expiry-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.expiry-item.critical {
    border-left: 5px solid #f44336;
    background: linear-gradient(135deg, #ffebee, #fff);
}

.expiry-item.urgent {
    border-left: 5px solid #ff9800;
    background: linear-gradient(135deg, #fff3e0, #fff);
}

.expiry-item.warning {
    border-left: 5px solid #ffc107;
    background: linear-gradient(135deg, #fffde7, #fff);
}

/* 계약만료 기간별 색상 */
.expiry-item.month-1 {
    border-left: 5px solid #ff4444;
    background: linear-gradient(135deg, #ffebee, #fff);
}

.expiry-item.month-3 {
    border-left: 5px solid #ff9800;
    background: linear-gradient(135deg, #fff3e0, #fff);
}

.expiry-item.month-6 {
    border-left: 5px solid #ffc107;
    background: linear-gradient(135deg, #fffde7, #fff);
}

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

.contract-type-badge {
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.contract-type-badge.customer {
    background-color: #e3f2fd;
    color: #1976d2;
}

.contract-type-badge.rental {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.urgency-badge {
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.urgency-badge.critical {
    background-color: #f44336;
    color: white;
}

.urgency-badge.urgent {
    background-color: #ff9800;
    color: white;
}

.urgency-badge.warning {
    background-color: #ffc107;
    color: #333;
}

.urgency-badge.normal {
    background-color: #4caf50;
    color: white;
}

.expiry-days {
    font-weight: bold;
    margin-top: 8px;
}

.expiry-days.critical {
    color: #f44336;
}

.expiry-days.urgent {
    color: #ff9800;
}

.expiry-days.warning {
    color: #ffc107;
}

.expiry-days.normal {
    color: #4caf50;
}
    word-wrap: break-word;
    line-height: 1.4;
}

/* 자산 관리 테이블 행 더블클릭 스타일 */
#assets-table tbody tr {
    transition: background-color 0.2s ease;
}

#assets-table tbody tr:hover {
    background-color: #f8f9fa !important;
    cursor: pointer;
}

#assets-table tbody tr:hover td {
    background-color: transparent;
}

/* 버튼이 있는 마지막 컬럼은 호버 시 커서 기본값 유지 */
#assets-table tbody tr td:last-child {
    cursor: default;
}

#assets-table tbody tr td:last-child button {
    cursor: pointer;
}

/* 테이블 힌트 스타일 */
.table-hint {
    text-align: center;
    padding: 10px 0;
    margin-top: 5px;
}

/* 자산 관리 고객 검색 스타일 */
.customer-search-container {
    position: relative;
    width: 100%;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: block;
    width: 100%;
}

.search-result-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.customer-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.customer-info {
    font-size: 12px;
    color: #666;
}

.search-no-results {
    padding: 10px 12px;
    color: #999;
    text-align: center;
    font-style: italic;
}

/* ===== 자산관리 상태 배지 스타일 ===== */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    display: inline-block;
    min-width: 60px;
}

.status-rented {
    background-color: #dc3545;
    color: white;
}

.status-available {
    background-color: #28a745;
    color: white;
}

.status-repair {
    background-color: #ffc107;
    color: #212529;
}

.status-disposed {
    background-color: #6c757d;
    color: white;
}

.status-unknown {
    background-color: #e9ecef;
    color: #495057;
}

/* 자산 이력 타입 배지 */
.history-type-badge {
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    display: inline-block;
    min-width: 50px;
}

.history-type-badge.렌탈시작 {
    background-color: #007bff;
    color: white;
}

.history-type-badge.렌탈종료 {
    background-color: #6c757d;
    color: white;
}

.history-type-badge.수리 {
    background-color: #ffc107;
    color: #212529;
}

.history-type-badge.점검 {
    background-color: #17a2b8;
    color: white;
}

.history-type-badge.이동 {
    background-color: #6f42c1;
    color: white;
}

.history-type-badge.등록 {
    background-color: #28a745;
    color: white;
}

.history-type-badge.수정 {
    background-color: #fd7e14;
    color: white;
}

.history-type-badge.폐기 {
    background-color: #dc3545;
    color: white;
}

.history-type-badge.기타 {
    background-color: #e9ecef;
    color: #495057;
}

/* 자산 상세 정보 레이아웃 */
.asset-detail-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.asset-history-section {
    border-top: 1px solid #dee2e6;
    padding-top: 20px;
}

.asset-history-section .section-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.count-badge {
    background-color: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

/* 자산 이력 테이블 스타일 */
.asset-history-section table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.asset-history-section th,
.asset-history-section td {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    text-align: left;
}

.asset-history-section th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #495057;
}

.asset-history-section tbody tr:hover {
    background-color: #f8f9fa;
}

/* 자산 목록 카운트 표시 */
.count-display {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.count-label {
    color: #6c757d;
    font-weight: normal;
}

.count-number {
    font-weight: bold;
    color: #007bff;
}

.count-separator {
    color: #dee2e6;
}

/* 고객 자산 관리 모달 스타일 */
.customer-asset-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.customer-asset-container .section {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    background: #f8f9fa;
}

.customer-asset-container .section-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

.asset-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.asset-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
}

.asset-item.rented-asset {
    border-left: 4px solid #dc3545;
}

.asset-item.available-asset {
    border-left: 4px solid #28a745;
}

.asset-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.asset-serial {
    font-size: 14px;
    color: #007bff;
}

.asset-model {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.asset-category {
    font-size: 12px;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.asset-date {
    font-size: 12px;
    color: #6c757d;
}

.asset-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.customer-asset-container .search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.customer-asset-container .search-container input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.customer-asset-container .search-container select {
    min-width: 150px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

/* 날짜 및 숫자 필드들 텍스트 정렬 통일 */
.extra-large-modal .form-group:has(#customer-detail-contract-start) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-contract-end) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-contract-period) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-registered-date) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-ceo-phone) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-company-phone) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-contact-phone) .readonly-field,
.extra-large-modal .form-group:has(#customer-detail-contact-phone2) .readonly-field {
    text-align: left !important;
    font-family: inherit !important;
}

/* 각 항목의 최소/최대 너비 제한 */
.extra-large-modal .form-group {
    min-width: 0;
    flex-shrink: 1;
}

/* 짧은 데이터 항목들 */
.extra-large-modal .form-group:has(#customer-detail-grade),
.extra-large-modal .form-group:has(#customer-detail-region) {
    max-width: 120px;
}

/* 중간 데이터 항목들 */
.extra-large-modal .form-group:has(#customer-detail-contract-start),
.extra-large-modal .form-group:has(#customer-detail-contract-end),
.extra-large-modal .form-group:has(#customer-detail-contract-period),
.extra-large-modal .form-group:has(#customer-detail-registered-date) {
    max-width: 160px;
}

/* 고객 상세 모달에서 정보 그룹들을 더 최적화 */
.extra-large-modal .info-group {
    margin-bottom: 15px;
    padding: 12px;
}

.extra-large-modal .info-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

/* 기본 정보 섹션: 왼쪽 정렬 및 적당한 간격 */
.extra-large-modal .customer-info-section .form-section:first-child .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: start;
}

/* 회사 정보 섹션: 왼쪽 정렬 및 적당한 간격 */
.extra-large-modal .customer-info-section .form-section:nth-child(2) .form-row:first-child {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: start;
}

.extra-large-modal .customer-info-section .form-section:nth-child(2) .form-row:nth-child(2) {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: start;
}

/* 담당자 정보 섹션: 1줄 레이아웃 및 왼쪽 정렬 */
.extra-large-modal .customer-info-section .form-section:nth-child(3) .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    justify-content: flex-start;
}

/* 담당자 정보 각 form-group 요소들의 정렬 */
.extra-large-modal .customer-info-section .form-section:nth-child(3) .form-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    margin: 0;
}

.extra-large-modal .customer-info-section .form-section:nth-child(3) .form-group label {
    text-align: left;
    margin-bottom: 8px;
    align-self: flex-start;
}

.extra-large-modal .customer-info-section .form-section:nth-child(3) .form-group .readonly-field {
    text-align: left;
    align-self: flex-start;
    width: 100%;
}

/* 계약 및 기타 정보 섹션: 왼쪽 정렬 및 적당한 간격 */
.extra-large-modal .customer-info-section .form-section:nth-child(4) .form-row:first-child {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: start;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .large-modal {
        width: 95%;
        max-height: 95vh;
    }

    .extra-large-modal {
        width: 98%;
        max-width: none;
    }

    .customer-info-grid {
        grid-template-columns: 1fr;
    }

    .info-group-grid {
        grid-template-columns: 1fr;

/* 사업자 정보 페이지 스타일 - 심플 디자인 */
.company-info-simple {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.simple-info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
    align-items: center;
}

.simple-info-row:last-child {
    border-bottom: none;
}

.simple-info-row label {
    font-weight: 600;
    color: #495057;
    width: 140px;
    flex-shrink: 0;
    font-size: 0.95em;
}

.simple-info-row span {
    flex: 1;
    color: #333;
    font-size: 1em;
    margin-left: 20px;
}

.simple-info-row span:empty::before {
    content: "-";
    color: #999;
}

@media (max-width: 768px) {
    .company-info-simple {
        padding: 20px;
        margin: 0 15px;
    }

    .simple-info-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 0;
    }

    .simple-info-row label {
        width: 100%;
        margin-bottom: 5px;
    }

    .simple-info-row span {
        margin-left: 0;
        width: 100%;
    }
}

/* 직인 도장 업로드 스타일 */
.seal-upload-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.seal-preview {
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    background-color: #f8f9fa;
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seal-placeholder {
    color: #6c757d;
    font-size: 0.9em;
}

.seal-placeholder i {
    font-size: 2.5em;
    margin-bottom: 8px;
    display: block;
    color: #adb5bd;
}

.seal-preview img {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.seal-upload-area button {
    padding: 10px 20px;
    border: 1px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.seal-upload-area button:hover:not(:disabled) {
    background: #007bff;
    color: white;
}

.seal-upload-area button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 읽기 전용 입력 필드 스타일 */
input[readonly] {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    color: #495057;
    cursor: default;
}

/* 인쇄 옵션 모달 스타일 */
.print-option-section {
    text-align: center;
    padding: 30px 20px;
}

.print-option-section p {
    margin-bottom: 30px;
    font-size: 18px;
    color: #333;
    font-weight: 500;
}

.print-option-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 300px;
    margin: 0 auto;
}

.print-option-btn {
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    position: relative;
    overflow: hidden;
    background: white;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.print-option-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transition: all 0.3s ease;
}

.print-option-btn.btn-primary:before {
    background: #007bff;
}

.print-option-btn.btn-secondary:before {
    background: #6c757d;
}

.print-option-btn.btn-success:before {
    background: #28a745;
}

.print-option-btn:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.print-option-btn:hover:before {
    width: 100%;
    opacity: 0.1;
}

.print-option-btn:active {
    transform: translateX(2px);
}

.print-option-btn i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.print-option-btn.btn-primary i {
    color: #007bff;
}

.print-option-btn.btn-secondary i {
    color: #6c757d;
}

.print-option-btn.btn-success i {
    color: #28a745;
}

input[readonly]:focus {
    border-color: #e9ecef;
    box-shadow: none;
}

/* 다중 품목 스타일 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.product-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    background-color: #fafafa;
}

.product-item:first-child {
    background-color: transparent;
    border: none;
    padding: 0;
    margin-bottom: 15px;
}

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

.product-item-title {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.remove-product-btn {
    padding: 5px 8px;
    font-size: 12px;
}

.total-summary {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #333;
    text-align: right;
}

.total-amount-group {
    width: 250px;
    margin-left: auto;
}

.total-amount-group label {
    font-weight: bold;
    font-size: 14px;
}

.total-amount-group input {
    font-weight: bold;
    font-size: 14px;
    text-align: right;
    background-color: #f8f9fa;
    max-width: 180px;
}

/* 기타 제품 수기입력 필드 스타일 */
.custom-product-name {
    border: 2px dashed #007bff;
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 8px 12px;
    font-style: italic;
    color: #495057;
}

.custom-product-name:focus {
    border-color: #0056b3;
    background-color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    font-style: normal;
}

/* 할인 섹션 스타일 */
.discount-section {
    margin: 15px 0;
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

.discount-section .form-row {
    margin-bottom: 0;
}

.discount-section .form-group {
    width: 200px;
}

.final-amount-group {
    width: 300px;
    margin-left: auto;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 3px solid #28a745;
}

.final-amount-group label {
    font-weight: bold;
    font-size: 18px;
    color: #28a745;
}

.final-amount-group input {
    font-weight: bold;
    font-size: 18px;
    text-align: right;
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}
    }

    .section-title {
        font-size: 1.1em;
    }

    .group-title {
        font-size: 1em;
    }

    .info-group {
        padding: 15px;
        margin-bottom: 20px;
    }
}

/* ==================== 렌탈 관리 스타일 ==================== */

/* 고객 검색 드롭다운 */
.customer-search-container {
    position: relative;
}

/* 렌탈 계약 등록 모달의 고객 정보 섹션 레이아웃 조정 */
#rental-contract-form .section:first-of-type .form-row {
    display: flex;
    gap: 15px;
}

#rental-contract-form .section:first-of-type .form-group {
    flex: 1;
    min-width: 0;
}

/* 렌탈 계약 등록 모달의 고객 검색 입력 필드 크기 조정 */
#rental-customer-search {
    font-size: 15px;
    padding: 12px 14px;
    width: 100%;
}

/* 렌탈 계약 등록 모달의 선택된 고객 필드 크기 조정 */
#selected-customer-name {
    font-size: 15px;
    padding: 12px 14px;
    width: 100%;
}

.customer-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.customer-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.customer-item:hover {
    background-color: #f8f9ff;
}

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

.customer-item strong {
    color: #333;
    font-size: 0.95rem;
}

.customer-item small {
    color: #666;
    font-size: 0.85rem;
}

/* 자산 검색 드롭다운 */
.asset-search-container {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: center;
}

.asset-search-container input {
    flex: 2;
    min-width: 200px;
}

.asset-search-container select {
    flex: 1;
    min-width: 120px;
    max-width: 150px;
}

.asset-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.asset-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.asset-item:hover {
    background-color: #f8f9ff;
}

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

.asset-item strong {
    color: #333;
    font-size: 0.95rem;
}

.asset-item small {
    color: #666;
    font-size: 0.85rem;
}

/* 렌탈 계약 모달 특별 스타일 */
.rental-contract-modal .section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* 사용량 섹션 스타일 */
.usage-section {
    margin-top: 20px;
    padding: 20px;
    background: #e8f4fd;
    border-radius: 8px;
    border: 1px solid #b3d7f0;
}

.usage-title {
    margin: 0 0 15px 0;
    color: #1976d2;
    font-size: 1rem;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #b3d7f0;
}

.rental-contract-modal .section-title {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #dee2e6;
}

.rental-contract-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.rental-contract-modal .form-row:last-child {
    margin-bottom: 0;
}

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

.rental-contract-modal .form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.rental-contract-modal .form-group input,
.rental-contract-modal .form-group select,
.rental-contract-modal .form-group textarea {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rental-contract-modal .form-group input:focus,
.rental-contract-modal .form-group select:focus,
.rental-contract-modal .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.rental-contract-modal .form-group input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

.rental-contract-modal textarea {
    resize: vertical;
    min-height: 80px;
}

/* 렌탈 상세 모달 스타일 */
#rental-detail-modal .section,
#rental-detail-modal .detail-section,
#rental-detail-content .section,
/* A/S 모달 스타일 통일 */
#as-modal .section,
#as-detail-modal .section,
/* 렌탈 계약 등록 모달 스타일 통일 */
#rental-contract-modal .section,
/* 판매 등록 모달 스타일 통일 */
#sales-registration-modal .section,
/* 판매 정보 수정 모달 스타일 통일 */
#sales-edit-modal .section,
/* 고객 정보 수정 모달 스타일 통일 */
#customer-modal .section,
/* 자산 상세 정보 모달 스타일 통일 */
#asset-detail-modal .section,
/* 미수금 수납 처리 모달 스타일 통일 */
#payment-modal .section,
#payment-modal .form-section {
    margin-bottom: 30px !important;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* AS 접수 모달 전용 컴팩트 스타일 */
#as-modal .section {
    margin-bottom: 15px !important;
    padding: 12px !important;
}

#as-modal .section-title {
    font-size: 0.95rem !important;
    margin: 0 0 10px 0 !important;
    padding-bottom: 6px !important;
}

#as-modal .form-group {
    margin-bottom: 12px !important;
}

#as-modal .form-group label {
    font-size: 0.9rem;
    margin-bottom: 6px;
}

#as-modal input[type="text"],
#as-modal input[type="date"],
#as-modal select,
#as-modal textarea {
    padding: 6px 10px;
    font-size: 0.9rem;
}

#as-modal textarea {
    line-height: 1.4;
}

.rental-detail-modal .section h4,
.rental-detail-modal .section-title,
.rental-detail-modal .detail-section h4,
/* 모든 모달 섹션 제목 스타일 통일 */
#as-modal .section h4,
#as-modal .section-title,
#as-detail-modal .section h4,
#as-detail-modal .section-title,
#rental-contract-modal .section h4,
#rental-contract-modal .section-title,
#sales-registration-modal .section h4,
#sales-registration-modal .section-title,
#sales-edit-modal .section h4,
#sales-edit-modal .section-title,
#customer-modal .section h4,
#customer-modal .section-title,
#asset-detail-modal .section h4,
#asset-detail-modal .section-title,
#payment-modal .section h4,
#payment-modal .section-title,
#payment-modal .form-section-title {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #dee2e6;
}

.rental-detail-modal .detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.rental-detail-modal .detail-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.rental-detail-modal .detail-item label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
    min-width: 100px;
    flex-shrink: 0;
}

.rental-detail-modal .detail-item span {
    color: #333;
    font-size: 0.95rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    flex: 1;
}

.rental-detail-modal .detail-section p {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #333;
    line-height: 1.6;
}

/* 렌탈 테이블 상태 배지 추가 스타일 */
.status-badge.status-렌탈중 {
    background-color: #28a745;
    color: white;
}

.status-badge.status-수리중 {
    background-color: #ffc107;
    color: #212529;
}

.status-badge.status-종료 {
    background-color: #6c757d;
    color: white;
}

.status-badge.status-대기 {
    background-color: #ffc107;
    color: #212529;
}

.status-badge.status-승인 {
    background-color: #28a745;
    color: white;
}

.status-badge.status-거부 {
    background-color: #dc3545;
    color: white;
}

/* 견적서 모달 스타일 */
#quotation-modal .form-section {
    border-left: none;
}

/* 렌탈 관리 페이지 특별 스타일 */
#rental-management-page .table-container {
    margin-top: 20px;
}

#rental-management-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#rental-management-page .search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}

#rental-management-page .filter-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

#rental-management-page .filter-container select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    min-width: 120px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .rental-contract-modal .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .rental-detail-modal .detail-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .asset-search-container {
        flex-direction: column;
        align-items: stretch;
    }

    .asset-search-container input {
        min-width: auto;
        width: 100%;
    }

    .asset-search-container select {
        min-width: auto;
        width: 100%;
    }

    #rental-management-page .page-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    #rental-management-page .filter-container {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

/* 렌탈 계약 수정 이력 스타일 */
.history-list {
    margin-top: 10px;
}

.history-item {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
}

.history-header {
    margin-bottom: 10px;
    color: #495057;
    font-size: 14px;
}

.history-reason {
    color: #6c757d;
    font-weight: normal;
    margin-left: 10px;
}

.history-changes {
    margin-left: 15px;
}

.change-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 13px;
    line-height: 1.4;
}

.change-field {
    font-weight: 600;
    color: #495057;
    min-width: 100px;
    margin-right: 10px;
}

.change-old {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 3px;
    padding: 2px 6px;
    margin-right: 8px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.change-arrow {
    color: #6c757d;
    margin: 0 8px;
    font-weight: bold;
}

.change-new {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 3px;
    padding: 2px 6px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 자산 이력 테이블 개선 스타일 */
#asset-history-content table {
    font-size: 0.9em;
}

#asset-history-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
    padding: 8px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
}

#asset-history-content table td {
    padding: 10px 8px;
    vertical-align: top;
    border-bottom: 1px solid #dee2e6;
}

#asset-history-content table tr:hover {
    background-color: #f8f9fa;
}

/* 이력 유형 배지 스타일 개선 */
.history-type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    text-align: center;
    min-width: 60px;
}

.history-type-badge.등록 {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.history-type-badge.수정 {
    background-color: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffcc02;
}

.history-type-badge.렌탈시작 {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.history-type-badge.렌탈종료 {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.history-type-badge.수리 {
    background-color: #fce4ec;
    color: #ad1457;
    border: 1px solid #f8bbd9;
}

/* 상세 내용 셀 스타일 */
#asset-history-content td:nth-child(5) {
    max-width: 300px;
    word-wrap: break-word;
    white-space: pre-line;
}

/* 고객 상세 정보 렌탈 이력 스타일 */
#customer-rental-history .history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9em;
}

#customer-rental-history .history-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    padding: 8px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.85em;
}

#customer-rental-history .history-table td {
    padding: 8px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

#customer-rental-history .history-table tr:hover {
    background-color: #f8f9fa;
}

/* 렌탈 상태 배지 추가 */
.status-badge.status-active {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}



/* 렌탈 계약 목록 스타일 */
.rental-contracts-table {
    overflow-x: auto;
    max-height: 400px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

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

.rental-contracts-table th,
.rental-contracts-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    font-size: 13px;
}

.rental-contracts-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 1;
}

.rental-contracts-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 계약 상태별 스타일 */
.contract-expired {
    background-color: #ffebee !important;
    color: #c62828;
}

.contract-urgent {
    background-color: #fff3e0 !important;
    color: #ef6c00;
}

.contract-warning {
    background-color: #fff8e1 !important;
    color: #f57f17;
}

/* 상태 텍스트 스타일 */
.status-expired {
    color: #c62828;
    font-weight: bold;
}

.status-urgent {
    color: #ef6c00;
    font-weight: bold;
}

.status-warning {
    color: #f57f17;
    font-weight: bold;
}

/* 라디오 버튼 그룹 스타일 */
.radio-group {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: normal;
}

.radio-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.radio-option span {
    cursor: pointer;
    font-size: 14px;
}

.radio-option:hover span {
    color: #007bff;
}

/* 사용량 필드 섹션 스타일 */
.usage-section {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    background-color: #f8f9fa;
    margin: 15px 0;
}

.usage-title {
    margin: 0 0 15px 0;
    color: #495057;
    font-weight: 600;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

/* 사용량 관리 방식 배지 스타일 */
.usage-type-badge {
    background-color: #e7f3ff;
    color: #0056b3;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

/* 고객 상세 정보 모달 스타일 개선 */
#customer-detail-modal .modal-content {
    max-width: 95vw;
    width: 1200px;
}

/* 고객 상세 정보 모달 및 AS 상세 정보 모달 컴팩트 스타일 */
#customer-detail-modal .section,
#as-detail-modal .section {
    margin-bottom: 15px !important;
    padding: 12px !important;
}

#customer-detail-modal .section-title,
#as-detail-modal .section-title {
    font-size: 0.95rem !important;
    margin: 0 0 8px 0 !important;
    padding-bottom: 6px !important;
}

#customer-detail-modal .form-row,
#as-detail-modal .detail-grid {
    row-gap: 8px !important;
    margin-bottom: 8px !important;
}

#customer-detail-modal .form-group label,
#as-detail-modal .detail-item label {
    font-size: 0.85rem !important;
}

#customer-detail-modal .readonly-field,
#as-detail-modal .detail-item span {
    font-size: 0.9rem !important;
}

#customer-detail-modal .history-table th,
#customer-detail-modal .history-table td {
    padding: 3px 2px !important;
    font-size: 11px !important;
}

/* AS 상세 모달 추가 스타일 */
#as-detail-modal .detail-grid {
    gap: 8px;
}

#as-detail-modal .detail-item {
    margin-bottom: 6px;
}

#as-detail-modal .symptoms-text,
#as-detail-modal .content-text {
    font-size: 0.9rem !important;
    line-height: 1.4;
}

/* AS 상세 모달 행 기반 레이아웃 */
.as-detail-row {
    display: flex;
    gap: 15px;
    margin-bottom: 6px;
    align-items: flex-start;
}

.as-detail-row .detail-item {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.as-detail-row .detail-item.as-full-width {
    flex: 1 1 100%;
}

.as-detail-row .detail-item label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.as-detail-row .detail-item span,
.as-detail-row .detail-item div {
    display: block;
    color: #212529;
}

.as-detail-row .content-text {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    min-height: 60px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* AS 처리 내역 섹션 - 라벨과 필드 가로 정렬 */
#previous-processing-section .as-detail-row .detail-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    flex: 0 1 auto;
}

#previous-processing-section .as-detail-row .detail-item label {
    margin-bottom: 0;
    white-space: nowrap;
    min-width: fit-content;
}

#previous-processing-section .as-detail-row .detail-item span {
    display: inline;
    text-align: left;
}

#previous-processing-section .as-detail-row .detail-item .content-text {
    min-height: auto;
    padding: 4px 8px;
    display: inline-block;
    margin: 0;
}

#previous-processing-section .as-detail-row .detail-item.as-full-width {
    flex-direction: column;
    align-items: flex-start;
}

#previous-processing-section .as-detail-row .detail-item.as-full-width label {
    margin-bottom: 4px;
}

#previous-processing-section .as-detail-row .detail-item.as-full-width .content-text {
    min-height: 60px;
    display: block;
    width: 100%;
}

/* 반응형 지원 - 좁은 화면에서 수직 배열 */
@media (max-width: 1200px) {
    .as-detail-row {
        flex-wrap: wrap;
    }

    .as-detail-row .detail-item {
        flex: 1 1 calc(50% - 8px);
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .as-detail-row .detail-item {
        flex: 1 1 100%;
    }
}

/* 고객 상세 정보 이력 섹션 */
.customer-history-section {
    margin-bottom: 20px;
}

.history-content {
    max-width: 100%;
}

/* 고객 상세 정보 테이블 스타일 */
.history-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
    table-layout: fixed; /* 고정 레이아웃으로 너비 제어 */
}

.history-table th,
.history-table td {
    padding: 4px 2px;
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
}

.history-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 11px;
}

/* AS내역 테이블 컬럼 너비 (완료일 포함 6개 컬럼) - 초컴팩트 */
.history-table th:nth-child(1),
.history-table td:nth-child(1) { width: 10%; } /* AS번호 */

.history-table th:nth-child(2),
.history-table td:nth-child(2) { width: 6%; } /* 요청일 - 대폭 축소 */

.history-table th:nth-child(3),
.history-table td:nth-child(3) { width: 12%; } /* 장비명 */

.history-table th:nth-child(4),
.history-table td:nth-child(4) {
    width: 60%;
    white-space: normal; /* 증상 텍스트는 줄바꿈 허용 */
} /* 증상 - 대부분 공간 할당 */

.history-table th:nth-child(5),
.history-table td:nth-child(5) { width: 6%; } /* 상태 - 대폭 축소 */

.history-table th:nth-child(6),
.history-table td:nth-child(6) { width: 6%; } /* 완료일 - 대폭 축소 */

/* 렌탈 계약 테이블 */
.rental-contracts-table {
    max-width: 100%;
}

.rental-contracts-table .table {
    width: 100%;
    font-size: 12px;
    table-layout: fixed;
}

.rental-contracts-table .table th,
.rental-contracts-table .table td {
    padding: 6px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 렌탈 계약 테이블 열 너비 (8개 컬럼) - 컴팩트하게 */
.rental-contracts-table .table th:nth-child(1),
.rental-contracts-table .table td:nth-child(1) { width: 10%; } /* 계약번호 */

.rental-contracts-table .table th:nth-child(2),
.rental-contracts-table .table td:nth-child(2) { width: 20%; } /* 제품명 */

.rental-contracts-table .table th:nth-child(3),
.rental-contracts-table .table td:nth-child(3) { width: 15%; } /* 시리얼번호 */

.rental-contracts-table .table th:nth-child(4),
.rental-contracts-table .table td:nth-child(4) { width: 9%; } /* 계약일 */

.rental-contracts-table .table th:nth-child(5),
.rental-contracts-table .table td:nth-child(5) { width: 9%; } /* 종료일 */

.rental-contracts-table .table th:nth-child(6),
.rental-contracts-table .table td:nth-child(6) { width: 12%; } /* 렌탈기간 */

.rental-contracts-table .table th:nth-child(7),
.rental-contracts-table .table td:nth-child(7) { width: 15%; } /* 월렌탈료 */

.rental-contracts-table .table th:nth-child(8),
.rental-contracts-table .table td:nth-child(8) { width: 10%; } /* 상태 */

/* 고객 상세 정보 - 보유장비 스타일 */
.device-item {
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

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

.device-item:contains("자산 정보 없음") {
    color: #dc3545;
    font-style: italic;
}

/* 데이터 관리 페이지 스타일 */
.data-management-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.data-function-row {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.data-function-row:last-child {
    border-bottom: none;
}

.data-function-row.danger-section {
    background-color: #fff5f5;
    border-left: 4px solid #dc3545;
}

.data-function-row h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.data-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.data-buttons button {
    min-width: 150px;
}

.warning-text {
    color: #dc3545;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 14px;
}

.info-text {
    color: #17a2b8;
    margin-bottom: 10px;
    font-size: 13px;
}

/* 렌탈 계약 자산 검색 드롭다운 스타일 (AS접수와 동일) */
.asset-category-header {
    background: #e9ecef;
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
    font-weight: bold;
    color: #495057;
    font-size: 14px;
    cursor: default;
}

.asset-separator {
    background: #f8f9fa;
    padding: 4px 12px;
    color: #6c757d;
    font-size: 12px;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
    cursor: default;
}

/* 출력 매수 관련 스타일 */
.usage-info-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.info-item label {
    font-weight: 500;
    color: #495057;
    margin: 0;
}

.info-item span {
    font-weight: 600;
    color: #212529;
}

.usage-analysis {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

.usage-analysis h5 {
    margin: 0 0 15px 0;
    color: #856404;
    font-size: 16px;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
}

.analysis-item label {
    font-weight: 500;
    color: #6c4a00;
    margin: 0;
}

.analysis-item span {
    font-weight: 600;
    color: #212529;
}

.analysis-item.excess-fee {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.analysis-item.excess-fee label {
    color: #721c24;
}

.analysis-item.excess-fee span {
    color: #721c24;
    font-weight: 700;
}

.additional-fee {
    color: #dc3545;
    font-weight: 700;
}

.cumulative-counter-info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #2196f3;
}

.counter-details-content {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-top: 8px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.counter-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 6px 0;
    border-bottom: 1px solid #e9ecef;
    gap: 10px;
    min-height: 20px;
}

.counter-detail-item:last-child {
    border-bottom: none;
}

.counter-detail-label {
    color: #666;
    font-size: 13px;
    font-weight: 500;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: 100px;
}

.counter-detail-value {
    font-weight: bold;
    color: #333;
    text-align: right;
    word-break: break-word;
    flex-grow: 1;
    line-height: 1.4;
}

.counter-detail-value.previous {
    color: #333;
}

.counter-detail-value.current {
    color: #333;
}

.counter-detail-value.usage {
    color: #333;
}

.counter-detail-value.first-service {
    color: #333;
}

/* 카운터 상세 정보 반응형 스타일 */
@media (max-width: 768px) {
    .counter-detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 8px 0;
    }

    .counter-detail-label {
        min-width: auto;
        margin-bottom: 3px;
    }

    .counter-detail-value {
        text-align: left;
        font-size: 14px;
    }

    .counter-details-content {
        padding: 12px;
    }
}

/* ================================================
   대시보드 통계 카드 스타일
   ================================================ */

.stat-detail-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.stat-detail-header i {
    font-size: 24px;
}

.stat-detail-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.stat-detail-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

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

.stat-row strong {
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .stat-detail-card {
        padding: 15px;
    }

    .stat-detail-header h4 {
        font-size: 14px;
    }

    .stat-row span {
        font-size: 13px;
    }

    .stat-row strong {
        font-size: 14px;
    }
}


/* 초과 요금 입금 처리 모달 스타일 */
#excess-fee-payment-modal {
    z-index: 2200;
}

#excess-fee-payment-modal .modal-content {
    max-width: 600px;
    width: 90%;
}

.excess-fee-info {
    margin-bottom: 20px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert h4 {
    margin: 0 0 10px 0;
    color: #d63031;
    font-size: 16px;
}

.payment-options {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.payment-options .form-group {
    margin-bottom: 5px;
}

.payment-options .form-group:last-child {
    margin-bottom: 0;
}

.payment-options label {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background-color 0.2s;
    width: fit-content;
    max-width: 100%;
}

.payment-options label:hover {
    background-color: #e9ecef;
}

.payment-options input[type="radio"] {
    margin: 0;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.payment-options span {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
}

#on-site-payment-section {
    padding: 15px;
    background: #f0f8ff;
    border-radius: 8px;
    border: 1px solid #bee5eb;
    margin-top: 15px;
}

#excess-received-amount {
    font-size: 16px;
    font-weight: bold;
    color: #28a745;
}

.excess-fee-details {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    border: 1px solid #dee2e6;
}

.excess-detail-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.excess-detail-item {
    display: flex;
    flex-direction: column;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.excess-detail-label {
    color: #666;
    font-size: 12px;
    margin-bottom: 4px;
}

.excess-detail-value {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.excess-detail-value.total {
    color: #e17055;
    font-size: 16px;
}

.excess-detail-formula {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    border-left: 3px solid #667eea;
    margin-top: 10px;
}

.formula-line {
    color: #495057;
    font-size: 13px;
    margin: 6px 0;
    line-height: 1.5;
}

/* AS 접수 현황판 스타일 */
.as-reception-board {
    background: white;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
}

.as-reception-board h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #667eea;
    padding-bottom: 5px;
}

.reception-table-container {
    overflow-x: auto;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.reception-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 800px;
}

.reception-table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 8px 6px;
    text-align: center;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
    font-size: 12px;
}

.reception-table th.date-header {
    background: #4a90e2;
    color: white;
    min-width: 90px;
    text-align: center;
}

.reception-table td {
    padding: 8px 6px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    border-right: 1px solid #f1f3f4;
    background: white;
    transition: background-color 0.2s;
    min-width: 30px;
}

.reception-table td:first-child {
    background: #f8f9fa;
    font-weight: 500;
    color: #495057;
    min-width: 90px;
    text-align: center;
    white-space: nowrap;
}

.reception-table td.count-cell {
    cursor: pointer;
    font-weight: bold;
    position: relative;
}

.reception-table td.count-cell:hover {
    background: #e3f2fd;
    color: #1976d2;
}

.reception-table td.count-cell.has-requests {
    background: #e8f5e8;
    color: #2e7d32;
}

.reception-table td.count-cell.has-requests:hover {
    background: #c8e6c9;
    color: #1b5e20;
}

.reception-table td.count-cell.zero {
    color: #9e9e9e;
    font-weight: normal;
}

.reception-table tbody tr:hover td:not(.count-cell) {
    background: #f5f5f5;
}

/* 오늘 날짜 행 스타일 */
.reception-table tbody tr.today-row {
    background: linear-gradient(135deg, #fffbf0 0%, #fff3cd 100%);
    box-shadow: 0 0 0 2px #ffc107;
}

.reception-table tbody tr.today-row td:first-child {
    background: linear-gradient(135deg, #ffb300 0%, #ff8f00 100%);
    color: white;
    font-weight: 600;
}

.reception-table tbody tr.today-row td.count-cell {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.reception-table tbody tr.today-row td.count-cell.has-requests {
    background: rgba(255, 152, 0, 0.2);
    color: #e65100;
    font-weight: bold;
}

.reception-table tbody tr.today-row td.count-cell:hover {
    background: rgba(255, 193, 7, 0.3);
    color: #e65100;
}

.reception-table tbody tr.today-row:hover td:not(.count-cell) {
    background: linear-gradient(135deg, #ffb300 0%, #ff8f00 100%);
}

/* 반응형 대응 */
@media (max-width: 1200px) {
    .reception-table {
        font-size: 11px;
        min-width: 700px;
    }

    .reception-table th,
    .reception-table td {
        padding: 6px 4px;
    }

    .dashboard-sidebar-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .reception-table-container {
        margin: 0 -5px;
    }

    .reception-table {
        font-size: 10px;
        min-width: 600px;
    }

    .reception-table th,
    .reception-table td {
        padding: 5px 3px;
    }

    .reception-table th.date-header,
    .reception-table td:first-child {
        min-width: 70px;
        font-size: 9px;
    }

    .as-reception-board {
        padding: 5px;
    }

    .as-reception-board h3 {
        font-size: 14px;
        margin: 0 0 5px 0;
    }

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

    .as-reception-board {
        padding: 15px;
    }
}

/* 클릭 가능한 통계 카드 스타일 */
.clickable-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* 페이지네이션 스타일 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #667eea;
    color: #667eea;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.pagination-btn.page-number {
    min-width: 40px;
}

.pagination-ellipsis {
    padding: 8px;
    color: #999;
}



/* 자동완성 드롭다운 스타일 */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    margin-top: 2px;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:hover {
    background: #f8f9fa;
}

/* 라벨 노트 스타일 (기준 표시) */
.label-note {
    font-size: 11px;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
    font-weight: 500;
}

/* 버튼 그룹 스타일 (사용량 관리 방식 선택) */
.button-group {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
    padding: 4px;
}

.btn-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    position: relative;
}

.btn-option i {
    font-size: 20px;
    transition: all 0.3s ease;
}

.btn-option:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.btn-option.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.btn-option.active i {
    transform: scale(1.1);
}

.btn-option span {
    font-size: 13px;
    white-space: nowrap;
}

/* 렌탈 계약 수정 이력 스타일 */
.history-list {
    margin-top: 15px;
}

.history-item {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.history-header {
    font-size: 0.95rem;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

.history-reason {
    color: #6c757d;
    font-weight: normal;
    margin-left: 10px;
}

.history-changes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.change-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: white;
    border-radius: 4px;
    font-size: 0.9rem;
}

.change-field {
    font-weight: 600;
    color: #495057;
    min-width: 140px;
}

.change-old {
    color: #dc3545;
    text-decoration: line-through;
    padding: 2px 8px;
    background: #f8d7da;
    border-radius: 3px;
}

.change-arrow {
    margin: 0 10px;
    color: #6c757d;
    font-weight: bold;
}

.change-new {
    color: #28a745;
    font-weight: 600;
    padding: 2px 8px;
    background: #d4edda;
    border-radius: 3px;
}

/* 토스트 알림 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    margin-bottom: 10px;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid #28a745;
}

.toast.toast-success {
    border-left-color: #28a745;
}

.toast.toast-warning {
    border-left-color: #ffc107;
}

.toast.toast-error {
    border-left-color: #dc3545;
}

.toast.toast-info {
    border-left-color: #17a2b8;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: #28a745;
}

.toast-warning .toast-icon {
    color: #ffc107;
}

.toast-error .toast-icon {
    color: #dc3545;
}

.toast-info .toast-icon {
    color: #17a2b8;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #333;
}

.toast-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    background: #f0f0f0;
    color: #666;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.toast-hiding {
    animation: slideOutRight 0.3s ease-out forwards;
}

/* 커스텀 확인 다이얼로그 */
.confirm-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.confirm-dialog-overlay.active {
    display: flex;
}

.confirm-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 90%;
    animation: confirmFadeIn 0.2s ease-out;
}

.confirm-dialog-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e9ecef;
}

.confirm-dialog-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.confirm-dialog-icon {
    font-size: 24px;
}

.confirm-dialog-icon.warning {
    color: #ffc107;
}

.confirm-dialog-icon.danger {
    color: #dc3545;
}

.confirm-dialog-icon.info {
    color: #17a2b8;
}

.confirm-dialog-body {
    padding: 20px 24px;
    color: #666;
    line-height: 1.6;
    white-space: pre-wrap;
}

.confirm-dialog-footer {
    padding: 16px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.confirm-dialog-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-dialog-cancel {
    background: #f8f9fa;
    color: #666;
}

.confirm-dialog-cancel:hover {
    background: #e9ecef;
}

.confirm-dialog-confirm {
    background: #667eea;
    color: white;
}

.confirm-dialog-confirm:hover {
    background: #5568d3;
}

.confirm-dialog-confirm.danger {
    background: #dc3545;
}

.confirm-dialog-confirm.danger:hover {
    background: #c82333;
}

@keyframes confirmFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 견적서 출력 버튼 스타일 (사각형) */
.quotation-print-btn {
    border-radius: 4px !important;
    padding: 10px 18px !important;
    font-weight: 500;
}

.quotation-print-btn.btn-secondary {
    background: #6c757d;
    border-radius: 4px !important;
}

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

.quotation-print-btn.btn-primary {
    background: #007bff;
    border-radius: 4px !important;
}

.quotation-print-btn.btn-primary:hover {
    background: #0056b3;
}

/* CSV 미리보기 모달 스타일 */
.csv-preview-section {
    margin-bottom: 20px;
}

.csv-preview-section h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}

.field-mapping-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field-mapping-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.system-field-label {
    min-width: 120px;
    font-weight: 500;
    color: #495057;
}

.mapping-arrow {
    color: #667eea;
    font-size: 18px;
    font-weight: bold;
}

.csv-field-select {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.csv-field-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}


/* =================== 낮은 해상도 지원 =================== */

/* 화면 높이가 낮을 때 */
@media (max-height: 800px) {
    .header {
        height: 60px;
        padding: 10px 20px;
    }
    
    .page-content {
        padding: 10px 15px;
    }
    
    .category-list {
        height: 350px !important;
    }

    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

@media (max-height: 700px) {
    .header {
        height: 50px;
        padding: 8px 15px;
    }

    .page-content {
        padding: 8px 12px;
    }

    .category-list {
        height: 280px !important;
    }

    .form-row {
        margin-bottom: 10px;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
}

@media (max-height: 600px) {
    .sidebar {
        font-size: 0.9rem;
    }

    .logo h2 {
        font-size: 1rem;
    }

    .category-list {
        height: 220px !important;
    }

    .header {
        height: 45px;
        padding: 5px 10px;
    }
}

/* 백업 관리 스타일 */
.backup-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.backup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: box-shadow 0.2s;
}

.backup-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.backup-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.backup-info strong {
    color: #333;
    font-size: 14px;
}

.backup-details {
    color: #666;
    font-size: 12px;
}

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

.backup-actions .btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* 판매 합계 표시 바 */
.summary-bar {
    display: block !important;
    padding: 10px 20px !important;
    background: #f8f9fa !important;
    border-top: 2px solid #dee2e6 !important;
    margin-top: 10px !important;
    text-align: right !important;
    white-space: nowrap !important;
    overflow-x: auto !important;
    direction: ltr !important;
}

.summary-bar .summary-label {
    font-weight: 500 !important;
    color: #495057 !important;
    font-size: 12px !important;
    margin-left: 15px !important;
}

.summary-bar .summary-label:first-child {
    margin-left: 0 !important;
}

.summary-bar .summary-value {
    font-weight: 600 !important;
    color: #0066cc !important;
    font-size: 12px !important;
    margin-left: 5px !important;
}

.summary-bar .summary-separator {
    color: #adb5bd !important;
    font-size: 12px !important;
    margin: 0 10px !important;
}

/* AS 사진 그리드 */
.as-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.as-photo-item {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.as-photo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.as-photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.as-photo-caption {
    padding: 8px;
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    background: #fff;
}

/* 사진 확대 모달 */
#photo-zoom-modal {
    display: none;
    position: fixed !important;
    z-index: 99999 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.9) !important;
    isolation: isolate !important;
}

#photo-zoom-modal img {
    display: block !important;
    max-width: 90% !important;
    max-height: 90% !important;
    margin: auto !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 100000 !important;
}

#photo-zoom-modal .close {
    position: absolute !important;
    top: 20px !important;
    right: 35px !important;
    color: #fff !important;
    font-size: 40px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    z-index: 100001 !important;
}

#photo-zoom-modal .close:hover {
    color: #ccc;
}

/* 공개 AS 알림 배너 애니메이션 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ring {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(-10deg);
    }
    20%, 40% {
        transform: rotate(10deg);
    }
}

#public-as-notification-banner button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===================================
   AS 관리 대시보드 스타일
   =================================== */

.as-dashboard {
    padding: 10px 0;
    margin-bottom: 15px;
}

.dashboard-filters {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* 상태 뱃지 - 배경 없이 텍스트 색상만 */
.status-badge {
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.status-badge:hover {
    text-decoration: underline;
}

.badge-count {
    margin-left: 3px;
    font-weight: 700;
}

/* 상태별 색상 - 텍스트만 */
.badge-출장전 {
    color: #1976d2;
}

.badge-입고수리중 {
    color: #388e3c;
}

.badge-외부의뢰중 {
    color: #f57c00;
}

.badge-기타 {
    color: #7b1fa2;
}

.badge-처리완료 {
    color: #616161;
}

/* 구분선 */
.filter-separator {
    font-size: 16px;
    color: #999;
    margin: 0 5px;
}

/* 필터 레이블 */
.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

/* 담당자 뱃지 */
#technician-badges {
    display: inline-flex;
    gap: 10px;
}

.tech-badge {
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: #495057;
    user-select: none;
}

.tech-badge:hover {
    text-decoration: underline;
}

.tech-badge.active {
    font-weight: 700;
    color: #1976d2;
}

.tech-unassigned {
    color: #f57c00;
}

/* 새로고침 버튼 */
.btn-refresh-simple {
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #495057;
    margin-left: auto;
}

.btn-refresh-simple:hover {
    background: #e9ecef;
}

.btn-refresh-simple i {
    margin-right: 5px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .dashboard-filters {
        gap: 10px;
    }

    .status-badge,
    .tech-badge,
    .filter-label {
        font-size: 13px;
    }
}
