/* ============================================
   FIFO SCHEDULER STYLES
   ============================================ */

/* --- Collapsible Sidebar --- */
.sidebar-collapse-btn {
    background: none;
    border: none;
    color: var(--text-muted, #6b7280);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sidebar-collapse-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary, #e5e7eb);
}

.sidebar.collapsed {
    width: 60px;
    min-width: 60px;
}

.sidebar.collapsed .sidebar-label {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    padding: 20px 12px;
    justify-content: center;
}

.sidebar.collapsed .sidebar-header .logo {
    justify-content: center;
}

.sidebar.collapsed .logo-img {
    margin: 0;
}

.sidebar.collapsed .sidebar-nav a {
    padding: 12px;
    justify-content: center;
}

.sidebar.collapsed .sidebar-nav svg {
    margin: 0;
}

.sidebar.collapsed .sidebar-footer {
    padding: 16px 8px;
}

.sidebar.collapsed .sidebar-footer .btn {
    padding: 8px;
    min-width: 0;
}

.sidebar.collapsed .sidebar-collapse-btn svg {
    transform: rotate(180deg);
}

/* Smooth transition for sidebar width */
.sidebar {
    transition: width 0.25s ease, min-width 0.25s ease, transform 0.3s ease;
}

/* --- Scheduler Main Layout --- */
.scheduler-main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.scheduler-title h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e5e7eb;
    margin: 0;
    white-space: nowrap;
}

/* --- View Toggle --- */
.view-toggle {
    display: flex;
    gap: 0;
    flex-shrink: 0;
}

.view-btn {
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.view-btn:first-child { border-radius: 6px 0 0 6px; }
.view-btn:last-child { border-radius: 0 6px 6px 0; }

.view-btn.active {
    background: #DC2626;
    color: #fff;
    border-color: #DC2626;
    font-weight: 600;
}

.view-btn:not(.active):hover {
    background: rgba(255,255,255,0.08);
    color: #e5e7eb;
}

/* --- Month Tabs --- */
.scheduler-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: #1a1a2e;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.month-tabs {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    flex: 1;
}

