/**
 * 인수증 기능 전용 스타일시트
 */

/* 템플릿 저장 버튼 */
.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
    color: white;
}

/* 인수증 상세 페이지 스타일 */
.receipt-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.detail-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.detail-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

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

.detail-table th {
    text-align: left;
    padding: 10px;
    font-weight: 600;
    color: #555;
    width: 120px;
    vertical-align: top;
}

.detail-table td {
    padding: 10px;
    color: #2c3e50;
    word-break: break-word;
}

.detail-table tr {
    border-bottom: 1px solid #e0e0e0;
}

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

#receipt-detail-loading {
    padding: 40px;
    color: #7f8c8d;
}

#receipt-detail-content {
    padding: 20px 0;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .receipt-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-table th {
        width: 100px;
        font-size: 14px;
    }
    
    .detail-table td {
        font-size: 14px;
    }
}

/* 복수 생성 영역 */
.multiple-creation {
    background: #fff3e0;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 2px solid #ffe0b2;
}

.multiple-creation h4 {
    font-size: 16px;
    font-weight: 600;
    color: #e67e22;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.multiple-creation h4::before {
    content: '📋';
    font-size: 20px;
}

.quantity-input-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.quantity-input-group label {
    font-weight: 500;
    color: #2c3e50;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #e67e22;
    background: white;
    color: #e67e22;
    font-size: 18px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: #e67e22;
    color: white;
}

.quantity-input {
    width: 80px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    padding: 8px;
    border: 2px solid #e67e22;
    border-radius: 5px;
}

.quantity-input:focus {
    border-color: #d35400;
}

/* 일괄 상태 변경 영역 */
.bulk-actions-container {
    background: white;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bulk-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bulk-action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bulk-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bulk-action-btn.btn-new-arrival {
    background: #27ae60;
    color: white;
}

.bulk-action-btn.btn-new-arrival:hover:not(:disabled) {
    background: #229954;
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.bulk-action-btn.btn-same-delivery {
    background: #3498db;
    color: white;
}

.bulk-action-btn.btn-same-delivery:hover:not(:disabled) {
    background: #2980b9;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.selected-count {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #ecf0f1;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
}

.selected-count .count {
    color: #e74c3c;
    font-weight: 600;
    margin: 0 4px;
}

/* 인수증 리스트 테이블 */
.receipt-table-wrapper {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.receipt-table th {
    background: #34495e;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
}

.receipt-table th.checkbox-col {
    width: 40px;
    text-align: center;
}

.receipt-table td {
    padding: 12px;
    border-bottom: 1px solid #ecf0f1;
}

.receipt-table tbody tr:hover {
    background: #f8f9fa;
}

.receipt-table .checkbox-col {
    text-align: center;
}

.receipt-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 상태 뱃지 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.status-new {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.status-arrived-new {
    background: #e8f5e9;
    color: #388e3c;
}

.status-badge.status-arrived-same {
    background: #fff3e0;
    color: #f57c00;
}

.status-badge.status-delivered {
    background: #f3e5f5;
    color: #7b1fa2;
}

.status-badge.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

/* 인수증 번호 */
.receipt-no {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #2c3e50;
}

/* 필터 영역 */
.filter-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.filter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 일괄 처리 버튼 스타일 */
.bulk-action-btn.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

.bulk-action-btn.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
}

.bulk-action-btn.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background: white;
    color: #2c3e50;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 반응형 */
@media (max-width: 768px) {
    .bulk-actions {
        flex-direction: column;
    }

    .bulk-action-btn {
        width: 100%;
        justify-content: center;
    }

    .receipt-table {
        font-size: 12px;
    }

    .receipt-table th,
    .receipt-table td {
        padding: 8px 4px;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }
}
