/* Search-name highlight: high contrast (yellow) */
.my-name-highlight {
    color: #0f172a !important;
    font-weight: 800 !important;
    background: #facc15;
    padding: 0.08em 0.28em;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(202, 138, 4, 0.45);
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* App color palette */
:root {
    --app-blue-900: #0d1e3d;
    --app-blue-800: #1a3a6f;
    --app-blue-700: #2563eb;
    --app-blue-600: #3b82f6;
    --app-blue-500: #60a5fa;
    --app-blue-400: #93c5fd;
    --app-blue-300: #bfdbfe;
    --app-blue-100: #dbeafe;
    --app-blue-50: #eff6ff;
    
    --app-gray-900: #111827;
    --app-gray-800: #1f2937;
    --app-gray-700: #374151;
    --app-gray-600: #4b5563;
    --app-gray-500: #6b7280;
    --app-gray-400: #9ca3af;
    --app-gray-300: #d1d5db;
    --app-gray-200: #e5e7eb;
    --app-gray-100: #f3f4f6;
    --app-gray-50: #f9fafb;
    
    --app-green-600: #16a34a;
    --app-green-500: #22c55e;
    --app-red-600: #dc2626;
    --app-red-500: #ef4444;
    --app-yellow-500: #eab308;
    
    --app-green-accent: #2ca01c;
    --app-green-accent-dark: #1e7a0f;
    
    --app-accent-blue: #0073ea;
    --app-accent-blue-dark: #0056b3;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
    background: var(--app-gray-50);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: var(--app-gray-50);
    color: var(--app-gray-900);
    line-height: 1.6;
    text-transform: uppercase;
    overflow: hidden; /* Prevent double scrollbars */
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden; /* Key: prevent body scroll */
}

/* Header Styles – dark blue */
.app-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: var(--shadow-md);
    z-index: 100;
    flex-shrink: 0; /* Don't let header shrink */
}

.app-header .app-title span {
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.app-title {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    display: block;
    max-width: 320px;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.app-title .icon {
    font-size: 1.75rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Header lock column button: icon + label (ensure lock icon is visible) */
.app-header .lock-columns-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: white;
}
.app-header .lock-columns-btn svg {
    flex-shrink: 0;
    display: block;
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.date-input {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
}

.date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* Header: who's viewing the board */
.header-viewers-wrap {
    position: relative;
    display: inline-block;
}
.header-viewers-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s;
}
.header-viewers-trigger:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}
.header-viewers-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.header-viewers-label {
    white-space: nowrap;
}
.header-viewers-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    max-width: 280px;
    max-height: 280px;
    overflow-y: auto;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--app-gray-200);
    z-index: 1000;
    padding: 0.5rem 0;
}
.header-viewers-dropdown-title {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--app-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.header-viewers-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.header-viewers-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: var(--app-gray-800);
}
.header-viewers-list li::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--app-green-500);
    flex-shrink: 0;
}
.header-viewers-list li.you::before {
    background: var(--app-blue-500);
}

/* User profile dropdown in header */
.user-profile-wrap {
    position: relative;
    display: inline-block;
}
.user-profile-access-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    pointer-events: none;
    opacity: 0;
    z-index: 1;
}
.user-profile-wrap.has-access-request .user-profile-access-indicator {
    opacity: 1;
    animation: access-request-flash 1.5s ease-in-out infinite;
}
@keyframes access-request-flash {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    }
    50% {
        opacity: 0.85;
        box-shadow: 0 0 12px 4px rgba(34, 197, 94, 0.8);
    }
}
.user-profile-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background 0.2s;
}
.user-profile-trigger:hover {
    background: rgba(255, 255, 255, 0.35);
}
.user-profile-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.user-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-profile-initials {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}
.user-profile-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--app-gray-200);
    z-index: 1000;
    padding: 0.5rem 0;
}
.user-profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--app-gray-100);
}
.user-profile-dropdown-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    background: var(--app-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.user-profile-dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-profile-dropdown-initials {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--app-gray-600);
    text-transform: uppercase;
}
.user-profile-dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.user-profile-dropdown-name {
    font-weight: 600;
    color: var(--app-gray-900);
    font-size: 0.95rem;
}
.user-profile-dropdown-role {
    font-size: 0.8rem;
    color: var(--app-gray-500);
}
.user-profile-dropdown-actions {
    padding: 0.25rem 0;
}
.user-profile-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    font-size: 0.9rem;
    color: var(--app-gray-700);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
    text-decoration: none;
    box-sizing: border-box;
}
.user-profile-dropdown-item:hover {
    background: var(--app-gray-100);
}
.user-profile-dropdown-item-danger {
    color: var(--app-red-600);
}
.user-profile-dropdown-item-danger:hover {
    background: #fef2f2;
}

/* Button Styles */
.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

a.btn {
    text-decoration: none;
    color: inherit;
}

.btn-primary {
    background: white;
    color: var(--app-blue-700);
}

.btn-primary:hover {
    background: var(--app-gray-100);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Fix button text color in schedule header (white background) */
.schedule-header .btn-secondary {
    background: var(--app-gray-100);
    color: var(--app-gray-900);
    border: 1px solid var(--app-gray-300);
}

.schedule-header .btn-secondary:hover {
    background: var(--app-gray-200);
    color: var(--app-gray-900);
}

/* Clear Board button: distinct color (amber/warning) */
.btn-clear-board {
    background: #d97706;
    color: white;
    border: 1px solid #b45309;
}
.btn-clear-board:hover {
    background: #b45309;
    color: white;
    border-color: #92400e;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1.2rem;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Figma-style: consistent icon size in buttons/links (SVG) */
.btn-icon-svg {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-icon-svg svg {
    width: 100%;
    height: 100%;
}
.btn-icon .btn-icon-svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Main Content Layout */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden; /* Critical: prevents double scroll */
    position: relative;
    min-height: 0; /* Important for flex children */
}

/* Types Sidebar (Left) */
.types-sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid var(--app-gray-200);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
    z-index: 5;
    flex-shrink: 0;
}

.sidebar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--app-gray-200);
    background: var(--app-gray-50);
}

.sidebar-icon-btn {
    background: transparent;
    border: 1px solid var(--app-gray-300);
    border-radius: 4px;
    padding: 0.4rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-icon-btn:hover {
    background: var(--app-gray-100);
    border-color: var(--app-gray-400);
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--app-gray-700);
}

.sidebar-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.view-selector {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--app-gray-200);
    background: white;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

