/* CSS Variables & Core Setup */
:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-card-hover: rgba(31, 41, 55, 0.85);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-active: rgba(56, 189, 248, 0.4);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --color-blue: #38bdf8;
    --color-blue-glow: rgba(56, 189, 248, 0.15);
    --color-green: #10b981;
    --color-green-glow: rgba(16, 185, 129, 0.15);
    --color-orange: #f59e0b;
    --color-orange-glow: rgba(245, 158, 11, 0.15);
    --color-red: #ef4444;
    --color-red-glow: rgba(239, 68, 68, 0.15);
    --color-purple: #8b5cf6;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --sidebar-width: 260px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
}

body.auth-login-mode {
    overflow: hidden;
}

/* App Container Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

#app-root[hidden] {
    display: none !important;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.logo-glow {
    width: 32px;
    height: 32px;
    background: radial-gradient(circle, var(--color-blue) 0%, transparent 70%);
    border-radius: 50%;
    position: absolute;
    filter: blur(4px);
    opacity: 0.8;
}

.logo-text {
    display: flex;
    flex-direction: column;
    font-family: var(--font-heading);
    margin-left: 0.5rem;
}

.logo-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-subtitle {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-blue);
    letter-spacing: 1px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    background: transparent;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: left;
    width: 100%;
}

.nav-item svg {
    transition: var(--transition-fast);
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: rgba(56, 189, 248, 0.08);
    color: var(--color-blue);
    border-left: 3px solid var(--color-blue);
    border-radius: 0 12px 12px 0;
}

.nav-item.active svg {
    stroke: var(--color-blue);
}

/* Connection Status Card */
.connection-status-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
}

.pulse-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
}

.status-online {
    background-color: var(--color-green);
    box-shadow: 0 0 8px var(--color-green);
}

.status-simulating {
    background-color: var(--color-blue);
    box-shadow: 0 0 8px var(--color-blue);
}

.status-offline {
    background-color: var(--color-red);
    box-shadow: 0 0 8px var(--color-red);
}

.pulse-indicator::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: inherit;
    animation: pulse 1.8s infinite ease-in-out;
    left: 0;
    top: 0;
    opacity: 0.4;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(2.5); opacity: 0; }
}

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

.conn-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.conn-ip {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: monospace;
}

/* Main Workspace Panel */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header bar */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1.5rem;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Sync Panel */
.sync-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}