.month-tab {
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.month-tab:first-child {
    border-radius: 6px 0 0 6px;
}

.month-tab:last-child {
    border-radius: 0 6px 6px 0;
}

.month-tab:hover {
    background: rgba(255,255,255,0.08);
    color: #e5e7eb;
}

.month-tab.active {
    background: #DC2626;
    color: #fff;
    border-color: #DC2626;
    font-weight: 600;
}

.year-selector select {
    padding: 6px 12px;
    background: #16162a;
    color: #e5e7eb;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

/* --- Schedule Grid Container --- */
.scheduler-grid-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #f5f5dc;
    display: flex;
    flex-direction: column;
}

.scheduler-grid-scroll {
    flex: 1;
    width: 100%;
    overflow: auto;
}

/* --- Schedule Grid Table --- */
.scheduler-grid {
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    width: max-content;
    min-width: 100%;
}

/* Header row */
.scheduler-grid thead th {
    position: sticky;
    top: 0;
    z-index: 15;
    background: #0077b6;
    color: #fff;
    font-weight: 600;
    padding: 4px 2px;
    text-align: center;
    border: 1px solid #005f8a;
    white-space: nowrap;
    font-size: 0.7rem;
}

/* Day-of-week sub-header */
.scheduler-grid thead .dow-row th {
    background: #0096d6;
    font-size: 0.65rem;
    font-weight: 500;
    padding: 2px;
}

/* Sticky left columns */
.scheduler-grid .col-project,
.scheduler-grid .col-poste,
.scheduler-grid .col-employee {
    position: sticky;
    z-index: 12;
    background: #e8e8e8;
    color: #1a1a2e;
    font-weight: 600;
    text-align: left;
    padding: 4px 8px;
    border: 1px solid #bbb;
    white-space: nowrap;
}

.scheduler-grid .col-project {
    left: 0;
    z-index: 13;
    min-width: 80px;
    max-width: 80px;
    background: #d4d4d4;
    color: #1a1a2e;
    font-size: 0.75rem;
}

.scheduler-grid .col-poste {
    left: 80px;
    z-index: 12;
    min-width: 100px;
    max-width: 100px;
    font-size: 0.7rem;
    color: #555;
}

.scheduler-grid .col-employee {
    left: 180px;
    z-index: 12;
    min-width: 120px;
    max-width: 120px;
    font-size: 0.75rem;
    color: #1a1a2e;
}

/* Header sticky left cells */
.scheduler-grid thead .th-project,
.scheduler-grid thead .th-poste,
.scheduler-grid thead .th-employee {
    position: sticky;
    z-index: 20;
    background: #005f8a;
}

.scheduler-grid thead .th-project {
    left: 0;
    min-width: 80px;
    max-width: 80px;
}

.scheduler-grid thead .th-poste {
    left: 80px;
    min-width: 100px;
    max-width: 100px;
}

.scheduler-grid thead .th-employee {
    left: 180px;
    min-width: 120px;
    max-width: 120px;
}

/* --- Shift Cells --- */
.scheduler-grid td.shift-cell {
    min-width: 32px;
    max-width: 32px;
    width: 32px;
    height: 28px;
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: all 0.15s;
    background: #fffde7;
}

.scheduler-grid td.shift-cell:hover {
    outline: 2px solid #DC2626;
    outline-offset: -2px;
    z-index: 5;
    position: relative;
}

/* Shift code colors */
.shift-V {
    background: #2e7d32 !important;
    color: #fff !important;
    font-size: 0.85rem !important;
}

.shift-R {
    background: #c62828 !important;
    color: #fff !important;
    font-size: 0.85rem !important;
}

.shift-J {
    background: #ffeb3b !important;
    color: #333 !important;
}

.shift-N {
    background: #7986cb !important;
    color: #fff !important;
}

.shift-X {
    background: #bdbdbd !important;
    color: #666 !important;
}

/* Legacy codes kept for manual overrides */
.shift-A {
    background: #2e7d32 !important;
    color: #fff !important;
}

.shift-arrow {
    background: #c62828 !important;
    color: #fff !important;
}

/* Weekend columns — only tint body cells, keep headers blue */
.scheduler-grid td.shift-cell.weekend {
    background: #fff3cd;
}

/* Project group separator row */
.scheduler-grid tr.project-separator td {
    background: #0077b6;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 6px 8px;
    border: 1px solid #005f8a;
}

/* Project cell (merged) */
.scheduler-grid td.project-cell {
    background: #1a1a2e !important;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    text-align: center;
    vertical-align: middle;
    border: 2px solid #333;
    writing-mode: horizontal-tb;
}

/* Coverage badge inside project cell */
.project-coverage-badge {
    display: block;
    margin-top: 4px;
    padding: 2px 6px;
    background: rgba(239,68,68,0.25);
    border: 1px solid rgba(239,68,68,0.5);
    border-radius: 4px;
    color: #fca5a5;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Equipe label */
.scheduler-grid td.equipe-cell {
    background: #2a2a4a !important;
    color: #aaa;
    font-weight: 600;
    font-size: 0.65rem;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #444;
}

/* --- Bottom Toolbar --- */
.scheduler-toolbar {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    background: #1a1a2e;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.06);
    color: #9ca3af;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.toolbar-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #e5e7eb;
    border-color: rgba(255,255,255,0.2);
}

.toolbar-btn svg {
    width: 16px;
    height: 16px;
}

/* --- Cell Edit Modal --- */
.modal-sm {
    max-width: 380px;
}

.modal-lg {
    max-width: 800px;
    max-height: 80vh;
}

.modal-lg .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.shift-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.shift-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 8px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    color: #e5e7eb;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.shift-btn span {
    font-size: 0.65rem;
    font-weight: 400;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shift-btn:hover {
    transform: scale(1.05);
}

.shift-btn.shift-V {
    border-color: #2e7d32;
    color: #66bb6a;
}
.shift-btn.shift-V:hover {
    background: rgba(46,125,50,0.2);
}

.shift-btn.shift-R {
    border-color: #c62828;
    color: #ef5350;
}
.shift-btn.shift-R:hover {
    background: rgba(198,40,40,0.2);
}

.shift-btn.shift-J {
    border-color: #ffeb3b;
    color: #ffeb3b;
}
.shift-btn.shift-J:hover {
    background: rgba(255,235,59,0.15);
}

.shift-btn.shift-N {
    border-color: #7986cb;
}
.shift-btn.shift-N:hover {
    background: rgba(121,134,203,0.2);
}

.shift-btn.shift-X {
    border-color: #bdbdbd;
    color: #bdbdbd;
}
.shift-btn.shift-X:hover {
    background: rgba(189,189,189,0.15);
}

.shift-btn.shift-clear {
    border-color: #666;
    color: #666;
}
.shift-btn.shift-clear:hover {
    background: rgba(255,255,255,0.08);
}

/* --- Editor Toolbar --- */
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.editor-search {
    flex: 1;
    padding: 8px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: #e5e7eb;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.editor-search:focus {
    border-color: #DC2626;
}

.editor-search::placeholder {
    color: #6b7280;
}

/* --- Editor Lists --- */
.editor-list {
    width: 100%;
}

.editor-list table {
    width: 100%;
    border-collapse: collapse;
}

.editor-list th,
.editor-list td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.8rem;
}

.editor-list th {
    color: #9ca3af;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.editor-list td {
    color: #e5e7eb;
}

.editor-row {
    cursor: pointer;
    transition: background 0.15s;
}

.editor-row:hover td {
    background: rgba(220,38,38,0.08);
}

.editor-empty,
.editor-empty-sm {
    color: #6b7280;
    font-size: 0.85rem;
    text-align: center;
    padding: 32px 16px;
}

.editor-empty-sm {
    padding: 12px 8px;
    font-size: 0.8rem;
}

/* --- Editor Tabs --- */
.editor-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.editor-tab {
    padding: 8px 20px;
    background: transparent;
    color: #9ca3af;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.editor-tab:hover {
    color: #e5e7eb;
}

.editor-tab.active {
    color: #DC2626;
    border-bottom-color: #DC2626;
    font-weight: 600;
}

.editor-tab-content {
    display: none;
}

.editor-tab-content.active {
    display: block;
}

.tab-desc {
    color: #6b7280;
    font-size: 0.8rem;
    margin-bottom: 12px;
}

/* --- Editor Forms --- */
.editor-form-view {
    /* shown/hidden via JS */
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 4px;
}

.form-row > .form-group {
    flex: 1;
}

.form-group-btn {
    flex: 0 0 auto !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.form-group-btn .btn {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

/* --- Geocoding Status --- */
.proj-geo-status {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.geo-loading {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.15);
}

.geo-ok {
    color: #10b981;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.geo-error {
    color: #f87171;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.15);
}

.coords-toggle {
    display: inline-block;
    color: #6b7280;
    font-size: 0.75rem;
    margin-bottom: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.coords-toggle:hover {
    color: #9ca3af;
}

.coords-advanced {
    margin-bottom: 8px;
}

.loc-pin {
    font-size: 0.8rem;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: #e5e7eb;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #DC2626;
}

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

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: #1a1a2e;
    color: #e5e7eb;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.form-actions .btn-danger {
    margin-left: auto;
}

.form-actions .btn-primary {
    margin-left: auto;
}

.form-actions .btn-danger + .btn-primary {
    margin-left: 0;
}

/* --- Tag Items (formations, equipment) --- */
.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(220,38,38,0.08);
    border: 1px solid rgba(220,38,38,0.2);
    border-radius: 6px;
    margin: 4px 4px 4px 0;
    font-size: 0.8rem;
    color: #e5e7eb;
}

.tag-date {
    font-size: 0.7rem;
    color: #9ca3af;
}

.tag-remove {
    background: none;
    border: none;
    color: #ef5350;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}

.tag-remove:hover {
    color: #ff6b6b;
}

/* --- Checklist (project required formations) --- */
.checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    font-size: 0.8rem;
    color: #e5e7eb;
    cursor: pointer;
    transition: all 0.15s;
}

.checklist-item:hover {
    border-color: rgba(220,38,38,0.3);
    background: rgba(220,38,38,0.06);
}

.checklist-item input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #DC2626;
}

/* --- Project Date Hint --- */
.project-date-hint {
    margin-top: 6px;
    padding: 8px 12px;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 6px;
    color: #93c5fd;
    font-size: 0.78rem;
    line-height: 1.4;
}
.project-date-hint strong {
    color: #60a5fa;
}

/* --- Travel Warning --- */
.travel-warning-hint {
    margin-top: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    line-height: 1.4;
}

.travel-info-ok {
    color: #86efac;
}

.travel-warn-medium {
    color: #fbbf24;
    font-weight: 600;
}

.travel-warn-high {
    color: #f87171;
    font-weight: 700;
}

.travel-warning-hint:has(.travel-warn-medium) {
    background: rgba(251,191,36,0.1);
    border: 1px solid rgba(251,191,36,0.25);
}

.travel-warning-hint:has(.travel-warn-high) {
    background: rgba(248,113,113,0.1);
    border: 1px solid rgba(248,113,113,0.25);
}

.travel-warning-hint:has(.travel-info-ok) {
    background: rgba(134,239,172,0.06);
    border: 1px solid rgba(134,239,172,0.15);
}

.travel-legs {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.72rem;
    color: #9ca3af;
}

.travel-leg {
    padding: 2px 0;
}

.travel-leg strong {
    color: #d1d5db;
}

/* Unstaffed project placeholder row */
.unstaffed-label {
    text-align: center !important;
    vertical-align: middle !important;
    background: #e8e8e8 !important;
}

.unstaffed-warning {
    color: #d97706;
    font-weight: 600;
    font-size: 0.75rem;
    margin-right: 10px;
}

.unstaffed-assign-btn {
    padding: 4px 12px;
    background: #DC2626;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
}

.unstaffed-assign-btn:hover {
    background: #b91c1c;
}

.shift-cell.empty-cell {
    background: #f0f0f0 !important;
    cursor: default;
}

.shift-cell.empty-cell:hover {
    outline: none;
}

/* Travel badge in grid employee cell */
.travel-badge {
    display: inline-block;
    margin-left: 4px;
    font-size: 0.65rem;
    cursor: help;
}

.travel-badge-medium {
    color: #d97706;
}

.travel-badge-high {
    color: #ef4444;
}

/* --- Conflict Warning --- */
.conflict-warning {
    padding: 12px 16px;
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 0.8rem;
    line-height: 1.5;
    margin-top: 12px;
}

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

/* --- Coverage Status --- */
.coverage-status {
    padding: 14px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 0.85rem;
}

.coverage-full {
    background: rgba(5,150,105,0.1);
    border: 1px solid rgba(5,150,105,0.25);
}

.coverage-gap {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.25);
}