.view-icon-btn {
    background: transparent;
    border: 2px solid var(--app-gray-300);
    border-radius: 6px;
    padding: 0.75rem;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.view-icon-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.view-icon-btn .truck-trailer-icon-md {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.view-icon-btn .view-icon-svg {
    width: 100%;
    height: 100%;
    display: block;
}
.view-icon-btn .view-icon-svg svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.view-icon-btn:hover {
    background: var(--app-gray-50);
    border-color: var(--app-blue-500);
}

.view-icon-btn.active {
    background: var(--app-blue-100);
    border-color: var(--app-blue-600);
    color: var(--app-blue-700);
}

.types-section {
    flex: 1;
    padding: 0.75rem;
    background: white;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.types-search {
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.crew-off-badge {
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
.crew-off-badge:not([data-count="0"]) {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.types-employees-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow-y: auto;
}

.types-employees-list .employee-card {
    width: 100%;
    margin: 0;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    border-width: 1px;
    cursor: grab;
}

.types-employees-list .employee-card .employee-card-header {
    gap: 0.5rem;
    margin-bottom: 0;
}

.types-section .on-board-indicator {
    margin-left: auto;
    color: #16a34a;
    font-size: 0.9rem;
    font-weight: bold;
    flex-shrink: 0;
}

.types-employees-list .employee-card .employee-initials {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.types-employees-list .employee-card .employee-name {
    font-size: 0.85rem;
}

.types-employees-list .employee-card .employee-delete-btn {
    padding: 0.15rem;
    font-size: 0.85rem;
}

.types-employees-list .employee-card:hover {
    transform: translateY(-1px);
}

.types-employees-list .employee-card.dragging {
    opacity: 0.6;
    transform: scale(0.95);
}

/* Schedule Fluid: employees grouped by type (Tower, Civil, Other) */
.types-employees-by-type {
    gap: 0.75rem;
}
.employee-type-section {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.employee-type-section-heading {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--app-gray-600);
    padding: 0.2rem 0;
    border-bottom: 1px solid var(--app-gray-300);
}
.employee-type-section[data-type="Tower"] .employee-type-section-heading { color: var(--app-blue-700); }
.employee-type-section[data-type="Civil"] .employee-type-section-heading { color: var(--app-orange-700, #c2410c); }
.employee-type-section[data-type="Tower Maintenance"] .employee-type-section-heading { color: #2563eb; }
.employee-type-section[data-type="DC"] .employee-type-section-heading { color: #6366f1; }
.employee-type-section[data-type="Inspections"] .employee-type-section-heading { color: #0d9488; }
.employee-type-section[data-type="Dedicated Crew - Tower"] .employee-type-section-heading { color: #1d4ed8; }
.employee-type-section[data-type="Other"] .employee-type-section-heading { color: var(--app-gray-600); }
.employee-type-section[data-type="Subcontractors"] .employee-type-section-heading { color: var(--app-gray-700); }
.employee-type-section[data-type="Time off"] .employee-type-section-heading { color: #b91c1c; }
.subcontractors-empty-state {
    font-size: 0.85rem;
    color: var(--app-gray-500);
    padding: 1rem 0.5rem;
    text-align: center;
}
.employee-type-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--app-gray-600);
}
.employee-card .employee-info .employee-type-label[data-type="Tower"] { color: var(--app-blue-600); }
.employee-card .employee-info .employee-type-label[data-type="Civil"] { color: var(--app-orange-600, #ea580c); }
.employee-card .employee-info .employee-type-label[data-type="Inspections"] { color: #0d9488; }
.employee-card .employee-info .employee-type-label[data-type="Other"] { color: var(--app-gray-500); }

.manager-card .manager-card-delete-btn {
    margin-left: auto;
    flex-shrink: 0;
    padding: 0.2rem 0.35rem;
    font-size: 1rem;
    line-height: 1;
}

.manager-card {
    transition: all 0.2s ease;
}

.manager-card:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.no-managers-message {
    padding: 2rem;
    text-align: center;
    color: var(--app-gray-600);
    font-size: 0.9rem;
}

.types-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.type-category {
    border: 1px solid var(--app-gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.type-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--app-gray-100);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.search-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 6px;
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--app-blue-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Schedule Section - CRITICAL FIX */
.schedule-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Key: prevent double scroll */
    background: var(--app-gray-50);
}
.schedule-section > * {
    min-width: 0; /* Important for flex */
    min-height: 0; /* Important for flex */
}

/* Job Schedule Header */
.job-schedule-header {
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: 1px solid var(--app-gray-200);
    flex-shrink: 0; /* Don't let this shrink */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.job-schedule-header .job-schedule-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--app-gray-900);
}

.job-schedule-header .job-nav-numbers {
    flex: 1;
    min-width: 12rem;
}

.job-schedule-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--app-gray-900);
}

.global-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* Multi-select crew category chips (schedule board) */
.schedule-category-bar {
    flex-basis: 100%;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.35rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--app-gray-200);
}

.schedule-category-bar-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--app-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 0.25rem;
}

.schedule-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 999px;
    background: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--app-gray-800);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.schedule-category-chip:hover {
    border-color: var(--app-blue-400);
}

.schedule-category-chip.is-active {
    border-color: var(--app-blue-600);
    background: rgba(37, 99, 235, 0.08);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.schedule-category-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.schedule-category-clear {
    margin-left: 0.25rem;
    padding: 0.35rem 0.6rem;
    border: none;
    border-radius: 6px;
    background: var(--app-gray-100);
    color: var(--app-gray-700);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
}

.schedule-category-clear:hover {
    background: var(--app-gray-200);
}

.filter-dropdown {
    padding: 0.5rem 1rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

.filter-dropdown:hover {
    border-color: var(--app-blue-500);
}

.filter-dropdown:focus {
    outline: none;
    border-color: var(--app-blue-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-checkboxes {
    display: flex;
    gap: 1rem;
}

.filter-checkboxes label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.date-picker-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-picker-filter label {
    font-weight: 500;
    font-size: 0.9rem;
}

/* ============================================
   CRITICAL SCROLLING FIX - SCHEDULING BOARD
   ============================================ */

/* Main container for scheduling board */
.scheduling-board-container {
    flex: 1; /* Take remaining space */
    display: flex;
    flex-direction: column;
    min-height: 0; /* Critical for flex scrolling */
    overflow: hidden; /* Prevent container from scrolling */
    background: white;
}

/* Top navigation bar - sticky at top */
.scheduling-board-container .top-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: linear-gradient(180deg, #fafbfc 0%, #f1f3f5 100%);
    flex-shrink: 0;
    border-bottom: 1px solid var(--app-gray-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Grid toolbar - clean icon-first layout */
.grid-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Toolbar base button */
.grid-toolbar .toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    background: transparent;
    color: var(--app-gray-700);
}

.grid-toolbar .toolbar-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--app-gray-300);
}

.grid-toolbar .toolbar-btn.active {
    background: var(--app-blue-100);
    border-color: #2563eb;
    color: #2563eb;
}

.grid-toolbar .toolbar-btn.active .toolbar-icon {
    color: #2563eb;
}

/* Select mode button: green when active + flashing glow */
@keyframes select-mode-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5), 0 0 8px 2px rgba(22, 163, 74, 0.25);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.35), 0 0 14px 4px rgba(22, 163, 74, 0.4);
    }
}

#selectModeBtn.active {
    background: #dcfce7;
    border-color: var(--app-green-600);
    color: var(--app-green-600);
    animation: select-mode-glow 1.5s ease-in-out infinite;
}

#selectModeBtn.active .toolbar-icon {
    color: var(--app-green-600);
}

.grid-toolbar .toolbar-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

/* Toolbar SVGs: explicit size and display so icons always render (not as empty boxes) */
.grid-toolbar .toolbar-icon {
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    min-height: 1.25rem;
    flex-shrink: 0;
    display: block;
    stroke: currentColor;
    fill: none;
}

.grid-toolbar .toolbar-btn .toolbar-icon {
    color: inherit;
}

/* Lock icons in toolbar: ensure visible (open/closed toggled by script) */
.grid-toolbar .lock-icon-open,
.grid-toolbar .lock-icon-closed {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Icon-only toolbar buttons */
.grid-toolbar .toolbar-btn-icon {
    padding: 0.5rem;
    min-width: 36px;
}

.grid-toolbar .toolbar-btn-icon .toolbar-icon {
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    min-height: 1.25rem;
}

/* Week navigation group – prev/next with current week label */
.week-nav-group {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.25rem 0;
    background: var(--app-gray-50);
    border: 1px solid var(--app-gray-200);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}
.week-nav-group .week-nav-btn {
    padding: 0.5rem 0.6rem;
    border: none;
    background: transparent;
    color: var(--app-gray-600);
}
.week-nav-group .week-nav-btn:hover {
    background: var(--app-gray-100);
    color: var(--app-blue-600);
}
.week-nav-group .week-nav-btn:first-child {
    border-radius: 8px 0 0 8px;
}
.week-nav-group .week-nav-btn:last-child {
    border-radius: 0 8px 8px 0;
}
.week-nav-label {
    min-width: 13rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--app-gray-800);
    text-align: center;
    border-left: 1px solid var(--app-gray-200);
    border-right: 1px solid var(--app-gray-200);
    white-space: nowrap;
}
.week-nav-label.is-current-week {
    color: var(--app-blue-700);
}

/* Job nav numbers – jump to job row 1–30 (in Job Schedule section), 15 per row */
.job-nav-numbers {
    display: grid;
    grid-template-columns: repeat(15, 1.6rem);
    gap: 0.25rem;
    align-items: center;
    padding: 0.35rem 0;
}
.job-nav-num-btn {
    width: 1.6rem;
    height: 1.6rem;
    min-width: 1.6rem;
    padding: 0;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid var(--app-gray-200);
    border-radius: 4px;
    background: var(--app-gray-50);
    color: var(--app-gray-700);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.job-nav-num-btn:hover {
    background: var(--app-blue-100);
    border-color: var(--app-blue-400);
    color: var(--app-blue-700);
}
.schedule-board-table tbody tr.job-row-highlight td {
    position: relative;
}
.schedule-board-table tbody tr.job-row-highlight td::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(37, 99, 235, 0.45);
    pointer-events: none;
    z-index: 10;
    animation: job-row-highlight-flash 2s ease-out forwards;
}
@keyframes job-row-highlight-flash {
    0%, 85% { opacity: 1; }
    100% { opacity: 0; }
}

/* Toolbar divider */
.toolbar-divider {
    width: 1px;
    height: 1.5rem;
    background: var(--app-gray-300);
    margin: 0 0.25rem;
    flex-shrink: 0;
}

/* Lock button with icon + label */
.grid-toolbar .toolbar-btn-with-label .toolbar-btn-text {
    white-space: nowrap;
}

/* Primary action buttons (Show all, Apply) */
.grid-toolbar .toolbar-btn-primary {
    background: var(--app-blue-600);
    color: white;
    border-color: var(--app-blue-600);
}

.grid-toolbar .toolbar-btn-primary:hover {
    background: var(--app-blue-700);
    border-color: var(--app-blue-700);
    color: white;
}

.grid-toolbar .toolbar-btn-primary .toolbar-icon {
    color: white;
}

/* Danger button (Clear board) */
.grid-toolbar .toolbar-btn-danger {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.grid-toolbar .toolbar-btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: white;
}

.grid-toolbar .toolbar-btn-danger .toolbar-icon {
    color: white;
}

.toolbar-search {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 6px;
    font-size: 0.9rem;
}

.toolbar-search:focus {
    outline: none;
    border-color: var(--app-blue-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Table wrapper - THE SCROLLING CONTAINER */
.table-wrapper {
    flex: 1; /* Take all remaining space */
    overflow-x: auto; /* Allow horizontal scroll */
    overflow-y: auto; /* Allow vertical scroll */
    min-height: 0; /* Critical for flex children */
    position: relative;
    background: white;
    scroll-behavior: smooth;
}

/* Floating scroll arrows – very subtle until hover */
.board-scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(44, 62, 80, 0.18);
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    opacity: 0.35;
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.board-scroll-arrow:hover,
.board-scroll-arrow:focus-visible {
    opacity: 1;
    background: rgba(44, 62, 80, 0.92);
    color: white;
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.board-scroll-arrow:active {
    transform: translateY(-50%) scale(0.98);
}
.board-scroll-arrow svg {
    flex-shrink: 0;
}
.board-scroll-arrow-left {
    left: 280px; /* Past Job details column, closer to scrollable date area */
}
.board-scroll-arrow-right {
    right: 0.5rem;
}

/* The actual table */
.schedule-board-table {
    width: 100%;
    min-width: fit-content; /* Allow table to expand beyond viewport */
    border-collapse: separate; /* Changed from collapse for better sticky */
    border-spacing: 0;
    table-layout: auto;
}

/* Sticky table header – must stack above tbody when both have sticky cells */
.schedule-board-table thead {
    position: sticky;
    top: 0; /* Stick to top of scroll container */
    z-index: 20;
    background-color: #2c3e50;
    color: white;
}
.schedule-board-table tbody {
    position: relative;
    z-index: 0;
}

/* Add shadow to header to show it's floating */
.schedule-board-table thead::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.schedule-board-table thead th {
    padding: 0.75rem 0.6rem;
    font-weight: 600;
    font-size: 0.8rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
    background-color: #2c3e50; /* Ensure background color */
}

.schedule-board-table tbody td {
    padding: 0.15rem;
    border: 1px solid var(--app-gray-200);
    vertical-align: top;
    background: white;
    box-sizing: border-box;
}

.schedule-board-table tbody tr {
    min-height: 0;
}

.schedule-board-table tbody tr:nth-child(even) td {
    background: #fafafa;
}

.schedule-board-table tbody tr:hover td {
    background: #f5f5f5;
}

/* Date column body cells: visible neutral gradient + black-tint shadow (matches job board day cells) */
.schedule-board-table tbody td.date-col:not(.date-col-cancelled-weather):not(.date-col-today) {
    position: relative;
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #f8fafc 42%,
        #eef2f7 100%
    );
    border-color: rgba(15, 23, 42, 0.14);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 1px 2px rgba(0, 0, 0, 0.06),
        0 4px 12px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.05);
}

.schedule-board-table tbody td.date-col.date-col-past:not(.date-col-cancelled-weather):not(.date-col-today) {
    background: linear-gradient(
        180deg,
        #f9fafb 0%,
        #f3f4f6 48%,
        #e9ecef 100%
    );
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        0 2px 4px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.1);
}

.schedule-board-table tbody td.date-col.date-col-today:not(.date-col-cancelled-weather) {
    position: relative;
    isolation: isolate;
    overflow: visible;
    background: linear-gradient(
        180deg,
        rgba(96, 165, 250, 0.42) 0%,
        rgba(59, 130, 246, 0.32) 28%,
        rgba(37, 99, 235, 0.38) 100%
    );
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 2px 8px rgba(37, 99, 235, 0.28);
}

.schedule-board-table tbody td.date-col.date-col-today:not(.date-col-cancelled-weather) .day-cell-structured,
.schedule-board-table tbody td.date-col.date-col-today:not(.date-col-cancelled-weather) .job-column.job-column-split {
    min-width: 0;
}

.schedule-board-table tbody td.date-col.date-col-today:not(.date-col-cancelled-weather) .job-number-input {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    max-width: 100%;
}

.schedule-board-table tbody tr:nth-child(even) td.date-col:not(.date-col-cancelled-weather):not(.date-col-today) {
    background: linear-gradient(
        180deg,
        #fafbfc 0%,
        #f1f5f9 42%,
        #e8edf2 100%
    );
}

.schedule-board-table tbody tr:nth-child(even) td.date-col.date-col-past:not(.date-col-cancelled-weather):not(.date-col-today) {
    background: linear-gradient(
        180deg,
        #f5f5f5 0%,
        #eceef2 48%,
        #e5e7eb 100%
    );
}

.schedule-board-table tbody tr:hover td.date-col:not(.date-col-cancelled-weather):not(.date-col-today) {
    background: linear-gradient(
        180deg,
        #f9fafb 0%,
        #f1f5f9 100%
    );
}

.schedule-board-table tbody tr:hover td.date-col.date-col-past:not(.date-col-cancelled-weather):not(.date-col-today) {
    background: linear-gradient(180deg, #f3f4f6 0%, #e8eaec 100%);
}

.schedule-board-table tbody tr:hover td.date-col.date-col-today:not(.date-col-cancelled-weather) {
    background: linear-gradient(
        180deg,
        rgba(96, 165, 250, 0.48) 0%,
        rgba(59, 130, 246, 0.36) 28%,
        rgba(37, 99, 235, 0.42) 100%
    );
}

/* Cell inner content: fill cell and contain overflow */
.schedule-board-table tbody td .job-column,
.schedule-board-table tbody td .additional-column,
.schedule-board-table tbody td .daily-column {
    width: 100%;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
}

/* Day cell: Manager (top), Trucks, Trailers, Crew – compact */
.schedule-board-table .day-cell-structured {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    padding: 0.35rem 0.4rem 0.45rem;
}

/* Three-dot menu: Copy, Paste, Save team config */
.schedule-board-table .day-cell-actions-wrap {
    position: absolute;
    top: 0.1rem;
    right: 0.2rem;
    z-index: 10;
}
.schedule-board-table .day-cell-actions-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: none;
    border-radius: 3px;
    background: transparent;
    color: var(--app-gray-600);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}
.schedule-board-table .day-cell-actions-btn:hover {
    background: var(--app-gray-200);
    color: var(--app-gray-800);
}
.schedule-board-table .day-cell-actions-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.1rem;
    min-width: 10rem;
    padding: 0.25rem 0;
    background: #fff;
    border: 1px solid var(--app-gray-300);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.schedule-board-table .day-cell-actions-dropdown[hidden] {
    display: none;
}
.schedule-board-table .day-cell-actions-item {
    display: block;
    width: 100%;
    padding: 0.35rem 0.75rem;
    border: none;
    background: none;
    font-size: 0.75rem;
    text-align: left;
    cursor: pointer;
    color: var(--app-gray-800);
}
.schedule-board-table .day-cell-actions-item:hover:not(:disabled) {
    background: var(--app-gray-100);
}
.schedule-board-table .day-cell-actions-item:disabled {
    color: var(--app-gray-400);
    cursor: not-allowed;
}
.schedule-board-table .day-cell-actions-sep {
    height: 1px;
    margin: 0.25rem 0.5rem;
    background: var(--app-gray-200);
}
.schedule-board-table .day-cell-actions-item-saved {
    font-size: 0.7rem;
}

/* Day cell selected state: blue selection ring + show add bar */
.schedule-board-table .day-cell-structured.day-cell-selected {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}
.schedule-board-table .day-cell-add-bar {
    display: none;
    flex-wrap: wrap;
    gap: 0.2rem;
    align-items: center;
    padding: 0.2rem 0;
    border-bottom: 1px solid var(--app-gray-200);
    margin-bottom: 0.15rem;
}
.schedule-board-table .day-cell-structured.day-cell-selected .day-cell-add-bar {
    display: flex;
}
.schedule-board-table .day-cell-add-btn {
    padding: 0.2rem 0.45rem;
    font-size: 0.7rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 4px;
    background: #fff;
    color: var(--app-gray-700);
    cursor: pointer;
    white-space: nowrap;
}
.schedule-board-table .day-cell-add-btn:hover {
    background: var(--app-gray-100);
    border-color: #2563eb;
    color: #2563eb;
}
.schedule-board-table .day-cell-add-dropdown {
    position: absolute;
    z-index: 100;
    min-width: 10rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.25rem 0;
    background: #fff;
    border: 1px solid var(--app-gray-300);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.schedule-board-table .day-cell-add-dropdown[hidden] {
    display: none !important;
}
.schedule-board-table .day-cell-add-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.schedule-board-table .day-cell-add-list-grouped {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.schedule-board-table .day-cell-add-section {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.schedule-board-table .day-cell-add-section-heading {
    padding: 0.4rem 0.75rem 0.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--app-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--app-gray-50);
    border-bottom: 1px solid var(--app-gray-200);
    flex-shrink: 0;
}
.schedule-board-table .day-cell-add-section-items {
    /* No scroll - single scroll on parent dropdown */
}
.schedule-board-table .day-cell-add-item {
    display: block;
    width: 100%;
    padding: 0.35rem 0.75rem;
    border: none;
    background: none;
    font-size: 0.75rem;
    text-align: left;
    cursor: pointer;
    color: var(--app-gray-800);
}
.schedule-board-table .day-cell-add-item:hover {
    background: var(--app-gray-100);
}
.schedule-board-table .day-cell-add-item.day-cell-add-item-selected {
    background: #dcfce7;
    color: #166534;
    font-weight: 600;
}
.schedule-board-table .day-cell-add-item.day-cell-add-item-selected:hover {
    background: #bbf7d0;
}

.schedule-board-table .day-cell-manager-row,
.schedule-board-table .day-cell-construction-manager-row,
.schedule-board-table .day-cell-lead-project-assistant-row,
.schedule-board-table .day-cell-trucks-row,
.schedule-board-table .day-cell-trailers-row,
.schedule-board-table .day-cell-crew-row {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    column-gap: 0.28rem;
    row-gap: 0.12rem;
}
/* PJ Manager + Con Manager on one line — centered in the cell */
.schedule-board-table .day-cell-pj-con-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 0.15rem 0.25rem;
    width: 100%;
    min-width: 0;
}
.schedule-board-table .day-cell-pj-con-row .day-cell-manager-row,
.schedule-board-table .day-cell-pj-con-row .day-cell-construction-manager-row {
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(50% - 0.125rem);
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 0.22rem;
}
/* Visual break between “job identity” (number / client / site) and staffing rows */
.schedule-board-table .day-cell-job-info ~ .day-cell-pj-con-row {
    margin-top: 0.15rem;
    padding-top: 0.3rem;
    border-top: 1px solid rgba(148, 163, 184, 0.45);
}
.schedule-board-table .day-cell-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--app-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    min-width: 0;
    max-width: 9rem;
    line-height: 1.2;
    align-self: center;
    justify-self: start;
}
.schedule-board-table .day-cell-manager-slot {
    min-height: 18px;
    min-width: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.08rem 0.2rem;
    border-radius: 3px;
    border: 1px dashed var(--app-gray-300);
    background: var(--app-gray-50);
    cursor: copy;
    justify-self: start;
    width: fit-content;
    max-width: 100%;
}
.schedule-board-table .day-cell-manager-slot.drag-over {
    border-color: var(--app-blue-500);
    background: var(--app-blue-50);
}
.schedule-board-table .day-cell-manager-placeholder {
    color: var(--app-gray-400);
    font-size: 0.7rem;
}
.schedule-board-table .day-cell-manager-pill {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.06rem 0.25rem;
    border-radius: 3px;
    background: var(--app-blue-500);
    color: white;
    cursor: pointer;
}
.schedule-board-table .day-cell-construction-manager-slot {
    min-height: 18px;
    min-width: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.08rem 0.2rem;
    border-radius: 3px;
    border: 1px dashed var(--app-gray-300);
    background: var(--app-gray-50);
    cursor: copy;
    justify-self: start;
    width: fit-content;
    max-width: 100%;
}
.schedule-board-table .day-cell-construction-manager-slot.drag-over,
.schedule-board-table .day-cell-lead-project-assistant-slot.drag-over {
    border-color: var(--app-blue-500);
    background: var(--app-blue-50);
}
.schedule-board-table .day-cell-lead-project-assistant-slot {
    min-height: 18px;
    min-width: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    justify-self: start;
    width: fit-content;
    max-width: 100%;
}
.schedule-board-table .day-cell-lead-project-assistant-placeholder {
    color: var(--app-gray-400);
    font-size: 0.7rem;
}
.schedule-board-table .day-cell-lead-project-assistant-pill {
    font-size: 0.7rem;
    font-weight: 700;
}
.schedule-board-table .day-cell-construction-manager-placeholder {
    color: var(--app-gray-400);
    font-size: 0.7rem;
}
.schedule-board-table .day-cell-construction-manager-pill {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.06rem 0.25rem;
    border-radius: 3px;
    background: var(--app-blue-500);
    color: white;
    cursor: pointer;
}
.schedule-board-table .day-cell-weather-wrap {
    position: absolute;
    top: 0.15rem;
    right: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1;
    pointer-events: none;
}
.schedule-board-table .day-cell-weather-icon {
    font-size: 1rem;
}
.schedule-board-table .day-cell-weather-temp {
    font-size: 0.75rem;
    color: #000;
    font-weight: 500;
}
.schedule-board-table .day-cell-trucks-row,
.schedule-board-table .day-cell-trailers-row {
    gap: 0.2rem;
    min-height: 0;
    flex-shrink: 0;
}
.schedule-board-table .day-cell-trucks-row .day-cell-label,
.schedule-board-table .day-cell-trailers-row .day-cell-label {
    min-width: 2rem;
}
.schedule-board-table .day-cell-trucks,
.schedule-board-table .day-cell-trailers {
    flex: 1 1 auto;
    min-height: 18px;
    min-width: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.15rem;
    align-items: center;
    padding: 0.06rem 0.15rem;
    border-radius: 3px;
    border: 1px dashed var(--app-gray-300);
    background: var(--app-gray-50);
    justify-self: start;
    width: fit-content;
    max-width: 100%;
}
.schedule-board-table .day-cell-trucks .scheduled-truck,
.schedule-board-table .day-cell-trailers .scheduled-trailer {
    display: inline-flex;
    align-items: center;
    gap: 0.12rem;
    padding: 0.06rem 0.22rem;
    border-radius: 3px;
    font-size: 0.58rem;
    font-weight: 600;
    color: white;
    margin: 0.04rem 0.08rem 0.04rem 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    flex-shrink: 0;
}
.schedule-board-table .day-cell-trucks .scheduled-truck .remove-btn,
.schedule-board-table .day-cell-trailers .scheduled-trailer .remove-btn {
    width: 10px;
    height: 10px;
    font-size: 0.5rem;
    padding: 0;
    min-width: 10px;
    min-height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.schedule-board-table .day-cell-trucks.drag-over,
.schedule-board-table .day-cell-trailers.drag-over {
    border-radius: 4px;
    border: 1px dashed var(--app-blue-400);
    background: var(--app-blue-50);
}
.schedule-board-table .day-cell-trailer-add-input {
    width: 2.2rem;
    min-width: 2.2rem;
    font-size: 0.6rem;
    padding: 0.08rem 0.2rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 3px;
}
.schedule-board-table .day-cell-trucks:has(.scheduled-truck) .day-cell-crew-empty-hint,
.schedule-board-table .day-cell-trailers:has(.scheduled-trailer) .day-cell-crew-empty-hint {
    display: none;
}
.schedule-board-table .day-cell-truck-trailer-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}
.schedule-board-table .day-cell-field {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.schedule-board-table .day-cell-field .day-cell-label {
    min-width: auto;
}
.schedule-board-table .day-cell-input {
    width: 3.5rem;
    max-width: 4rem;
    font-size: 0.7rem;
    padding: 0.2rem 0.3rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 4px;
}
.schedule-board-table .day-cell-crew-row {
    align-items: flex-start;
    gap: 0.2rem;
    min-height: 0;
}
.schedule-board-table .day-cell-crew {
    flex: 1;
    min-height: 32px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.12rem;
    align-items: center;
    align-content: flex-start;
}
/* Smaller crew pills so at least 8 fit */
.schedule-board-table .day-cell-crew .scheduled-employee,
.schedule-board-table .day-cell-crew .worker-card {
    padding: 0.04rem 0.14rem;
    font-size: 0.52rem;
    gap: 0.08rem;
    margin: 0.02rem 0.06rem 0.02rem 0;
}
.schedule-board-table .day-cell-crew .scheduled-employee .remove-btn,
.schedule-board-table .day-cell-crew .worker-card .remove-btn {
    width: 8px;
    height: 8px;
    min-width: 8px;
    min-height: 8px;
    font-size: 0.45rem;
}
.schedule-board-table .day-cell-crew-empty-hint {
    font-size: 0.65rem;
    color: var(--app-gray-500);
    font-style: italic;
    pointer-events: none;
}
.schedule-board-table .worker-cards-container:has(.scheduled-employee) .day-cell-crew-empty-hint,
.schedule-board-table .worker-cards-container:has(.worker-card) .day-cell-crew-empty-hint {
    display: none;
}

.schedule-board-table tbody td select {
    max-width: 100%;
    min-width: 0;
}

.schedule-board-table tbody td input[type="text"],
.schedule-board-table tbody td input[type="number"] {
    max-width: 100%;
    box-sizing: border-box;
}

/* ====================================
   STICKY LEFT COLUMNS (Job Number & State)
   ==================================== */

/* Fixed left: Job Number column */
.schedule-board-table .job-number-col {
    position: sticky;
    left: 0;
    background: white;
    z-index: 5;
}

/* Add shadow to show it's floating */
.schedule-board-table .job-number-col::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 0;
    bottom: 0;
    width: 4px;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.schedule-board-table thead .job-number-col {
    background-color: #2c3e50;
    z-index: 15; /* Higher than body cells */
}

.schedule-board-table .date-col-header,
.schedule-board-table .additional-col-header {
    white-space: nowrap;
}

/* Table layout: fixed so colgroup controls column widths (resizable) */
.schedule-board-table {
    table-layout: fixed;
}

.schedule-board-table thead th {
    position: relative;
}

.schedule-board-resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: col-resize;
    z-index: 10;
}

.schedule-board-resize-handle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.schedule-board-table .job-number-col .schedule-board-resize-handle:hover,
.schedule-board-table .date-col-header .schedule-board-resize-handle:hover,
.schedule-board-table .additional-col-header .schedule-board-resize-handle:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Column widths: min-width only so columns can be resized via colgroup */
.schedule-board-table .job-number-col {
    min-width: 150px;
}

.schedule-board-table .date-col,
.schedule-board-table .date-col-header {
    min-width: 80px;
}

.schedule-board-table .date-col-header {
    white-space: normal; /* allow "Cancel due to weather condition" label on second line */
    vertical-align: top;
    text-align: center;
}

.schedule-board-table .day-weather-icon {
    cursor: pointer;
}

.schedule-board-table .day-weather-icon:hover {
    opacity: 0.9;
}

/* Past days: same gray as Job details header; no edits allowed */
.schedule-board-table .date-col-header.date-col-header-past {
    background-color: #2c3e50 !important;
    color: rgba(255, 255, 255, 0.95) !important;
}
.schedule-board-table .date-col-header-past .date-col-header-lock {
    display: inline-flex;
    align-items: center;
    margin-left: 0.25rem;
    color: var(--app-gray-400);
    vertical-align: middle;
}
/* Coming (future) days: blue highlight */
.schedule-board-table .date-col-header.date-col-header-future {
    background: linear-gradient(180deg, #1e40af 0%, #1e3a8a 100%) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}
.schedule-board-table td.date-col-past {
    /* no blue highlight */
}
.schedule-board-table .day-cell-past-locked {
    position: relative;
    /* no blue background */
}
/* Only crew / manager / truck / trailer tags in past-day cells become gray; current/future days unchanged */
.schedule-board-table .day-cell-past-locked .day-cell-manager-pill,
.schedule-board-table .day-cell-past-locked .day-cell-construction-manager-pill,
.schedule-board-table .day-cell-past-locked .day-cell-lead-project-assistant-pill,
.schedule-board-table .day-cell-past-locked .day-cell-trucks .scheduled-truck,
.schedule-board-table .day-cell-past-locked .day-cell-trailers .scheduled-trailer,
.schedule-board-table .day-cell-past-locked .day-cell-crew .scheduled-employee {
    background: var(--app-gray-400) !important;
    color: var(--app-gray-100) !important;
    border-color: var(--app-gray-500);
}
.schedule-board-table .day-cell-past-lock {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 1.5rem; /* shift lock up a bit */
    background: transparent;
    color: var(--app-gray-500);
    pointer-events: auto;
}
.schedule-board-table .day-cell-past-lock svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}
.grid-header-date-past {
    background-color: #2c3e50 !important;
    color: rgba(255, 255, 255, 0.95) !important;
}
.grid-header-lock {
    display: inline-flex;
    align-items: center;
    margin-left: 0.2rem;
    color: var(--app-gray-400);
    vertical-align: middle;
}
.grid-header-date-future {
    background: linear-gradient(180deg, #1e40af 0%, #1e3a8a 100%) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Date header column: today – polished blue highlight */
.schedule-board-table .date-col-header.date-col-header-today {
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 28%, #2563eb 100%) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 8px rgba(37, 99, 235, 0.35);
    position: relative;
}
.schedule-board-table .date-col-header.date-col-header-today::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    pointer-events: none;
}
.schedule-board-table .date-col-header.date-col-header-today .day-header-label,
.schedule-board-table .date-col-header.date-col-header-today .day-weather-icon,
.schedule-board-table .date-col-header.date-col-header-today .day-weather-temp {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Date header column when that day was cancelled due to weather */
.schedule-board-table .date-col-header.date-col-header-cancelled-weather {
    background-color: #4a2c2c !important;
}

/* Label when day was cancelled due to weather (from weather page) - in date header */
.schedule-board-table .date-col-header .cancel-due-to-weather-label {
    display: block !important;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #f0a0a0;
    line-height: 1.2;
    visibility: visible !important;
    opacity: 1 !important;
}

/* TD: whole column cell when that day is cancelled due to weather */
.schedule-board-table td.date-col-cancelled-weather {
    background-color: #fde8e8;
}

/* Day cell inner: cancelled due to weather (label inside cell in red) */
.schedule-board-table .day-cell-cancelled-weather {
    background: #fde8e8;
}

.schedule-board-table .day-cell-cancelled-weather .day-cell-cancelled-weather-label {
    color: #b03030;
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0.35rem 0;
    padding: 0.25rem 0;
    display: block !important;
    width: 100%;
    flex-shrink: 0;
    visibility: visible !important;
}

.schedule-board-table .additional-col-td,
.schedule-board-table .additional-col-header {
    min-width: 80px;
}

/* Job details: header stays fixed when scrolling horizontally and vertically (top-left corner) */
.schedule-board-table .left-fixed-col-header {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 25;
    background-color: #2c3e50;
    min-width: 100px;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.08);
}
.schedule-board-table .left-fixed-col-td {
    position: sticky;
    left: 0;
    z-index: 15;
    background-color: white;
    border-right: 2px solid var(--app-gray-200);
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.06);
    overflow: visible;
}
.schedule-board-table .left-fixed-col-td.sow-dropdown-open-td {
    z-index: 80;
}
.schedule-board-table tbody tr:nth-child(even) .left-fixed-col-td {
    background-color: #fafafa;
}
.schedule-board-table tbody tr:hover .left-fixed-col-td {
    background-color: #f5f5f5;
}

/* Office column: compact dropdown showing only selected value (e.g. CH), not long list */
.schedule-board-table .left-fixed-col-td .additional-column {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
}
/* Combined Office Shift hours + Scope of Work column */
.schedule-board-table .left-fixed-col-td .office-hours-scope-column {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.35rem 0.4rem;
    min-height: 2.5rem;
}
.schedule-board-table .office-hours-scope-section {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.schedule-board-table .office-hours-scope-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #475569;
}
.schedule-board-table .office-hours-scope-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.schedule-board-table .office-hours-scope-row .office-select-compact {
    flex: 0 0 auto;
}
.schedule-board-table .office-hours-scope-row .hours-input {
    flex: 1;
    min-width: 2.5rem;
}
.schedule-board-table .office-hours-scope-row.shift-times-row {
    margin-top: 0.25rem;
    gap: 0.35rem 0.75rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}
.schedule-board-table .shift-time-group {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    min-width: 0;
    width: max-content;
    max-width: 100%;
}
.schedule-board-table .shift-time-group .office-hours-scope-shift-label {
    flex: 0 0 auto;
    min-width: 0;
    max-width: 2.75rem;
    text-align: left;
}
.schedule-board-table .office-hours-scope-shift-label {
    font-size: 0.7rem;
    color: #64748b;
}
.schedule-board-table .shift-time-group .shift-time-input {
    flex: 0 0 auto;
    width: 5.25rem;
    min-width: 4.5rem;
    max-width: 6rem;
    font-size: 0.75rem;
}
.schedule-board-table .office-hours-scope-section .sow-cell {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.schedule-board-table .office-hours-scope-section .sow-cell.sow-dropdown-open {
    z-index: 200;
}
.schedule-board-table .office-hours-scope-section .sow-list-wrap {
    position: absolute;
    left: 0;
    right: auto;
    min-width: min(100%, 220px);
    width: max(100%, 180px);
    max-width: min(320px, 90vw);
}
.schedule-board-table .office-hours-scope-section .sow-display {
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
}
.schedule-board-table .left-fixed-col-td .office-select-compact {
    width: auto;
    min-width: 3.5rem;
    max-width: 100%;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    text-align: center;
}
.schedule-board-table .left-fixed-col-td .additional-input {
    width: auto;
    min-width: 3rem;
    max-width: 100%;
    text-align: center;
}
.schedule-board-table .left-fixed-col-td .hours-input {
    min-width: 3.5rem;
    font-weight: 500;
}

/* Job number cell: clear vertical stack so it doesn't break */
.schedule-board-table .job-column.job-column-split {
    padding: 0.5rem 0.6rem;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: stretch;
}

.schedule-board-table .job-column.job-column-split .job-number-input {
    min-height: 28px;
    padding: 0.25rem 0.4rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 0.85rem;
}

.schedule-board-table .job-column.job-column-split .job-number-input:hover {
    background: var(--app-gray-50);
}

.schedule-board-table .job-column.job-column-split .job-number-input:focus {
    outline: 2px solid var(--app-blue-600);
    background: var(--app-blue-50);
}

.schedule-board-table .job-column.job-column-split .job-zip-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.schedule-board-table .job-column.job-column-split .job-zip-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--app-gray-600);
    flex-shrink: 0;
}

.schedule-board-table .job-column.job-column-split .job-zip-input {
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
    padding: 0.2rem 0.35rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 4px;
}

.schedule-board-table .job-column.job-column-split .job-city-state-row {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--app-gray-700);
}

/* Job number/zip/client inside day cell: compact so it doesn't dominate the cell */
.schedule-board-table .day-cell-job-info {
    min-height: 0;
    padding: 0.4rem 0.45rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: stretch;
}

.schedule-board-table .day-cell-job-info .job-number-input {
    min-height: 22px;
    font-size: 0.78rem;
}

.schedule-board-table .day-cell-job-info .job-client-name-row {
    display: grid;
    grid-template-columns: auto minmax(3.5rem, 1fr) auto minmax(3.5rem, 1fr);
    align-items: center;
    column-gap: 0.22rem;
    row-gap: 0.2rem;
}

.schedule-board-table .day-cell-job-info .job-client-name-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--app-gray-600);
    flex-shrink: 0;
}

.schedule-board-table .day-cell-job-info .job-client-select {
    font-size: 0.78rem;
    min-height: 22px;
    padding: 0.2rem 0.35rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 4px;
    background: var(--app-white, #fff);
    min-width: 0;
    width: 100%;
    max-width: none;
}

.schedule-board-table .day-cell-job-info .job-site-name-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--app-gray-600);
    flex-shrink: 0;
    margin-left: 0;
    padding-left: 0.35rem;
}

.schedule-board-table .day-cell-job-info .job-site-name-input {
    font-size: 0.78rem;
    min-height: 22px;
    padding: 0.2rem 0.35rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 4px;
    min-width: 0;
    width: 100%;
}

.schedule-board-table .day-cell-job-info .job-site-name-input::placeholder {
    color: var(--app-gray-400);
}

.schedule-board-table .day-cell-job-info .job-site-name-input:focus {
    outline: 2px solid var(--app-blue-600);
    border-color: var(--app-blue-600);
}

.schedule-board-table .day-cell-job-info .job-zip-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.schedule-board-table .day-cell-job-info .job-zip-input {
    flex: 0 1 5.5rem;
    min-width: 4.5rem;
    max-width: 6rem;
}
.schedule-board-table .day-cell-job-info .job-city-state-row {
    margin-left: auto;
    font-size: 0.72rem;
    white-space: nowrap;
}

/* Per-cell weather (by job zip): top-right but left of the three-dots button; button opens weather page */
.schedule-board-table .day-cell-weather {
    position: absolute;
    top: 0.25rem;
    right: 1.75rem; /* leave space for .day-cell-actions-btn (1.25rem) + gap */
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.35rem;
    font-size: 0.75rem;
    color: var(--app-gray-700);
    background: transparent;
    border: none;
    border-radius: 4px;
    min-height: 0;
    cursor: pointer;
    font-family: inherit;
}

.schedule-board-table .day-cell-weather:hover {
    color: var(--app-blue-600);
}

.schedule-board-table .day-cell-weather:focus {
    outline: 2px solid var(--app-blue-600);
    outline-offset: 2px;
}

.schedule-board-table .day-cell-weather-icon {
    font-size: 1rem;
    line-height: 1;
}

.schedule-board-table .day-cell-weather-temp {
    font-weight: 600;
    color: var(--app-gray-800);
}

/* Worker cards container: horizontal layout, wrap */
.schedule-board-table .worker-cards-container.daily-column {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.2rem;
    padding: 0.2rem;
    min-height: 0;
    align-items: center;
    align-content: flex-start;
}

/* Individual worker cards - compact size on schedule board */
.schedule-board-table .daily-column .scheduled-employee,
.schedule-board-table .worker-card {
    display: inline-flex;
    align-items: center;
    gap: 0.12rem;
    padding: 0.06rem 0.22rem;
    border-radius: 3px;
    font-size: 0.58rem;
    font-weight: 600;
    color: white;
    cursor: grab;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
    margin: 0.04rem 0.08rem 0.04rem 0;
}

.schedule-board-table .daily-column .scheduled-employee .remove-btn,
.schedule-board-table .worker-card .remove-btn {
    width: 10px;
    height: 10px;
    font-size: 0.5rem;
    padding: 0;
    min-width: 10px;
    min-height: 10px;
}

.schedule-board-table .daily-column .scheduled-employee:hover,
.schedule-board-table .worker-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.schedule-board-table .daily-column .scheduled-employee:active,
.schedule-board-table .worker-card:active {
    cursor: grabbing;
}

.schedule-board-table .daily-column .scheduled-employee.dragging,
.schedule-board-table .worker-card.dragging {
    opacity: 0.5;
}

.schedule-board-table .daily-column .scheduled-employee span,
.schedule-board-table .worker-card span {
    font-size: inherit;
    line-height: 1.2;
}

/* Job Schedule Grid */
.job-schedule-grid {
    display: grid;
    grid-template-columns: 300px 200px repeat(7, 180px);
    gap: 0;
    background: var(--app-gray-300);
    border: 1px solid var(--app-gray-300);
    min-width: fit-content;
}

.job-column {
    background: white;
    padding: 0.5rem 0.4rem;
    border: 1px solid var(--app-gray-200);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: text;
}

/* Job column split: job #, zip, city, state */
.job-column-split {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.35rem;
    cursor: default;
}

.job-column-split .job-number-input {
    font-weight: 700;
    font-size: 0.9rem;
    min-height: 28px;
    padding: 0.25rem 0.35rem;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: text;
}

.job-column-split .job-number-input:hover {
    background: var(--app-gray-50);
}

.job-column-split .job-number-input:focus {
    outline: 2px solid var(--app-blue-600);
    outline-offset: -2px;
    background: var(--app-blue-50);
}

.job-zip-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.job-zip-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--app-gray-600);
    flex-shrink: 0;
}