.sync-hint {
    flex-basis: 100%;
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.sync-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sync-row {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    gap: 0.5rem;
}

.sync-value {
    font-weight: 600;
    color: var(--text-primary);
}

.text-glow-blue {
    color: var(--color-blue);
    text-shadow: 0 0 6px rgba(56, 189, 248, 0.4);
}

/* Buttons */
.btn {
    border: none;
    outline: none;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-blue) 0%, #0284c7 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(56, 189, 248, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-success {
    background: linear-gradient(135deg, var(--color-green) 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.hidden {
    display: none !important;
}

.scope-banner {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--color-blue);
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-full {
    width: 100%;
}

.icon-spin {
    animation: spin 1.5s infinite linear;
    animation-play-state: paused;
}

.syncing .icon-spin {
    animation-play-state: running;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Tab panes styling */
.tab-pane {
    display: none;
    animation: fadeIn var(--transition-normal);
}

.tab-pane.active {
    display: block;
}

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

/* Metric Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(16px);
    transition: var(--transition-normal);
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(100px circle at top right, rgba(255,255,255,0.015), transparent);
    pointer-events: none;
}

.metric-card:hover {
    transform: translateY(-3px);
    background-color: var(--bg-card-hover);
}

.metric-card.metric-drill {
    cursor: pointer;
    user-select: none;
    pointer-events: auto;
}

.metric-card.metric-drill:focus-visible {
    outline: 2px solid var(--color-blue);
    outline-offset: 2px;
}

.metric-hint {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.metric-card.metric-drill:hover .metric-hint,
.metric-card.metric-drill:focus-visible .metric-hint {
    opacity: 1;
}


.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-green { background-color: rgba(16, 185, 129, 0.08); color: var(--color-green); }
.bg-orange { background-color: rgba(245, 158, 11, 0.08); color: var(--color-orange); }
.bg-red { background-color: rgba(239, 68, 68, 0.08); color: var(--color-red); }
.bg-blue { background-color: rgba(56, 189, 248, 0.08); color: var(--color-blue); }

.border-glow-green:hover { border-color: rgba(16, 185, 129, 0.25); box-shadow: 0 8px 24px rgba(16, 185, 129, 0.05); }
.border-glow-orange:hover { border-color: rgba(245, 158, 11, 0.25); box-shadow: 0 8px 24px rgba(245, 158, 11, 0.05); }
.border-glow-red:hover { border-color: rgba(239, 68, 68, 0.25); box-shadow: 0 8px 24px rgba(239, 68, 68, 0.05); }
.border-glow-blue:hover { border-color: rgba(56, 189, 248, 0.25); box-shadow: 0 8px 24px rgba(56, 189, 248, 0.05); }
.border-glow-purple:hover { border-color: rgba(139, 92, 246, 0.25); box-shadow: 0 8px 24px rgba(139, 92, 246, 0.05); }

.bg-purple { background-color: rgba(139, 92, 246, 0.08); color: var(--color-purple); }
.bg-teal-badge { background-color: rgba(20, 184, 166, 0.1); color: #14b8a6; border: 1px solid rgba(20, 184, 166, 0.2); }

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

.metric-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Glass card & grids */
.glass-card {
    border: 1px solid var(--border-color);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.span-2 {
    grid-column: span 2;
}

.card-header {
    margin-bottom: 1.25rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.15rem;
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.chart-wrapper {
    height: 320px;
    position: relative;
}

/* Live Activity Feed */
.feed-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.feed-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition-fast);
}

.feed-row:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.feed-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-blue);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.feed-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.feed-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.feed-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.badge {
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.25px;
    text-transform: uppercase;
}

.bg-green-badge { background-color: rgba(16, 185, 129, 0.1); color: var(--color-green); border: 1px solid rgba(16, 185, 129, 0.2); }
.bg-orange-badge { background-color: rgba(245, 158, 11, 0.1); color: var(--color-orange); border: 1px solid rgba(245, 158, 11, 0.2); }
.bg-red-badge { background-color: rgba(239, 68, 68, 0.1); color: var(--color-red); border: 1px solid rgba(239, 68, 68, 0.2); }
.bg-blue-badge { background-color: rgba(56, 189, 248, 0.1); color: var(--color-blue); border: 1px solid rgba(56, 189, 248, 0.2); }
.bg-purple-badge { background-color: rgba(139, 92, 246, 0.1); color: var(--color-purple); border: 1px solid rgba(139, 92, 246, 0.2); }

.badge-pulse {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    float: right;
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-red);
}

.badge-pulse::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--color-red);
    border-radius: 50%;
    animation: flash 1.2s infinite ease-in-out;
}

@keyframes flash {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Filter bar & Logs */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
}

.filter-search {
    flex-grow: 1;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-width: 330px;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.55rem 0.85rem;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
    width: 100%;
}

.form-control:focus {
    border-color: var(--border-active);
    background-color: rgba(255, 255, 255, 0.04);
}

/* Select / dropdown — force high-contrast dark menu (fixes white-on-white options) */
select.form-control {
    color-scheme: dark;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--bg-secondary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.25rem;
}

select.form-control:focus {
    background-color: rgba(17, 24, 39, 0.95);
}

select.form-control option,
select.form-control optgroup {
    background-color: #111827;
    color: #f9fafb;
    font-weight: 500;
}

