/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.35);
}

.header p {
    font-size: 1.15rem;
    opacity: 0.95;
    font-weight: 300;
    line-height: 1.7;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Main content layout */
.main-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card h3 i {
    color: #667eea;
}

/* Input group */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
}

.input-group input {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #f8fafc;
}

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

/* Holiday inputs */
.holiday-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.holiday-inputs .input-group {
    margin-bottom: 0;
}

.holiday-inputs .input-group label {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.holiday-inputs .input-group input {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.total-summary {
    margin-top: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
}

.total-summary strong {
    font-weight: 600;
}

/* Stats */
.stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.stat-label {
    font-weight: 500;
    color: #64748b;
}

.stat-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e293b;
}

.stat-item.remaining .stat-value {
    color: #059669;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

/* Public holidays */
.public-holidays {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.holiday-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 0.9rem;
}

.holiday-date {
    font-weight: 500;
    color: #667eea;
}

.holiday-name {
    color: #64748b;
}

/* Company holidays */
.company-holiday-input {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.company-holiday-input input[type="date"] {
    flex: 1;
    min-width: 120px;
}

.company-holiday-input input[type="text"] {
    flex: 2;
    min-width: 100px;
}

.company-holidays {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 12px;
}

.company-holiday-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f0f9ff;
    border-radius: 6px;
    font-size: 0.9rem;
    border-left: 3px solid #0ea5e9;
}

.company-holiday-item .holiday-date {
    color: #0ea5e9;
}

.company-holiday-item .holiday-name {
    color: #0f172a;
    flex: 1;
    margin: 0 12px;
}

.delete-company-holiday {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.delete-company-holiday:hover {
    background: #fef2f2;
}

/* Scenario management */
.scenario-input {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.scenario-input input {
    flex: 1;
}

.current-scenario {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.current-scenario label {
    font-weight: 600;
    color: #4a5568;
    margin: 0;
}

.current-scenario span {
    font-weight: 700;
    color: #667eea;
    flex: 1;
}

.scenario-file-actions {
    display: flex;
    gap: 8px;
    margin: 16px 0;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.scenario-file-actions button {
    flex: 1;
}

.scenarios-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.scenario-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.scenario-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e0;
}

.scenario-item.active {
    background: #eff6ff;
    border-color: #3b82f6;
}

.scenario-info {
    flex: 1;
}

.scenario-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.scenario-details {
    font-size: 0.8rem;
    color: #64748b;
}

.scenario-actions {
    display: flex;
    gap: 4px;
}

.scenario-actions button {
    padding: 6px 8px;
    font-size: 0.75rem;
    min-width: auto;
}

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

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

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

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

.scenario-storage-info {
    margin-top: 12px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.scenario-storage-info small {
    color: #64748b;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.scenario-storage-info i {
    color: #3b82f6;
}

/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    margin-bottom: 8px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #475569;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.8rem;
    min-width: auto;
}

.btn-icon {
    padding: 8px;
    background: rgba(255,255,255,0.2);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* Calendar section */
.calendar-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

.calendar-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    min-width: 100px;
    text-align: center;
}

/* Calendar grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.calendar-help {
    margin-top: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-size: 0.9rem;
}

.calendar-help p {
    margin: 4px 0;
    color: #4a5568;
}

.calendar-help p:first-child {
    margin-bottom: 8px;
    color: #1e293b;
}

.month {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.month-header {
    text-align: center;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.day-header {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    padding: 8px 4px;
}

.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.day:hover {
    background: #e2e8f0;
    transform: scale(1.05);
}

.day.other-month {
    color: #cbd5e0;
    cursor: default;
}

.day.other-month:hover {
    background: transparent;
    transform: none;
}

.day.weekend {
    background: #fef7f0;
    color: #c05621;
}

.day.public-holiday {
    background: #fef2f2;
    color: #dc2626;
    font-weight: 600;
}

.day.company-holiday {
    background: #f0f9ff;
    color: #0ea5e9;
    font-weight: 600;
}

.day.selected {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
}

.day.half-day {
    background: linear-gradient(135deg, #667eea 50%, transparent 50%);
    color: #667eea;
    font-weight: 600;
    position: relative;
}

.day.half-day::after {
    content: "½";
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.6rem;
    font-weight: 700;
    color: #667eea;
}

.day.selected:hover {
    transform: scale(1.05);
}

.day.today {
    border: 2px solid #667eea;
    font-weight: 700;
}

/* Legend */
.legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.3);
}

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

.legend-color.half-day {
    background: linear-gradient(135deg, #667eea 50%, #e2e8f0 50%);
}

.legend-color.public {
    background: #dc2626;
}

.legend-color.company {
    background: #0ea5e9;
}

.legend-color.weekend {
    background: #c05621;
}

/* Responsive design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
    
    .calendar-section {
        order: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .calendar-grid {
        grid-template-columns: 1fr;
    }
    
    .legend {
        gap: 16px;
    }
    
    .legend-item {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 16px;
    }
    
    .calendar-section {
        padding: 16px;
    }
    
    .days-grid {
        gap: 1px;
    }
    
    .day {
        font-size: 0.8rem;
    }
}

/* Scrollbar styling */
.public-holidays::-webkit-scrollbar {
    width: 6px;
}

.public-holidays::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.public-holidays::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.public-holidays::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
} 