/* 전역 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 10px;
    width: 100%;
    overflow-x: auto;
}

/* 컨테이너 */
.container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    overflow-x: visible;
}

/* 헤더 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

header h1 {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 날짜 섹션 */
.date-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.date-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.date-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-input-group label {
    font-weight: bold;
    color: #555;
    white-space: nowrap;
}

.date-input-group input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
}

.date-input-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* 테이블 섹션 */
.table-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    width: 100%;
}

/* 스크롤바 스타일 */
.table-section::-webkit-scrollbar {
    height: 12px;
}

.table-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-section::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.table-section::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

.table-title {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-month-display {
    font-size: 1.2rem;
    color: #FF9800;
    font-weight: bold;
    margin-left: 10px;
}

/* 버튼 스타일 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: bold;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-report {
    background: #FF9800;
    color: white;
    text-decoration: none;
}

.btn-report:hover {
    background: #F57C00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

.btn-save {
    background: #2196F3;
    color: white;
}

.btn-save:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.btn-excel {
    background: #10793F;
    color: white;
}

.btn-excel:hover {
    background: #0D5E31;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 121, 63, 0.3);
}

.btn-print {
    background: #667eea;
    color: white;
}

.btn-print:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

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

.btn-delete:hover {
    background: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

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

.btn-secondary:hover {
    background: #F57C00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

.btn-month {
    background: #9C27B0;
    color: white;
}

.btn-month:hover {
    background: #7B1FA2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(156, 39, 176, 0.3);
}

.month-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 테이블 컨테이너 */
.table-container {
    border-radius: 10px;
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 70vh;
}

/* 메인 테이블 */
.fuel-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.fuel-table th,
.fuel-table td {
    border: 1px solid #ddd;
    padding: 6px 4px;
    text-align: center;
    min-width: 45px;
    max-width: 45px;
    width: 45px;
}

.fuel-table thead th {
    background: #667eea;
    color: white;
    font-weight: bold;
    position: sticky;
    z-index: 10;
}

/* 첫 번째 행: 일자 */
.fuel-table thead tr:nth-child(1) th {
    top: 0;
    font-size: 0.85rem;
    padding: 6px 4px;
}

/* 두 번째 행: 차량번호(요일) */
.fuel-table thead tr:nth-child(2) th {
    top: 38px;
    font-size: 0.8rem;
    padding: 6px 4px;
}

/* 고정 열 (일자/차량번호) */
.fixed-col {
    position: sticky;
    left: 0;
    background: #667eea;
    z-index: 20;
    min-width: 80px !important;
    max-width: 80px !important;
    width: 80px !important;
    font-weight: bold;
}

.fuel-table thead .fixed-col {
    z-index: 21;
}

.fuel-table tbody .fixed-col {
    background: #f8f9fa;
    color: #333;
    z-index: 5;
}

.fuel-table tfoot .fixed-col {
    background: #667eea;
    color: white;
    z-index: 5;
}

/* 차량번호 입력 */
.vehicle-input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: bold;
}

.vehicle-input:focus {
    outline: none;
    border-color: #667eea;
    background: #f0f4ff;
}

/* 주유량 입력 칸 */
.fuel-input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center !important;
    transition: all 0.3s ease;
}

