/* === CONSISTENT JOB ROLE COLORS === */
:root {
    --role-barman-bg: #fff3e0;
    --role-barman-border: #ff9800;
    --role-barman-text: #ef6c00;
    
    --role-bartender-bg: #fff3e0;
    --role-bartender-border: #ff9800;
    --role-bartender-text: #ef6c00;
    
    --role-waiter-bg: #e8f5e8;
    --role-waiter-border: #4caf50;
    --role-waiter-text: #2e7d32;
    
    --role-chef-bg: #ffebee;
    --role-chef-border: #f44336;
    --role-chef-text: #c62828;
    
    --role-cleaner-bg: #f3e5f5;
    --role-cleaner-border: #9c27b0;
    --role-cleaner-text: #7b1fa2;
    
    --role-owner-bg: #f5f5f5;
    --role-owner-border: #6c757d;
    --role-owner-text: #495057;
}

/* Apply consistent colors to ALL role elements */
.role-barman, 
.shift-block.role-barman, 
.role-badge.role-barman, 
.template-badge.role-barman,
.legend-item.role-barman,
.role-badge.mini.role-barman {
    background: var(--role-barman-bg) !important;
    border-color: var(--role-barman-border) !important;
    color: var(--role-barman-text) !important;
}

.role-bartender, 
.shift-block.role-bartender, 
.role-badge.role-bartender, 
.template-badge.role-bartender,
.legend-item.role-bartender,
.role-badge.mini.role-bartender,
.quick-template-btn.role-bartender {
    background: var(--role-bartender-bg) !important;
    border-color: var(--role-bartender-border) !important;
    color: var(--role-bartender-text) !important;
    border-left-color: var(--role-bartender-border) !important;
}

.role-waiter, 
.shift-block.role-waiter, 
.role-badge.role-waiter, 
.template-badge.role-waiter,
.legend-item.role-waiter,
.role-badge.mini.role-waiter {
    background: var(--role-waiter-bg) !important;
    border-color: var(--role-waiter-border) !important;
    color: var(--role-waiter-text) !important;
}

.role-chef, 
.shift-block.role-chef, 
.role-badge.role-chef, 
.template-badge.role-chef,
.legend-item.role-chef,
.role-badge.mini.role-chef {
    background: var(--role-chef-bg) !important;
    border-color: var(--role-chef-border) !important;
    color: var(--role-chef-text) !important;
}

.role-cleaner, 
.shift-block.role-cleaner, 
.role-badge.role-cleaner, 
.template-badge.role-cleaner,
.legend-item.role-cleaner,
.role-badge.mini.role-cleaner {
    background: var(--role-cleaner-bg) !important;
    border-color: var(--role-cleaner-border) !important;
    color: var(--role-cleaner-text) !important;
}

.role-owner, 
.shift-block.role-owner, 
.role-badge.role-owner, 
.template-badge.role-owner,
.legend-item.role-owner,
.role-badge.mini.role-owner {
    background: var(--role-owner-bg) !important;
    border-color: var(--role-owner-border) !important;
    color: var(--role-owner-text) !important;
}

/* === LEGEND FILTER BUTTONS === */
.legend-filter-btn {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #495057;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px;
}

.legend-filter-btn:hover {
    background: #e9ecef;
    border-color: #0073aa;
    color: #0073aa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.legend-filter-btn.active {
    background: #0073aa;
    border-color: #0073aa;
    color: white;
    box-shadow: 0 3px 12px rgba(0, 115, 170, 0.3);
    transform: translateY(-2px);
}

.legend-filter-btn[data-role="all"] {
    background: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.legend-filter-btn[data-role="all"]:hover {
    background: #138496;
    border-color: #117a8b;
    color: white;
}

.legend-filter-btn[data-role="all"].active {
    background: #117a8b;
    border-color: #10707f;
    box-shadow: 0 3px 12px rgba(23, 162, 184, 0.3);
}

/* Role-specific filter button colors */
.legend-filter-btn[data-role="bartender"] {
    background: var(--role-bartender-bg);
    border-color: var(--role-bartender-border);
    color: var(--role-bartender-text);
}

.legend-filter-btn[data-role="bartender"]:hover,
.legend-filter-btn[data-role="bartender"].active {
    background: var(--role-bartender-border);
    color: white;
}

.legend-filter-btn[data-role="waiter"] {
    background: var(--role-waiter-bg);
    border-color: var(--role-waiter-border);
    color: var(--role-waiter-text);
}

.legend-filter-btn[data-role="waiter"]:hover,
.legend-filter-btn[data-role="waiter"].active {
    background: var(--role-waiter-border);
    color: white;
}

.legend-filter-btn[data-role="chef"] {
    background: var(--role-chef-bg);
    border-color: var(--role-chef-border);
    color: var(--role-chef-text);
}

.legend-filter-btn[data-role="chef"]:hover,
.legend-filter-btn[data-role="chef"].active {
    background: var(--role-chef-border);
    color: white;
}

.legend-filter-btn[data-role="cleaner"] {
    background: var(--role-cleaner-bg);
    border-color: var(--role-cleaner-border);
    color: var(--role-cleaner-text);
}

.legend-filter-btn[data-role="cleaner"]:hover,
.legend-filter-btn[data-role="cleaner"].active {
    background: var(--role-cleaner-border);
    color: white;
}

.legend-filter-btn[data-role="owner"] {
    background: var(--role-owner-bg);
    border-color: var(--role-owner-border);
    color: var(--role-owner-text);
}

.legend-filter-btn[data-role="owner"]:hover,
.legend-filter-btn[data-role="owner"].active {
    background: var(--role-owner-border);
    color: white;
}

/* === FILTERED OUT CELLS === */
.detailed-cell.filtered-out {
    opacity: 0.3;
    background: #f8f9fa !important;
    transition: all 0.3s ease;
}

.detailed-cell.filtered-out .role-icons {
    opacity: 0.5;
}

/* === SHIFT TEMPLATE STYLES === */
.manual-time-inputs,
.split-shift-inputs,
.break-inputs {
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    background: #f8f9fa;
}

.split-shift-inputs {
    background: #fff3e0;
    border-color: #ff9800;
}

.break-inputs {
    background: #e8f5e8;
    border-color: #4caf50;
}

.split-info,
.break-info {
    margin-top: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    font-style: italic;
}

.template-type {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.template-type.regular {
    background: #e3f2fd;
    color: #1976d2;
}

.template-type.split {
    background: #fff3e0;
    color: #f57c00;
}

.templates-list {
    margin: 25px 0;
}

.templates-list h3 {
    color: #495057;
    font-size: 18px;
    margin-bottom: 15px;
}

.add-template-form {
    background: white;
    padding: 25px;
    margin: 25px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.add-template-form h3 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 18px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.regular-shift-inputs,
.split-shift-inputs {
    transition: all 0.3s ease;
}

.break-options {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #dee2e6;
}

.template-preview {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.template-preview h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 14px;
}

#template-preview-content {
    font-family: monospace;
    background: white;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    min-height: 40px;
    color: #6c757d;
}

.template-preview-hours {
    margin-top: 8px;
    font-weight: 600;
    color: #28a745;
}

.template-preview-split {
    display: flex;
    gap: 15px;
    margin: 5px 0;
}

.template-preview-part {
    flex: 1;
    padding: 8px;
    background: #e3f2fd;
    border-radius: 4px;
    text-align: center;
    font-size: 12px;
}

.template-preview-break {
    margin: 5px 0;
    padding: 5px 10px;
    background: #fff3e0;
    border-radius: 4px;
    text-align: center;
    font-size: 11px;
    color: #f57c00;
}

/* === ENHANCED SHIFT DROPDOWN === */
.enhanced-shift-dropdown {
    position: relative;
}

.enhanced-shift-dropdown select {
    padding-right: 40px;
    min-width: 250px;
}

.enhanced-shift-dropdown .current-template-badge {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 5;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid;
}

.template-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
    margin-left: 5px;
}

/* === SHIFT FORM ENHANCEMENTS === */
.shift-form .form-group label {
    position: relative;
}

.shift-form .form-group label.required:after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

.job-role-selector {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    margin: 15px 0;
}

.job-role-selector label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
}

