/* daily-report-viewer.css */

/* 전체 레이아웃 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* 헤더 */
.page-header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
    font-weight: 400;
}

/* 날짜 선택기 */
.date-selector {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

.date-input-group label {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.date-input {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    min-width: 150px;
}

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

.search-btn, .today-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.today-btn {
    background: #f8f9fa;
    color: #667eea;
    border: 2px solid #667eea;
}

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

/* 로딩 스피너 */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    margin: 30px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #666;
    font-size: 1.1rem;
}

/* 에러 메시지 */
.error-message {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    border-left: 5px solid #e74c3c;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.error-icon {
    font-size: 1.5rem;
}

.error-text {
    color: #e74c3c;
    font-weight: 600;
    font-size: 1.1rem;
}

/* 데이터 없음 메시지 */
.no-data-message {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 50px;
    text-align: center;
    margin: 30px 0;
}

.no-data-content {
    color: #666;
}

.no-data-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 20px;
}

.no-data-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

/* 요약 카드 */
.report-summary {
    margin-bottom: 30px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.summary-card.error-card {
    border-left: 5px solid #e74c3c;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.card-icon {
    font-size: 1.5rem;
}

.card-title {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

.error-card .card-value {
    color: #e74c3c;
}

/* 작업자 리포트 */
.workers-report {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.workers-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.worker-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border-left: 5px solid #667eea;
    transition: all 0.3s ease;
}

.worker-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.worker-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.worker-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.worker-total-hours {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

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

.work-entry {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.work-entry:hover {
    border-color: #667eea;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.1);
}

.work-entry.error-entry {
    border-left: 4px solid #e74c3c;
    background: #fff5f5;
}

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

.project-name {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.work-hours {
    background: #e8f4f8;
    color: #2c5aa0;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
}

.work-entry.error-entry .work-hours {
    background: #ffebee;
    color: #c62828;
}

.entry-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9rem;
    color: #666;
}

.entry-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.detail-value {
    color: #333;
}

.error-type {
    color: #e74c3c;
    font-weight: 600;
}

/* 내보내기 섹션 */
.export-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.export-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.export-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.export-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.excel-btn:hover {
    background: #1a5a37;
    transform: translateY(-2px);
}

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

.print-btn:hover {
    background: #343a40;
    transform: translateY(-2px);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .page-header {
        padding: 20px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .date-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-input-group > * {
        width: 100%;
        text-align: center;
    }
    
    .summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .work-entries {
        grid-template-columns: 1fr;
    }
    
    .worker-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .export-buttons {
        flex-direction: column;
    }
}

/* 인쇄 스타일 */
@media print {
    body {
        background: white;
    }
    
    .container {
        max-width: none;
        margin: 0;
        padding: 20px;
    }
    
    .date-selector,
    .export-section {
        display: none;
    }
    
    .summary-card,
    .workers-report,
    .worker-card,
    .work-entry {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .page-header {
        background: white !important;
        box-shadow: none !important;
        border-bottom: 2px solid #333;
    }
    
    .page-header h1 {
        color: #333 !important;
        -webkit-text-fill-color: #333 !important;
    }
}