.fuel-input:focus {
    outline: none;
    border: 4px solid #4CAF50 !important;
    background: linear-gradient(135deg, #A5D6A7 0%, #66BB6A 100%) !important;
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.9), 
                inset 0 0 15px rgba(255, 255, 255, 0.8),
                0 0 0 8px rgba(76, 175, 80, 0.3) !important;
    transform: scale(1.15) !important;
    transition: all 0.2s ease !important;
    font-weight: 900 !important;
    font-size: 1.2rem !important;
    color: #000000 !important;
    text-shadow: 1px 1px 0 #ffffff, -1px -1px 0 #ffffff, 1px -1px 0 #ffffff, -1px 1px 0 #ffffff;
    letter-spacing: 1px;
    z-index: 1000;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 숫자 입력 필드의 위아래 화살표 제거 */
.fuel-input::-webkit-outer-spin-button,
.fuel-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.fuel-input[type=number] {
    -moz-appearance: textfield;
}

/* 합계 셀도 가운데 정렬 */
.total-cell {
    text-align: center !important;
    font-weight: bold;
}

/* 수요일 열 강조 */
.wednesday-col {
    background: #fff9e6 !important;
    color: #d84315 !important;
    font-weight: bold;
}

/* 요일 헤더 색상 */
.day-sunday {
    background: #ffebee !important;
    color: #c62828 !important;
}

.day-saturday {
    background: #e3f2fd !important;
    color: #1565c0 !important;
}

/* 테이블 행 호버 효과 */
.fuel-table tbody tr:hover {
    background: #f0f8ff;
}

/* 포커스된 행 하이라이트 */
.fuel-table tbody tr.focused-row {
    background: #ffeb3b !important;
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.6);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

.fuel-table tbody tr.focused-row td {
    background: #C8E6C9 !important;
    border-top: 3px solid #4CAF50 !important;
    border-bottom: 3px solid #4CAF50 !important;
}

.fuel-table tbody tr.focused-row .vehicle-input {
    background: #81C784 !important;
    border: 3px solid #388E3C !important;
    font-weight: bold;
    font-size: 1rem;
    color: #000;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* 인쇄 전용 요소 (화면에서 숨김) */
.print-only {
    display: none;
}

.fuel-table tbody tr.focused-row .fuel-input {
    background: #C8E6C9 !important;
    border: 2px solid #4CAF50 !important;
    font-weight: bold;
    font-size: 1rem;
}

/* 포커스된 열 하이라이트*/
.fuel-table thead th.focused-column {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%) !important;
    color: white !important;
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.fuel-table tbody td.focused-column {
    background: #E8F5E9 !important;
    box-shadow: inset 0 0 0 1px #4CAF50;
}

.fuel-table tbody td.focused-column .fuel-input {
    background: #C8E6C9 !important;
    border-color: #4CAF50 !important;
}

/* 주유 입력 박스 포커스 애니메이션 */
@keyframes inputPulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(76, 175, 80, 0.9), 
                    inset 0 0 15px rgba(255, 255, 255, 0.8),
                    0 0 0 8px rgba(76, 175, 80, 0.3);
        transform: scale(1.15);
        background: linear-gradient(135deg, #A5D6A7 0%, #66BB6A 100%);
    }
    50% {
        box-shadow: 0 0 50px rgba(76, 175, 80, 1), 
                    inset 0 0 20px rgba(255, 255, 255, 1),
                    0 0 0 12px rgba(76, 175, 80, 0.5);
        transform: scale(1.18);
        background: linear-gradient(135deg, #81C784 0%, #4CAF50 100%);
    }
}

.fuel-input:focus {
    animation: inputPulse 1s ease-in-out infinite;
}

.fuel-table tbody tr.focused-row .fixed-col {
    background: #81C784 !important;
    border-left: 4px solid #388E3C !important;
}

/* 합계 행 */
.fuel-table tfoot tr {
    background: #fff3cd;
    font-weight: bold;
}

.fuel-table tfoot td {
    font-weight: bold;
    color: #856404;
}

/* 단가 입력 섹션 */
/* 단가 섹션 컨테이너 */
.price-sections-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section-title {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.price-section {
    padding: 15px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.price-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.price-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-input-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 15px;
}

.price-input-group {
    background: #fff5f5;
    border: 2px solid #ff6b6b;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0; /* flex 아이템이 축소될 수 있도록 */
}

.price-input-group label {
    font-weight: bold;
    color: #c62828;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.price-input-group .price-inputs-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
    width: 100%;
}

.price-input-group .price-input-item {
    flex: 1;
    min-width: 0; /* flex 아이템이 축소될 수 있도록 */
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-input-group .price-input-item small {
    font-size: 0.8rem;
    color: #666;
    font-weight: normal;
    text-align: center;
    white-space: nowrap;
}

.price-input-group input {
    padding: 8px;
    border: 2px solid #ff6b6b;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: bold;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.price-input-group .calculated-price {
    background: #e3f2fd;
    border: 2px solid #2196f3;
    color: #1565c0;
    cursor: default;
}

.price-input-group .calculated-price:focus {
    background: #e3f2fd;
    border-color: #2196f3;
}

.price-input-group input:focus {
    outline: none;
    border-color: #ff4757;
    background: #ffe0e0;
}

/* 단가 입력 필드의 위아래 화살표 제거 */
.price-input-group input::-webkit-outer-spin-button,
.price-input-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.price-input-group input[type=number] {
    -moz-appearance: textfield;
}

/* 통계 섹션 */
.stats-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

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

.stat-card {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.diesel-stat {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.gasoline-stat {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.kerosene-stat {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.total-stat {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

/* 차량합계 열 */
.total-col {
    position: sticky;
    right: 0;
    background: #667eea;
    z-index: 10;
    min-width: 100px !important;
    font-weight: bold;
}

.stat-label {
    font-size: 0.9rem;
    margin-bottom: 10px;
    opacity: 0.95;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
}

/* 안내 섹션 */
.info-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.info-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-section ul {
    list-style: none;
}

.info-section li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-section li:last-child {
    border-bottom: none;
}

.info-section strong {
    color: #667eea;
}

/* 빈 행 스타일 */
.empty-row {
    opacity: 0.5;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 10px;
    width: 95%;
    max-width: 1400px;
    max-height: 90vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

.excel-sheet {
    margin-bottom: 30px;
}

.excel-sheet h3 {
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.excel-sheet table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

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

.excel-sheet table th {
    background: #667eea;
    color: white;
    font-weight: bold;
}

.excel-sheet table tr:nth-child(even) {
    background: #f8f9fa;
}

.excel-sheet table tr:hover {
    background: #e3f2fd;
}

/* 삭제 모달 스타일 */
.delete-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.delete-modal-content {
    position: relative;
    background: white;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-in-out;
}

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

.delete-modal-header {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delete-modal-header h2 {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.delete-modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.delete-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.delete-modal-body {
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.delete-btn {
    width: 100%;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
    text-align: left;
}

.delete-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.delete-btn i {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.delete-btn div {
    flex: 1;
}

.delete-btn strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #333;
}

.delete-btn p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.delete-btn-date {
    border-color: #2196F3;
}

.delete-btn-date:hover {
    border-color: #1976D2;
    background: #E3F2FD;
}

.delete-btn-date i {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.delete-btn-vehicle {
    border-color: #FF9800;
}

.delete-btn-vehicle:hover {
    border-color: #F57C00;
    background: #FFF3E0;
}

.delete-btn-vehicle i {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.delete-btn-all {
    border-color: #f44336;
}

.delete-btn-all:hover {
    border-color: #d32f2f;
    background: #FFEBEE;
}

.delete-btn-all i {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .header-controls {
        width: 100%;
        justify-content: flex-start;
    }
    
    .date-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-input-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .fuel-table th,
    .fuel-table td {
        min-width: 60px;
        padding: 6px;
        font-size: 0.85rem;
    }
    
    .price-input-container {
        grid-template-columns: 1fr;
    }
}

/* 인쇄 스타일 */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    body {
        background: white;
        padding: 0;
        margin: 0;
    }
    
    .no-print {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .table-section {
        padding: 5px;
        margin-bottom: 20px;
        box-shadow: none;
        page-break-after: auto;
    }
    
    /* 경유 섹션 다음에 휘발유 표시 */
    .table-section:nth-of-type(1) {
        page-break-after: auto;
    }
    
    /* 등유는 새 페이지에 */
    .table-section:nth-of-type(3) {
        page-break-before: always;
    }
    
    /* 인쇄 전용 요소 표시 */
    .print-only {
        display: table-row !important;
    }
    
    /* 일일 합계 행 스타일 */
    .daily-total-row {
        display: table-row !important;
    }
    
    .daily-total-row td {
        background: #c8e6c9 !important;
        font-weight: bold !important;
        padding: 6px 2px !important;
        font-size: 8pt !important;
        border: 1px solid #333 !important;
        color: #1b5e20 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .daily-total-row .fixed-col {
        background: #4CAF50 !important;
        color: white !important;
        font-size: 9pt !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .table-title {
        font-size: 14pt;
        margin-bottom: 8px;
    }
    
    .year-month-display {
        font-size: 12pt;
    }
    
    /* 테이블 컨테이너 수정 */
    .table-container {
        overflow: visible !important;
        border-radius: 0;
    }
    
    .table-wrapper {
        overflow: visible !important;
        max-height: none !important;
        display: block;
    }
    
    /* 테이블 스타일 */
    .fuel-table {
        width: 100% !important;
        border-collapse: collapse !important;
        table-layout: fixed !important;
        font-size: 8pt;
        page-break-inside: auto;
    }
    
    .fuel-table th,
    .fuel-table td {
        padding: 2px !important;
        border: 1px solid #000 !important;
        text-align: center !important;
        vertical-align: middle !important;
        min-width: 0 !important;
        width: auto !important;
        word-wrap: break-word;
        overflow: visible !important;
    }
    
    /* 헤더 스타일 */
    .fuel-table thead th {
        position: static !important;
        background: #667eea !important;
        color: white !important;
        font-weight: bold;
        font-size: 8pt;
        padding: 4px 2px !important;
        line-height: 1.4;
        vertical-align: middle !important;
    }
    
    /* 일자 행 */
    .fuel-table thead tr:nth-child(1) th {
        height: 30px !important;
    }
    
    /* 차량번호(요일) 행 */
    .fuel-table thead tr:nth-child(2) th {
        height: 30px !important;
    }
    
    .fuel-table thead tr:nth-child(2) .fixed-col {
        background: #667eea !important;
        color: white !important;
    }
    
    /* 인쇄 시 "차량번호"를 "차량"으로 표기 */
    .vehicle-label::before {
        content: "차량";
    }
    
    .vehicle-label {
        font-size: 0 !important;
    }
    
    /* 고정 열 스타일 제거 */
    .fixed-col {
        position: static !important;
        left: auto !important;
        z-index: 0 !important;
        width: 60px !important;
    }
    
    .fuel-table thead .fixed-col,
    .fuel-table tfoot .fixed-col {
        background: #667eea !important;
        color: white !important;
    }
    
    .fuel-table tbody .fixed-col {
        background: #f8f9fa !important;
        color: #000 !important;
    }
    
    /* 입력 필드를 텍스트처럼 표시 */
    input.vehicle-input,
    input.fuel-input {
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        border: none !important;
        background: transparent !important;
        color: #000 !important;
        font-family: 'Malgun Gothic', sans-serif !important;
        font-size: 8pt !important;
        text-align: center !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    /* placeholder는 인쇄 시 숨김 */
    input::-webkit-input-placeholder {
        color: transparent !important;
    }
    input:-moz-placeholder {
        color: transparent !important;
    }
    input::-moz-placeholder {
        color: transparent !important;
    }
    input:-ms-input-placeholder {
        color: transparent !important;
    }
    
    /* 수요일 강조 */
    .wednesday-col {
        background: #fff9e6 !important;
        color: #d84315 !important;
        font-weight: bold;
    }
    
    .wednesday-col input {
        color: #d84315 !important;
        font-weight: bold;
    }
    
    /* 요일 색상 */
    .day-sunday {
        background: #ffebee !important;
        color: #c62828 !important;
    }
    
    .day-saturday {
        background: #e3f2fd !important;
        color: #1565c0 !important;
    }
    
    /* 합계 행 */
    .fuel-table tfoot tr {
        background: #fff3cd !important;
    }
    
    .fuel-table tfoot td {
        font-weight: bold;
        color: #856404 !important;
        font-size: 9pt;
    }
    
    /* 통계 섹션 */
    .stats-section {
        page-break-before: always;
        page-break-inside: avoid;
    }
    
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 10px;
        border: 2px solid #333;
        background: white !important;
        color: #000 !important;
    }
    
    .stat-label {
        font-size: 10pt;
        color: #000 !important;
        font-weight: bold;
    }
    
    .stat-value {
        font-size: 14pt;
        color: #000 !important;
        font-weight: bold;
    }
    
    /* 인쇄 시 통계 카드 구분 */
    .diesel-stat {
        border-left: 5px solid #000 !important;
    }
    
    .gasoline-stat {
        border-left: 5px solid #666 !important;
    }
    
    .kerosene-stat {
        border-left: 5px solid #999 !important;
    }
    
    .total-stat {
        border: 3px solid #000 !important;
    }
    
    /* 페이지 설정 */
    @page {
        size: A4 landscape !important;
        margin: 10mm;
    }
    
    /* 페이지 나누기 방지 */
    .fuel-table tr {
        page-break-inside: avoid;
    }
    
    /* 빈 행은 인쇄 시 숨김 */
    .empty-row {
        display: none !important;
    }
    
    /* 합계 행은 인쇄 시 숨김 (통계 섹션에 표시) */
    .fuel-table tfoot {
        display: none !important;
    }
}

/* 흑백 인쇄 모드 */
@media print {
    .print-bw * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* 흑백 모드: 모든 배경을 흰색으로, 텍스트를 검은색으로 */
    .print-bw .fuel-table thead th {
        background: white !important;
        color: black !important;
        border: 1px solid #000 !important;
    }
    
    .print-bw .fuel-table thead tr:nth-child(2) .fixed-col {
        background: white !important;
        color: black !important;
    }
    
    .print-bw .fixed-col {
        background: white !important;
        color: black !important;
    }
    
    .print-bw .day-sunday,
    .print-bw .day-saturday {
        background: white !important;
        color: black !important;
    }
    
    .print-bw .wednesday-col {
        background: white !important;
        color: black !important;
    }
    
    .print-bw .daily-total-row td {
        background: white !important;
        color: black !important;
        font-weight: bold !important;
    }
    
    .print-bw .daily-total-row .fixed-col {
        background: white !important;
        color: black !important;
    }
    
    .print-bw .stat-card {
        background: white !important;
        color: black !important;
        border: 1px solid #000 !important;
    }
    
    .print-bw .stat-label {
        color: #666 !important;
    }
    
    .print-bw .stat-value {
        color: black !important;
    }
    
    .print-bw .table-title {
        color: black !important;
    }
}