.job-role-selector select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.job-role-selector small {
    color: #6c757d;
    font-style: italic;
    margin-top: 5px;
    display: block;
}

.template-dropdown-enhanced {
    position: relative;
}

.template-dropdown-enhanced select {
    padding-right: 30px;
}

.template-dropdown-enhanced:after {
    content: "▼";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6c757d;
    font-size: 12px;
}

.shift-template-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* === TIME INPUT ENHANCEMENTS === */
.time-input-group {
    position: relative;
}

.time-input-group input[type="time"] {
    padding-right: 35px;
}

.time-input-helper {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 11px;
    pointer-events: none;
}

.hours-calculator {
    margin-top: 15px;
    padding: 12px;
    background: #e8f5e8;
    border-radius: 6px;
    border-left: 4px solid #28a745;
    display: none;
}

.hours-calculator.visible {
    display: block;
}

.hours-calculator .calculation-details {
    font-size: 12px;
    color: #495057;
    margin-top: 5px;
}

.hours-calculator .total-hours {
    font-size: 16px;
    font-weight: 600;
    color: #28a745;
}

.overnight-indicator {
    color: #6f42c1;
    font-size: 11px;
    font-weight: 600;
    margin-left: 5px;
}

.conflict-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 10px 0;
    color: #856404;
    font-size: 13px;
}

.conflict-warning strong {
    color: #dc3545;
}

/* === QUICK TEMPLATE BUTTONS === */
.quick-templates {
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-template-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #495057;
}

.quick-template-btn:hover {
    background: #e9ecef;
    border-color: #0073aa;
    color: #0073aa;
}

.quick-template-btn.active {
    background: #0073aa;
    border-color: #0073aa;
    color: white;
}

.quick-template-btn.split {
    background: #fff3e0;
    border-color: #ff9800;
    color: #f57c00;
}

.quick-template-btn.split:hover,
.quick-template-btn.split.active {
    background: #ff9800;
    color: white;
}