.coverage-header {
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.coverage-full .coverage-header {
    color: #34d399;
}

.coverage-gap .coverage-header {
    color: #fca5a5;
}

.coverage-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.coverage-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coverage-label {
    color: #9ca3af;
    font-size: 0.8rem;
    min-width: 130px;
}

.coverage-count {
    color: #e5e7eb;
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 50px;
}

.coverage-ok {
    color: #34d399;
    font-weight: 600;
    font-size: 0.75rem;
}

.coverage-missing {
    color: #f87171;
    font-weight: 600;
    font-size: 0.75rem;
}

/* --- Form Hints --- */
.form-hint {
    display: block;
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 4px;
}

/* --- Status Badges in Editor --- */
.editor-list .status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-active { background: rgba(5,150,105,0.12); color: #34d399; }
.status-inactive { background: rgba(107,114,128,0.12); color: #9ca3af; }
.status-pending { background: rgba(217,119,6,0.12); color: #fbbf24; }

/* --- Modal Medium size --- */
.modal-md {
    max-width: 600px;
}

/* --- Override indicator --- */
.scheduler-grid td.override {
    box-shadow: inset 0 0 0 1px rgba(220,38,38,0.4);
}

/* --- Scheduler Empty State --- */
.scheduler-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(8,10,15,0.95);
    color: #e5e7eb;
    text-align: center;
    padding: 40px;
}

.scheduler-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.6;
}

.scheduler-empty h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.scheduler-empty p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 24px;
    max-width: 400px;
}

.empty-actions {
    display: flex;
    gap: 12px;
}

/* --- Modal info text --- */
.modal-info {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* --- Button variants used in editors --- */
.btn-danger {
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
}

/* --- Year View --- */
.scheduler-grid.year-view td.shift-cell {
    min-width: 18px;
    max-width: 18px;
    width: 18px;
    height: 20px;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 0;
}

.scheduler-grid.year-view thead th.month-label {
    position: sticky;
    top: 0;
    z-index: 15;
    background: #005f8a;
    color: #fff;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 4px 2px;
    text-align: center;
    border: 1px solid #004a6e;
    border-bottom: none;
}

.scheduler-grid.year-view thead th.day-header-yr {
    position: sticky;
    top: 26px;
    z-index: 15;
    background: #0077b6;
    color: #fff;
    font-weight: 500;
    font-size: 0.5rem;
    padding: 2px 0;
    text-align: center;
    border: 1px solid #005f8a;
    min-width: 18px;
    max-width: 18px;
}

/* Year view sticky left columns — same widths, smaller font */
.scheduler-grid.year-view .col-project {
    font-size: 0.65rem;
}

.scheduler-grid.year-view .col-poste {
    font-size: 0.6rem;
}

.scheduler-grid.year-view .col-employee {
    font-size: 0.65rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .scheduler-controls {
        flex-direction: column;
        gap: 8px;
    }

    .month-tabs {
        width: 100%;
    }

    .month-tab {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .scheduler-grid .col-project {
        min-width: 60px;
        max-width: 60px;
    }

    .scheduler-grid .col-poste {
        left: 60px;
        min-width: 80px;
        max-width: 80px;
    }

    .scheduler-grid .col-employee {
        left: 140px;
        min-width: 100px;
        max-width: 100px;
    }

    .scheduler-toolbar {
        flex-wrap: wrap;
    }

    .toolbar-btn {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
}


/* --- Clickable grid cells --- */

.clickable {
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.clickable:hover {
    background-color: rgba(229, 57, 53, 0.12) !important;
    color: #e53935;
}


/* --- Language Toggle Button --- */

.lang-toggle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e5e7eb;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 12px;
}

.lang-toggle:hover {
    background: rgba(229, 57, 53, 0.15);
    border-color: #e53935;
    color: #fff;
}

.lang-label {
    font-size: 0.75rem;
}


/* --- Poste filter bar --- */

.poste-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(229, 57, 53, 0.08);
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #e5e7eb;
}

.poste-filter-bar strong {
    color: #e53935;
}

/* --- Toolbar Separator --- */
.toolbar-separator {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.12);
    margin: 0 4px;
    flex-shrink: 0;
}

.toolbar-btn-export {
    background: rgba(220,38,38,0.1);
    border-color: rgba(220,38,38,0.3);
    color: #fca5a5;
}

.toolbar-btn-export:hover {
    background: rgba(220,38,38,0.2);
    border-color: rgba(220,38,38,0.5);
    color: #fff;
}

/* --- Export Modal Form --- */
.export-form-group {
    margin-bottom: 18px;
}

.export-form-group > label:first-child {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.export-period-row {
    display: flex;
    gap: 20px;
}

.export-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #e5e7eb;
    cursor: pointer;
}

.export-radio input[type="radio"] {
    accent-color: #DC2626;
    width: 16px;
    height: 16px;
}

.export-date-row {
    display: flex;
    gap: 16px;
}

.export-date-row .form-group {
    flex: 1;
}

.export-select-header {
    margin-bottom: 6px;
}

.export-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #e5e7eb;
    cursor: pointer;
    padding: 4px 0;
}

.export-checkbox-item input[type="checkbox"] {
    accent-color: #DC2626;
    width: 15px;
    height: 15px;
}

.export-select-list {
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.03);
}