select.form-control option:checked {
    background: linear-gradient(0deg, #1d4ed8 0%, #1d4ed8 100%);
    color: #ffffff;
}

select.form-control option:hover,
select.form-control option:focus {
    background-color: #1f2937;
    color: #ffffff;
}

select.form-control option[disabled] {
    color: #6b7280;
    background-color: #0f172a;
}

/* Date/time inputs — match dark theme picker where supported */
input[type="date"].form-control,
input[type="time"].form-control {
    color-scheme: dark;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator,
input[type="time"].form-control::-webkit-calendar-picker-indicator {
    filter: invert(0.85);
    cursor: pointer;
    opacity: 0.85;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator:hover,
input[type="time"].form-control::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Data Tables */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

.data-table th {
    padding: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    font-family: var(--font-heading);
}

.data-table td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.data-table tr:hover {
    background-color: rgba(255, 255, 255, 0.01);
}

.text-center { text-align: center; }

/* Employee Grid */
.employees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.employee-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    position: relative;
}

.employee-card:hover {
    background-color: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.emp-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.emp-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-blue);
}

.emp-meta {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.emp-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-heading);
}

.emp-id {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.emp-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
}

.detail-row:last-child {
    border: none;
}

.detail-val {
    color: #fff;
    font-weight: 500;
}

.emp-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

/* Settings Form & Config Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .span-2 {
        grid-column: span 1;
    }
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

.toggle-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 0.15rem;
}

.toggle-container label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

/* Sliders / Toggle switch style */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255,255,255,0.08);
    transition: .4s;
    border: 1px solid var(--border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    transition: .4s;
}

input:checked + .slider {
    background-color: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
}

input:checked + .slider:before {
    transform: translateX(24px);
    background-color: var(--color-blue);
    box-shadow: 0 0 8px var(--color-blue);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.form-help {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

.form-section-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Shifts inline listings */
.shifts-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 180px;
    overflow-y: auto;
}

.shift-item {
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shift-info-left {
    display: flex;
    flex-direction: column;
}

.shift-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.shift-item-times {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Modal Popup Window */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 90%;
    max-width: 440px;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: zoomIn var(--transition-normal);
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    outline: none;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

/* Login Screen */
.login-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 40%),
        radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.1), transparent 35%),
        var(--bg-primary);
}

.login-screen[hidden] {
    display: none !important;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
}

.login-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.login-brand h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.login-brand p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.login-logo-glow {
    margin: 0 auto;
}

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

.login-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.9rem 1rem;
    font-size: 1rem;
}

.login-error {
    color: var(--color-red);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    text-align: center;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

/* Holiday Calendar */
.holiday-calendar-layout {
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(260px, 0.9fr);
    gap: 1.5rem;
    align-items: start;
}

.holiday-calendar-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1rem;
}

.holiday-calendar-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.holiday-calendar-title {
    flex: 1;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.holiday-cal-nav {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition-fast);
}

.holiday-cal-nav:hover {
    border-color: var(--border-active);
    background: var(--color-blue-glow);
    color: var(--color-blue);
}

.holiday-cal-today {
    padding: 0.35rem 0.75rem !important;
    font-size: 0.75rem !important;
}

.holiday-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.holiday-calendar-weekdays span {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.holiday-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.35rem;
}

.holiday-cal-day {
    aspect-ratio: 1;
    min-height: 2.5rem;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    transition: var(--transition-fast);
    padding: 0.2rem;
}

.holiday-cal-day:hover:not(:disabled) {
    border-color: var(--border-active);
    background: rgba(56, 189, 248, 0.08);
}

.holiday-cal-day.outside-month {
    color: var(--text-muted);
    opacity: 0.45;
}

.holiday-cal-day.today {
    border-color: rgba(56, 189, 248, 0.35);
}

.holiday-cal-day.selected {
    border-color: var(--color-blue);
    background: var(--color-blue-glow);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
}

.holiday-cal-day.is-holiday {
    background: rgba(139, 92, 246, 0.18);
    border-color: rgba(139, 92, 246, 0.45);
    color: #ddd6fe;
}

.holiday-cal-day.is-holiday.selected {
    background: rgba(139, 92, 246, 0.28);
    border-color: var(--color-purple);
}

.holiday-cal-day-label {
    font-size: 0.55rem;
    line-height: 1.1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #c4b5fd;
    font-weight: 600;
}

.holiday-calendar-hint {
    margin-top: 0.85rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.holiday-sidebar .form-section-title {
    margin-bottom: 0.75rem;
}

@media (max-width: 900px) {
    .holiday-calendar-layout {
        grid-template-columns: 1fr;
    }
}