/* === ADMIN STYLES === */
.roster-admin {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.roster-controls {
    background: #f8f9fa;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

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

.week-selector input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

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

.roster-actions button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s;
}

.roster-actions button:hover {
    background: #005a87;
}

.print-roster {
    background: #6c757d !important;
}

.copy-last-week {
    background: #17a2b8 !important;
    color: white !important;
    border-color: #17a2b8 !important;
}

.copy-last-week:hover {
    background: #138496 !important;
    border-color: #117a8b !important;
}

/* === ROSTER TABLE === */
.roster-table-container {
    overflow-x: auto;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.roster-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 800px;
}

.roster-table th,
.roster-table td {
    border: 1px solid #dee2e6;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

.roster-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 10;
}

.roster-table th.time-col {
    min-width: 150px;
    background: #e9ecef;
}

.roster-table th.day-col {
    min-width: 120px;
    text-align: center;
    font-size: 12px;
    line-height: 1.3;
}

.staff-name-cell {
    background: #f8f9fa;
    min-width: 180px;
    font-size: 13px;
    position: relative;
}

.day-cell {
    min-height: 80px;
    position: relative;
    background: white;
}

.day-cell.drop-hover {
    background: #e3f2fd !important;
    border: 2px dashed #2196f3 !important;
}

/* === SHIFT BLOCKS === */
.shift-block {
    background: #e3f2fd;
    border-radius: 6px;
    padding: 8px;
    margin: 3px 0;
    border-left: 4px solid #2196f3;
    font-size: 11px;
    line-height: 1.4;
    cursor: move;
    position: relative;
    transition: all 0.2s ease;
}

.shift-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.shift-block.dragging {
    opacity: 0.7;
    transform: scale(1.05);
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.shift-block.conflict {
    background: #ffebee !important;
    border-left-color: #f44336 !important;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

.shift-time {
    font-weight: 600;
    color: #333;
}

.shift-role {
    font-size: 10px;
    font-weight: 600;
    margin: 2px 0;
    display: flex;
    align-items: center;
    gap: 3px;
}

.shift-hours {
    font-size: 10px;
    color: #666;
    font-weight: 500;
}

.shift-notes {
    font-size: 10px;
    color: #666;
    font-style: italic;
    margin-top: 2px;
}

.shift-role-indicator {
    background: #ff9800;
    color: white;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 3px;
    margin-top: 2px;
    text-align: center;
    font-weight: 600;
}

.shift-actions {
    position: absolute;
    top: 2px;
    right: 2px;
    opacity: 0;
    transition: opacity 0.2s;
}

.shift-block:hover .shift-actions {
    opacity: 1;
}

.delete-shift {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.delete-shift:hover {
    background: #c82333;
}

/* === ROLE BADGES === */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid;
    line-height: 1;
}

.role-badge.mini {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dee2e6;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* === STATUS BADGES === */
.status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* === CLEAR WEEK BUTTON === */
.clear-week-btn {
    background: #dc3545 !important;
    color: white !important;
    border: 1px solid #dc3545 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    cursor: pointer !important;
    margin-top: 5px !important;
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
    font-weight: 600 !important;
}

.clear-week-btn:hover {
    background: #c82333 !important;
    border-color: #bd2130 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3) !important;
}

.clear-week-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(220, 53, 69, 0.3) !important;
}

/* === HOURS TRACKING === */
.hours-ok {
    color: #28a745;
    font-weight: 600;
}

.hours-warning {
    color: #dc3545;
    font-weight: 600;
}

.shift-count {
    color: #6c757d;
    font-size: 10px;
}

.hours-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.hours-summary h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
}

.hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.staff-hours {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    text-align: center;
}

.staff-hours.overtime {
    border-color: #dc3545;
    background: #fff5f5;
}

.staff-hours.near-max {
    border-color: #ffc107;
    background: #fffbf0;
}

.staff-hours.normal {
    border-color: #28a745;
    background: #f8fff9;
}

.hours-display {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.hours-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin: 8px 0;
    overflow: hidden;
}

.hours-progress {
    height: 100%;
    background: #28a745;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.staff-hours.near-max .hours-progress {
    background: #ffc107;
}

.staff-hours.overtime .hours-progress {
    background: #dc3545;
}

.overtime-notice {
    color: #dc3545;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
}

/* === FORMS === */
.add-shift-form,
.add-staff-form,
.quick-add-shifts {
    background: white;
    padding: 25px;
    margin: 25px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.add-shift-form h3,
.add-staff-form h3,
.quick-add-shifts h3 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 18px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

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

.quick-form-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.multiple-days-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.day-checkboxes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.day-checkboxes label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    cursor: pointer;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    font-size: 13px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.form-group input.error,
.form-group select.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.auto-filled {
    background: #d4edda !important;
    border-color: #28a745 !important;
    transition: all 0.3s ease;
}

/* === STAFF LIST === */
.staff-list {
    margin: 25px 0;
}

.staff-list h3 {
    color: #495057;
    font-size: 18px;
    margin-bottom: 15px;
}

.staff-list .wp-list-table {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* === FRONTEND STYLES === */
.restaurant-roster-frontend {
    max-width: 100%;
    margin: 20px 0;
    font-family: inherit;
}

.roster-mobile-menu {
    display: none;
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 20px;
    width: 100%;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

.roster-mobile-menu:hover {
    background: #005a87;
}

.roster-navigation {
    max-width: 100%;
    width: 100%;
    min-width: 800px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--global-palette1, #f8f9fa);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.roster-navigation button {
    background: var(--global-palette3, #0073aa);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.roster-navigation button:hover {
    background: var(--global-palette4, #005a87);
}

.roster-current-week {
    font-size: 18px;
    font-weight: 600;
    color: var(--global-palette8, #495057);
}

/* === MESSAGES === */
.roster-message {
    padding: 12px 16px;
    margin: 15px 0;
    border-radius: 6px;
    font-weight: 500;
    border-left: 4px solid;
}

.roster-message.success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.roster-message.error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
    font-size: 16px;
}

.loading:before {
    content: "⏳ ";
    margin-right: 8px;
}

/* === COVERAGE VIEW STYLES === */
.coverage-table-container {
    overflow-x: auto;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.coverage-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 1000px;
}

.coverage-table th,
.coverage-table td {
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: center;
    vertical-align: top;
}

.coverage-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 10;
}

.time-header {
    min-width: 80px;
    background: #e9ecef !important;
}

.day-header {
    min-width: 120px;
    font-size: 12px;
    line-height: 1.3;
}

.time-cell {
    background: #f8f9fa;
    font-weight: 600;
    min-width: 80px;
}

.coverage-cell {
    min-height: 60px;
    position: relative;
    padding: 4px;
}

.coverage-excellent {
    background: #d4edda;
    border-color: #28a745;
}

.coverage-good {
    background: #fff3cd;
    border-color: #ffc107;
}

.coverage-minimal {
    background: #f8d7da;
    border-color: #dc3545;
}

.coverage-none {
    background: #f8f9fa;
    border-color: #6c757d;
}

.coverage-summary {
    font-size: 11px;
    line-height: 1.2;
}

.staff-count {
    font-weight: 600;
    margin-bottom: 3px;
}

.role-breakdown {
    margin: 2px 0;
}

.role-count {
    display: block;
    font-size: 10px;
    margin: 1px 0;
}

.staff-names {
    margin-top: 3px;
}

.staff-name {
    font-size: 9px;
    background: rgba(255, 255, 255, 0.8);
    padding: 1px 3px;
    margin: 1px 0;
    border-radius: 2px;
}

.no-coverage {
    color: #6c757d;
    font-style: italic;
    font-size: 10px;
}

.coverage-legend {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.legend-items {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.legend-item {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid;
}

.legend-item.excellent {
    background: #d4edda;
    color: #155724;
}

.legend-item.good {
    background: #fff3cd;
    color: #856404;
}

.legend-item.minimal {
    background: #f8d7da;
    color: #721c24;
}

.legend-item.none {
    background: #e9ecef;
    color: #6c757d;
}

.coverage-alerts {
    margin: 20px 0;
    padding: 15px;
    background: #fff3cd;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
}

.alert-list {
    margin-top: 10px;
}

.alert-item {
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 4px;
    font-size: 13px;
}

.alert-item.warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.alert-item.error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.alert-item.info {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
}

/* === DETAILED COVERAGE === */
.detailed-coverage-legend {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
}

.detailed-coverage-legend h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.detailed-coverage-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.detailed-coverage-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.detailed-coverage-table th,
.detailed-coverage-table td {
    border: 1px solid #dee2e6;
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
}

.detailed-coverage-table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    font-size: 12px;
}

.detailed-cell {
    min-height: 50px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.detailed-cell[data-level="0"] { background: #f8f9fa; }
.detailed-cell[data-level="1"] { background: #fff8e1; }
.detailed-cell[data-level="2"] { background: #e8f5e8; }
.detailed-cell[data-level="3"] { background: #e3f2fd; }

.detailed-cell:hover {
    background: #e3f2fd !important;
    border: 2px solid #0073aa;
}

.role-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

/* Tooltips */
.coverage-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: none;
}

.coverage-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2c3e50;
}

.tooltip-content {
    line-height: 1.4;
}

.role-icon {
    font-size: 14px;
    margin-right: 4px;
}

/* === SUMMARY CARDS === */
.coverage-summary-cards {
    margin: 20px 0;
}

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

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s ease;
}

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

.card-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
}

.card-content h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.card-content p {
    margin: 4px 0 0 0;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

/* === STAFF VIEW ISOLATION === */
.staff-view .detailed-coverage-legend,
.staff-view .coverage-summary-cards,
.staff-view .detailed-coverage-table,
.staff-view .detailed-coverage-container,
.staff-view .coverage-grid-container,
.staff-view .heatmap-container,
.staff-view .coverage-table,
.staff-roster-wrapper .detailed-coverage-legend,
.staff-roster-wrapper .coverage-summary-cards,
.staff-roster-wrapper .detailed-coverage-table,
.staff-roster-wrapper .detailed-coverage-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.staff-view .staff-roster-container,
.staff-view .staff-roster-table,
.staff-view .roster-table-container,
.staff-roster-wrapper .staff-roster-container,
.staff-roster-wrapper .staff-roster-table,
.staff-roster-wrapper .roster-table-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.staff-view .loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
    font-size: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin: 20px 0;
}

.staff-view .loading:before {
    content: "👥 ";
    margin-right: 8px;
}

/* === STAFF MODAL ENHANCEMENTS === */
.staff-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: translateY(0);
}

.filter-options h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.filter-section {
    margin: 20px 0;
}

.filter-section h4 {
    margin-bottom: 10px;
    color: #555;
}

.filter-divider {
    text-align: center;
    margin: 20px 0;
    color: #999;
    font-weight: bold;
}

.filter-section select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-section select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.filter-section select:hover {
    border-color: #0073aa;
}

.filter-actions {
    margin-top: 25px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.button-primary, .button-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.button-staff {
    background: #126724;
    border-radius: 16px;
    color: white;
    padding: 6px 16px;
}

.button-addshift {
    background: #126724;
    border-radius: 16px;
    color: white;
    padding: 6px 16px;
}

.button-secondary {
    background: #f0f0f0;
    color: #333;
}

.roster-filter-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.roster-filter-badge {
    background: #126724;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.filter-button-small {
    padding: 5px 10px;
    font-size: 12px;
    color: #000000;
    border: 1px solid #126724;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
}

.button-small {
    padding: 5px 10px;
    font-size: 12px;
    color: #000000;
    border: 1px solid #126724;
    border-radius: 16px;
    background: #e8e8e8;
    cursor: pointer;
}

/* === TEMPLATE SELECTOR MODAL === */
.template-selector-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.template-selector {
    background: white !important;
    border-radius: 8px !important;
    padding: 0 !important;
    min-width: 300px !important;
    max-width: 90vw !important;
    width: 400px !important;
    max-height: 80vh !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
    margin: 0 !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
}

.template-selector.loading {
    opacity: 0.6 !important;
    pointer-events: none !important;
    position: relative !important;
}

.template-selector.loading::after {
    content: "Loading templates..." !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    z-index: 1 !important;
    white-space: nowrap !important;
}

.template-selector-header {
    background: #f8f9fa !important;
    padding: 15px 20px !important;
    border-bottom: 1px solid #dee2e6 !important;
    border-radius: 8px 8px 0 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1 !important;
}

.template-selector-header h4 {
    margin: 0 !important;
    color: #495057 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

.close-template-selector {
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    line-height: 1 !important;
}

.close-template-selector:hover {
    background: #c82333 !important;
    transform: scale(1.1) !important;
}

.template-selector-content {
    padding: 20px !important;
    max-height: calc(80vh - 80px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.template-selector-content p {
    margin: 0 0 15px 0 !important;
    color: #6c757d !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
}

.template-selector-content::-webkit-scrollbar {
    width: 6px;
}

.template-selector-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.template-selector-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.template-selector-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.template-options {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.template-option {
    background: #f8f9fa !important;
    border: 2px solid #e9ecef !important;
    border-radius: 6px !important;
    padding: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: left !important;
    width: 100% !important;
    font-family: inherit !important;
    font-size: 14px !important;
    display: block !important;
}

.template-option:hover {
    background: #e3f2fd !important;
    border-color: #2196f3 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2) !important;
}

.template-option:active {
    transform: translateY(0) !important;
}

.template-option-header {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 5px !important;
}

.template-icon {
    font-size: 16px !important;
    line-height: 1 !important;
}

.template-name {
    font-weight: 600 !important;
    color: #495057 !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
}

.template-time {
    font-size: 13px !important;
    color: #6c757d !important;
    margin-bottom: 3px !important;
    font-family: monospace !important;
    line-height: 1.2 !important;
}

.template-hours {
    font-size: 12px !important;
    color: #28a745 !important;
    font-weight: 600 !important;
    line-height: 1 !important;
}

/* Prevent body scroll when modal is open */
body.template-modal-open {
    overflow: hidden !important;
}

/* === LOADING UTILITIES === */
.roster-loading-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(255, 255, 255, 0.9) !important;
    z-index: 100000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    backdrop-filter: blur(2px) !important;
}

.roster-loading-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: white !important;
    padding: 30px !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid #e1e5e9 !important;
    max-width: 90vw !important;
    text-align: center !important;
}

.roster-loading-gif {
    width: 64px !important;
    height: 64px !important;
    margin-bottom: 15px !important;
    display: block !important;
    max-width: none !important;
    border: none !important;
}

.roster-loading-spinner {
    font-size: 48px !important;
    margin-bottom: 15px !important;
    animation: spin 1s linear infinite !important;
}

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

.roster-loading-text {
    font-size: 16px !important;
    color: #495057 !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.detailed-coverage-container {
    animation: fadeIn 0.3s ease-out;
}

.detailed-cell {
    transition: all 0.2s ease;
}

.template-fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.manual-time-inputs.slide-in {
    animation: slideInFromTop 0.3s ease-out;
}

.split-shift-inputs.slide-in,
.break-inputs.slide-in {
    animation: slideInFromBottom 0.3s ease-out;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
    .roster-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .week-selector {
        justify-content: center;
    }
    
    .roster-actions {
        justify-content: center;
    }
    
    .hours-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .detailed-coverage-table {
        font-size: 11px;
    }
    
    .detailed-coverage-legend .legend-items {
        gap: 6px;
    }
    
    .legend-filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .roster-mobile-menu {
        display: block;
    }
    
    .roster-controls {
        display: none;
    }
    
    .roster-table {
        font-size: 12px;
        min-width: 600px;
    }
    
    .roster-table th,
    .roster-table td {
        padding: 8px 6px;
    }
    
    .shift-block {
        font-size: 10px;
        padding: 6px;
        margin: 2px 0;
    }
    
    .staff-name-cell {
        min-width: 120px;
        font-size: 12px;
    }
    
    .roster-navigation {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .roster-navigation button {
        width: 100%;
        padding: 12px;
    }
    
    .form-row,
    .quick-form-row {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }
    
    .hours-grid {
        grid-template-columns: 1fr;
    }
    
    .roster-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .roster-actions button {
        width: 100%;
        padding: 12px;
    }
    
    .detailed-coverage-table {
        font-size: 10px;
    }
    
    .detailed-coverage-legend {
        padding: 12px 15px;
    }
    
    .detailed-coverage-legend .legend-items {
        flex-direction: column;
        gap: 6px;
    }
    
    .legend-filter-btn {
        justify-content: center;
        width: 100%;
        padding: 8px 12px;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .summary-card {
        padding: 15px;
    }
    
    .card-content h3 {
        font-size: 20px;
    }

    .staff-modal {
        padding: 10px;
    }
    
    .modal-content {
        padding: 20px;
        max-height: 95vh;
    }
    
    .filter-actions {
        flex-direction: column;
    }

    .template-selector-overlay {
        padding: 10px !important;
    }
    
    .template-selector {
        min-width: 280px !important;
        max-width: 95vw !important;
        max-height: 90vh !important;
    }
    
    .template-selector-header {
        padding: 12px 15px !important;
    }
    
    .template-selector-header h4 {
        font-size: 15px !important;
    }
    
    .template-selector-content {
        padding: 15px !important;
        max-height: calc(90vh - 70px) !important;
    }
    
    .template-option {
        padding: 10px !important;
    }
    
    .template-name {
        font-size: 13px !important;
    }
    
    .template-time {
        font-size: 12px !important;
    }

    .roster-loading-content {
        padding: 20px !important;
        margin: 15px !important;
    }
    
    .roster-loading-gif {
        width: 48px !important;
        height: 48px !important;
        margin-bottom: 12px !important;
    }
    
    .roster-loading-spinner {
        font-size: 36px !important;
        margin-bottom: 12px !important;
    }
    
    .roster-loading-text {
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .add-shift-form,
    .add-staff-form,
    .quick-add-shifts {
        padding: 15px;
        margin: 15px 0;
    }
    
    .shift-block {
        font-size: 9px;
        padding: 4px;
    }
    
    .roster-table th.day-col {
        font-size: 10px;
        min-width: 80px;
    }
    
    .staff-name-cell {
        min-width: 100px;
        font-size: 11px;
    }
    
    .detailed-coverage-legend {
        padding: 10px;
    }
    
    .detailed-coverage-legend h4 {
        font-size: 14px;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .coverage-tooltip {
        font-size: 11px;
        padding: 8px 10px;
    }
    
    .roster-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .roster-actions .button,
    .roster-actions button {
        width: 100%;
    }
    
    .clear-week-btn {
        font-size: 10px !important;
        padding: 3px 6px !important;
    }
    
    .legend-filter-btn {
        font-size: 11px;
        padding: 6px 10px;
    }

    .template-selector {
        min-width: 260px !important;
        max-width: 98vw !important;
    }
    
    .template-selector-header {
        padding: 10px 12px !important;
    }
    
    .template-selector-content {
        padding: 12px !important;
    }
    
    .template-option {
        padding: 8px !important;
    }
    
    .close-template-selector {
        width: 24px !important;
        height: 24px !important;
        font-size: 14px !important;
    }

    .roster-loading-content {
        padding: 15px !important;
        margin: 10px !important;
    }
    
    .roster-loading-gif {
        width: 36px !important;
        height: 36px !important;
        margin-bottom: 10px !important;
    }
    
    .roster-loading-spinner {
        font-size: 28px !important;
        margin-bottom: 10px !important;
    }
    
    .roster-loading-text {
        font-size: 13px !important;
    }
}

/* === TOUCH DEVICES === */
@media (hover: none) and (pointer: coarse) {
    .shift-block {
        padding: 10px;
        margin: 4px 0;
        font-size: 12px;
        touch-action: none;
        user-select: none;
    }
    
    .form-group input,
    .form-group select {
        padding: 12px;
        font-size: 16px;
        min-height: 44px;
    }
    
    .roster-navigation button,
    .roster-actions button {
        min-height: 44px;
        padding: 12px 20px;
    }
    
    .shift-actions {
        opacity: 1;
    }
    
    .delete-shift {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .clear-week-btn {
        min-height: 40px !important;
        font-size: 12px !important;
        padding: 8px !important;
    }
    
    .legend-filter-btn {
        min-height: 44px;
        padding: 10px 16px;
    }
}

/* === ACCESSIBILITY IMPROVEMENTS === */
.form-group input:focus,
.form-group select:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.quick-template-btn:focus,
.legend-filter-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.shift-template-indicator[aria-label] {
    cursor: help;
}

.shift-block:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.clear-week-btn:focus {
    outline: 2px solid #0073aa !important;
    outline-offset: 2px !important;
}

/* === PRINT STYLES === */
@media print {
    .roster-controls,
    .add-shift-form,
    .add-staff-form,
    .quick-add-shifts,
    .roster-navigation,
    .roster-actions,
    .roster-mobile-menu,
    .shift-actions,
    .clear-week-btn,
    .detailed-coverage-legend,
    .legend-filter-btn {
        display: none !important;
    }
    
    .roster-table-container {
        box-shadow: none;
        border: 2px solid #000;
    }
    
    .roster-table {
        border: none;
    }
    
    .roster-table th,
    .roster-table td {
        border: 1px solid #000 !important;
        background: white !important;
        color: black !important;
        font-size: 10px !important;
        padding: 6px !important;
    }
    
    .shift-block {
        background: #f5f5f5 !important;
        border: 1px solid #000 !important;
        color: black !important;
        font-size: 8px !important;
        padding: 4px !important;
        margin: 1px 0 !important;
    }
    
    .hours-summary {
        background: white !important;
        color: black !important;
        border: 1px solid #000 !important;
        page-break-inside: avoid;
    }
    
    .restaurant-roster-frontend {
        margin: 0;
    }
    
    .roster-table-container {
        margin: 0;
    }
    
    .role-badge,
    .template-badge {
        background: #f0f0f0 !important;
        color: black !important;
        border: 1px solid #000 !important;
    }
    
    .staff-view .roster-table-container,
    .staff-roster-wrapper .roster-table-container,
    .staff-roster-container {
        display: block !important;
        visibility: visible !important;
    }
    
    .detailed-coverage-table {
        background: white !important;
        color: black !important;
    }
    
    .detailed-cell {
        background: white !important;
        color: black !important;
    }
    
    .role-badge.mini {
        background: #f0f0f0 !important;
        color: black !important;
        border: 1px solid #000 !important;
    }
}

/* === UNTIL CLOSING STYLES === */
.end-time-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#closing_time_info,
#split_closing_time_info {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 4px;
    border-left: 3px solid #2196f3;
    margin-top: 8px;
}

#closing_time_info small,
#split_closing_time_info small {
    color: #1976d2;
    font-weight: 600;
}

select#end_time_type,
select#split_end_time_type {
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-bottom: 8px;
    background: white;
    cursor: pointer;
}

/* === CLEAR WEEK BUTTON === */
.clear-all-week {
    background: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

.clear-all-week:hover {
    background: #c82333 !important;
    border-color: #bd2130 !important;
}

/* === COPY SPECIFIC WEEK === */
.copy-specific-week {
    background: #17a2b8 !important;
    color: white !important;
    border-color: #17a2b8 !important;
}

.copy-specific-week:hover {
    background: #138496 !important;
    border-color: #117a8b !important;
}

#copy_from_week {
    padding: 7px 12px !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    background: white !important;
    cursor: pointer !important;
}

#copy_from_week:focus {
    outline: none !important;
    border-color: #0073aa !important;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1) !important;
}

/* === MOBILE ROSTER STYLES === */
.restaurant-roster-mobile {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 100%;
    padding: 10px;
}

.mobile-header {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-header h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-filter select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 10px;
    background: white;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
}

.mobile-nav {
    display: flex;
    gap: 10px;
}

.mobile-nav button {
    flex: 1;
    padding: 10px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mobile-nav button:active {
    transform: scale(0.98);
    background: #005a87;
}

.mobile-staff-section {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.mobile-staff-section h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-role {
    font-size: 12px;
    color: #666;
    font-weight: normal;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 12px;
}

.mobile-shift-line {
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px dotted #e1e5e9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-shift-line:last-child {
    border-bottom: none;
}

.mobile-shift-line strong {
    color: #495057;
    min-width: 80px;
}

.no-shifts {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
}

/* === RESPONSIVE IMPROVEMENTS === */
@media (max-width: 768px) {
    .roster-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .roster-actions form {
        display: block !important;
        width: 100%;
    }
    
    .roster-actions button,
    .roster-actions input[type="date"] {
        width: 100%;
        margin-bottom: 5px;
    }
    
    #copy-specific-week-form {
        display: flex !important;
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .restaurant-roster-mobile {
        padding: 5px;
    }
    
    .mobile-header {
        padding: 10px;
    }
    
    .mobile-staff-section {
        padding: 10px;
    }
    
    .mobile-shift-line {
        font-size: 13px;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .mobile-shift-line strong {
        min-width: auto;
    }
}

/* Replace the existing .shift-block.updating styles in roster.css */
.shift-block.updating {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

/* Remove the text-based "Moving..." and use the gif instead */
.shift-block.updating::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    transform: translate(-50%, -50%);
    background: url('running.gif') no-repeat center;
    background-size: contain;
    z-index: 1000;
}

/* Fallback if gif doesn't load */
.shift-block.updating.no-gif::after {
    content: "Moving...";
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    width: auto;
    height: auto;
}

       .mobile-shift-line {
            padding: 5px 0;
            font-size: 14px;
            border-bottom: 1px dotted #e1e5e9;
            color: #000000;
        }

        /* === ENHANCED ROSTER CSS === */

/* Existing CSS stays the same, adding new features below */

/* === HOLIDAY STYLES === */
.holiday-day {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc80 100%) !important;
    color: #e65100 !important;
    font-weight: 600 !important;
    border: 2px solid #ff9800 !important;
    position: relative;
}

.holiday-day::before {
    content: "🎄";
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
    opacity: 0.7;
}

.holiday-indicator {
    color: #e65100 !important;
    font-weight: 600 !important;
    font-size: 10px !important;
    display: block !important;
    margin-top: 2px !important;
    text-align: center !important;
}

.holiday-cell {
    background: linear-gradient(to bottom, #fff8f0 0%, #fff3e0 100%) !important;
    border-left: 4px solid #ff9800 !important;
    position: relative;
}

.holiday-cell::after {
    content: "🎄";
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 14px;
    opacity: 0.3;
    z-index: 1;
}

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

.refresh-holidays-btn {
    background: #ff6f00 !important;
    color: white !important;
    border-color: #ff6f00 !important;
    transition: all 0.3s ease;
}

.refresh-holidays-btn:hover {
    background: #e65100 !important;
    border-color: #bf360c !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.3);
}

/* === VACATION FILTER STYLES === */
.vacation-filter-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e1e5e9;
}

.vacation-filter-section h3 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 18px;
    border-bottom: 2px solid #17a2b8;
    padding-bottom: 8px;
}

.vacation-filter-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 20px;
    align-items: end;
}

.vacation-filter-form .form-group {
    display: flex;
    flex-direction: column;
}

.vacation-filter-form label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    font-size: 13px;
}

.vacation-filter-form select {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    min-width: 200px;
}

.vacation-filter-form select:focus {
    outline: none;
    border-color: #17a2b8;
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1);
}

/* === VACATION SUMMARY STYLES === */
.vacation-summary-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.staff-leave-summary h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.leave-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.stat-item label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.stat-item span {
    font-weight: 700;
    font-size: 16px;
    color: #2c3e50;
}

.hours-used {
    color: #e74c3c !important;
}

.hours-remaining.positive {
    color: #27ae60 !important;
}

.hours-remaining.negative {
    color: #e74c3c !important;
    background: #ffebee;
    padding: 4px 8px;
    border-radius: 4px;
}

.leave-progress-bar {
    width: 100%;
    height: 12px;
    background: #ecf0f1;
    border-radius: 6px;
    overflow: hidden;
    margin: 15px 0;
    position: relative;
}

.leave-progress {
    height: 100%;
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 50%, #f39c12 80%, #e74c3c 100%);
    border-radius: 6px;
    transition: width 0.8s ease-in-out;
    position: relative;
}

.leave-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(255,255,255,0.3) 50%, transparent 51%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.leave-warning {
    background: #fff3cd;
    color: #856404;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
    margin-top: 15px;
    font-weight: 600;
}

/* === ANNUAL LEAVE SETTINGS STYLES === */
.annual-leave-settings {
    background: white;
    padding: 25px;
    margin: 25px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.annual-leave-settings h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.leave-settings-info {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
    margin: 20px 0;
}

.leave-settings-info p {
    margin: 5px 0;
    color: #1976d2;
    font-size: 14px;
}

.current-leave-settings {
    margin: 30px 0;
}

.current-leave-settings h3 {
    color: #495057;
    font-size: 18px;
    margin-bottom: 15px;
}

.add-leave-setting {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-top: 25px;
}

.add-leave-setting h3 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 16px;
    border-bottom: 2px solid #28a745;
    padding-bottom: 8px;
}

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

.leave-setting-form .form-group {
    display: flex;
    flex-direction: column;
}

.leave-setting-form label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    font-size: 13px;
}

.leave-setting-form input {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.leave-setting-form input:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.leave-setting-form small {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
}

.leave-calculation-preview {
    background: white;
    padding: 12px 15px;
    border-radius: 6px;
    border: 2px solid #28a745;
    color: #155724;
    font-size: 14px;
    margin: 15px 0;
    text-align: center;
}

.edit-leave-setting {
    background: #17a2b8 !important;
    color: white !important;
    border-color: #17a2b8 !important;
}

.edit-leave-setting:hover {
    background: #138496 !important;
    border-color: #117a8b !important;
}

/* === ENHANCED VACATION TABLE === */
#vacations-table tbody tr[style*="display: none"] {
    display: none !important;
}

#vacations-table tbody tr {
    transition: all 0.3s ease;
}

#vacations-table tbody tr:hover {
    background: #f8f9fa !important;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Highlight filtered results */
.vacation-filtered #vacations-table tbody tr:not([style*="display: none"]) {
    background: #e8f5e8 !important;
}

/* === MOBILE RESPONSIVENESS === */
@media (max-width: 768px) {
    .vacation-filter-form .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .leave-stats {
        grid-template-columns: 1fr;
    }
    
    .leave-setting-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .holiday-day {
        font-size: 11px !important;
    }
    
    .holiday-indicator {
        font-size: 9px !important;
    }
    
    .holiday-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .refresh-holidays-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .vacation-summary-card {
        padding: 15px;
    }
    
    .stat-item {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .annual-leave-settings {
        padding: 15px;
    }
    
    .leave-settings-info {
        padding: 12px;
    }
    
    .add-leave-setting {
        padding: 15px;
    }
}

/* === ANIMATION ENHANCEMENTS === */
@keyframes holidayGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 152, 0, 0.3); }
    50% { box-shadow: 0 0 15px rgba(255, 152, 0, 0.6); }
}

.holiday-day {
    animation: holidayGlow 3s ease-in-out infinite;
}

@keyframes filterHighlight {
    0% { background: white; }
    50% { background: #e8f5e8; }
    100% { background: white; }
}

.vacation-filtered #vacations-table tbody tr:not([style*="display: none"]) {
    animation: filterHighlight 1s ease-in-out;
}

/* === LOADING STATES === */
.vacation-filter-form .loading {
    opacity: 0.6;
    pointer-events: none;
}

.vacation-filter-form .loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #17a2b8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* === ACCESSIBILITY IMPROVEMENTS === */
.holiday-day:focus,
.holiday-cell:focus,
.refresh-holidays-btn:focus,
#staff-filter:focus,
#year-filter:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* === PRINT STYLES === */
@media print {
    .vacation-filter-section,
    .holiday-controls,
    .refresh-holidays-btn,
    .leave-warning,
    .vacation-filter-form {
        display: none !important;
    }
    
    .holiday-day {
        background: #f0f0f0 !important;
        color: black !important;
        border: 1px solid #000 !important;
    }
    
    .holiday-indicator {
        color: black !important;
    }
    
    .vacation-summary-card {
        background: white !important;
        border: 2px solid #000 !important;
        page-break-inside: avoid;
    }
}

/* === ENHANCED BUTTONS === */
.button-primary,
.button-staff,
.button-addshift {
    transition: all 0.3s ease;
}

.button-primary:hover,
.button-staff:hover,
.button-addshift:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* === STATUS INDICATORS === */
.status-positive {
    color: #27ae60 !important;
    font-weight: 600 !important;
}

.status-negative {
    color: #e74c3c !important;
    font-weight: 600 !important;
}

.status-warning {
    color: #f39c12 !important;
    font-weight: 600 !important;
}

/* === ENHANCED TOOLTIPS === */
.tooltip-enhanced {
    position: relative;
    cursor: help;
}

.tooltip-enhanced::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
}

.tooltip-enhanced::before {
    content: '';
    position: absolute;
    bottom: 117%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2c3e50;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.tooltip-enhanced:hover::after,
.tooltip-enhanced:hover::before {
    opacity: 1;
    visibility: visible;
}

/* === FLEX UTILITIES === */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.flex-column {
    display: flex;
    flex-direction: column;
}

.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

/* Bold Red Holiday Styling */
.day-col.holiday-day {
    background: linear-gradient(135deg, #ffe6e6 0%, #fff0f0 100%) !important;
    border: 2px solid #dc3545 !important;
    position: relative;
}

.holiday-date-text {
    font-weight: 900 !important;
    color: #dc3545 !important;
    font-size: 14px !important;
    text-shadow: 0 1px 2px rgba(220, 53, 69, 0.3);
    display: block;
}

.holiday-name {
    color: #dc3545 !important;
    font-weight: 600 !important;
    font-size: 10px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px !important;
    display: block;
}

/* Holiday cell styling */
.holiday-cell {
    background: linear-gradient(to bottom, #ffe6e6 0%, #fff0f0 100%) !important;
    border-left: 4px solid #dc3545 !important;
    position: relative;
}

.holiday-cell::before {
    content: "🏖️";
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
    opacity: 0.7;
    z-index: 1;
}

/* Holiday header styling - make it more specific */
.roster-table th.day-col.holiday-day {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%) !important;
    border: 2px solid #dc3545 !important;
    color: #dc3545 !important;
    font-weight: bold !important;
}

.roster-table .holiday-date-text {
    font-weight: 900 !important;
    color: #dc3545 !important;
    font-size: 14px !important;
    text-shadow: 0 1px 2px rgba(220, 53, 69, 0.3);
    display: block;
}

.roster-table .holiday-name {
    color: #dc3545 !important;
    font-weight: 600 !important;
    font-size: 10px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px !important;
    display: block;
}

/* Holiday cell styling - make it more specific */
.roster-table .day-cell.holiday-cell {
    background: linear-gradient(to bottom, #ffebee 0%, #ffcdd2 100%) !important;
    border-left: 4px solid #dc3545 !important;
    border-right: 2px solid #dc3545 !important;
    position: relative;
}

.roster-table .day-cell.holiday-cell::before {
    content: "🏖️";
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
    opacity: 0.7;
    z-index: 1;
}

/* Ensure holiday styling overrides all other cell styles */
.roster-table tbody tr .day-cell.holiday-cell {
    background: linear-gradient(to bottom, #ffebee 0%, #ffcdd2 100%) !important;
}

/* Debug class - add this temporarily to see if holidays are being detected */
.holiday-debug {
    background: red !important;
    border: 5px solid yellow !important;
    color: white !important;
}


/* === VACATION INDICATOR STYLES === */
.vacation-indicator {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #4caf50;
    margin: 2px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    box-shadow: 0 1px 3px rgba(76, 175, 80, 0.2);
    animation: vacationGlow 2s ease-in-out infinite;
}

@keyframes vacationGlow {
    0%, 100% { 
        box-shadow: 0 1px 3px rgba(76, 175, 80, 0.2); 
    }
    50% { 
        box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4); 
    }
}

/* Alternative simpler version if you prefer just the icon */
.vacation-indicator.simple {
    background: transparent;
    border: none;
    padding: 2px;
    font-size: 14px;
    box-shadow: none;
    animation: none;
}

/* Make vacation conflicts more visible */
.shift-block.vacation-conflict {
    background: #ffebee !important;
    border-left-color: #f44336 !important;
    border-right: 2px solid #f44336 !important;
    position: relative;
}

.shift-block.vacation-conflict::before {
    content: "⚠️";
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
    z-index: 2;
}

/* === COUNTRY SELECT DROPDOWN STYLES === */
.country-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 300px;
}

.country-select-button {
    width: 100%;
    padding: 8px 30px 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    color: #23282d;
    transition: border-color 0.3s ease;
}

.country-select-button:hover {
    border-color: #0073aa;
}

.country-select-button:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.country-select-button.placeholder {
    color: #999;
}

.country-select-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.3s ease;
    color: #666;
}

.country-select-arrow.open {
    transform: translateY(-50%) rotate(180deg);
}

.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow: hidden;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
}

.country-dropdown.open {
    display: block;
}

.country-search {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.country-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.country-search input:focus {
    outline: none;
    border-color: #0073aa;
}

.country-list {
    max-height: 220px;
    overflow-y: auto;
}

.country-option {
    padding: 8px 10px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.country-option:hover {
    background-color: #f8f9fa;
}

.country-option.selected {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 600;
}

.country-option.highlighted {
    background-color: #0073aa;
    color: white;
}

.check-icon {
    font-size: 14px;
    color: #0073aa;
}

.no-results {
    padding: 15px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Make holiday text red in mobile shortcode */
.restaurant-roster-mobile .mobile-shift-line.holiday-shift,
.restaurant-roster-mobile .mobile-shift-line.holiday-shift * {
    color: #dc3545 !important;
}

/* === ENHANCED LOADING UTILITIES === */
.roster-loading-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(255, 255, 255, 0.95) !important;
    z-index: 100000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    backdrop-filter: blur(3px) !important;
    animation: fadeIn 0.3s ease-in-out !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.roster-loading-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: white !important;
    padding: 40px !important;
    border-radius: 15px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    border: 2px solid #e1e5e9 !important;
    max-width: 90vw !important;
    text-align: center !important;
    animation: slideIn 0.4s ease-out !important;
}

@keyframes slideIn {
    from { 
        transform: translateY(-20px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.roster-running-gif {
    width: 66px !important;
    height: 66px !important;
    margin-bottom: 20px !important;
    display: block !important;
    max-width: none !important;
    border: none !important;
    border-radius: 8px !important;
    /* Add a subtle glow effect */
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.3) !important;
}

.roster-loading-spinner {
    font-size: 48px !important;
    margin-bottom: 20px !important;
    animation: bounce 1.5s ease-in-out infinite !important;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.roster-loading-text {
    font-size: 18px !important;
    color: #2c3e50 !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    letter-spacing: 0.5px !important;
}

/* Loading states for specific elements */
.loading-spinner {
    animation: spin 1s linear infinite !important;
    display: inline-block !important;
}

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

/* Template selector loading state */
.template-selector.loading {
    opacity: 0.6 !important;
    pointer-events: none !important;
    position: relative !important;
}

.template-selector.loading::after {
    content: "⏳" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 24px !important;
    animation: spin 1s linear infinite !important;
    z-index: 1000 !important;
}

/* Form loading states */
.vacation-filter-form.loading {
    opacity: 0.7 !important;
    pointer-events: none !important;
}

.vacation-filter-form.loading button {
    opacity: 0.5 !important;
}

/* Roster display loading state */
.roster-display .loading {
    text-align: center !important;
    padding: 60px 20px !important;
    font-size: 18px !important;
    color: #6c757d !important;
    font-weight: 500 !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-radius: 8px !important;
    margin: 20px 0 !important;
    border: 2px dashed #dee2e6 !important;
    position: relative !important;
}

.roster-display .loading::before {
    content: "🔄" !important;
    display: block !important;
    font-size: 32px !important;
    margin-bottom: 15px !important;
    animation: spin 2s linear infinite !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .roster-loading-content {
        padding: 30px 20px !important;
        margin: 20px !important;
    }
    
    .roster-running-gif {
        width: 50px !important;
        height: 50px !important;
        margin-bottom: 15px !important;
    }
    
    .roster-loading-text {
        font-size: 16px !important;
    }
    
    .roster-loading-spinner {
        font-size: 36px !important;
        margin-bottom: 15px !important;
    }
}

/* Ensure loading overlay appears above everything */
.roster-loading-overlay {
    z-index: 999999 !important;
}

/* Additional loading states for buttons */
button.loading {
    position: relative !important;
    color: transparent !important;
}

button.loading::after {
    content: "⏳" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: #333 !important;
    animation: spin 1s linear infinite !important;
}

/* ENHANCED DELETE BUTTON FIX */
.shift-actions {
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
    z-index: 1001 !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease !important;
    pointer-events: auto !important;
}

.shift-block:hover .shift-actions {
    opacity: 1 !important;
}

.delete-shift {
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 18px !important;
    height: 18px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

.delete-shift:hover {
    background: #c82333 !important;
    transform: scale(1.1) !important;
}

/* Touch devices - always show */
@media (hover: none) and (pointer: coarse) {
    .shift-actions {
        opacity: 1 !important;
    }
    
    .delete-shift {
        width: 28px !important;
        height: 28px !important;
        font-size: 14px !important;
    }
}

/* Desktop - show on hover */
@media (hover: hover) and (pointer: fine) {
    .shift-actions {
        opacity: 0 !important;
    }
    
    .shift-block:hover .shift-actions {
        opacity: 1 !important;
    }
}