.export-select-list .export-checkbox-item {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.export-select-list .export-checkbox-item:last-child {
    border-bottom: none;
}

.export-email-section {
    padding: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
}

.export-recipient-count {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 6px;
}

/* --- Export Toast --- */
.export-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    background: #059669;
    color: #fff;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.export-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* --- Export History Table --- */
.export-history-table {
    width: 100%;
    border-collapse: collapse;
}

.export-history-table th,
.export-history-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.8rem;
}

.export-history-table th {
    color: #9ca3af;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.export-history-table td {
    color: #e5e7eb;
}

.export-history-table .btn-sm {
    padding: 4px 10px;
    font-size: 0.7rem;
}

.export-history-empty {
    color: #6b7280;
    font-size: 0.85rem;
    text-align: center;
    padding: 24px;
}

/* ============================================
   MAP VIEW
   ============================================ */

.map-container {
    flex: 1;
    position: relative;
    width: 100%;
    min-height: 500px;
    background: #0a0a1a;
    z-index: 1;
}

.map-leaflet {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 500px;
}

.leaflet-container {
    background: #0a0a1a !important;
}

/* --- Site Markers --- */
.site-marker {
    background: var(--primary, #DC2626);
    border: 3px solid #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: transform 0.2s;
}

.site-marker:hover {
    transform: scale(1.15);
}

.site-marker.coverage-full {
    background: #16a34a;
    border-color: #34d399;
}

.site-marker.coverage-gap {
    background: #d97706;
    border-color: #fbbf24;
    animation: pulse-gap 2s infinite;
}

@keyframes pulse-gap {
    0%, 100% { box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
    50% { box-shadow: 0 4px 16px rgba(248,113,113,0.5); }
}

/* --- Employee Markers --- */
.emp-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #1a1a2e;
    border: 2.5px solid var(--primary, #DC2626);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: #fff;
    cursor: grab;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.emp-marker:hover {
    transform: scale(1.2);
    z-index: 1000 !important;
}

.emp-marker.dragging {
    cursor: grabbing;
    box-shadow: 0 6px 24px rgba(220,38,38,0.5);
    transform: scale(1.3);
    z-index: 2000 !important;
}

/* Employee state colors */
.emp-marker.emp-state-onsite {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981 !important;
}

.emp-marker.emp-state-travel {
    background: rgba(2, 136, 209, 0.15);
    border-color: #0288d1 !important;
}

.emp-marker.emp-state-offrotation {
    background: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b !important;
    opacity: 0.85;
}

.emp-marker.emp-state-unassigned {
    background: rgba(107, 114, 128, 0.15);
    border-color: #6b7280 !important;
    opacity: 0.75;
    cursor: pointer;
}

.emp-marker.emp-state-absent {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444 !important;
}

/* --- Map Popups --- */
.map-popup-site .leaflet-popup-content-wrapper,
.map-popup-emp .leaflet-popup-content-wrapper {
    background: #10121a;
    color: #e5e7eb;
    border: 1px solid #2d3048;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.map-popup-site .leaflet-popup-tip,
.map-popup-emp .leaflet-popup-tip {
    background: #10121a;
    border: 1px solid #2d3048;
}

.map-popup-site .leaflet-popup-close-btn,
.map-popup-emp .leaflet-popup-close-btn {
    color: #9ca3af;
}

.popup-site h3,
.popup-emp h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    color: #f1f5f9;
}

.popup-location {
    color: #9ca3af;
    font-size: 0.8rem;
    margin: 0 0 8px;
}

.popup-coverage {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.popup-coverage.status-ok {
    background: rgba(52,211,153,0.15);
    color: #34d399;
}

.popup-coverage.status-gap {
    background: rgba(248,113,113,0.15);
    color: #f87171;
}

.popup-stats {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    margin-bottom: 8px;
    color: #94a3b8;
}

.popup-emp-list {
    border-top: 1px solid #1e2030;
    padding-top: 8px;
    max-height: 180px;
    overflow-y: auto;
}

.popup-emp-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.8rem;
}

.popup-emp-name {
    color: #e5e7eb;
}

.popup-emp-shift {
    color: #94a3b8;
    font-size: 0.75rem;
}

.popup-state {
    font-size: 0.78rem;
    font-weight: 600;
    margin: 0 0 6px;
    color: #94a3b8;
}

.popup-role {
    color: #94a3b8;
    font-size: 0.8rem;
    margin: 0 0 8px;
}

.popup-details {
    font-size: 0.8rem;
    line-height: 1.6;
}

.popup-details strong {
    color: #94a3b8;
}

/* --- Map Floating Toolbar --- */
.map-toolbar {
    position: absolute;
    top: 12px;
    right: 56px;
    z-index: 1000;
    display: flex;
    gap: 6px;
}

.map-toolbar-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    background: rgba(16, 18, 26, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: #e5e7eb;
    cursor: pointer;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.map-toolbar-btn:hover {
    background: rgba(26, 28, 40, 0.95);
    border-color: rgba(255,255,255,0.2);
}

.map-toolbar-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.map-toolbar-btn svg {
    flex-shrink: 0;
}

/* --- Map Date Navigation Toolbar --- */
.map-date-toolbar {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(16, 18, 26, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
}
.map-date-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #e5e7eb;
    cursor: pointer;
    transition: all 0.15s;
}
.map-date-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}
.map-date-btn-active {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.5);
    color: #DC2626;
}
.map-date-input {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: #e5e7eb;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    padding: 5px 8px;
    height: 30px;
    cursor: pointer;
}
.map-date-input::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
    cursor: pointer;
}
.map-date-sep {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.12);
    margin: 0 4px;
}
.map-date-speed {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: #e5e7eb;
    font-size: 0.7rem;
    padding: 2px 4px;
    height: 30px;
    cursor: pointer;
}
.map-date-speed option {
    background: #1a1c28;
    color: #e5e7eb;
}

