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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

header {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

h1 {
    color: #2d3748;
    font-size: 2rem;
    font-weight: 700;
}

.week-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.week-selector label {
    font-weight: 600;
    color: #4a5568;
}

.week-selector select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.week-selector select:focus {
    outline: none;
    border-color: #667eea;
}

#refresh-btn {
    padding: 8px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

#refresh-btn:hover {
    background: #5a6fd8;
}

main {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.week-info {
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e2e8f0;
}

#week-title {
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.week-summary {
    color: #4a5568;
    font-size: 1.1rem;
}

.work-table {
    overflow-x: auto;
}

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

thead {
    background: #f7fafc;
}

th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
}

td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

tr:hover {
    background: #f8fafc;
}

.day-name {
    font-weight: 600;
    color: #2d3748;
}

.weekend {
    color: #718096;
    font-style: italic;
}

.time-display {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #4a5568;
}

.hours-positive {
    color: #22c55e;
    font-weight: 600;
}

.hours-negative {
    color: #ef4444;
    font-weight: 600;
}

.hours-zero {
    color: #64748b;
}

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

button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

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

.btn-secondary:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

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

.danger {
    background: #ef4444;
    color: white;
}

.danger:hover {
    background: #dc2626;
}

.actions {
    padding: 24px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading.show {
    display: flex;
}

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

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

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s;
    z-index: 1001;
    max-width: 300px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background: #22c55e;
}

.notification.error {
    background: #ef4444;
}

.notification.info {
    background: #3b82f6;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .work-table {
        font-size: 14px;
    }
    
    th, td {
        padding: 12px 8px;
    }
    
    .day-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .day-actions button {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    .work-table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 4px;
    }
}