:root {
    --color-accent-glow: rgba(255, 215, 0, 0.15);
    --color-accent: #ffd700;
}

/* FullCalendar Overrides */
.fc-theme-bootstrap5 .fc-scrollgrid {
    border-color: var(--border-color) !important;
}

.fc-day-today {
    background-color: rgba(255, 215, 0, 0.05) !important;
    /* Subtle gold tint */
}

.conflict-warning {
    border: 2px solid #ef4444 !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    z-index: 10;
}

.shifts-lane {
    position: relative;
}

.fc-theme-bootstrap5 td,
.fc-theme-bootstrap5 th {
    border-color: var(--border-color) !important;
}

.fc .fc-list-day-cushion,
.fc .fc-cell-shaded {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.fc-event {
    cursor: pointer;
    border: none !important;
    border-radius: 4px !important;
    overflow: hidden;
}

.fc-event-main {
    padding: 2px 4px !important;
    font-size: 0.85rem;
}

.fc-v-event .fc-event-main {
    color: #fff;
}

/* Hide All-Day Slot as requested */
.fc-timegrid-allday,
.fc-timegrid-allday-cushion {
    display: none !important;
}

/* Draggable Staff Item */
.fc-event.draggable-staff {
    margin-bottom: 10px;
    padding: 10px 15px;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #e2e8f0;
    cursor: grab;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex;
    align-items: center;
    border-radius: 8px !important;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.fc-event.draggable-staff:active {
    cursor: grabbing !important;
}

.fc-event.draggable-staff:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: var(--color-accent) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.staff-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Redesigned Staff Item with Workload Bar */
.draggable-staff {
    flex-direction: column;
    align-items: stretch !important;
    padding: 8px 12px !important;
}

.staff-info {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.workload-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.workload-bar {
    height: 100%;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.workload-bar.over-limit {
    background: #ef4444;
    /* red */
}

/* Resource Grid Styles */
#resource-grid-overlay {
    background-color: #0f172a;
}

.resource-grid {
    display: grid;
    position: relative;
    border: 1px solid #334155;
    border-radius: 8px;
    overflow: visible;
    background: #0f172a;
    min-width: 100%;
    /* min-height removed to allow stacking */
    user-select: none;
    margin-bottom: 2rem;
    /* Spacing between stacked grids */
}

.grid-slot.drag-over {
    background-color: var(--color-accent-glow) !important;
    border: 2px dashed var(--color-accent) !important;
    box-shadow: inset 0 0 20px var(--color-accent-glow) !important;
    transition: all 0.1s ease-in-out;
}

.shifted-block {
    cursor: move !important;
}

.grid-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #1e293b;
    border-bottom: 2px solid #334155;
    height: 50px;
    display: flex;
    align-items: center;
}

.pos-col-header {
    position: sticky;
    left: 0;
    z-index: 11;
    background: #1e293b;
    border-right: 2px solid #334155;
    padding: 0 15px;
    font-weight: 600;
    color: #94a3b8;
}

.time-slot-header {
    display: flex;
    flex-grow: 1;
    height: 100%;
}

.time-slot {
    flex: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #64748b;
}

.grid-row {
    display: flex;
    height: 80px;
    border-bottom: 1px solid #1e293b;
}

.pos-label {
    width: 200px;
    position: sticky;
    left: 0;
    z-index: 5;
    background: #0f172a;
    border-right: 2px solid #334155;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.shifts-lane {
    flex-grow: 1;
    position: relative;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 4.166% 100%;
}

.shift-block {
    position: absolute;
    height: 36px;
    top: 8px;
    background: rgba(59, 130, 246, 0.8);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.8rem;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
    overflow: hidden;
}

.shift-block:hover {
    transform: scale(1.02);
    z-index: 10;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

.shift-block.conflict-error {
    border: 2px solid #ef4444 !important;
    background: rgba(239, 68, 68, 0.8) !important;
    padding-right: 20px;
    /* Make room for icon */
}

/* Conflict Icon */
.shift-block.conflict-error::after {
    content: "\f33a";
    /* bi-exclamation-triangle-fill */
    font-family: "bootstrap-icons";
    position: absolute;
    top: 2px;
    right: 2px;
    color: white;
    font-size: 1rem;
}


.shift-block.conflict-warning {
    border: 2px solid #f59e0b !important;
}

.shifted-block {
    position: relative;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    user-select: none;
}

.resize-handle,
.resize-handle-top {
    position: absolute;
    left: 0;
    right: 0;
    height: 8px;
    cursor: ns-resize;
    z-index: 5;
}

.resize-handle {
    bottom: 0;
}

.resize-handle-top {
    top: 0;
}

.resize-handle:hover,
.resize-handle-top:hover {
    background: rgba(255, 255, 255, 0.3);
}


.shifted-block.draft-shift {
    opacity: 0.8 !important;
    border: 2px dashed rgba(255, 255, 255, 0.5) !important;
    background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1) 10px, transparent 10px, transparent 20px) !important;
}

.shifted-block.selected-shift {
    border: 2px solid var(--color-accent) !important;
    box-shadow: 0 0 15px var(--color-accent-glow), 0 0 25px var(--color-accent-glow) !important;
    z-index: 100 !important;
}

.grid-slot {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 26px;
}

.closed-overlay {
    background: repeating-linear-gradient(45deg,
            rgba(0, 0, 0, 0.1),
            rgba(0, 0, 0, 0.1) 10px,
            rgba(0, 0, 0, 0.2) 10px,
            rgba(0, 0, 0, 0.2) 20px);
}

.pos-col-header {
    background: var(--bg-tertiary) !important;
    border-bottom: 2px solid var(--border-glass) !important;
    border-right: 1px solid var(--border-glass) !important;
    padding: 10px 5px !important;
    color: var(--color-accent) !important;
}

/* Custom Button Styles */
.btn-outline-accent {
    color: var(--color-accent) !important;
    border: 1px solid var(--color-accent) !important;
    background: transparent !important;
}

.btn-outline-accent:hover,
.btn-outline-accent.active {
    background: var(--color-accent) !important;
    color: var(--color-primary-dark) !important;
}

/* Tab styles */
.nav-tabs .nav-link {
    color: #94a3b8;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 20px;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    color: #fff;
    border-bottom-color: #475569;
}

.nav-tabs .nav-link.active {
    background: transparent !important;
    color: var(--color-accent) !important;
    border-bottom-color: var(--color-accent) !important;
}

/* Table styles */
#staff-settings-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.grid-day-header {
    background: #1e293b;
    border-bottom: 1px solid #334155;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: bold;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}