/* --- Map Hint --- */
.map-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(16, 18, 26, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 8px 16px;
    color: #94a3b8;
    font-size: 0.75rem;
    pointer-events: none;
}

/* --- Unassigned Employees Panel --- */
.map-unassigned-panel {
    position: absolute;
    left: 12px;
    top: 12px;
    bottom: 12px;
    width: 220px;
    background: rgba(16, 18, 26, 0.92);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    z-index: 1000;
    overflow-y: auto;
    padding: 16px;
}

.unassigned-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.unassigned-header h4 {
    margin: 0;
    font-size: 0.85rem;
    color: #f1f5f9;
}

.unassigned-count {
    background: var(--primary, #DC2626);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.unassigned-empty {
    color: #6b7280;
    font-size: 0.8rem;
    text-align: center;
    padding: 20px 0;
}

.unassigned-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.unassigned-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.unassigned-item:hover {
    background: rgba(220,38,38,0.1);
    border-color: rgba(220,38,38,0.2);
}

.unassigned-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary, #DC2626);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.unassigned-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.unassigned-name {
    color: #e5e7eb;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unassigned-role {
    color: #6b7280;
    font-size: 0.7rem;
}

/* --- Quick Assign Modal --- */
.qa-employee-display {
    margin-bottom: 16px;
}

.qa-employee-display label {
    color: #9ca3af;
    font-size: 0.75rem;
    display: block;
    margin-bottom: 4px;
}

.qa-emp-name {
    color: #f1f5f9;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 8px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid #1e2030;
    border-radius: 8px;
}

/* --- Impact Analysis Panel --- */
.qa-impact-panel {
    margin-top: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    overflow: hidden;
}

.qa-impact-header {
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.06);
    border-bottom: 1px solid rgba(245, 158, 11, 0.12);
    display: flex;
    align-items: center;
    gap: 6px;
}

.qa-impact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.qa-impact-item:last-child {
    border-bottom: none;
}

.qa-impact-warning .qa-impact-icon {
    color: #f59e0b;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.qa-impact-ok .qa-impact-icon {
    color: #10b981;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.qa-impact-text {
    color: #e5e7eb;
    font-size: 0.8rem;
    line-height: 1.5;
}

.qa-impact-text strong {
    color: #f1f5f9;
}

.qa-impact-detail {
    color: #9ca3af;
    font-size: 0.75rem;
}

.qa-impact-gap {
    color: #f87171;
    font-weight: 600;
    font-size: 0.75rem;
}

.qa-impact-action {
    padding: 10px 14px;
    font-size: 0.78rem;
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.04);
    border-top: 1px solid rgba(96, 165, 250, 0.1);
    line-height: 1.5;
}

/* --- Replacement Suggestions Panel --- */
.qa-suggest-panel {
    margin-top: 12px;
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.03);
    overflow: hidden;
}

.qa-suggest-header {
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.06);
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.qa-suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}

.qa-suggest-item:last-child {
    border-bottom: none;
}

.qa-suggest-item:hover {
    background: rgba(16, 185, 129, 0.06);
}

.qa-suggest-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.qa-suggest-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.qa-suggest-name {
    color: #e5e7eb;
    font-size: 0.8rem;
    font-weight: 500;
}

.qa-suggest-reason {
    color: #6b7280;
    font-size: 0.7rem;
}

.qa-suggest-apply {
    flex-shrink: 0;
    font-size: 0.7rem !important;
    padding: 4px 10px !important;
}

/* --- QA Warning Button State --- */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border-color: #f59e0b !important;
    color: #000 !important;
    font-weight: 700;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
}

/* --- QA Validation Error --- */
.qa-validation-error {
    color: #f87171;
    font-size: 0.8rem;
    padding: 8px 12px;
    margin-top: 8px;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 6px;
}

/* --- Theme Popover --- */
.theme-popover {
    position: fixed;
    z-index: 2000;
    background: #10121a;
    border: 1px solid #2d3048;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    width: 220px;
}