.job-zip-input {
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
    padding: 0.2rem 0.35rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 4px;
}

.job-zip-input:focus {
    outline: none;
    border-color: var(--app-blue-600);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.job-city-state-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: var(--app-gray-700);
}

.job-city-value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.job-state-value {
    font-weight: 600;
    flex-shrink: 0;
}

.job-column.editable-cell {
    cursor: text;
    min-height: 32px;
    padding: 0.5rem 0.4rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.job-column.editable-cell:hover {
    background: var(--app-gray-50);
}

.job-column.editable-cell:focus {
    outline: 2px solid var(--app-blue-600);
    outline-offset: -2px;
    background: var(--app-blue-50);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.job-column.editable-cell:empty:before {
    content: attr(data-placeholder);
    color: var(--app-gray-400);
    font-style: italic;
}

.job-expand {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--app-gray-600);
    padding: 0.25rem;
}

.metrics-column {
    background: white;
    padding: 0.75rem;
    border: 1px solid var(--app-gray-200);
    font-size: 0.85rem;
}

.daily-column {
    background: white;
    padding: 0.4rem;
    border: 1px solid var(--app-gray-200);
    min-height: 60px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    overflow: visible;
}

/* Smaller employee badges inside daily columns */
.daily-column .scheduled-employee {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    margin: 0.05rem 0.1rem 0.05rem 0;
    gap: 0.25rem;
}

.daily-column .scheduled-employee .remove-btn {
    width: 14px;
    height: 14px;
    font-size: 0.65rem;
}

.additional-column {
    background: white;
    padding: 0.5rem;
    border: 1px solid var(--app-gray-200);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
}

.additional-column.droppable-cell {
    flex-wrap: wrap;
    gap: 0.3rem;
    overflow: visible;
}

.additional-column.editable-cell {
    cursor: text;
    min-height: 32px;
    padding: 0.5rem 0.4rem;
}

.additional-select,
.additional-input {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Scope of Work - scrollable select */
.sow-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    position: relative;
    min-height: 32px;
}
.sow-display {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    color: #374151;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sow-display:hover {
    color: var(--app-blue-600);
}
.sow-trigger {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid var(--app-gray-300);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 0.65rem;
    line-height: 1;
    color: #6b7280;
}
.sow-trigger:hover {
    background: var(--app-gray-100);
    color: #111827;
}
.sow-list-wrap {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 2px;
    z-index: 100;
    background: #fff;
    border: 1px solid var(--app-gray-300);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 280px;
    overflow-y: auto;
}
.sow-list-wrap.sow-list-wrap-portal {
    border-radius: 10px;
    border-color: rgba(148, 163, 184, 0.7);
    box-shadow:
        0 18px 40px rgba(2, 6, 23, 0.25),
        0 6px 16px rgba(2, 6, 23, 0.16);
    overflow: hidden;
}
.sow-list-wrap.sow-list-wrap-portal .sow-list {
    max-height: inherit;
}
.sow-list-wrap.sow-list-wrap-portal .sow-list-header {
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.9), rgba(191, 219, 254, 0.65));
    border-bottom-color: rgba(147, 197, 253, 0.75);
}
.sow-list-wrap[hidden] {
    display: none;
}
.sow-list {
    padding: 0.25rem 0;
}
.sow-list-header {
    padding: 0.35rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #374151;
    background: #e0f2fe;
    border-bottom: 1px solid #bae6fd;
    position: sticky;
    top: 0;
    z-index: 1;
}
.sow-list-item {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    color: #111827;
    border-bottom: 1px solid #f3f4f6;
}
.sow-list-item:hover {
    background: #eff6ff;
    color: var(--app-blue-700);
}
.sow-list-item:last-child {
    border-bottom: none;
}

