/* ==========================================
   User Navigation & Auth Modal Styles
   ========================================== */
.user-nav-section {
  display: inline-flex;
  align-items: center;
}

.user-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  padding: 4px 10px 4px 12px;
  border-radius: 9999px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.user-avatar {
  font-size: 1rem;
  line-height: 1;
}

.user-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary);
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  padding: 3px 8px !important;
  font-size: 0.725rem !important;
  border-radius: 9999px !important;
  background: var(--card-bg);
  color: #b91c1c !important;
  border-color: #fca5a5 !important;
}

.btn-logout:hover {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
}

.auth-modal-content {
  max-width: 480px;
  height: auto;
  max-height: 90vh;
  max-height: 90dvh;
  border-radius: 12px;
}

.auth-modal-header {
  background: var(--gray-bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 8px;
}

.auth-tab-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-tab-btn.active {
  background: var(--card-bg);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.auth-modal-body {
  background: var(--card-bg);
  padding: 22px 24px;
  overflow-y: auto;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-optional-section {
  background: var(--gray-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 4px;
}

.auth-optional-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.auth-switch-text {
  text-align: center;
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 10px;
}

.auth-switch-text a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.auth-switch-text a:hover {
  text-decoration: underline;
}

.auth-alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-alert.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.auth-alert.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.btn-block {
  width: 100%;
  padding: 10px 16px;
}

/* ==========================================
   Feature 7: Fill From Last Week Prompt Banner
   ========================================== */
.last-week-prompt-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
  animation: fadeInDown 0.25s ease-out;
}

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

.prompt-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prompt-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.prompt-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prompt-text-group strong {
  font-size: 0.925rem;
  color: var(--primary);
}

.prompt-text-group span {
  font-size: 0.825rem;
  color: var(--text-muted-dark);
}

.prompt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================
   Feature 6: Standardized Allowances Quick-Picker
   ========================================== */
.allowance-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.allowance-input-wrap.menu-open {
  z-index: 10000 !important;
}

.timesheet-table tr.has-open-allowance-menu {
  z-index: 10000 !important;
  position: relative;
}

.allowance-input {
  padding-right: 32px !important;
  width: 100%;
  text-overflow: ellipsis;
}

.btn-allowance-picker {
  position: absolute;
  right: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  font-size: 0.95rem;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.15s ease;
  color: var(--text-muted);
}

.btn-allowance-picker:hover {
  background: #e2e8f0;
  transform: scale(1.1);
}

.allowance-menu {
  position: fixed;
  z-index: 100000 !important;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.12);
  width: 290px;
  max-height: 320px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  animation: allowanceMenuFadeIn 0.12s ease-out;
}

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

.allowance-menu.open-upward {
  box-shadow: 0 -16px 36px rgba(0, 0, 0, 0.22), 0 -4px 12px rgba(0, 0, 0, 0.12);
}

.allowance-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-allowance-edit-km {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 0.7rem;
  cursor: pointer;
  line-height: 1;
  transition: all 0.12s ease;
}

.btn-allowance-edit-km:hover {
  background: var(--primary-light);
  border-color: #93c5fd;
}

.allowance-menu-header {
  padding: 8px 12px;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--gray-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.allowance-item {
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
  border-bottom: 1px solid var(--border);
}

.allowance-item:hover,
.allowance-item:focus {
  background: var(--primary-light);
  color: var(--primary);
}

.allowance-item.is-selected {
  background: #f0fdf4;
  color: #166534;
  font-weight: 600;
}

:root[data-theme="dark"] .allowance-menu {
  background: var(--card-bg);
  border-color: var(--border);
}

:root[data-theme="dark"] .allowance-item {
  color: var(--text-main);
  border-bottom-color: var(--border);
}

:root[data-theme="dark"] .allowance-item:hover,
:root[data-theme="dark"] .allowance-item:focus {
  background: rgba(96, 165, 250, 0.2);
  color: #93c5fd;
}

:root[data-theme="dark"] .allowance-item.is-selected {
  background: #064e3b;
  color: #a7f3d0;
}

.allowance-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
  background: var(--card-bg);
  transition: all 0.12s ease;
  color: transparent;
}

.allowance-item.is-selected .allowance-checkbox {
  background: #10b981;
  border-color: #059669;
  color: white;
}

.allowance-menu-footer {
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  background: var(--gray-bg);
  display: flex;
  justify-content: flex-end;
}

.btn-allowance-done {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 5px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-allowance-done:hover {
  background: var(--primary-hover);
}

/* ==========================================
   Travel Km Prompt Modal Styles
   ========================================== */
#travelKmModal {
  z-index: 100001 !important;
}

.travel-km-modal-content {
  max-width: 420px;
  height: auto;
  max-height: 90vh;
  max-height: 90dvh;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.travel-km-modal-header {
  background: var(--gray-bg);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.travel-km-modal-body {
  background: var(--card-bg);
  padding: 20px;
}

.travel-km-intro {
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 14px;
}

.km-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.km-input-wrapper input {
  padding-right: 48px;
  font-size: 1.1rem;
  font-weight: 700;
  height: 44px;
}

.km-suffix {
  position: absolute;
  right: 14px;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.km-chips-label {
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

.km-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.btn-km-chip {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: 9999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-km-chip:hover {
  background: var(--primary-light);
  border-color: #93c5fd;
  color: var(--primary);
}

.travel-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ==========================================
   Text-to-Signature Generator Modal Styles
   ========================================== */
.text-sig-modal-content {
  max-width: 520px;
  height: auto;
  max-height: 90vh;
  max-height: 90dvh;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.text-sig-modal-body {
  background: var(--card-bg);
  padding: 20px;
  overflow-y: auto;
}

.text-sig-target-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.text-sig-target-desc strong {
  color: var(--primary);
}

.sig-style-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--gray-bg);
}

.sig-style-card {
  padding: 8px 12px;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.15s ease;
  user-select: none;
}

.sig-style-card:hover {
  border-color: #93c5fd;
  background: #f0f9ff;
}

.sig-style-card.active {
  border-color: var(--primary);
  background: #e8f2f9;
  box-shadow: 0 0 0 1px var(--primary);
}

.sig-style-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.sig-style-name {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--text-muted);
}

.sig-style-card.active .sig-style-name {
  color: var(--primary);
}

.sig-style-sample {
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.sig-color-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-sig-color {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-sig-color:hover {
  background: var(--bg-hover);
}

.btn-sig-color.active {
  border-color: var(--primary);
  background: #e8f2f9;
  color: var(--primary);
}

.color-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.sig-preview-section {
  background: var(--gray-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-top: 6px;
}

.sig-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.sig-preview-canvas-wrapper {
  background: var(--card-bg);
  border: 2px dashed #cbd5e1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  overflow: hidden;
}

.text-sig-preview-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================
   Feature 13: Weekly Hours Trend Chart
   ========================================== */
.history-chart-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 12px 18px 8px 18px;
  padding: 14px 18px 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.history-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.chart-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

#chartAvgBadge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 16px;
  border: 1px solid rgba(10, 77, 125, 0.15);
  font-variant-numeric: tabular-nums;
}

:root[data-theme="dark"] #chartAvgBadge {
  background: rgba(96, 165, 250, 0.16);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.3);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.725rem;
  color: var(--text-muted);
  background: var(--gray-bg);
  padding: 3px 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.legend-color-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-color-dot.normal { background: #0a4d7d; }
.legend-color-dot.ot15 { background: #f59e0b; }
.legend-color-dot.ot20 { background: #f97316; }
.legend-color-dot.ot25 { background: #8b5cf6; }

:root[data-theme="dark"] .legend-color-dot.normal { background: #0284c7; }

.chart-canvas-wrapper {
  width: 100%;
  height: 130px;
  position: relative;
}

#weeklyHoursChartCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

/* Interactive Floating Tooltip */
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  z-index: 20;
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 145px;
  transform: translate(-50%, -100%);
  margin-top: -6px;
  transition: opacity 0.12s ease;
}

.chart-tooltip.visible {
  display: flex;
}

.chart-tooltip-header {
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 0.73rem;
}

.chart-tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
}

.chart-tooltip-row .label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
}

.chart-tooltip-row .value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ==========================================
   Feature 3: Document Thumbnails in History
   ========================================== */
.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-thumb-canvas {
  width: 50px;
  height: 65px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  flex-shrink: 0;
}

.history-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.overview-thumb-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.overview-thumb-canvas {
  width: 180px;
  height: 230px;
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  background: var(--card-bg);
}

/* ==========================================
   Timesheet Approved & Locked Banner
   ========================================== */
.timesheet-locked-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 8px;
  padding: 12px 18px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(22, 101, 52, 0.08);
}

:root[data-theme="dark"] .timesheet-locked-banner {
  background: #052e16;
  border-color: #166534;
  color: #f0fdf4;
}

.locked-banner-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.locked-banner-content {
  flex: 1;
  font-size: 0.92rem;
  color: #14532d;
}

:root[data-theme="dark"] .locked-banner-content {
  color: #bbf7d0;
}

.locked-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-unlock {
  background: white;
  color: #15803d !important;
  border-color: #86efac !important;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-unlock:hover {
  background: #dcfce7 !important;
  border-color: #22c55e !important;
}

:root[data-theme="dark"] .btn-unlock {
  background: #14532d;
  color: #dcfce7 !important;
  border-color: #22c55e !important;
}

:root[data-theme="dark"] .btn-unlock:hover {
  background: #166534;
}

/* ==========================================================================
   Timesheet Locked State - Greyed Out Visual Styling
   ========================================================================== */

/* Subtle card styling when locked */
.timesheet-locked .card {
  border-color: #cbd5e1;
}

:root[data-theme="dark"] .timesheet-locked .card {
  border-color: #334155;
}

/* Grey out all form input fields when locked */
.timesheet-locked input:not(#week_ending),
.timesheet-locked select,
.timesheet-locked textarea,
.timesheet-locked .form-control:not(#week_ending),
.field-locked {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  outline: none !important;
  user-select: text;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

:root[data-theme="dark"] .timesheet-locked input:not(#week_ending),
:root[data-theme="dark"] .timesheet-locked select,
:root[data-theme="dark"] .timesheet-locked textarea,
:root[data-theme="dark"] .timesheet-locked .form-control:not(#week_ending),
:root[data-theme="dark"] .field-locked {
  background-color: #1e293b !important;
  color: #94a3b8 !important;
  border-color: #334155 !important;
}

/* Table input borders and compact row styling when locked */
.timesheet-locked .timesheet-table input,
.timesheet-locked .timesheet-table select {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #e2e8f0 !important;
}

:root[data-theme="dark"] .timesheet-locked .timesheet-table input,
:root[data-theme="dark"] .timesheet-locked .timesheet-table select {
  background-color: #1e293b !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

/* Specific styling for locked select dropdowns */
.timesheet-locked select,
.timesheet-locked select:disabled {
  opacity: 0.9;
  cursor: not-allowed !important;
}

/* Dim and disable interactive control buttons */
.timesheet-locked .btn-allowance-picker,
.timesheet-locked .btn-stepper,
.timesheet-locked .row-actions button,
.timesheet-locked .sig-actions button,
.timesheet-locked .sig-actions label,
.timesheet-locked .locked-disabled {
  opacity: 0.3 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
  filter: grayscale(100%);
  transition: opacity 0.2s ease;
}

/* Signature boxes when locked */
.timesheet-locked .sig-box {
  background-color: #f8fafc;
  border: 1.5px dashed #cbd5e1;
}

:root[data-theme="dark"] .timesheet-locked .sig-box {
  background-color: #0b1329;
  border-color: #334155;
}

.timesheet-locked .sig-canvas-container,
.sig-canvas-container.sig-locked {
  background-color: #f1f5f9 !important;
  border: 1.5px solid #cbd5e1 !important;
  cursor: not-allowed !important;
  position: relative;
}

:root[data-theme="dark"] .timesheet-locked .sig-canvas-container,
:root[data-theme="dark"] .sig-canvas-container.sig-locked {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

/* Locked badge watermark inside signature containers */
.timesheet-locked .sig-canvas-container::after,
.sig-canvas-container.sig-locked::after {
  content: "🔒 Locked";
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(241, 245, 249, 0.92);
  color: #475569;
  border: 1px solid #cbd5e1;
  pointer-events: none;
  backdrop-filter: blur(2px);
  z-index: 5;
}

:root[data-theme="dark"] .timesheet-locked .sig-canvas-container::after,
:root[data-theme="dark"] .sig-canvas-container.sig-locked::after {
  background: rgba(30, 41, 59, 0.92);
  color: #94a3b8;
  border-color: #334155;
}

/* Timesheet table rows subtle grey tint when locked */
.timesheet-locked .timesheet-table tbody tr {
  background-color: #fafbfc;
}

.timesheet-locked .timesheet-table tbody tr:nth-child(even) {
  background-color: #f1f5f9;
}

:root[data-theme="dark"] .timesheet-locked .timesheet-table tbody tr {
  background-color: #0f172a;
}

:root[data-theme="dark"] .timesheet-locked .timesheet-table tbody tr:nth-child(even) {
  background-color: #141e33;
}

/* Ensure week-ending bar and selector remain fully prominent and interactive */
.timesheet-locked .week-ending-bar {
  background: var(--card-bg);
  border-color: var(--primary);
  opacity: 1 !important;
}

.timesheet-locked #week_ending {
  background-color: var(--card-bg) !important;
  color: var(--text-main) !important;
  border-color: var(--border) !important;
  cursor: pointer !important;
}

/* ==========================================================================
   Mandatory Authentication Gate
   ========================================================================== */
body.auth-required-active #mainContent,
body.auth-required-active #bottomBar {
  filter: blur(5px);
  opacity: 0.35;
  pointer-events: none !important;
  user-select: none !important;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

body.auth-required-active .navbar-actions button:not(#btnToggleTheme):not(#btnOpenAuthModal) {
  pointer-events: none !important;
  opacity: 0.3 !important;
}

.auth-required-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eff6ff;
  color: #1e40af;
  border-left: 4px solid #3b82f6;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 12px 16px 0 16px;
  font-size: 0.88rem;
  line-height: 1.4;
}

:root[data-theme="dark"] .auth-required-banner {
  background: #1e293b;
  color: #93c5fd;
  border-left-color: #60a5fa;
}

.auth-required-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.auth-required-text strong {
  color: #1d4ed8;
}

:root[data-theme="dark"] .auth-required-text strong {
  color: #bfdbfe;
}

.auth-modal-subtitle {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0 0 16px 0;
  text-align: center;
  line-height: 1.4;
}