.theme-label {
    color: #f1f5f9;
    font-size: 0.85rem;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.theme-popover input[type="color"] {
    width: 100%;
    height: 36px;
    border: 1px solid #2d3048;
    border-radius: 8px;
    background: #0c0e16;
    cursor: pointer;
    padding: 2px;
    margin-bottom: 10px;
}

.theme-presets {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.theme-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.15);
    cursor: pointer;
    transition: all 0.2s;
}

.theme-swatch:hover {
    transform: scale(1.15);
    border-color: rgba(255,255,255,0.4);
}

.theme-reset {
    width: 100%;
}

/* --- Leaflet overrides for dark theme --- */
.leaflet-control-zoom a {
    background: #10121a !important;
    color: #e5e7eb !important;
    border-color: #2d3048 !important;
}

.leaflet-control-zoom a:hover {
    background: #1a1c28 !important;
}

.leaflet-control-attribution {
    background: rgba(16,18,26,0.8) !important;
    color: #6b7280 !important;
    font-size: 0.6rem !important;
}

.leaflet-control-attribution a {
    color: #94a3b8 !important;
}

/* --- Right-Click Context Menu --- */
.context-menu {
    position: fixed;
    z-index: 9999;
    min-width: 180px;
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    padding: 4px 0;
    font-family: 'Inter', sans-serif;
}

.context-menu-item {
    display: block;
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    color: #e5e7eb;
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s;
}

.context-menu-item:hover {
    background: rgba(220,38,38,0.15);
    color: #fff;
}

.context-menu-item:disabled {
    color: #555;
    cursor: default;
}

.context-menu-item:disabled:hover {
    background: none;
}

.context-menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 4px 0;
}

/* --- Drag Shift Blocks --- */
.shift-cell.drag-handle {
    cursor: col-resize;
}

.shift-cell.drag-target {
    outline: 2px dashed #DC2626 !important;
    outline-offset: -2px;
}

.shift-cell.dragging {
    opacity: 0.5;
}

/* ============================================
   SHOWROOM PRODUCTION VISUAL OVERHAUL
   AI-Generated Assets from Replicate
   (FLUX 1.1 Pro + Recraft V3 SVG)
   ============================================ */

/* === HERO VIDEO BANNER (Minimax AI-generated) === */
.hero-banner {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px;
    background: linear-gradient(transparent, rgba(10,10,20,0.9));
    pointer-events: none;
}

.hero-logo {
    max-height: 50px;
    max-width: 200px;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.hero-powered {
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 8px;
}

.hero-powered strong {
    color: rgba(239,68,68,0.7);
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 12px rgba(0,0,0,0.8), 0 0 40px rgba(220,38,38,0.3);
    letter-spacing: 1.5px;
    margin: 0 0 4px;
}

.hero-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

/* Fallback to static image if video fails */
.hero-banner {
    background: url('../images/bg/hero-dawn.jpg') center/cover no-repeat;
}

@media (max-width: 768px) {
    .hero-banner { height: 140px; }
    .hero-title { font-size: 1.3rem; }
    .hero-overlay { padding: 16px; }
}

/* === SIDEBAR — Dark mining texture with glassmorphism === */
.sidebar {
    background:
        linear-gradient(180deg, rgba(13,13,26,0.95) 0%, rgba(26,26,46,0.95) 100%),
        url('../images/sidebar-bg.jpg') center/cover !important;
    border-right: 1px solid rgba(220,38,38,0.1) !important;
    backdrop-filter: blur(10px);
}

.sidebar .logo-img {
    filter: drop-shadow(0 0 8px rgba(220,38,38,0.3));
}

.sidebar .sidebar-label {
    text-shadow: 0 0 12px rgba(220,38,38,0.2);
}

.sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(220,38,38,0.15), transparent) !important;
    border-left: 3px solid var(--primary, #DC2626);
}

/* === TOPBAR — Gradient with subtle accent line === */
.topbar {
    background: linear-gradient(90deg, #0d0d1a 0%, #1a1a2e 50%, #0d0d1a 100%) !important;
    border-bottom: 2px solid transparent !important;
    border-image: linear-gradient(90deg, transparent, rgba(220,38,38,0.4), transparent) 1 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* === CONTROLS BAR — Enhanced month tabs === */
.controls {
    background: rgba(15,15,30,0.6);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.04);
    backdrop-filter: blur(8px);
}

.controls .month-tabs button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
}