/* Employee Sidebar (Right) */
.employee-sidebar {
    width: 300px;
    background: white;
    border-left: 1px solid var(--app-gray-200);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, width 0.3s ease;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.employee-sidebar.collapsed {
    width: 0;
    transform: translateX(100%);
    overflow: hidden;
}

.sidebar-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--app-gray-200);
    background: var(--app-gray-50);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.preferred-crew-sidebar .sidebar-subtitle {
    font-size: 0.8rem;
    color: var(--app-gray-600);
    padding: 0.5rem 1rem 0;
    margin: 0;
    border-bottom: 1px solid var(--app-gray-200);
    line-height: 1.3;
}

.employee-search {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--app-gray-200);
}

.employee-search .search-input {
    width: 100%;
}

.employee-search .search-input:focus {
    outline: none;
    border-color: var(--app-blue-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.employee-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Employee Card */
.employee-card {
    background: white;
    border: 2px solid var(--app-gray-200);
    border-radius: 8px;
    padding: 1rem;
    cursor: grab;
    transition: all 0.2s;
    user-select: none;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.employee-card:hover {
    border-color: var(--app-blue-500);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.employee-card:active {
    cursor: grabbing;
}

.employee-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.employee-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.employee-initials {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
}

.employee-info {
    flex: 1;
    min-width: 0;
}

.employee-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--app-gray-900);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-details {
    font-size: 0.8rem;
    color: var(--app-gray-600);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.employee-dept {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    background: var(--app-gray-100);
    color: var(--app-gray-700);
    width: fit-content;
}

.employee-delete-btn {
    background: transparent;
    border: none;
    color: var(--app-red-500);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 1rem;
}

.employee-delete-btn:hover {
    background: var(--app-red-100);
    color: var(--app-red-600);
}

/* Drag states */
.employee-card.drag-over {
    border-color: var(--app-blue-600);
    background: var(--app-blue-50);
}

.daily-column.drag-over {
    background: var(--app-blue-50);
    outline: 2px dashed var(--app-blue-600);
    outline-offset: -2px;
}

.state-cell.highlight,
.additional-column.highlight {
    background: #fff9c4 !important;
}

.state-cell.highlight-weather,
.additional-column.highlight-weather {
    background: #f5f5f5 !important;
}

.state-cell.highlight-break,
.additional-column.highlight-break {
    background: #fff3e0 !important;
}

/* Scheduled Employee in Grid */
.scheduled-employee {
    background: var(--app-blue-500);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    margin: 0.1rem 0.2rem 0.1rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: grab;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.scheduled-employee:active {
    cursor: grabbing;
}

.scheduled-employee.dragging {
    opacity: 0.5;
}

.scheduled-employee:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.daily-column .scheduled-employee:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.scheduled-employee span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheduled-employee .remove-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.scheduled-employee:hover .remove-btn {
    opacity: 1;
}

.scheduled-employee .remove-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Multiple employees in a cell - display inline */
.grid-cell {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.3rem;
    flex-direction: row;
    overflow-x: visible;
    overflow-y: hidden;
    min-width: fit-content;
}

/* Ensure dropdowns and inputs still work in cells with employees */
.grid-cell select,
.grid-cell input {
    flex-shrink: 0;
    min-width: 60px;
}

/* When cell has employees, adjust layout */
.grid-cell:has(.scheduled-employee) {
    align-items: flex-start;
    padding-top: 0.35rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--app-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--app-gray-50);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--app-gray-900);
}

.modal-close {
    color: var(--app-gray-600);
}

.modal-close:hover {
    color: var(--app-gray-900);
    background: var(--app-gray-200);
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--app-gray-700);
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--app-blue-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--app-gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: var(--app-gray-50);
}

.modal-hint {
    font-size: 0.9rem;
    color: var(--app-gray-600);
    margin-bottom: 1rem;
}

.group-edit-checklist {
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.group-edit-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.35rem 0;
}

.group-edit-checkbox-label input {
    width: auto;
}

/* Preferred Crew group cards */
.crew-group-card {
    position: relative;
    padding-right: 2.5rem;
}

.crew-group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.crew-group-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--app-gray-900);
}

