html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1d29;
    color: #e1e4e8;
}

a, .btn-link {
    color: #667eea;
}

a:hover {
    color: #764ba2;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem rgba(102, 126, 234, 0.25), 0 0 0 0.25rem rgba(102, 126, 234, 0.5);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #51cf66;
}

.invalid {
    outline: 1px solid #ff6b6b;
}

.validation-message {
    color: #ff6b6b;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA9NC4wODE1IDI5MSA9NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDg2Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* MudBlazor Dark Theme Overrides */
.mud-paper {
    background-color: #242837 !important;
}

.mud-drawer {
    background-color: #1a1d29 !important;
}

.mud-appbar {
    background-color: #242837 !important;
}

/* Scrollbar styling for dark theme */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1d29;
}

::-webkit-scrollbar-thumb {
    background: #3c4254;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4c5264;
}

/* Schedule Grid Modern Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-card {
    animation: fadeIn 0.5s ease-out;
}

/* Smooth transitions for all interactive elements */
button, .mud-button {
    transition: all 0.2s ease !important;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ===== SCHEDULE GRID STYLES ===== */

.schedule-grid-container {
    padding: 20px;
    max-width: 100%;
}

/* Main table container with horizontal scroll */
.main-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    background: #242837;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.main-table-wrapper {
    min-width: 100%;
    display: inline-block;
}

/* Schedule table base styles */
.schedule-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #242837;
}

.schedule-table thead {
    background: #1a1d29;
    position: sticky;
    top: 0;
    z-index: 10;
}

.schedule-table th {
    color: #a8b2d1;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
}

.schedule-table th.day-header {
    background: #2d3142;
    border: 1px solid #1a1d29;
    min-width: 45px;
    max-width: 45px;
}

.schedule-table th.day-header.weekend {
    background: #1a1d29;
    color: #6b7280;
}

/* Personnel name cell - sticky left column */
.personnel-name-cell {
    background: #2d3142;
    border: 1px solid #1a1d29;
    color: #e1e4e8;
    font-weight: 500;
    white-space: nowrap;
    text-align: left;
}

/* Schedule cells */
.schedule-cell {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    text-align: center;
    vertical-align: middle;
    height: 50px;
    min-width: 45px;
    max-width: 45px;
}

.schedule-cell:hover {
    transform: scale(1.05);
    z-index: 5;
    box-shadow: 0 0 0 2px #667eea;
}

/* Cell state styles - these match the colors from SchedulePresentationHelper */
.schedule-cell.day-duty {
    background: #FFD700;
    color: #1a1d29;
    border: 1px solid #1a1d29;
}

.schedule-cell.night-duty {
    background: #1E90FF;
    color: white;
    border: 1px solid #1a1d29;
}

.schedule-cell.full-day-duty {
    background: linear-gradient(135deg, #FFD700 0%, #FFD700 50%, #1E90FF 50%, #1E90FF 100%);
    color: white;
    border: 1px solid #1a1d29;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.schedule-cell.leave-day {
    background: #ff6b6b;
    color: white;
    border: 1px solid #1a1d29;
}

.schedule-cell.sick-leave {
    background: #9b59b6;
    color: white;
    border: 1px solid #1a1d29;
}

/* Manual assignment indicator */
.schedule-cell.manual-locked {
    border: 2px solid #ffd43b !important;
}

/* ===== CONFIG PANEL STYLES ===== */

.config-panel {
    background: #242837;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.input-field {
    background: #2d3142;
}

.generate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6) !important;
}

.generate-btn:active:not(:disabled) {
    transform: translateY(0) !important;
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== STATS CARDS STYLES ===== */

.stats-card {
    background: #242837;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.stats-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1;
}

.stats-label {
    color: #a8b2d1;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .schedule-table th,
    .schedule-table td {
        padding: 6px !important;
        font-size: 0.875rem;
    }
    
    .schedule-cell {
        min-width: 40px;
        max-width: 40px;
        height: 45px;
    }
    
    .config-panel {
        padding: 15px;
    }
    
    .stats-value {
        font-size: 1.5rem;
    }
    
    .stats-label {
        font-size: 0.75rem;
    }
}