.controls .month-tabs button.active {
    background: linear-gradient(135deg, var(--primary, #DC2626), #ef4444) !important;
    box-shadow: 0 4px 16px rgba(220,38,38,0.5), 0 0 0 1px rgba(255,255,255,0.1) !important;
    transform: translateY(-1px);
}

.controls .month-tabs button:not(.active):hover {
    background: rgba(220,38,38,0.1) !important;
    transform: translateY(-1px);
}

.controls .view-toggle button.active {
    background: linear-gradient(135deg, rgba(220,38,38,0.8), rgba(220,38,38,0.6)) !important;
    box-shadow: 0 2px 12px rgba(220,38,38,0.3) !important;
}

/* === GRID — Iron ore texture background === */
.grid-container {
    background:
        linear-gradient(180deg, rgba(15,15,30,0.97), rgba(15,15,30,0.99)),
        url('../images/bg/grid-texture.jpg') center/cover;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* === PROJECT HEADERS — Mine site card style === */
.grid-project-header {
    background: linear-gradient(90deg, rgba(220,38,38,0.12) 0%, rgba(220,38,38,0.02) 100%) !important;
    border-left: 4px solid var(--primary, #DC2626) !important;
    border-bottom: 1px solid rgba(220,38,38,0.08) !important;
    transition: all 0.2s;
}

.grid-project-header:hover {
    background: linear-gradient(90deg, rgba(220,38,38,0.18) 0%, rgba(220,38,38,0.04) 100%) !important;
}

.grid-project-header td:first-child {
    font-weight: 800;
    text-shadow: 0 0 20px rgba(220,38,38,0.15);
}

/* === SHIFT CELLS — Glowing indicators === */
.shift-cell {
    transition: all 0.15s ease;
    border-radius: 2px;
}

.shift-cell:hover {
    box-shadow: inset 0 0 0 2px rgba(220,38,38,0.4), 0 0 12px rgba(220,38,38,0.15);
    transform: scale(1.05);
    z-index: 2;
    position: relative;
}

/* Shift type colors — enhanced with glow */
.shift-cell.shift-J {
    text-shadow: 0 0 6px rgba(245,158,11,0.5);
}
.shift-cell.shift-N {
    text-shadow: 0 0 6px rgba(139,92,246,0.5);
}
.shift-cell.shift-V {
    text-shadow: 0 0 6px rgba(16,185,129,0.5);
}
.shift-cell.shift-R {
    text-shadow: 0 0 6px rgba(239,68,68,0.5);
}

/* === EMPLOYEE ROWS — Subtle hover effect === */
.grid-employee-row:hover td {
    background: rgba(220,38,38,0.04) !important;
}

.grid-employee-row td:first-child {
    transition: color 0.2s;
}

.grid-employee-row:hover td:first-child {
    color: var(--primary, #DC2626);
}

/* === MODALS — Glassmorphism with mine photo headers === */
.modal-overlay.active {
    backdrop-filter: blur(8px) saturate(1.5);
    background: rgba(0,0,0,0.6) !important;
}

.modal-panel {
    background: rgba(20,20,35,0.98) !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03) !important;
    overflow: hidden;
}

/* Employee modal header image */
.modal-panel[data-editor="employee"]::before,
.modal-panel .modal-header {
    position: relative;
}

/* Modal tabs */
.modal-panel .tab-btn.active {
    background: linear-gradient(135deg, var(--primary, #DC2626), #ef4444) !important;
    box-shadow: 0 2px 12px rgba(220,38,38,0.4) !important;
}

/* Modal form inputs */
.modal-panel input,
.modal-panel select,
.modal-panel textarea {
    background: rgba(0,0,0,0.3) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 8px !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-panel input:focus,
.modal-panel select:focus,
.modal-panel textarea:focus {
    border-color: rgba(220,38,38,0.5) !important;
    box-shadow: 0 0 0 3px rgba(220,38,38,0.1) !important;
    outline: none;
}

/* === CELL EDIT MODAL — Premium buttons === */
.cell-edit-modal {
    background: rgba(20,20,40,0.98) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 12px !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5) !important;
    backdrop-filter: blur(20px);
}

.cell-edit-modal .shift-btn {
    border-radius: 10px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.06);
}

.cell-edit-modal .shift-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* === EMPTY STATE — Full illustration === */
.empty-state-container,
.empty-state {
    background: url('../images/ui/empty-schedule.jpg') center top/contain no-repeat;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 32px;
    border-radius: 16px;
}

.empty-state h3,
.empty-state-container h3 {
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* === MAP VIEW — Enhanced with overlay === */
.map-container {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    min-height: 600px !important;
    height: calc(100vh - 350px) !important;
}

.map-leaflet {
    min-height: 600px !important;
}

/* === TOOLBAR — Floating glass bar === */
.toolbar, .bottom-toolbar {
    background: rgba(15,15,30,0.85) !important;
    backdrop-filter: blur(16px) saturate(1.5);
    border: 1px solid rgba(255,255,255,0.06) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
}

.toolbar button, .bottom-toolbar button {
    border-radius: 8px !important;
    transition: all 0.2s !important;
}

.toolbar button:hover, .bottom-toolbar button:hover {
    background: rgba(220,38,38,0.15) !important;
    transform: translateY(-1px);
}

/* === CONTEXT MENU — Glass panel === */
.context-menu {
    background: rgba(20,20,40,0.95) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 10px !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5) !important;
    overflow: hidden;
}

.context-menu button:hover {
    background: linear-gradient(90deg, rgba(220,38,38,0.15), transparent) !important;
}

/* === COVERAGE INDICATOR — Glowing badges === */
.coverage-badge {
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.coverage-ok {
    background: linear-gradient(135deg, #059669, #10B981) !important;
    box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}

.coverage-warning {
    background: linear-gradient(135deg, #D97706, #F59E0B) !important;
    box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}

.coverage-danger {
    background: linear-gradient(135deg, #DC2626, #EF4444) !important;
    box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}

/* === SCROLLBAR — Custom styled === */
.grid-container::-webkit-scrollbar,
.modal-panel::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.grid-container::-webkit-scrollbar-track,
.modal-panel::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}

.grid-container::-webkit-scrollbar-thumb,
.modal-panel::-webkit-scrollbar-thumb {
    background: rgba(220,38,38,0.3);
    border-radius: 3px;
}

.grid-container::-webkit-scrollbar-thumb:hover,
.modal-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(220,38,38,0.5);
}

/* === ANIMATIONS — Smooth page transitions === */
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.grid-container {
    animation: fadeSlideIn 0.4s ease-out;
}

.modal-panel {
    animation: fadeSlideIn 0.3s ease-out;
}

/* === THEME POPOVER — Enhanced === */
.theme-popover {
    background: rgba(20,20,40,0.98) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 12px !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5) !important;
}

/* === SHOWROOM BADGE — Premium === */
body.dashboard-page::after {
    content: 'DEV SHOWROOM';
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 9999;
    background: linear-gradient(135deg, #DC2626, #991b1b);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 5px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(220,38,38,0.4), 0 0 0 1px rgba(255,255,255,0.1);
    pointer-events: none;
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(220,38,38,0.4); }
    50% { box-shadow: 0 4px 24px rgba(220,38,38,0.6), 0 0 40px rgba(220,38,38,0.1); }
}

/* === GLOBAL BODY — Subtle texture === */
body.dashboard-page {
    background:
        radial-gradient(ellipse at 20% 80%, rgba(220,38,38,0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(59,130,246,0.02) 0%, transparent 50%),
        #0a0a14 !important;
}

/* === LOADING STATES === */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.loading-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* ============================================
   AI ASSISTANT — Beedy Chat Panel
   ============================================ */

/* Floating AI button */
#beedy-ai-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #DC2626, #991b1b);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(220,38,38,0.4), 0 0 0 1px rgba(255,255,255,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    user-select: none;
}

#beedy-ai-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 32px rgba(220,38,38,0.5);
}

.ai-btn-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.ai-btn-label {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Chat panel */
#beedy-ai-panel {
    position: fixed;
    bottom: 80px;
    left: 24px;
    z-index: 99999;
    width: 420px;
    max-width: calc(100vw - 48px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: rgba(12, 12, 24, 0.98);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(220,38,38,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    color: #E5E5E5;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#beedy-ai-panel.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Header */
.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(220,38,38,0.1), rgba(220,38,38,0.03));
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.ai-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-avatar {
    font-size: 1.6rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #DC2626, #991b1b);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(220,38,38,0.3);
}

.ai-name {
    font-weight: 800;
    font-size: 1rem;
    color: white;
}

.ai-role {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.ai-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.ai-close:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

/* Messages area */
.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-messages::-webkit-scrollbar { width: 4px; }
.ai-messages::-webkit-scrollbar-thumb { background: rgba(220,38,38,0.2); border-radius: 2px; }

.ai-msg {
    display: flex;
    gap: 10px;
    max-width: 95%;
    animation: msgFadeIn 0.3s ease;
}

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

.ai-msg-bot {
    align-self: flex-start;
}

.ai-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-msg-avatar {
    width: 28px;
    height: 28px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(220,38,38,0.1);
    border-radius: 8px;
}

.ai-msg-user .ai-msg-avatar { display: none; }

.ai-msg-content {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.85rem;
    line-height: 1.6;
}

.ai-msg-content p { margin: 0 0 8px; }
.ai-msg-content p:last-child { margin: 0; }
.ai-msg-content ul { margin: 4px 0; padding-left: 16px; }
.ai-msg-content li { margin: 2px 0; }
.ai-msg-content strong { color: #EF4444; }
.ai-msg-content code { background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; }
.ai-msg-content blockquote {
    border-left: 3px solid #DC2626;
    padding: 8px 12px;
    margin: 8px 0;
    background: rgba(220,38,38,0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}
.ai-msg-content h3, .ai-msg-content h4 {
    color: #EF4444;
    margin: 12px 0 4px;
    font-size: 0.9rem;
}

.ai-msg-user .ai-msg-content {
    background: linear-gradient(135deg, rgba(220,38,38,0.15), rgba(220,38,38,0.08));
    border-color: rgba(220,38,38,0.15);
}

/* Typing indicator */
.typing-dots {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(220,38,38,0.5);
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Quick suggestion buttons */
.ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 16px;
    border-top: 1px solid rgba(255,255,255,0.04);
    flex-shrink: 0;
}

.ai-suggestions button {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.6);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.ai-suggestions button:hover {
    background: rgba(220,38,38,0.1);
    border-color: rgba(220,38,38,0.2);
    color: white;
}

/* Input area */
.ai-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
}

#ai-input {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 14px;
    color: #E5E5E5;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    resize: none;
    outline: none;
    max-height: 120px;
    transition: border-color 0.2s;
}

#ai-input:focus {
    border-color: rgba(220,38,38,0.4);
}

#ai-input::placeholder {
    color: rgba(255,255,255,0.2);
}

#ai-send {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #DC2626, #991b1b);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

#ai-send:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 12px rgba(220,38,38,0.4);
}

/* Mic button */
#ai-mic {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

#ai-mic:hover {
    background: rgba(220,38,38,0.1);
    color: white;
}

#ai-mic.recording {
    background: linear-gradient(135deg, #DC2626, #991b1b);
    color: white;
    animation: micPulse 1s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(220,38,38,0.4);
}

@keyframes micPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(220,38,38,0.3); }
    50% { box-shadow: 0 0 24px rgba(220,38,38,0.6); }
}

/* Voice bar */
.ai-voice-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(90deg, rgba(220,38,38,0.1), rgba(220,38,38,0.05));
    border-top: 1px solid rgba(220,38,38,0.15);
    flex-shrink: 0;
}

#voice-status {
    font-size: 0.75rem;
    font-weight: 600;
    color: #EF4444;
    flex: 1;
}