.crew-group-count {
    font-size: 0.75rem;
    color: var(--app-gray-500);
}

.crew-group-members {
    font-size: 0.8rem;
    color: var(--app-gray-600);
    margin-bottom: 0.25rem;
}

.crew-group-edit-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.9rem;
    padding: 0.25rem;
}

/* State dropdown cell */
.state-cell {
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.state-select {
    width: 100%;
    padding: 0.35rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 4px;
    font-size: 0.85rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.state-select:hover {
    border-color: var(--app-blue-500);
}

.state-select:focus {
    outline: none;
    border-color: var(--app-blue-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Dropdown cells (Crew SOW, Office) */
.dropdown-cell {
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-select {
    width: 100%;
    padding: 0.35rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 4px;
    font-size: 0.85rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.dropdown-select:hover {
    border-color: var(--app-blue-500);
}

.dropdown-select:focus {
    outline: none;
    border-color: var(--app-blue-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Date cell input */
.date-cell {
    padding: 0.25rem;
}

.date-cell-input {
    width: 100%;
    padding: 0.35rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
}

.date-cell-input:focus {
    outline: none;
    border-color: var(--app-blue-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Number input cell */
.number-cell {
    padding: 0.25rem;
}

.number-input {
    width: 100%;
    padding: 0.35rem;
    border: 1px solid var(--app-gray-300);
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
}

.number-input:focus {
    outline: none;
    border-color: var(--app-blue-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--app-gray-100);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--app-gray-400);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--app-gray-500);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .employee-sidebar {
        width: 240px;
    }
    
    .schedule-grid {
        grid-template-columns: 350px 110px 110px 110px 110px 250px 140px 220px 180px 110px 110px 140px 220px 220px 350px 140px;
        font-size: 0.75rem;
    }
    
    .grid-header {
        font-size: 0.75rem;
        padding: 0.5rem 0.35rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .employee-sidebar {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--app-gray-200);
    }
    
    .employee-list {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
    }
    
    .employee-card {
        min-width: 200px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }
}

/* Empty State */
.empty-schedule-cell {
    color: var(--app-gray-400);
    font-size: 0.8rem;
    text-align: center;
    padding: 1rem;
    font-style: italic;
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--app-gray-500);
}

/* Populate to next Thursday modal (Friday paste) */
.populate-next-thursday-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.populate-next-thursday-overlay.populate-modal-visible {
    opacity: 1;
    visibility: visible;
}
.populate-next-thursday-modal {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.populate-next-thursday-overlay.populate-modal-visible .populate-next-thursday-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}
.populate-next-thursday-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    animation: populate-bounce 0.6s ease;
}
@keyframes populate-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
.populate-next-thursday-modal h3 {
    font-size: 1.25rem;
    color: var(--app-gray-900);
    margin-bottom: 0.5rem;
    text-align: center;
}
.populate-next-thursday-text {
    font-size: 0.95rem;
    color: var(--app-gray-600);
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.5;
}
.populate-next-thursday-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}
.populate-next-thursday-actions .btn {
    min-width: 140px;
}
.populate-next-thursday-actions .btn-secondary {
    background: var(--app-gray-100);
    color: var(--app-gray-900);
    border: 1px solid var(--app-gray-300);
}
.populate-next-thursday-actions .btn-secondary:hover {
    background: var(--app-gray-200);
    color: var(--app-gray-900);
}

/* Paste week set modal – job section selector */
.paste-week-set-modal {
    max-width: 480px;
}
.paste-week-set-label {
    font-size: 0.95rem;
    color: var(--app-gray-700);
    margin-bottom: 0.75rem;
    text-align: center;
    font-weight: 500;
}
.paste-week-set-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    max-height: 180px;
    overflow-y: auto;
}
.paste-week-set-numbers .job-num-btn {
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--app-gray-300);
    background: var(--app-gray-50);
    color: var(--app-gray-800);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.paste-week-set-numbers .job-num-btn:hover {
    background: var(--app-gray-200);
    border-color: var(--app-gray-400);
}
.paste-week-set-numbers .job-num-btn.selected {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* Schedule loading overlay – charging animation when page takes too long */
.schedule-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(249, 250, 251, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.schedule-loading-overlay.visible {
    opacity: 1;
    visibility: visible;
}
.schedule-loading-overlay[hidden] {
    display: none !important;
}
.schedule-loading-overlay:not([hidden]).visible {
    display: flex !important;
}
.schedule-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}
.schedule-lottie-container {
    flex-shrink: 0;
}
.schedule-loading-charger {
    --battery-w: 64px;
    --battery-h: 32px;
}
.schedule-loading-battery {
    display: flex;
    align-items: center;
    justify-content: center;
}
.schedule-loading-battery-body {
    width: var(--battery-w);
    height: var(--battery-h);
    border: 3px solid var(--app-gray-400);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    background: var(--app-gray-100);
}
.schedule-loading-battery-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, var(--app-blue-500), var(--app-blue-600));
    border-radius: 3px;
    animation: schedule-loading-fill 1.8s ease-in-out infinite;
}
.schedule-loading-bolt {
    position: absolute;
    width: 28px;
    height: 28px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--app-yellow-500);
    opacity: 0.9;
    animation: schedule-loading-bolt-pulse 1.2s ease-in-out infinite;
}
.schedule-loading-battery-tip {
    width: 8px;
    height: 14px;
    background: var(--app-gray-400);
    border-radius: 0 4px 4px 0;
    margin-left: 2px;
}
.schedule-loading-text {
    font-size: 0.95rem;
    color: var(--app-gray-600);
    font-weight: 500;
}
@keyframes schedule-loading-fill {
    0%, 100% { width: 10%; }
    50% { width: 90%; }
}
@keyframes schedule-loading-bolt-pulse {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}