.voice-stop-btn {
    background: rgba(220,38,38,0.2);
    border: 1px solid rgba(220,38,38,0.3);
    color: #EF4444;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

/* Voice wave animation */
.voice-wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 20px;
}

.voice-wave span {
    width: 3px;
    height: 8px;
    background: #EF4444;
    border-radius: 2px;
    animation: voiceWave 0.8s ease-in-out infinite;
}

.voice-wave span:nth-child(1) { animation-delay: 0s; }
.voice-wave span:nth-child(2) { animation-delay: 0.1s; }
.voice-wave span:nth-child(3) { animation-delay: 0.2s; }
.voice-wave span:nth-child(4) { animation-delay: 0.3s; }
.voice-wave span:nth-child(5) { animation-delay: 0.4s; }

@keyframes voiceWave {
    0%, 100% { height: 4px; opacity: 0.4; }
    50% { height: 18px; opacity: 1; }
}

/* TTS toggle */
.ai-tts-toggle {
    padding: 4px 16px 8px;
    flex-shrink: 0;
}

/* Mobile responsive */
@media (max-width: 480px) {
    #beedy-ai-panel {
        left: 8px;
        right: 8px;
        bottom: 70px;
        width: auto;
        height: calc(100vh - 90px);
    }
    #beedy-ai-btn {
        left: 12px;
        bottom: 12px;
        padding: 10px 16px;
    }
    .ai-btn-label { display: none; }
}

/* === HELP FAB — Enhanced === */
.help-fab {
    background: linear-gradient(135deg, var(--primary, #DC2626), #ef4444) !important;
    box-shadow: 0 4px 16px rgba(220,38,38,0.4) !important;
    border: 2px solid rgba(255,255,255,0.1) !important;
    transition: all 0.3s !important;
}

.help-fab:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 8px 24px rgba(220,38,38,0.5) !important;
}
