:root {
  --kbInset: 0px;
  --update-bar-height: 0px; /* Set to 36px when update is available */
}

/* ============================================
   Update Bar - persistent full-width bar above header
   ============================================ */
#updateBar {
  display: none; /* hidden until update available */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: rgba(99, 102, 241, 0.55);
  border: none;
  border-bottom: 1px solid rgba(129, 140, 248, 0.5);
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 9999;
  animation: update-bar-glow 3s ease-in-out infinite;
  transition: background 0.2s ease;
}

#updateBar.visible {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#updateBar:hover,
#updateBar:focus {
  background: rgba(99, 102, 241, 0.75);
  animation: none;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.5);
}

#updateBar:active {
  background: rgba(99, 102, 241, 0.85);
}

/* Gentle pulsing glow */
@keyframes update-bar-glow {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
  }
  50% {
    box-shadow: 0 2px 16px rgba(99, 102, 241, 0.45), 0 4px 24px rgba(139, 92, 246, 0.25);
  }
}

/* Push header and content down when update bar is visible */
body.has-update .appbar {
  top: 36px;
}

/* Adjust any fixed/sticky elements */
body.has-update {
  --update-bar-height: 36px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  #updateBar {
    height: 32px;
    font-size: 0.8rem;
  }
  
  body.has-update .appbar {
    top: 32px;
  }
}

/* Accessibility helpers */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-150%);
  background: var(--accent, #6c63ff);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0 0 12px 12px;
  font-weight: 600;
  z-index: 1000;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.skip-link:focus {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Device-specific styles: Hide keyboard shortcuts on mobile/touch devices */
.is-mobile .desktop-only,
.is-touch .desktop-only,
.is-mobile .keyboard-shortcuts,
.is-touch .keyboard-shortcuts {
  display: none !important;
}

/* Ensure touch targets are large enough on mobile */
.is-mobile button,
.is-touch button {
  min-height: 44px;
  min-width: 44px;
}

.is-mobile .pill,
.is-touch .pill {
  padding: 0.65em 1.2em;
}

.confirm-btn {
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 1em;
  font-weight: bold;
  margin-left: 8px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(34,197,94,0.12);
}
.confirm-btn:disabled {
  background: #b3e5c7;
  color: #888;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.7;
}

/* Photo capture styles */
.photo-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.photo-btn {
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.95em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(79,70,229,0.15);
  min-width: 100px;
}

.photo-btn:hover {
  background: #4338ca;
  box-shadow: 0 4px 12px rgba(79,70,229,0.25);
  transform: translateY(-1px);
}

.photo-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(79,70,229,0.2);
}

.photo-preview-area {
  background: #1e1b3a;
  border-radius: 12px;
  padding: 16px;
  border: 2px dashed #3d4a7a;
  transition: border-color 0.3s;
}

.photo-preview-area.has-photos {
  border-color: #4f46e5;
  border-style: solid;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  align-items: start;
}

.photo-thumbnail {
  position: relative;
  background: #2a2f4a;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  border: 2px solid #3a4264;
  transition: all 0.2s;
}

/* Review Step Styles */
.review-task-card {
  background: var(--surface-variant);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.review-task-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.review-task-title {
  margin: 0;
  color: var(--primary);
  font-size: 1.1em;
}

.review-task-hours {
  color: var(--text-secondary);
  font-weight: 600;
}

.review-task-description {
  margin: 0.5rem 0;
  line-height: 1.4;
  color: var(--text);
}

.review-task-codes {
  margin: 0.5rem 0;
}

.review-task-photo-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.review-task-photo-info {
  color: var(--success);
  font-weight: 500;
}

.review-task-photo-btn {
  font-size: 1em;
  padding: 0.6em 1.2em;
}

.review-empty-state {
  color: var(--text-secondary);
  font-style: italic;
  padding: 1rem 0;
}

/* Editable Review Card */
.review-editable {
  padding: 0;
  overflow: hidden;
}

.review-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}

.review-row:last-child {
  border-bottom: none;
}

.review-row-label {
  font-size: 0.8em;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

/* Direct edit input container */
.review-input-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.review-direct-input {
  flex: 1;
  min-width: 0;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  font-size: 0.95em;
}

.review-direct-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(30, 41, 59, 0.8);
}

.review-direct-input[type="number"] {
  max-width: 100px;
}

.review-direct-input[type="date"] {
  max-width: 160px;
}

/* Save button - appears when value changes */
.review-save-btn {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #22c55e;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.review-save-btn:hover {
  background: #22c55e;
  color: white;
}

.review-save-btn-active {
  background: #22c55e;
  color: white;
  animation: pulse-save 1s ease-in-out infinite;
}

@keyframes pulse-save {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Search-based fields (Job, Cost Code) */
.review-search-container {
  flex-direction: column;
  align-items: stretch;
}

.review-current-value {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.review-current-value:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.review-search-input {
  width: 100%;
}

.review-search-cancel {
  background: rgba(100, 116, 139, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text-secondary);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85em;
  cursor: pointer;
  margin-top: 0.5rem;
  align-self: flex-start;
}

.review-search-cancel:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.review-code-desc {
  color: var(--text-secondary);
  font-size: 0.9em;
}

.review-row-value {
  font-size: 1em;
  color: var(--text);
  word-break: break-word;
}

.review-row-value strong {
  color: var(--primary);
}

.review-hours-value {
  font-weight: 700;
  font-size: 1.1em;
  color: var(--success);
}

.review-edit-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8em;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.review-edit-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Inline edit form */
.review-row-value-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.review-inline-edit {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.review-inline-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.95em;
}

.review-inline-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.review-inline-textarea {
  resize: vertical;
  min-height: 60px;
}

.review-inline-btns {
  display: flex;
  gap: 0.5rem;
}

.review-inline-save,
.review-inline-cancel {
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 600;
  transition: all 0.15s ease;
}

.review-inline-save {
  background: var(--success);
  color: white;
}

.review-inline-save:hover {
  filter: brightness(1.1);
}

.review-inline-cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.review-inline-cancel:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

/* Job/Code search results in review */
.review-job-results {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 10;
}

.review-job-results:empty {
  display: none;
}

.review-job-result-item {
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  font-size: 0.85em;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-job-result-item:last-child {
  border-bottom: none;
}

.review-job-result-item:hover {
  background: rgba(99, 102, 241, 0.15);
}

.review-job-result-item:active {
  background: rgba(99, 102, 241, 0.25);
}

.review-job-result-item strong {
  color: var(--primary);
  font-weight: 600;
  margin-right: 0.5rem;
}

.review-code-pill {
  font-size: 0.85em;
  padding: 0.25rem 0.5rem;
  display: inline-block;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.review-photo-indicator {
  color: var(--success);
  font-weight: 500;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .review-row {
    grid-template-columns: 80px 1fr auto;
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .review-row-label {
    font-size: 0.75em;
  }
  
  .review-row-value {
    font-size: 0.9em;
  }
  
  .review-edit-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.75em;
  }
}

.review-task-meta {
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.review-employee {
  font-weight: 600;
  color: var(--text);
}

.review-code-label {
  margin-left: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9em;
}

.review-task-miles {
  font-size: 0.9em;
  color: var(--text-secondary);
  margin: 0.5rem 0;
}

.review-task-no-photo {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.9em;
}

.review-photo-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.review-photo-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.review-photo-more {
  font-size: 0.85em;
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
}

.review-task-notes {
  margin-top: 0.75rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  font-size: 0.9em;
  line-height: 1.4;
}

/* Photo Reminder Dialog Styles */
.photo-reminder-dialog {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.photo-reminder-content {
  background: var(--surface);
  padding: 2rem;
  border-radius: 12px;
  max-width: 500px;
  margin: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-height: 80vh;
  overflow-y: auto;
}

.photo-reminder-title {
  margin-top: 0;
  color: var(--primary);
  font-size: 1.5em;
}

.photo-reminder-message {
  line-height: 1.6;
  margin: 1rem 0 0.5rem 0;
}

.photo-reminder-task-list {
  margin: 0.75rem 0 1rem 0;
  padding-left: 0;
  list-style: none;
  max-height: 400px;
  overflow-y: auto;
}

.photo-reminder-task-item {
  margin: 0.5rem 0;
  color: var(--text);
}

.photo-reminder-task-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
}

.photo-reminder-task-text {
  flex: 1;
  min-width: 150px;
  font-weight: 500;
}

.photo-reminder-inline-btn {
  flex-shrink: 0;
  font-size: 0.9em;
  padding: 0.4em 0.8em;
}

.photo-reminder-thumbnails {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-basis: 100%;
  padding-left: 0;
}

.photo-reminder-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--success, #10b981);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.photo-reminder-more {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 600;
  color: var(--text-secondary, #666);
}

.photo-reminder-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.photo-reminder-add-btn {
  font-size: 1.1em;
  padding: 0.75em 1.5em;
}

/* Photo Source Popup - for camera/gallery choice */
.photo-source-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: fadeIn 0.15s ease-out;
}

.photo-source-popup {
  background: var(--surface, #1e1e2e);
  border-radius: 16px;
  padding: 1rem;
  min-width: 200px;
  max-width: 280px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.photo-source-popup-title {
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary, #888);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.photo-source-popup-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  color: white;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.photo-source-popup-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.5);
}

.photo-source-popup-btn:active {
  transform: scale(0.98);
}

.photo-source-popup-cancel {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-secondary, #888);
  margin-bottom: 0;
  margin-top: 0.25rem;
}

.photo-source-popup-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.photo-source-icon {
  font-size: 1.3em;
}

/* Gentle Photo Reminder Popup Styles */
.gentle-photo-reminder-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
}

.gentle-photo-reminder-modal {
  background: var(--surface, #1a1a2e);
  padding: 1.5rem 2rem;
  border-radius: 12px;
  max-width: 400px;
  margin: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.gentle-photo-reminder-message {
  font-size: 1.1rem;
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
  color: var(--text, #fff);
}

.gentle-photo-reminder-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.gentle-photo-reminder-actions .pill {
  min-width: 120px;
}

/* Task card highlight for missing photos */
.record-card--missing-photo {
  animation: missing-photo-pulse 1.5s ease-in-out 3;
  box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.6), 0 0 15px rgba(251, 146, 60, 0.3);
}

@keyframes missing-photo-pulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.6), 0 0 15px rgba(251, 146, 60, 0.3);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.9), 0 0 25px rgba(251, 146, 60, 0.5);
  }
}

/* ========== Submit Confirmation Panel ========== */
/* Calm, non-celebratory confirmation with email fallback options */
.submit-confirmation-panel {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface, #1a1a2e);
  border: 1px solid var(--border, #333);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  max-width: 400px;
  width: calc(100% - 2rem);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 10001;
  animation: slideUpConfirm 0.3s ease-out;
}

@keyframes slideUpConfirm {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.submit-confirmation-panel h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text, #fff);
}

.submit-confirmation-message {
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
  color: var(--text-muted, #aaa);
  line-height: 1.4;
}

.submit-confirmation-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.submit-confirmation-actions .pill {
  flex: 1;
  min-width: 100px;
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
}

.submit-confirmation-points {
  margin: 1rem 0 0 0;
  font-size: 0.9rem;
  color: var(--text-muted, #aaa);
  text-align: center;
  border-top: 1px solid var(--border, #333);
  padding-top: 0.75rem;
}

/* Direct mailto link - most reliable fallback for mobile */
.submit-confirmation-link {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #333);
  text-align: center;
}

.mailto-direct-link {
  display: inline-block;
  color: var(--accent, #6c63ff);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: underline;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: rgba(108, 99, 255, 0.1);
  transition: background 0.2s ease;
}

.mailto-direct-link:hover,
.mailto-direct-link:active {
  background: rgba(108, 99, 255, 0.2);
  text-decoration: none;
}

/* Primary mailto button - the main action */
.submit-confirmation-primary {
  margin: 1rem 0;
  text-align: center;
}

.mailto-primary-button {
  display: inline-block;
  width: 100%;
  max-width: 320px;
  padding: 1rem 1.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent, #6c63ff);
  border-radius: 12px;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.mailto-primary-button:hover,
.mailto-primary-button:focus {
  background: var(--accent-hover, #5a52e0);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(108, 99, 255, 0.4);
  text-decoration: none;
  color: #fff;
}

.mailto-primary-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(108, 99, 255, 0.3);
}

/* Helper text below primary button */
.submit-confirmation-helper {
  margin: 0.75rem 0 1rem 0;
  font-size: 0.85rem;
  color: var(--text-muted, #888);
  text-align: center;
  font-style: italic;
}

/* Secondary actions row */
.submit-confirmation-actions.secondary-actions {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #333);
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .submit-confirmation-panel {
    bottom: 0;
    border-radius: 12px 12px 0 0;
    width: 100%;
    max-width: 100%;
  }
  
  .submit-confirmation-actions {
    flex-direction: column;
  }
  
  .submit-confirmation-actions .pill {
    width: 100%;
  }
  
  .mailto-direct-link {
    display: block;
    font-size: 1.2rem;
    padding: 1rem;
  }
  
  .mailto-primary-button {
    max-width: 100%;
    font-size: 1.15rem;
    padding: 1.1rem 1.5rem;
  }
}


.photo-thumbnail:hover {
  border-color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79,70,229,0.15);
}

.photo-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(239,68,68,0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.photo-remove:hover {
  background: rgba(239,68,68,1);
  transform: scale(1.1);
}

.photo-status {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.photo-status.uploading {
  background: rgba(245,158,11,0.9);
}

.photo-status.uploaded {
  background: rgba(34,197,94,0.9);
}

.photo-status.error {
  background: rgba(239,68,68,0.9);
}

/* Enhanced photo styles for Google Drive integration */
.drive-link-input {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.photo-thumbnail.linked-photo {
  border: 2px solid #10b981;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.photo-thumbnail .photo-image-container {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
  border-radius: 8px;
}

.photo-thumbnail .link-overlay {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(16, 185, 129, 0.9);
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

.photo-description {
  font-size: 11px;
  color: #374151;
  margin-top: 4px;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.photo-link {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 8px;
  background: #3b82f6;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  transition: background 0.2s;
}

.photo-link:hover {
  background: #2563eb;
}

.photo-btn {
  position: relative;
  overflow: hidden;
}

.photo-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.photo-btn:hover::before {
  left: 100%;
}

/* Diverse color scheme for different photo buttons */
.photo-btn:nth-child(1) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.photo-btn:nth-child(2) {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.photo-btn:nth-child(3) {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.photo-btn:nth-child(1):hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.photo-btn:nth-child(2):hover {
  background: linear-gradient(135deg, #ec4899 0%, #ef4444 100%);
}

.photo-btn:nth-child(3):hover {
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
}

@media (max-width: 600px) {
  .photo-controls {
    gap: 8px;
  }
  
  .photo-btn {
    padding: 8px 12px;
    font-size: 0.9em;
    min-width: 90px;
  }
  
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
  }
}
/* Responsive table for This Week section */
.responsive-table {
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;}
.table {
  width: 100%;
  min-width: 500px; /* Reduced from 600px for better mobile fit */
  border-collapse: collapse;
  table-layout: auto;
  box-sizing: border-box;}
.table th, .table td {
  padding: 4px 3px; /* Reduced padding for mobile */
  text-align: left;
  word-break: break-word;
  font-size: 0.85em; /* Slightly smaller font for mobile */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* On larger screens, allow more spacing */
@media (min-width: 600px) {
  .table {
    min-width: 600px; /* Restore full width on larger screens */
  }
  .table th, .table td {
    padding: 8px 6px;
    white-space: normal;
    font-size: 1em;
  }
  .table {
    min-width: 700px;
  }
}

/* For large screens, more comfortable spacing */
@media (min-width: 900px) {
  .table {
    min-width: 800px;
  }
  .table th, .table td {
    padding: 10px 8px;
  }
}
@media (max-width: 600px) {
  .table th, .table td {
    font-size: 0.85em; /* Smaller font for better fit */
    padding: 5px 2px; /* Reduced padding */
  }
  .table {
    font-size: 0.9em;
    min-width: 500px; /* Reduced minimum width for mobile */
  }
  
  /* Mobile card improvements */
  #weekCards .this-week-entry-card {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #2a2f4a;
    border: 1px solid #3a4264;
  }
  
  #weekCards .this-week-entry-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0;
    padding: 4px 0;
    border-bottom: 1px solid #3a4264;
  }
  
  #weekCards .this-week-entry-row:last-child {
    border-bottom: none;
  }
  
  #weekCards .this-week-entry-label {
    font-weight: 600;
    color: #8892b0;
    min-width: 70px;
    font-size: 0.85em;
  }
  
  #weekCards .this-week-entry-value {
    color: #e2e8f0;
    font-size: 0.9em;
    text-align: right;
    word-break: break-word;
  }
}
.row-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: 24px;
  width: 100%;
}

.button-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.missing-fields-warning {
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  color: #ff9800;
  font-size: 0.95em;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.missing-fields-warning .warning-icon {
  font-size: 1.1em;
  flex-shrink: 0;
}

.missing-fields-warning .warning-text {
  line-height: 1.4;
}

.missing-fields-warning #missingFieldsList {
  font-weight: 600;
  color: #ffb300;
}

.row-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: 24px;
  width: 100%;
}

.button-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.missing-fields-warning {
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  color: #ff9800;
  font-size: 0.95em;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

/* Big action button for Add Entry */
.big-action {
  display: block;
  width: 100%;
  max-width: 340px;
  margin: 18px auto 0 auto;
  padding: 18px 0;
  font-size: 1.25em;
  font-weight: bold;
  background: linear-gradient(90deg, #ffb300 0%, #ff9800 100%);
  color: #22254a;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(255,184,0,0.18);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}
.big-action:disabled, .big-action.disabled {
  background: #ffe0a3;
  color: #888;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.7;
}
.big-action:hover:not(:disabled), .big-action:active:not(:disabled) {
  background: linear-gradient(90deg, #ffd54f 0%, #ffb300 100%);
  box-shadow: 0 6px 24px rgba(255,184,0,0.28);
  transform: scale(1.03);
}
/* Top language/help buttons: smaller and spaced */
body {
  background: #181c2f;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  margin: 0;
  padding: 0;
}

main, .main-content, .container {
  margin: 0 auto;
  max-width: 100%; /* Full width, let child elements control their width */
  padding: 1rem 0.5rem; /* Minimal padding on main */
  box-sizing: border-box;
}

h1, h2, h3, h4 {
  color: #fff;
  margin-top: 24px;
  margin-bottom: 12px;
}

.form-row, .field, .row.gap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

label {
  font-weight: 500;
  margin-bottom: 4px;
  display: block;
}

input, select, textarea {
  border-radius: 6px;
  border: 1px solid #22254a;
  background: #232a3a;
  color: #e0e6f6;
  padding: 10px 14px;
  font-size: 1.08em;
  margin-bottom: 12px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 600px) {
  input, select, textarea {
    font-size: 1.12em;
    padding: 14px 16px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  #desc {
    min-height: 90px !important;
    font-size: 1.15em !important;
  }
}

#weekBody {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  background: #232a3a;
  border-radius: 8px;
  overflow: hidden;
}

#weekBody th, #weekBody td {
  padding: 10px 12px;
  border-bottom: 1px solid #22254a;
  color: #e0e6f6;
  text-align: left;
}

#weekBody th {
  background: #22254a;
  font-weight: 600;
  font-size: 1.05em;
}

#weekBody tr {
  background: none;
}
#weekBody tr:nth-child(even) {
  background: #20243a;
}

.badge.unsent {
  background: #eab308;
  color: #232a3a;
  border-radius: 6px;
  padding: 2px 8px;
  font-weight: 600;
}
.badge.submitted {
  background: #22c55e;
  color: #fff;
  border-radius: 6px;
  padding: 2px 8px;
  font-weight: 600;
}
.lang-btn, #showAllFieldHelp.pill {
  font-size: 0.95em !important;
  padding: 4px 14px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 12px !important;
  margin-right: 12px !important;
}
.lang-btn:last-child, #showAllFieldHelp.pill:last-child {
  margin-right: 0 !important;
}
/* Add more top margin for breathing room above buttons */
.hours-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.3em;
  width: 100%;
}
.hours-row .hours-minus, .hours-row .hours-plus {
  min-width: 2em;
  height: 2em;
  font-size: 1em;
  padding: 0;
  margin: 0;
}
.hours-row input[type="number"], .hours-row input[type="text"] {
  width: 5em;
  font-size: 0.9em;
  text-align: center;
  padding: 2px 4px;
}
/* Visually distinguish unsent and sent rows in the week table */
.unsent-row {
  background: #232a3a !important;
  border-left: 4px solid #f59e42 !important;
}
.sent-row {
  background: #1a1e2a !important;
  border-left: 4px solid #3ecf4a !important;
  opacity: 0.7;
}
.icon.undo {
  background: none;
  border: none;
  color: #1aaf5d;
  font-size: 1.2em;
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
  display: inline-block;
  transition: color 0.2s;
}
.icon.undo:hover {
  color: #eab308;
}
.selected-chip {
  background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%) !important;
  color: #1a1a1a !important;
  border: 3px solid #1aaf5d !important;
  font-weight: bold;
  box-shadow: 0 0 0 4px #1aaf5d55;
  transform: scale(1.07);
  z-index: 2;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}
.chip-check {
  color: #1aaf5d;
  font-size: 1.6em;
  margin-left: 0.6em;
  vertical-align: middle;
  font-weight: bold;
  text-shadow: 0 2px 8px #fff8;
}
.selected-lang {
  background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%) !important;
  color: #1a1a1a !important;
  border: 3px solid #1aaf5d !important;
  font-weight: bold;
  box-shadow: 0 0 0 4px #1aaf5d55;
  transform: scale(1.07);
  z-index: 2;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}
.lang-check {
  color: #1aaf5d;
  font-size: 1.6em;
  margin-left: 0.6em;
  vertical-align: middle;
  font-weight: bold;
  text-shadow: 0 2px 8px #fff8;
}
/* Responsive date pickers for time off section */
#timeoffDetails input[type="date"] {
  max-width: 100%;
  min-width: 0;
  width: 140px;
  box-sizing: border-box;
}

@media (max-width:480px), (orientation:portrait) and (max-width:600px) {
  .this-week-table {
    display: block;
    width: 100%;
    border-collapse: separate;
    background: none;
  }
  .this-week-table thead {
    display: none;
  }
  .this-week-table tbody {
    display: block;
    width: 100%;
  }
  .this-week-table tr {
    display: block;
    margin: 12px 0;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    background: #1d222a;
    position: relative;
    box-shadow: none;
    font-size: 1em;
    line-height: 1.35;
    word-break: break-word;
  }
  .this-week-table tr.unsent-row::before {
    content: '';
    display: block;
    height: 4px;
    width: 40px;
    background: #ff9800;
    border-radius: 4px 4px 0 0;
    position: absolute;
    top: -4px;
    left: 12px;
  }
  .this-week-table td {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 6px 10px;
    padding: 6px 0;
    font-size: 1em;
    align-items: center;
    word-break: break-word;
    border: none;
    background: none;
  }
  .this-week-table td::before {
    content: attr(data-label) ":";
    font-weight: 600;
    opacity: .85;
    font-size: 1em;
    color: #ff9800;
    margin-right: 8px;
    white-space: nowrap;
  }
  .this-week-table .desc-bilingual .desc-es,
  .this-week-table .desc-bilingual .desc-en {
    display: block;
    line-height: 1.3;
  }
  .this-week-table .desc-bilingual {
    grid-column: 1 / -1;
    margin-bottom: 6px;
  }
  .this-week-table .code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  }
  .this-week-table .hours, .this-week-table .miles {
    white-space: nowrap;
  }
  .this-week-table .row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
    grid-column: 1 / -1;
  }
  .this-week-table .row-actions .sent-pill,
  .this-week-table .row-actions .delete-btn {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    cursor: pointer;
    border: none;
    background: none;
  }
  .this-week-table .sent-pill {
    padding: 6px 10px;
    border-radius: 10px;
    background: #ff9800;
    color: #222;
    font-weight: bold;
    margin-right: 4px;
  }
  .this-week-table .delete-btn {
    color: #ff9800;
    font-size: 1.3em;
    background: none;
    border: none;
    border-radius: 10px;
    transition: background 0.2s;
  }
  .this-week-table .delete-btn:active,
  .this-week-table .delete-btn:focus {
    background: rgba(255,152,0,0.12);
    outline: none;
  }
}

/* Mobile card styles for time off entries */
.this-week-entry {
  background: #1d222a;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  position: relative;
}

.this-week-entry-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 6px 10px;
  padding: 6px 0;
  font-size: 1em;
  align-items: center;
  word-break: break-word;
  border: none;
  background: none;
}

.this-week-entry-label {
  font-weight: 600;
  opacity: .85;
  font-size: 1em;
  color: #ff9800;
  white-space: nowrap;
}

.this-week-entry-label::after {
  content: ":";
}

.this-week-entry-value {
  font-size: 1em;
  color: #f5f5f5;
  word-break: break-word;
}

/* Bilingual content in mobile cards */
.this-week-entry-value .desc-bilingual {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.this-week-entry-value .desc-bilingual .desc-es {
  color: #facc15;
  font-size: 13px;
  font-weight: 500;
}

.this-week-entry-value .desc-bilingual .desc-en {
  color: #a7f3d0;
  font-size: 13px;
}

.this-week-entry-value.unsent {
  background: #ff9800;
  color: #222;
  font-weight: bold;
  padding: 6px 10px;
  border-radius: 10px;
  text-align: center;
  min-width: 60px;
}

.this-week-entry-value.sent-badge {
  background: #22c55e;
  color: #fff;
  font-weight: bold;
  padding: 6px 10px;
  border-radius: 10px;
  text-align: center;
  min-width: 60px;
}

.this-week-entry .icon.trash {
  color: #ff9800;
  font-size: 1.3em;
  background: none;
  border: none;
  border-radius: 10px;
  transition: background 0.2s;
  cursor: pointer;
  padding: 6px;
  min-height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.this-week-entry .icon.trash:hover,
.this-week-entry .icon.trash:focus {
  background: rgba(255,152,0,0.12);
  outline: none;
}

.confirm-btn.confirmed {
  background: #22c55e !important;
  color: #fff !important;
  border: none !important;
  opacity: 0.7;
  cursor: not-allowed;
}
.confirm-btn.confirmed .checkmark {
  display: inline;
}
.confirm-btn:not(.confirmed) .checkmark {
  display: none;
}

/* Cost code chip selected state */
/* Cost code chips: wrap, space, and prevent overflow */
#suggestionChips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  width: 100%;
  align-items: flex-start;
  background: none;
  border-radius: 8px;
  box-sizing: border-box;
}

#suggestionChips .chip {
  flex: 0 1 auto;
  min-width: 180px;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  text-align: left;
  font-size: 0.9em;
  padding: 10px 14px;
  margin: 0;
  background: #3a4264;
  color: #e2e8f0;
  border: 1px solid #4f46e5;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

#suggestionChips .chip:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}
#suggestionChips .chip.selected {
  background: #22c55e !important;
  color: #fff !important;
  border: none !important;
  position: relative;
}
#suggestionChips .chip.selected::after {
  content: '?';
  font-size: 1.1em;
  color: #fff;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}
/* Remove all box, border, and background from any table cell, fieldset, or .field containing a help icon */
td .label-row, th .label-row, fieldset .label-row,
td .field-help-link, th .field-help-link, fieldset .field-help-link,
.field .label-row, .field .field-help-link {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}
/* Ensure no box, border, or background on label-row (parent of help icon) */
.label-row {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  padding: 0 !important;
  margin: 0 !important;
}
.field-help-link,
/* Remove all possible box, background, border, and spacing from help icon button in all states */
.field-help-link,
.field-help-link:focus,
.field-help-link:active,
.field-help-link:hover {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: none !important;
  background-color: transparent !important;
  padding: 0 !important;
  margin: 0 0 0 0.3em !important;
  vertical-align: middle;
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  -ms-appearance: none !important;
  display: inline-flex;
  align-items: center;
  /* Remove table cell, fieldset, or inherited backgrounds and borders */
  box-shadow: none !important;
  border-radius: 0 !important;
}

.help-icon,
.help-icon:focus,
.help-icon:active,
.help-icon:hover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3em;
  height: 1.3em;
  border-radius: 50%;
  background: #22c55e !important;
  color: #fff !important;
  font-weight: bold;
  font-size: 1em;
  text-align: center;
  line-height: 1.3em;
  margin-left: 0.2em;
  cursor: pointer;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background-color: #22c55e !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  -ms-appearance: none !important;
  transition: background 0.2s;
}

/* Remove background, border, or box-shadow from parent td/th/fieldset for help icon */
td .field-help-link, th .field-help-link, fieldset .field-help-link {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* --- COLOR VARIABLES --- */
:root {
  --accent: #6c63ff;
  --card: #181c2a;
  --sent: #10b981;
  --context-badge: #f59e42;

.context-badge {
  display: inline-block;
  background: var(--context-badge);
  color: #222;
  font-size: 0.95em;
  font-weight: 600;
  border-radius: 6px;
  padding: 2px 10px;
  margin-left: 10px;
  vertical-align: middle;
  box-shadow: 0 2px 8px #f59e4233;
}

/* Header actions */
.appbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex-shrink: 0;
  min-width: 0;
}

.appbar-actions .pill {
  flex-shrink: 0;
  min-width: fit-content;
}

@media (max-width: 700px) {
  .appbar-actions {
    gap: 6px;
  }
}

@media (max-width: 550px) {
  .appbar-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .appbar-actions .pill {
    flex: 1 1 auto;
    min-width: fit-content;
    max-width: fit-content;
  }
}

@media (max-width: 400px) {
  .appbar-actions .pill {
    flex: 1 1 auto;
    text-align: center;
    min-width: 0;
  }
}

/* Inline help icon/button for field labels (single robust rule) */
.help-inline {
  display: inline-block !important;
  margin-left: 8px !important;
  background: #3b82f6 !important;
  border: 2px solid #fff !important;
  color: #fff !important;
  font-size: 1.2em !important;
  font-weight: bold !important;
  cursor: pointer !important;
  border-radius: 50% !important;
  width: 1.7em !important;
  height: 1.7em !important;
  line-height: 1.5em !important;
  text-align: center !important;
  box-shadow: 0 2px 8px rgba(59,130,246,0.18) !important;
  transition: background 0.15s, color 0.15s, border 0.15s, transform 0.12s !important;
  vertical-align: middle !important;
  z-index: 10 !important;
}

.help-inline:focus, .help-inline:hover {
  background: #2563eb !important;
  color: #fff !important;
  border: 2px solid #fff !important;
  outline: none !important;
  transform: scale(1.12);
  box-shadow: 0 4px 16px #2563eb44 !important;
}

.appbar-content {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
  padding: 0.5rem 0;
}

html, body {
  /* height: 100%; */
  width: 100vw;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
  color: #f5f5f5;
  background: linear-gradient(180deg,#17193a 0%, #0b0d18 100%);
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
}

/* --- TRUE FLOATING HEADER --- */
.appbar {
  border-bottom: 2px solid #23284a;
}
main.page {
  margin-top: 40px;
  padding-top: 0;
  display: block; /* Changed from flex to block to prevent any flex side-by-side */
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  box-sizing: border-box;
}

/* Ensure sections stack vertically and don't get forced side-by-side */
main.page > section.card {
  width: 100%;
  max-width: 100%;
  margin: 18px auto 24px auto;
  display: block;
  clear: both;
  box-sizing: border-box;
}

/* Ensure This Week section gets full width and proper spacing */
section.card h2 {
  margin-bottom: 16px;
}

/* Ensure the week table section specifically doesn't get constrained */}
.table-wrap {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  box-sizing: border-box;
}

/* --- CARD / FORM --- */
/* Responsive card: mobile-first, desktop max-width */
.card {
  background: var(--card);
  border: 1.5px solid #3b3f75;
  border-radius: 20px;
  padding: 24px 16px;
  margin: 18px auto 24px auto;
  box-shadow: 0 6px 32px #000a;
  width: 100%;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  overflow-x: hidden;
  display: block;
}

@media (min-width: 700px) {
  .card {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 32px 32px;
  }
  .grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .field.col2 {
    grid-column: span 2;
  }
}

section.card + section.card {
  margin-top: 0;
}

@media (max-width: 700px) {
  .card {
    max-width: 98vw;
    padding: 16px 4vw;
    margin: 12px 0 18px 0;
    border-radius: 14px;
  }
}

/* --- FORM FIELDS --- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Responsive field inputs: never overflow parent */
.field input, .field textarea, .field select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: #23284a;
  border: 1px solid #444;
  color: #f5f5f5;
  border-radius: 6px;
  padding: 8px 10px;
  outline: none;
  font-size: 0.95em;
  transition: border 0.2s;
  box-sizing: border-box;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
}

/* --- BUTTONS --- */
.pill, .chip, .confirm-btn, .primary, .accent, .secondary {
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: 600;
  padding: 5px 12px;
  min-width: 32px;
  min-height: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: background 0.2s, box-shadow 0.2s;
}
.pill, .primary, .accent {
  background: linear-gradient(90deg, #6c63ff 0%, #2b2f55 100%);
  color: #fff;
  border: none;
}
.pill.secondary, .secondary {
  background: #23284a;
  color: #f5f5f5;
  border: 1px solid #6f3ce6;
}
.pill.ghost {
  background: rgba(71, 85, 105, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
  box-shadow: none;
}
.pill.ghost:hover {
  background: rgba(71, 85, 105, 0.25);
  border-color: rgba(148, 163, 184, 0.5);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.chip[data-add] {
  background: #6f3ce6;
  color: #fff;
  font-size: 0.7em;
  padding: 3px 10px;
}
.pill:hover, .primary:hover, .accent:hover {
  background: linear-gradient(90deg, #7c72ff 0%, #3b3f75 100%);
  box-shadow: 0 4px 16px rgba(108,99,255,0.15);
}
.pill:active, .primary:active, .accent:active {
  background: #6f3ce6;
}

/* --- SPACING & LAYOUT --- */
/* Button row always aligned and wraps on small screens */
.row-actions {
  display: flex;
  gap: 18px;
  justify-content: flex-end;
  margin-top: 12px;
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .row-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    justify-content: center;
  }
}

@media (max-width: 700px) {
  .row-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
}
/* --- HEADER / APPBAR --- */
.appbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 100;
  background: rgba(24, 28, 42, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.15);
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0.25rem clamp(0.5rem, 2vw, 1rem);
  min-height: 40px;
  height: auto;
  font-size: 0.85em !important;
}
.appbar .brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 1;
  min-width: 0;
}
.appbar .logo {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  box-shadow: 0 1px 4px #0003;
  flex-shrink: 0;
}
.appbar h1 {
  margin: 0;
  font-size: clamp(0.8rem, 2vw, 0.88rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appbar .sub {
  font-size: clamp(0.6rem, 1.8vw, 0.7rem);
  color: #bfc7e0;
  white-space: nowrap;
}
.appbar .pill {
  margin-left: 0;
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  padding: 0.4rem clamp(0.6rem, 1.5vw, 0.85rem);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .appbar {
    flex-direction: row;
    align-items: center;
    padding: 0.35rem 0.5rem;
    min-height: 44px;
  }
  .appbar .brand {
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
  }
  .appbar .logo {
    width: 28px; 
    height: 28px;
  }
  .appbar h1 {
    font-size: clamp(0.8rem, 3.5vw, 0.9rem);
  }
  .appbar .sub {
    display: none;
  }
  .appbar-content {
    padding: 0;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
  }
  .appbar-actions {
    gap: 6px;
    flex: 0 1 auto;
    flex-wrap: nowrap;
  }
  .appbar .pill {
    font-size: clamp(0.7rem, 2vw, 0.75rem);
    padding: 0.4rem 0.6rem;
    flex-shrink: 0;
  }
}

/* Smaller screens - stack appbar sections */
@media (max-width: 550px) {
  .appbar {
    min-height: auto;
  }
  .appbar-content {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .appbar .brand {
    justify-content: center;
  }
  
  .appbar-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .appbar .pill {
    flex: 1 1 auto;
    min-width: fit-content;
  }
}

main.page {
  margin-top: 36px;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  min-height: 80vh;
}

/* --- CARD / FORM --- */
.card {
  background: var(--card);
  border: 1.5px solid #3b3f75;
  border-radius: 16px;
  padding: 20px 18px;
  margin: 18px 0 24px 0;
  box-shadow: 0 4px 18px #0008;
  max-width: 600px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@media (max-width: 700px) {
  .card {
    max-width: 98vw;
    padding: 16px 4vw;
    margin: 16px 0 12px 0;
    border-radius: 14px;
  }
}

section.card + section.card {
  margin-top: 0;
}

/* --- FORM FIELDS --- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: #23284a;
  border: 1px solid #444;
  color: #f5f5f5;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font-size: 1.08em;
  transition: border 0.2s;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
}

/* --- BUTTONS --- */
.pill, .chip, .confirm-btn, .primary, .accent, .secondary {
  border-radius: 999px;
  font-size: 1.08em;
  font-weight: 600;
  padding: 10px 22px;
  min-width: 44px;
  min-height: 44px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: background 0.2s, box-shadow 0.2s;
}
.pill, .primary, .accent {
  background: linear-gradient(90deg, #6c63ff 0%, #2b2f55 100%);
  color: #fff;
  border: none;
}
.pill.secondary, .secondary {
  background: #23284a;
  color: #f5f5f5;
  border: 1px solid #6f3ce6;
}
.chip[data-add] {
  background: #6f3ce6;
  color: #fff;
}
.pill:hover, .primary:hover, .accent:hover {
  background: linear-gradient(90deg, #7c72ff 0%, #3b3f75 100%);
  box-shadow: 0 4px 16px rgba(108,99,255,0.15);
}
.pill:active, .primary:active, .accent:active {
  background: #6f3ce6;
}

/* --- SPACING & LAYOUT --- */
.row-actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 12px;
}

@media (max-width: 700px) {
  .row-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
}
.week-card-row {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 2px;
  font-size: 1em;
}
/* --- HEADER / APPBAR --- */
.appbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 100;
  background: rgba(24, 28, 42, 0.98);
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.18);
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0 0;
  min-height: 80px;
}
.appbar .brand {
  display: flex;
  align-items: center;
  gap: 24px;
}
.appbar .logo {
  width: 120px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0006;
}
.appbar h1 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.appbar .sub {
  font-size: 0.9rem;
  color: #bfc7e0;
}
.appbar .pill {
  margin-left: 18px;
}

@media (max-width: 700px) {
  .appbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 10px;
    min-height: 64px;
  }
  .appbar .brand {
    gap: 12px;
  }
  .appbar .logo {
    width: 40px; height: 40px;
  }
  .appbar h1 {
    font-size: 1.2rem;
  }
  .appbar-content {
    padding: 0 6px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

main.page {
  margin-top: 60px;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 80vh;
}

/* --- CARD / FORM --- */
.card {
  background: var(--card);
  border: 1.5px solid #3b3f75;
  border-radius: 20px;
  padding: 32px 28px;
  margin: 18px 0 24px 0;
  box-shadow: 0 6px 32px #000a;
  max-width: 100vw;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 700px) {
  .card {
    max-width: 98vw;
    padding: 16px 4vw;
    margin: 16px 0 12px 0;
    border-radius: 14px;
  }
}

section.card + section.card {
  margin-top: 0;
}

/* --- FORM FIELDS --- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: #23284a;
  border: 1px solid #444;
  color: #f5f5f5;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font-size: 1.08em;
  transition: border 0.2s;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
}

/* --- BUTTONS --- */
.pill, .chip, .confirm-btn, .primary, .accent, .secondary {
  border-radius: 999px;
  font-size: 1.08em;
  font-weight: 600;
  padding: 10px 22px;
  min-width: 44px;
  min-height: 44px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: background 0.2s, box-shadow 0.2s;
}
.pill, .primary, .accent {
  background: linear-gradient(90deg, #6c63ff 0%, #2b2f55 100%);
  color: #fff;
  border: none;
}
.pill.secondary, .secondary {
  background: #23284a;
  color: #f5f5f5;
  border: 1px solid #6f3ce6;
}
.chip[data-add] {
  background: #6f3ce6;
  color: #fff;
}
.pill:hover, .primary:hover, .accent:hover {
  background: linear-gradient(90deg, #7c72ff 0%, #3b3f75 100%);
  box-shadow: 0 4px 16px rgba(108,99,255,0.15);
}
.pill:active, .primary:active, .accent:active {
  background: #6f3ce6;
}

/* --- SPACING & LAYOUT --- */
.row-actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 12px;
}

@media (max-width: 700px) {
  .row-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
}
.week-card-row {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 2px;
  font-size: 1em;
}
/* --- HEADER / APPBAR --- */
.appbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 100;
  background: rgba(24, 28, 42, 0.98);
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.18);
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0 0;
  min-height: 80px;
}
.appbar .brand {
  display: flex;
  align-items: center;
  gap: 24px;
}
.appbar .logo {
  width: 120px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0006;
}
.appbar h1 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.appbar .sub {
  font-size: 0.9rem;
  color: #bfc7e0;
}
.appbar .pill {
  margin-left: 18px;
}

@media (max-width: 700px) {
  .appbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 10px;
    min-height: 64px;
  }
  .appbar .brand {
    gap: 12px;
  }
  .appbar .logo {
    width: 40px; height: 40px;
  }
  .appbar h1 {
    font-size: 1.2rem;
  }
  .appbar-content {
    padding: 0 6px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

main.page {
  margin-top: 60px;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 80vh;
}

/* --- CARD / FORM --- */
.card {
  background: var(--card);
  border: 1.5px solid #3b3f75;
  border-radius: 20px;
  padding: 32px 28px;
  margin: 18px 0 24px 0;
  box-shadow: 0 6px 32px #000a;
  max-width: 100vw;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 700px) {
  .card {
    max-width: 98vw;
    padding: 16px 4vw;
    margin: 16px 0 12px 0;
    border-radius: 14px;
  }
}

section.card + section.card {
  margin-top: 0;
}

/* --- FORM FIELDS --- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: #23284a;
  border: 1px solid #444;
  color: #f5f5f5;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font-size: 1.08em;
  transition: border 0.2s;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
}

/* --- BUTTONS --- */
.pill, .chip, .confirm-btn, .primary, .accent, .secondary {
  border-radius: 999px;
  font-size: 1.08em;
  font-weight: 600;
  padding: 10px 22px;
  min-width: 44px;
  min-height: 44px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: background 0.2s, box-shadow 0.2s;
}
.pill, .primary, .accent {
  background: linear-gradient(90deg, #6c63ff 0%, #2b2f55 100%);
  color: #fff;
  border: none;
}
.pill.secondary, .secondary {
  background: #23284a;
  color: #f5f5f5;
  border: 1px solid #6f3ce6;
}
.chip[data-add] {
  background: #6f3ce6;
  color: #fff;
}
.pill:hover, .primary:hover, .accent:hover {
  background: linear-gradient(90deg, #7c72ff 0%, #3b3f75 100%);
  box-shadow: 0 4px 16px rgba(108,99,255,0.15);
}
.pill:active, .primary:active, .accent:active {
  background: #6f3ce6;
}

/* --- SPACING & LAYOUT --- */
.row-actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 12px;
}

@media (max-width: 700px) {
  .row-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
}
.week-card-row {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 2px;
  font-size: 1em;
}
/* --- HEADER / APPBAR --- */
.appbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 100;
  background: rgba(24, 28, 42, 0.98);
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.18);
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0 0;
  min-height: 80px;
}
.appbar .brand {
  display: flex;
  align-items: center;
  gap: 24px;
}
.appbar .logo {
  width: 120px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0006;
}
.appbar h1 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.appbar .sub {
  font-size: 0.9rem;
  color: #bfc7e0;
}
.appbar .pill {
  margin-left: 18px;
}

@media (max-width: 700px) {
  .appbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 10px;
    min-height: 64px;
  }
  .appbar .brand {
    gap: 12px;
  }
  .appbar .logo {
    width: 40px; height: 40px;
  }
  .appbar h1 {
    font-size: 1.2rem;
  }
  .appbar-content {
    padding: 0 6px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

main.page {
  margin-top: 60px;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 80vh;
}

/* --- CARD / FORM --- */
.card {
  background: var(--card);
  border: 1.5px solid #3b3f75;
  border-radius: 20px;
  padding: 32px 28px;
  margin: 18px 0 24px 0;
  box-shadow: 0 6px 32px #000a;
  max-width: 100vw;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 700px) {
  .card {
    max-width: 98vw;
    padding: 16px 4vw;
    margin: 16px 0 12px 0;
    border-radius: 14px;
  }
}

section.card + section.card {
  margin-top: 0;
}

/* --- FORM FIELDS --- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: #23284a;
  border: 1px solid #444;
  color: #f5f5f5;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font-size: 1.08em;
  transition: border 0.2s;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
}

/* --- BUTTONS --- */
.pill, .chip, .confirm-btn, .primary, .accent, .secondary {
  border-radius: 999px;
  font-size: 1.08em;
  font-weight: 600;
  padding: 10px 22px;
  min-width: 44px;
  min-height: 44px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: background 0.2s, box-shadow 0.2s;
}
.pill, .primary, .accent {
  background: linear-gradient(90deg, #6c63ff 0%, #2b2f55 100%);
  color: #fff;
  border: none;
}
.pill.secondary, .secondary {
  background: #23284a;
  color: #f5f5f5;
  border: 1px solid #6f3ce6;
}
.chip[data-add] {
  background: #6f3ce6;
  color: #fff;
}
.pill:hover, .primary:hover, .accent:hover {
  background: linear-gradient(90deg, #7c72ff 0%, #3b3f75 100%);
  box-shadow: 0 4px 16px rgba(108,99,255,0.15);
}
.pill:active, .primary:active, .accent:active {
  background: #6f3ce6;
}

/* --- SPACING & LAYOUT --- */
.row-actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 12px;
}

@media (max-width: 700px) {
  .row-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
}
.week-card-row {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 2px;
  font-size: 1em;
}
/* --- HEADER / APPBAR --- */
.appbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 100;
  background: rgba(24, 28, 42, 0.98);
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.18);
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0 0;
  min-height: 80px;
}
.appbar .brand {
  display: flex;
  align-items: center;
  gap: 24px;
}
.appbar .logo {
  width: 120px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0006;
}
.appbar h1 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.appbar .sub {
  font-size: 0.9rem;
  color: #bfc7e0;
}
.appbar .pill {
  margin-left: 18px;
}

@media (max-width: 700px) {
  .appbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 10px;
    min-height: 64px;
  }
  .appbar .brand {
    gap: 12px;
  }
  .appbar .logo {
    width: 40px; height: 40px;
  }
  .appbar h1 {
    font-size: 1.2rem;
  }
  .appbar-content {
    padding: 0 6px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

main.page {
  margin-top: 60px;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 80vh;
}

/* --- CARD / FORM --- */
.card {
  background: var(--card);
  border: 1.5px solid #3b3f75;
  border-radius: 20px;
  padding: 32px 28px;
  margin: 18px 0 24px 0;
  box-shadow: 0 6px 32px #000a;
  max-width: 100vw;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 700px) {
  .card {
    max-width: 98vw;
    padding: 16px 4vw;
    margin: 16px 0 12px 0;
    border-radius: 14px;
  }
}

section.card + section.card {
  margin-top: 0;
}

/* --- FORM FIELDS --- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: #23284a;
  border: 1px solid #444;
  color: #f5f5f5;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font-size: 1.08em;
  transition: border 0.2s;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
}

/* --- BUTTONS --- */
.pill, .chip, .confirm-btn, .primary, .accent, .secondary {
  border-radius: 999px;
  font-size: 1.08em;
  font-weight: 600;
  padding: 10px 22px;
  min-width: 44px;
  min-height: 44px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: background 0.2s, box-shadow 0.2s;
}
.pill, .primary, .accent {
  background: linear-gradient(90deg, #6c63ff 0%, #2b2f55 100%);
  color: #fff;
  border: none;
}
.pill.secondary, .secondary {
  background: #23284a;
  color: #f5f5f5;
  border: 1px solid #6f3ce6;
}
.chip[data-add] {
  background: #6f3ce6;
  color: #fff;
}
.pill:hover, .primary:hover, .accent:hover {
  background: linear-gradient(90deg, #7c72ff 0%, #3b3f75 100%);
  box-shadow: 0 4px 16px rgba(108,99,255,0.15);
}
.pill:active, .primary:active, .accent:active {
  background: #6f3ce6;
}

/* --- SPACING & LAYOUT --- */
.row-actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 12px;
}

@media (max-width: 700px) {
  .row-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
}
.week-card-row {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 2px;
  font-size: 1em;
}
/* --- HEADER / APPBAR --- */
.appbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 100;
  background: rgba(24, 28, 42, 0.98);
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.18);
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0 0;
  min-height: 80px;
}
.appbar .brand {
  display: flex;
  align-items: center;
  gap: 24px;
}
.appbar .logo {
  width: 120px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0006;
}
.appbar h1 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.appbar .sub {
  font-size: 0.9rem;
  color: #bfc7e0;
}
.appbar .pill {
  margin-left: 18px;
}

@media (max-width: 700px) {
  .appbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 10px;
    min-height: 64px;
  }
  .appbar .brand {
    gap: 12px;
  }
  .appbar .logo {
    width: 40px; height: 40px;
  }
  .appbar h1 {
    font-size: 1.2rem;
  }
  .appbar-content {
    padding: 0 6px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

main.page {
  margin-top: 60px;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 80vh;
}

/* --- CARD / FORM --- */
.card {
  background: var(--card);
  border: 1.5px solid #3b3f75;
  border-radius: 20px;
  padding: 32px 28px;
  margin: 18px 0 24px 0;
  box-shadow: 0 6px 32px #000a;
  max-width: 100vw;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 700px) {
  .card {
    max-width: 98vw;
    padding: 16px 4vw;
    margin: 16px 0 12px 0;
    border-radius: 14px;
  }
}

section.card + section.card {
  margin-top: 0;
}

/* --- FORM FIELDS --- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: #23284a;
  border: 1px solid #444;
  color: #f5f5f5;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font-size: 1.08em;
  transition: border 0.2s;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
}

/* --- BUTTONS --- */
.pill, .chip, .confirm-btn, .primary, .accent, .secondary {
  border-radius: 999px;
  font-size: 1.08em;
  font-weight: 600;
  padding: 10px 22px;
  min-width: 44px;
  min-height: 44px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: background 0.2s, box-shadow 0.2s;
}
.pill, .primary, .accent {
  background: linear-gradient(90deg, #6c63ff 0%, #2b2f55 100%);
  color: #fff;
  border: none;
}
.pill.secondary, .secondary {
  background: #23284a;
  color: #f5f5f5;
  border: 1px solid #6f3ce6;
}
.chip[data-add] {
  background: #6f3ce6;
  color: #fff;
}
.pill:hover, .primary:hover, .accent:hover {
  background: linear-gradient(90deg, #7c72ff 0%, #3b3f75 100%);
  box-shadow: 0 4px 16px rgba(108,99,255,0.15);
}
.pill:active, .primary:active, .accent:active {
  background: #6f3ce6;
}

/* --- SPACING & LAYOUT --- */
.row-actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 12px;
}

@media (max-width: 700px) {
  .row-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
}
.week-card-row {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 2px;
  font-size: 1em;
}
/* Universal text color fix for all elements */
body, label, .muted, .tiny, .sub, th, td, .badge, .help-dialog, .pill, .chip, .confirm-btn, .sent-badge, .row, .field, .table, .desc-bilingual, .desc-bilingual .desc-es, .desc-bilingual .desc-en {
  color: #f5f5f5 !important;
}

input, select, textarea, button {
  color: #f5f5f5 !important;
  background: #23284a !important;
  border: 1px solid #444 !important;
}

input::placeholder, textarea::placeholder {
  color: #bfc7e0 !important;
  opacity: 1;
}

input:disabled, button:disabled, select:disabled, textarea:disabled {
  color: #888 !important;
  background: #23284a !important;
}

th, td {
  color: #f5f5f5 !important;
  font-size: 0.7em;
  padding: 0.12em 0.3em;
}

.field label {
  color: #f5f5f5 !important;
  font-weight: 500;
}

.muted, .tiny, .sub {
  color: #bfc7e0 !important;
}

.badge, .sent-badge {
  color: #181c2a !important;
  background: #f5f5f5 !important;
  font-size: 0.6em;
  padding: 0.12em 0.24em;
/* Hours input horizontal layout */
.hours-row {
  display: flex;
  align-items: center;
  gap: 0.2em;
}
.hours-row .hours-minus, .hours-row .hours-plus {
  min-width: 2em;
  height: 2em;
  font-size: 1em;
  padding: 0;
  margin: 0;
}
.hours-row input[type="number"], .hours-row input[type="text"] {
  width: 5em;
  font-size: 0.9em;
  text-align: center;
  padding: 2px 4px;
}
@media (max-width: 900px) {
  th, td {
    font-size: 0.6em;
    padding: 0.08em 0.15em;
  }
  .field input, .field textarea, .field select {
    font-size: 0.6em;
    padding: 2px 4px;
  }
  .hours-row input[type="number"], .hours-row input[type="text"] {
    width: 4em;
    font-size: 0.8em;
    padding: 1px 2px;
  }
}
@media (max-width: 600px) {
  .container, .main-card, .week-card, .input-group, .form-section {
    padding: 0.5rem;
    margin: 0.5rem auto;
  }
  th, td {
    font-size: 0.5em;
    padding: 0.04em 0.08em;
  }
  .field input, .field textarea, .field select {
    font-size: 0.5em;
    padding: 1px 2px;
  }
  .hours-row input[type="number"], .hours-row input[type="text"] {
    width: 3em;
    font-size: 0.7em;
    padding: 1px 1px;
  }
}
/* Prevent table side scrolling */
.week-card {
  overflow-x: auto;
  max-width: 100vw;
}

.help-dialog {
  color: #181c2a !important;
  background: #f5f5f5 !important;
}

.pill, .chip, .confirm-btn {
  color: #181c2a !important;
  background: #f5f5f5 !important;
  border: none;
}

.pill.secondary, .chip[data-add] {
  background: #6f3ce6 !important;
  color: #fff !important;
}

.primary, .accent {
  background: #6f3ce6 !important;
  color: #fff !important;
  border: none;
}

.secondary {
  background: #23284a !important;
  color: #f5f5f5 !important;
  border: 1px solid #6f3ce6;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  html, body {
    font-size: 16px;
  }
  .field, .row, .row-actions, .card, .table, .appbar {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }
  input, select, textarea, button {
    font-size: 1em;
    min-height: 44px;
  }
  .pill, .chip, .confirm-btn {
    min-width: 44px;
    min-height: 44px;
    font-size: 1em;
  }
}

/* Ensure table text is always light */}
.table th, .table td {
  color: #f5f5f5 !important;
}

/* Fix for datalist dropdowns (browser default) */
input[list]::-webkit-input-placeholder {
  color: #bfc7e0 !important;
}
input[list]::-moz-placeholder {
  color: #bfc7e0 !important;
}
input[list]:-ms-input-placeholder {
  color: #bfc7e0 !important;
}
input[list]::placeholder {
  color: #bfc7e0 !important;
@media (max-width: 700px) {
  .appbar-spacer {
    min-height: 96px;
    height: 96px;
  }
  .field:first-of-type {
    margin-top: 40px !important;
  }
  main.page {
    margin-top: 96px;
    padding-top: 20px;
  }
  .field:first-of-type {
    margin-top: 24px !important;
  }
}
  --accent: #6c63ff;
  --chip: #0f1220;
  --chipText: #fff;
  --ok: #0ea5e9;
  --sent: #10b981;
  --shadow: 0 8px 24px rgba(0,0,0,.25);
}
/* removed old .page layout, now handled by main.page above */

/* Unified Pill button styles */
.pill {
  border: 0 !important;
  padding: clamp(0.5rem, 1.5vw, 0.65rem) clamp(0.85rem, 2vw, 1.15rem) !important;
  border-radius: 999px !important;
  color: #fff !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(79, 70, 229, 0.85) 100%) !important;
  cursor: pointer;
  font-size: clamp(0.85rem, 1.8vw, 0.95rem) !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2) !important;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
  min-width: fit-content;
  box-sizing: border-box;
  border: 1px solid rgba(99, 102, 241, 0.3) !important;
}

.pill:hover, .pill:focus-visible {
  background: linear-gradient(135deg, rgba(99, 102, 241, 1) 0%, rgba(79, 70, 229, 1) 100%) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35) !important;
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.5) !important;
}

.pill:active {
  transform: translateY(0);
}

.pill.secondary {
  background: rgba(71, 85, 105, 0.6) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

.pill.secondary:hover {
  background: rgba(71, 85, 105, 0.8) !important;
  border-color: rgba(148, 163, 184, 0.4) !important;
}

.pill.ghost {
  background: rgba(71, 85, 105, 0.4) !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
}

.pill.ghost:hover {
  background: rgba(71, 85, 105, 0.6) !important;
  border-color: rgba(148, 163, 184, 0.35) !important;
}

.pill.primary {
  background: linear-gradient(135deg, rgba(99, 102, 241, 1) 0%, rgba(79, 70, 229, 0.95) 100%) !important;
  border-color: rgba(99, 102, 241, 0.5) !important;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3) !important;
}

.pill.primary:hover {
  background: linear-gradient(135deg, rgba(109, 112, 251, 1) 0%, rgba(89, 80, 239, 1) 100%) !important;
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.45) !important;
}

/* Installed state for install button */
.pill.installed {
  background: rgba(75, 85, 99, 0.4) !important;
  border-color: rgba(107, 114, 128, 0.3) !important;
  color: rgba(156, 163, 175, 0.8) !important;
  box-shadow: none !important;
  cursor: default !important;
  opacity: 0.7 !important;
  animation: none !important;
}

.pill.installed:hover {
  background: rgba(75, 85, 99, 0.4) !important;
  box-shadow: none !important;
  transform: none !important;
}

.pill.installed::before,
.pill.installed::after {
  display: none !important;
}

:root{
  --bg:#0b0d18;
  --surface:#15182a;
}

/* removed old .card layout, now handled above */

@media (max-width: 600px) {
  .card {
    max-width: 100vw;
    padding: 12px 2vw;
    margin: 10px 0;
    border-radius: 14px;
  }
  .table-wrap {
    max-width: 100vw;
    padding: 0 0 8px 0;
    overflow-x: auto;
    box-sizing: border-box;
  }
}
.table {
  font-size: 14px;
  min-width: unset;
  width: 100%;
  padding: 1.4rem;
  margin: 1.4rem auto;}
.table thead {
  font-size: 0.85em;
  padding: 0.5em 0.7em;}
.table tr {
  display: block;
  font-size: 1.4em;
  margin-bottom: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  font-size: 0.8em;
  padding: 0.35em 0.7em;}
.table td {
  font-size: 0.7em;
  padding: 0.28em 0.56em;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 0.63em;
  align-items: center;
  padding: 6px 8px;
  border: none;
  font-size: 13px;
  word-break: break-word;
  background: none;}
.table td:before {
  content: attr(data-label);
  flex: 0 0 90px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-right: 8px;
  display: block;}
.table td:last-child {
  justify-content: flex-end;
}
.col-sent, .icon.trash {
  flex: 0 0 auto;
  margin-left: 8px;
}
.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
@media (max-width:900px){ .grid2{ grid-template-columns:1fr; } }

.field{display:flex; flex-direction:column; gap:8px}
.field input, .field textarea, .field select{
  width:100%; background:#12152a; border:1px solid rgba(255,255,255,.08);
  color:var(--text); border-radius:12px; padding:12px 14px; outline:none;
}
.field input:focus, .field textarea:focus{ border-color: var(--accent); }

label{font-weight:600}

.hours-row{display:flex; align-items:center; gap:10px}
.round{
  width:48px; height:48px; border-radius:999px; background:#0f1220; color:#fff; border:0; cursor:pointer;
  box-shadow: var(--shadow);
}
.qbtns{display:flex; gap:12px; margin-top:8px}
.chip{
  background:var(--chip); color:var(--chipText); border:0; border-radius:999px; padding:8px 12px;
  cursor:pointer; box-shadow:var(--shadow);
}
.chip:disabled{opacity:.4; cursor:not-allowed}

.muted{
  color: #cbd5ff;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.row{display:flex; align-items:center; gap:18px}
.space-between{justify-content:space-between}

.es-badge{display:none; background:#2b2f55; color:#cbd5ff; padding:6px 10px; border-radius:999px; font-size:12px}
.es-badge.show{display:inline-flex}

.code-badge{background:#2b2f55; color:#cbd5ff; padding:6px 10px; border-radius:999px; font-size:12px}
.code-badge.active{background:#0f1220; color:#fff}

.suggest-wrap{display:flex; flex-wrap:wrap; gap:10px; margin-top:6px}
.suggest-wrap.empty{display:none}

.buttons-row{display:flex; gap:12px; margin-top:14px; flex-wrap:wrap}
.btn{
  border:0; border-radius:12px; padding:12px 16px; background:#2b2f55; color:#fff; cursor:pointer;
}
.btn.primary{background:var(--accent)}
.btn.secondary{background:#222642}
.btn:disabled{opacity:.5; cursor:not-allowed}

.badge.sent{background:rgba(16,185,129,.15); color:var(--sent); padding:4px 8px; border-radius:12px}

.table-wrap{
  overflow-x:auto;
  width:100%;
  max-width:100%;
  -webkit-overflow-scrolling:touch;
  box-sizing: border-box;}
.table{
  width:100%;
  max-width:100%;
  min-width:0;
  border-collapse:collapse;
  font-size:14px;
  table-layout:auto;}
.table th, .table td{
  padding:10px 8px;
  border-bottom:1px solid rgba(255,255,255,.08);
  word-break:break-word;}
.table thead th{color:#cbd5ff; font-weight:700}


@media only screen and (max-width: 600px) {
  .page {
    padding: 8px 2vw 8px 2vw;
    max-width: 100vw;
  }
  .card {
    padding: 10px 2vw;
    margin: 10px 0;
    border-radius: 12px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }
  .table-wrap {
    padding: 0 0 8px 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: auto;
    box-sizing: border-box;
  }
}

.desc-bilingual {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.desc-bilingual .desc-es {
  color: #facc15;
  font-size: 13px;
  font-weight: 500;
}
.desc-bilingual .desc-en {
  color: #a7f3d0;
  font-size: 13px;
}

/* Help dialog */
.help-dialog article.help {
  max-width: 480px;
  margin: 0 auto;
  background: #181b2e;
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 32px #000a;
  padding: 24px 18px 18px 18px;
}
.help-dialog .faq-q {
  color: #f3f6;
  font-weight: 600;
  font-size: 1.1em;
  margin-bottom: 8px;
}

/* Accessibility improvements */
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #4f9eff;
  outline-offset: 2px;
}
button:focus:not(:focus-visible), input:focus:not(:focus-visible), select:focus:not(:focus-visible), textarea:focus:not(:focus-visible) {
  outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .missing-fields-warning {
    background: rgba(255, 152, 0, 0.2) !important;
    border: 2px solid #ff9800 !important;
    color: #ffffff !important;
  }
  
  .muted {
    color: #b0b0b0 !important;
  }
  
  button {
    border: 1px solid currentColor;
  }
  
  .card {
    border: 1px solid #555;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Improved color contrast */
.muted {
  color: #9ca3af; /* Better contrast than previous muted colors */
}

.warning-text {
  color: #ffcc00; /* Improved contrast for warning text */
}

/* ========== MOBILE FIXES ========== */

/* Mobile device specific fixes */
.mobile-device select {
  -webkit-appearance: menulist !important;
  -moz-appearance: menulist !important;
  appearance: menulist !important;
  font-size: 16px !important; /* Prevents iOS zoom */
  min-height: 44px !important; /* iOS minimum touch target */
  padding: 12px 16px !important;
  border-radius: 8px !important;
  background: #2a2d4a !important;
  color: #ffffff !important;
  border: 2px solid #3d4a7a !important;
}

.mobile-device select:focus {
  border-color: #4f46e5 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}

.mobile-device input {
  font-size: 16px !important; /* Prevents iOS zoom */
  min-height: 44px !important; /* iOS minimum touch target */
  padding: 12px 16px !important;
}

.mobile-device button {
  min-height: 44px !important; /* iOS minimum touch target */
  padding: 12px 20px !important;
  font-size: 16px !important;
}

/* Fix mobile dropdown arrow */
.mobile-device select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E") !important;
  background-position: right 12px center !important;
  background-repeat: no-repeat !important;
  background-size: 16px 16px !important;
  padding-right: 40px !important;
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
  .row {
    flex-direction: column !important;
    gap: 16px !important;
  }
  
  .col {
    width: 100% !important;
    min-width: unset !important;
  }
  
  .photo-controls {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  
  .photo-btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }
  
  .photo-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) !important;
    gap: 8px !important;
  }
  
  /* Fix form layout on mobile */
  .form-group {
    margin-bottom: 20px !important;
  }
  
  label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
  }
  
  /* Make sure dropdowns are visible and touchable */
  select {
    position: relative !important;
    z-index: 10 !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  
  /* Fix iOS specific issues */
  select:disabled {
    opacity: 0.6 !important;
    background: #1a1d35 !important;
  }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  button:hover {
    transform: none !important; /* Disable hover effects on touch devices */
  }
  
  .chip:hover {
    transform: none !important;
  }
  
  .photo-thumbnail:hover {
    transform: none !important;
  }
}

/* Debug styles for mobile */
.mobile-debug {
  position: fixed;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 1000;
  max-width: 200px;
  word-wrap: break-word;
}

/* Fix for language button accessibility - ensure they're never blocked */
.lang-btn {
  position: relative !important;
  z-index: 9999 !important;
  pointer-events: auto !important;
}

/* Ensure language button container has proper z-index */
div[style*="text-align:right"] {
  position: relative !important;
  z-index: 9998 !important;
}

/* Fix appbar positioning to prevent overlap */
.appbar {
  position: relative !important;
  z-index: 1000 !important;
}

.appbar-actions {
  position: relative !important;
  z-index: 1001 !important;
}

/* Ensure main content is properly spaced below appbar */
main.page {
  margin-top: 60px !important;
  position: relative !important;
  z-index: 100 !important;
}

/* === GUIDED MODE WIZARD STYLES === */
#wizard {
  display: none;
}

#wizard.active {
  display: block;
}

#wizard .entries-today-panel {
  display: block;
}

#wizard:not(.active) .entries-today-panel {
  display: none;
}

/* Enhanced wizard header with progress */
.wizard-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 1.5rem; 
  gap: 1rem;
  background: linear-gradient(135deg, #1e1b3a 0%, #2a2550 100%);
  border-radius: 12px;
  padding: 20px 24px;
  border: 1px solid #3a4264;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.wizard-progress {
  flex: 1;
  margin-right: 1rem;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #374151;
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 10%; /* Will be updated by JS */
}

.wizard-nav-buttons { 
  display: flex; 
  gap: .5rem; 
}

.row { 
  display: flex; 
  gap: .5rem; 
  margin: .75rem 0; 
}

/* Language Selection */
.language-selection {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 24px 0;
}

.lang-choice {
  padding: 16px 32px;
  font-size: 1.1em;
  font-weight: 600;
  min-width: 140px;
  transition: all 0.3s ease;
}

.lang-choice:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79,70,229,0.3);
}

/* Step hints and validation */
.step-hint {
  color: #a1a9b8;
  font-size: 0.95em;
  margin-bottom: 16px;
  line-height: 1.4;
}

.validation-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 0.9em;
  margin-top: 12px;
  animation: shake 0.5s ease-in-out;
}

.validation-icon {
  font-size: 1.2em;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Wizard visibility - force with inline styles */
.wizard { display: none; }
.wizard.active { display: block; }

.wizard-step { 
  display: none;
  padding: 24px;
  animation: fadeIn 0.3s ease-in-out;
}

.wizard-step.active { 
  display: block;
}

.wizard-step h2 {
  color: #e2e8f0;
  font-size: 1.5em;
  margin-bottom: 8px;
  font-weight: 600;
}

.hidden { display: none !important; }

/* Force step hiding */
.wizard-step:not(.active) { display: none !important; }
.wizard:not(.active) { display: none !important; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Enhanced step actions */
.wizard-step-actions {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  align-items: center;
  flex-wrap: wrap;
}

.photo-step-actions {
  display: flex;
  gap: 16px;
  margin: 24px 0;
  justify-content: center;
}

.nag-actions {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  justify-content: center;
  align-items: center;
}

.friendly-nag {
  color: #fbbf24;
  font-size: 1.05em;
  text-align: center;
  margin: 16px 0;
  line-height: 1.5;
}

.skip-explanation {
  margin-top: 20px;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  border-left: 3px solid #3b82f6;
}

.skip-explanation small {
  color: #93c5fd;
  line-height: 1.4;
}

/* Photo preview area */
.photo-preview-area {
  margin: 20px 0;
  padding: 16px;
  background: #1e1b3a;
  border-radius: 8px;
  border: 2px dashed #4f46e5;
  text-align: center;
}

.photo-preview-area.has-photos {
  border-style: solid;
  border-color: #10b981;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.photo-preview-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.photo-preview-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

.photo-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#wizCostCodeSuggestions {
  margin: 20px 0;
  padding: 18px;
  background: linear-gradient(135deg, #1e1b3a 0%, #2a2046 100%);
  border-radius: 12px;
  border: 1px solid #4f46e5;
  box-shadow: 0 2px 8px rgba(79,70,229,0.1);
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

#wizCostCodeSuggestions h4 {
  margin: 0 0 12px 0;
  color: #a78bfa;
  font-size: 15px;
  font-weight: 600;
}

#wizSuggestedCodes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
  box-sizing: border-box;
}

#wizSuggestedCodes button {
  margin: 0;
  font-size: 13px;
  padding: 8px 14px;
  transition: all 0.2s ease;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#wizSuggestedCodes button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79,70,229,0.2);
}

/* Selection areas for job, code, etc */
.selection-area {
  margin: 20px 0;
  max-width: 100%;
  overflow: hidden;
}

.selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0;
  max-width: 100%;
  box-sizing: border-box;
}

.selection-item {
  padding: 16px;
  background: #1e1b3a;
  border: 2px solid #374151;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.selection-item:hover {
  border-color: #4f46e5;
  background: #252242;
  transform: translateY(-1px);
}

.selection-item.selected {
  border-color: #10b981;
  background: #1e3a32;
}

.selection-item h4 {
  margin: 0 0 4px 0;
  color: #e2e8f0;
  font-size: 1em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-item p {
  margin: 0;
  color: #9ca3af;
  font-size: 0.85em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}

/* Wizard photo preview styling */
.wizard-photo-preview {
  margin: 10px 0;
  padding: 10px;
  background: #1e1b3a;
  border-radius: 8px;
  border: 1px solid #3a4264;
}

.wizard-photo-preview img {
  max-width: 150px;
  max-height: 150px;
  border-radius: 4px;
  margin: 4px;
  object-fit: cover;
}

.wizard-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #3a4264;
}

.wizard-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.95em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 80px;
}

.wizard-btn.primary {
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 2px 8px rgba(79,70,229,0.15);
}

.wizard-btn.primary:hover:not(:disabled) {
  background: #4338ca;
  box-shadow: 0 4px 12px rgba(79,70,229,0.25);
  transform: translateY(-1px);
}

.wizard-btn.primary:disabled {
  background: #6b7280;
  color: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.wizard-btn.secondary {
  background: #374151;
  color: #d1d5db;
  border: 1px solid #4b5563;
}

.wizard-btn.secondary:hover:not(:disabled) {
  background: #4b5563;
  color: #fff;
}

.wizard-btn.secondary:disabled {
  background: #374151;
  color: #6b7280;
  cursor: not-allowed;
  border-color: #374151;
}

.wizard-btn.ghost {
  background: transparent;
  color: #9ca3af;
  border: 1px solid #4b5563;
}

.wizard-btn.ghost:hover:not(:disabled) {
  background: #374151;
  color: #e5e7eb;
}

.wizard-btn.ghost:disabled {
  color: #6b7280;
  border-color: #374151;
  cursor: not-allowed;
}

/* Hours and miles input areas */
.hours-input-area, .miles-input-area {
  margin: 20px 0;
}

.time-input-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.time-input-group input {
  flex: 1;
  min-width: 120px;
  padding: 12px 16px;
  font-size: 1.1em;
  text-align: center;
}

.time-presets {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.time-preset {
  padding: 8px 12px;
  background: #374151;
  border: 1px solid #4b5563;
  border-radius: 6px;
  color: #d1d5db;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s;
}

.time-preset:hover {
  background: #4b5563;
  border-color: #6b7280;
}

/* Enhanced review section */
.wizard-review {
  background: linear-gradient(135deg, #1e1b3a 0%, #2a2046 100%);
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
  border: 1px solid #4f46e5;
  box-shadow: 0 4px 16px rgba(79,70,229,0.1);
}

.review-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #374151;
}

.review-item:last-child {
  border-bottom: none;
}

.review-label {
  color: #a78bfa;
  font-weight: 600;
  min-width: 120px;
}

.review-value {
  color: #e2e8f0;
  flex: 1;
  text-align: right;
}

/* Final actions and success states */
.final-actions {
  display: flex;
  gap: 16px;
  margin: 24px 0;
  justify-content: center;
  flex-wrap: wrap;
}

.post-submit-actions {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  justify-content: center;
  flex-wrap: wrap;
}

.success-message {
  color: #10b981;
  font-size: 1.1em;
  text-align: center;
  margin: 16px 0;
  font-weight: 500;
}

.undo-window {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 16px;
  text-align: center;
}

.link-btn {
  background: none;
  border: none;
  color: #3b82f6;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

.link-btn:hover {
  color: #2563eb;
}

#legacy-form.hidden {
  display: none;
}

/* Mobile responsiveness for guided mode */
@media (max-width: 768px) {
  .wizard-header {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
  
  .wizard-nav-buttons {
    width: 100%;
    justify-content: space-between;
  }
  
  .language-selection {
    flex-direction: column;
    gap: 12px;
  }
  
  .lang-choice {
    min-width: auto;
    width: 100%;
  }
  
  .photo-step-actions,
  .nag-actions,
  .final-actions,
  .post-submit-actions {
    flex-direction: column;
  }
  
  .selection-grid {
    grid-template-columns: 1fr;
  }
  
  .selection-item {
    min-width: 0;
  }
  
  .selection-item h4 {
    font-size: 0.95em;
  }
  
  .selection-item p {
    font-size: 0.8em;
  }
  
  .g-assist {
    padding: 0.65rem;
    margin-left: -0.2rem;
    margin-right: -0.2rem;
  }
  
  .g-assist-chips {
    gap: 0.35rem;
  }
  
  .g-chip {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    max-width: calc(100vw - 4rem);
  }
  
  .g-chip-label {
    max-width: min(180px, calc(100vw - 10rem));
  }
  
  .time-input-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .review-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .review-value {
    text-align: left;
  }
}

/* === WIZARD UTILITY CLASSES === */
.chip, .mru-chip {
  display: inline-block;
  background: #4f46e5;
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.85em;
  cursor: pointer;
  margin: 2px 4px;
  border: none;
  transition: all 0.2s;
}

.chip:hover, .mru-chip:hover {
  background: #4338ca;
  transform: translateY(-1px);
}

.chip.selected, .mru-chip.selected {
  background: #10b981;
}

.chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.mru-section {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #3a4264;
}

.search-results {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #3a4264;
  border-radius: 8px;
  margin-top: 8px;
}

.cost-code-item {
  padding: 10px 12px;
  border-bottom: 1px solid #2a2f4a;
  cursor: pointer;
  transition: background 0.2s;
}

.cost-code-item:hover {
  background: #2a2f4a;
}

.cost-code-item.selected {
  background: #10b981;
  color: white;
}

.cost-code-item:last-child {
  border-bottom: none;
}

.no-results {
  padding: 16px;
  text-align: center;
  color: #8892b0;
  font-style: italic;
}

.hours-mode-toggle {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.hours-mode-toggle label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.time-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.entries-today-panel {
  background: #1e1b3a;
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
  border: 1px solid #3a4264;
}

.entries-today-panel h3 {
  margin: 0 0 16px 0;
  color: #a78bfa;
  font-size: 1.1em;
}

.entries-container {
  max-height: 300px;
  overflow-y: auto;
}

.entry-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #232a3a;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid #3a4264;
}

.entry-main {
  flex: 1;
}

.entry-job {
  font-weight: 500;
  color: #e2e8f0;
  margin-bottom: 4px;
}

.entry-details {
  display: flex;
  gap: 12px;
  font-size: 0.9em;
  color: #8892b0;
}

.entry-code {
  color: #4f46e5;
  font-weight: 500;
}

.entry-hours {
  color: #10b981;
}

.entry-photo {
  color: #f59e0b;
}

.entry-actions {
  display: flex;
  gap: 4px;
}

.entry-btn {
  background: none;
  border: 1px solid #4b5563;
  color: #d1d5db;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s;
}

.entry-btn:hover {
  background: #374151;
  border-color: #6b7280;
}

.no-entries {
  text-align: center;
  color: #8892b0;
  font-style: italic;
  padding: 20px;
}

.badge {
  display: inline-block;
  background: #4f46e5;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 500;
}

.row-sm {
  display: flex;
  gap: 8px;
  align-items: center;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}
/* --- Guided wizard refresh overrides --- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.language-toggle {
  display: flex;
  gap: 8px;
}

.lang-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.lang-btn .lang-check {
  font-size: 0.85em;
  visibility: hidden;
}

.lang-btn.active .lang-check {
  visibility: visible;
}

.wizard {
  background: #141829;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 18px 40px rgba(10, 15, 45, 0.35);
}

.wizard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.wizard-progress {
  flex: 1;
}

.progress-bar {
  position: relative;
  height: 8px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: inherit;
  transition: width 0.3s ease;
}

.wizard-nav-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: var(--kbInset, 0px);
}

.wizard-body {
  display: grid;
}

.wizard-step {
  display: none;
  animation: fadeIn 0.25s ease;
}

.wizard-step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.language-choice {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.lang-choice {
  min-width: 120px;
  justify-content: center;
  font-weight: 600;
}

.lang-choice.active {
  background: #4f46e5;
  color: #fff;
}

.wizard-select,
.wizard textarea,
.wizard input[type="search"],
.wizard input[type="date"],
.wizard input[type="number"],
.wizard input[type="time"],
.wizard input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.6);
  color: #e2e8f0;
  font-size: 1rem;
}

.select-card {
  background: rgba(30, 41, 59, 0.35);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.select-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.select-list li {
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.select-list li:hover,
.select-list li:focus {
  background: rgba(79, 70, 229, 0.2);
  transform: translateY(-1px);
  outline: none;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  background: rgba(99, 102, 241, 0.15);
  border: 1px dashed rgba(129, 140, 248, 0.5);
  color: #c7d2fe;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.chip:hover {
  background: rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.photo-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.friendly-nag {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  padding: 14px;
  border-radius: 12px;
  color: #fecaca;
  margin-bottom: 18px;
}

.nag-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hours-mode-toggle {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  padding: 4px;
  margin-bottom: 16px;
  gap: 6px;
}

.hours-mode-toggle button {
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
}

.hours-mode-toggle button.active {
  background: #4f46e5;
  color: #fff;
}

.hours-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hours-row button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  font-size: 1.3rem;
  cursor: pointer;
}

.hours-panel {
  display: grid;
  gap: 10px;
}

.validation {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(248, 113, 113, 0.12);
  border-radius: 12px;
  color: #fecaca;
}

.review-prompts {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  display: grid;
  gap: 12px;
}

.review-prompts li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.45);
  padding: 12px 16px;
  border-radius: 12px;
}

.wizard-summary {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(30, 64, 175, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.summary-row {
  color: #e2e8f0;
  font-weight: 500;
}

.post-submit-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.undo-window {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.45);
  padding: 12px 16px;
  border-radius: 12px;
  color: #bbf7d0;
}

.link-btn {
  background: none;
  border: none;
  color: #a78bfa;
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
}

.sr-announcer {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 800px) {
  .wizard {
    padding: 16px;
  }
  .wizard-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .review-prompts li {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* Wizard button system */
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(99, 102, 241, 0.45);
}

.btn-primary:disabled {
  background: rgba(99, 102, 241, 0.25);
  color: rgba(226, 232, 240, 0.55);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.7;
}

.btn-ghost {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  color: #e2e8f0;
  padding: 9px 20px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-ghost:hover {
  background: rgba(148, 163, 184, 0.18);
  transform: translateY(-1px);
}

.btn-ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-minimal {
  background: none;
  border: none;
  color: rgba(148, 163, 184, 0.85);
  padding: 8px 12px;
  font-weight: 600;
  border-radius: 999px;
  transition: color 0.2s ease;
}

.btn-minimal:hover {
  color: #e2e8f0;
}

.btn-minimal:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.6);
  outline-offset: 2px;
}

.wizard-nav-buttons button {
  min-width: 92px;
}

.code-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

#wizCodeList {
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.55);
  padding: 8px;
}

#wizCodeList[hidden] {
  display: none;
}

.chip.selected {
  background: rgba(99, 102, 241, 0.45);
  border: 1px solid rgba(129, 140, 248, 0.9);
  color: #ffffff;
}

.code-input-row .link-btn {
  margin-left: auto;
}
.select-list li.selected {
  background: rgba(99, 102, 241, 0.35);
  border: 1px solid rgba(129, 140, 248, 0.6);
  color: #e0e7ff;
}
.select-list li.muted {
  color: rgba(148, 163, 184, 0.7);
  background: transparent;
  border: none;
  cursor: default;
}
.cost-code-block {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: grid;
  gap: 12px;
}

.cost-code-block label {
  font-weight: 600;
  color: #e2e8f0;
}
.btn-primary:focus-visible,
.btn-ghost:focus-visible {
  outline: 2px solid rgba(129, 140, 248, 0.7);
  outline-offset: 2px;
}
body {
  background: radial-gradient(circle at top, #1a2342 0%, #0b1221 45%, #050816 100%);
  color: #e2e8f0;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 20px 60px;
  display: grid;
  gap: 28px;
}

.toolbar {
  align-items: flex-start;
}

.toolbar .pill {
  min-width: 110px;
}

.pill.secondary {
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.pill.secondary:hover {
  background: rgba(148, 163, 184, 0.3);
}

.wizard-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 18px;
  padding: 24px 26px;
}

.hero-text h2 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.hero-text p {
  margin: 0 0 16px;
  color: #cbd5f5;
  font-size: 1rem;
}

.hero-list {
  margin: 0;
  padding-left: 20px;
  color: #94a3c6;
  display: grid;
  gap: 4px;
}

.hero-illustration {
  font-size: 3.5rem;
  align-self: center;
}

.wizard-shell {
  display: grid;
  gap: 18px;
}

.wizard {
  border-radius: 20px;
  padding: 28px 26px 34px;
  background: rgba(11, 18, 33, 0.85);
  border: 1px solid rgba(79, 70, 229, 0.25);
  box-shadow: 0 22px 45px rgba(8, 12, 25, 0.45);
}

.wizard-coach {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: flex-start;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 16px;
  padding: 16px 18px;
}

.coach-avatar {
  font-size: 1.8rem;
  line-height: 1;
}

.coach-title {
  margin: 0 0 4px;
  font-weight: 700;
  color: #e0e7ff;
}

.coach-body {
  margin: 0;
  color: #c7d2fe;
}

.classic-dialog {
  border: none;
  padding: 0;
  background: transparent;
  width: min(940px, 92vw);
  max-height: 90vh;
}

.classic-dialog::backdrop {
  background: rgba(4, 10, 20, 0.78);
  backdrop-filter: blur(6px);
}

.classic-dialog-shell {
  background: rgba(9, 14, 28, 0.95);
  border-radius: 20px;
  padding: 24px 28px 32px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: grid;
  gap: 20px;
  max-height: 90vh;
  overflow-y: auto;
}

.classic-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.classic-dialog-header h2 {
  margin: 0 0 6px;
}

.classic-dialog-header .btn-minimal {
  font-size: 1.1rem;
}

.wizard-step {
  border-radius: 16px;
  padding: 18px 20px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.wizard-step.active {
  animation: fadeIn 0.25s ease;
}

.wizard-body {
  display: grid;
  gap: 18px;
}

.wizard-nav-buttons {
  gap: 10px;
}

.hero-text, .wizard-step h2 {
  font-weight: 700;
}

.language-choice button {
  min-width: 130px;
  font-size: 1.05rem;
}

.photo-buttons .pill {
  min-width: 160px;
}

.classic-dialog .legacy {
  display: grid;
  gap: 22px;
}

.classic-dialog .legacy .field-group {
  display: grid;
  gap: 8px;
}

.classic-dialog .legacy input,
.classic-dialog .legacy select,
.classic-dialog .legacy textarea {
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
}

.classic-dialog .actions-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-illustration {
  filter: drop-shadow(0 8px 24px rgba(99, 102, 241, 0.4));
}

@media (max-width: 900px) {
  .wizard-hero {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .hero-illustration {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .wizard {
    padding: 22px 18px 28px;
  }
  .wizard-coach {
    grid-template-columns: 1fr;
  }
  .classic-dialog-shell {
    padding: 22px 20px 28px;
  }
}

.classic-dialog.is-visible {
  display: block;
}
#wizSuggestedCodes {
  display: none;
}
.classic-dialog:not([open]) {
  display: none;
}
body.modal-open {
  overflow: hidden;
}
.classic-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
}

.classic-overlay[hidden] {
  display: none;
}

.classic-dimmer {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 20, 0.78);
  backdrop-filter: blur(6px);
}

.classic-container {
  position: relative;
  width: min(940px, 92vw);
  max-height: 92vh;
  overflow-y: auto;
  background: rgba(9, 14, 28, 0.95);
  border-radius: 22px;
  padding: 26px 30px 34px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 24px 60px rgba(5, 8, 22, 0.65);
  display: grid;
  gap: 22px;
  outline: none;
}

.classic-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.classic-header h2 {
  margin: 0 0 6px;
}

.classic-header .btn-minimal {
  font-size: 1.2rem;
  color: rgba(226, 232, 240, 0.7);
}

.classic-header .btn-minimal:hover {
  color: #e2e8f0;
}

.classic-container .legacy {
  display: grid;
  gap: 22px;
}

.classic-container .legacy .field-group {
  display: grid;
  gap: 8px;
}

.classic-container .legacy input,
.classic-container .legacy select,
.classic-container .legacy textarea {
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
}

.classic-container .actions-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.wizard-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 26px;
  align-items: start;
}

.wizard-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.wizard-lang,
.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.wizard {
  display: grid;
  gap: 18px;
}

.step-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #cbd5f5;
}

.wizard-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.wizard-footer .btn-ghost,
.wizard-footer .btn-primary {
  min-width: 108px;
}

.wizard-side-panel {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 18px 20px;
  display: grid;
  gap: 12px;
  min-height: 100%;
}

.wizard-side-panel h3 {
  margin: 0;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.side-list li {
  background: rgba(26, 35, 62, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.92rem;
}

.side-list li span {
  display: block;
  color: #cbd5f5;
}

@media (max-width: 1024px) {
  .wizard-card {
    grid-template-columns: 1fr;
  }

  .wizard-side-panel {
    order: -1;
  }
}
.side-list li strong {
  display: block;
  color: #e2e8f0;
}

.side-list li small {
  display: block;
  color: #94a3c6;
  margin-top: 2px;
  font-size: 0.82rem;
}
.coach-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: flex-start;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 16px;
  padding: 16px 18px;
}

.coach-icon {
  font-size: 1.9rem;
  line-height: 1;
}

.coach-title {
  margin: 0 0 4px;
  font-weight: 700;
  color: #e0e7ff;
}

.coach-body {
  margin: 0;
  color: #c7d2fe;
}







/* Guided mode refresh */
.menu-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.65rem 1rem;
  background: rgba(15, 22, 40, 0.75);
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
  backdrop-filter: blur(6px);
}
.menu-btn {
  appearance: none;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  transition: all 0.25s ease;
}
.menu-btn:hover,
.menu-btn:focus-visible {
  border-color: rgba(99, 102, 241, 0.55);
  background: rgba(99, 102, 241, 0.15);
  outline: none;
}
.menu-btn.active {
  background: linear-gradient(120deg, #6366f1 0%, #4338ca 100%);
  border-color: transparent;
  color: #f8fafc;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.25);
}

.g-shell {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  background: radial-gradient(circle at top, rgba(79, 70, 229, 0.18), rgba(12, 18, 34, 0.9));
  border-radius: 24px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  box-shadow: 0 18px 40px rgba(8, 15, 35, 0.35);
  box-sizing: border-box;
  overflow-x: hidden;
}

.g-header {
  display: grid;
  gap: 0.4rem;
}

.g-step-label {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.7);
}
.g-step-title {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}
.g-step-hint,
.g-hint {
  color: rgba(203, 213, 225, 0.9);
  font-size: 0.95rem;
  margin: 0;
}

/* Hide hardcoded headings in individual step sections (main header shows dynamic content) */
.g-step-heading,
.g-step-sub {
  display: none;
}

.g-field {
  display: grid;
  gap: 0.6rem;
}

.mode-panel.guided .field,
.mode-panel.guided .field input,
.mode-panel.guided .field select,
.mode-panel.guided .field textarea,
.mode-panel.guided .g-field,
.mode-panel.guided .g-field input,
.mode-panel.guided .g-field select,
.mode-panel.guided .g-field textarea {
  max-width: 100%;
}

.mode-panel.guided .card,
.mode-panel.guided .container,
.mode-panel.guided .g-shell,
.mode-panel.guided .g-card,
.mode-panel.guided section,
.mode-panel.guided .g-step,
main.page {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Main content area - add spacing for sticky header */
.layout {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  padding: 2.5rem clamp(0.5rem, 2vw, 1rem) 2rem;
  width: 100%;
  margin-top: 0;
  position: relative;
}

/* Mode panels */
.mode-panel {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
}

.mode-panel[hidden] {
  display: none !important;
}

.mode-panel.guided {
  /* Guided mode styles - using defaults */
  display: block;
}

.mode-panel.advanced {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 3vw, 2rem);
  padding: 0;
  margin-top: 0;
}

.advanced-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
}

.advanced-header-main h2 {
  margin: 0;
}

.advanced-header-main p {
  margin: 6px 0 0;
  max-width: 36ch;
}

.advanced-form {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 20px;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.35);
}

.advanced-row {
  display: grid;
  gap: clamp(1rem, 2vw, 1.25rem);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.advanced-form .field-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.advanced-form label {
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
}

.advanced-form input,
.advanced-form select,
.advanced-form textarea {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.advanced-form input:focus,
.advanced-form select:focus,
.advanced-form textarea:focus {
  border-color: rgba(129, 140, 248, 0.65);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  outline: none;
}

.advanced-form textarea {
  resize: vertical;
  min-height: 110px;
}

.advanced-task-card {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.advanced-hours-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.advanced-hours-input {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.advanced-hours-input input {
  flex: 1;
}

.adv-hours-btn {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  border-radius: 12px;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.adv-hours-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(129, 140, 248, 0.5);
  transform: scale(1.05);
}

.adv-hours-btn:active {
  transform: scale(0.95);
}

.adv-hours-presets {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.adv-preset-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border-radius: 10px;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.adv-preset-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

.adv-preset-btn:active {
  transform: scale(0.95);
}

.advanced-shortcuts {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  text-align: center;
}

.shortcuts-hint {
  color: rgba(203, 213, 225, 0.7);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.shortcuts-hint kbd {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: #a5b4fc;
  white-space: nowrap;
}

.advanced-task-card .field-group.full {
  grid-column: 1 / -1;
}

.advanced-task-card .field-group.full textarea {
  min-height: 120px;
}

.advanced-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-error {
  color: #fca5a5;
  font-size: 0.9rem;
  font-weight: 500;
  display: block;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(252, 165, 165, 0.1);
  border-left: 3px solid #fca5a5;
  border-radius: 4px;
}

.form-error:empty,
.form-error[hidden] {
  display: none;
}

.adv-result-list {
  margin-top: 0.5rem;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.45);
  max-height: 220px;
  overflow-y: auto;
  display: none;
  backdrop-filter: blur(8px);
}

.adv-result-list.is-visible {
  display: block;
}

.adv-result-list button {
  width: 100%;
  border: none;
  background: transparent;
  color: #e2e8f0;
  text-align: left;
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.adv-result-list button:hover,
.adv-result-list button:focus-visible {
  background: rgba(99, 102, 241, 0.18);
  outline: none;
}

.adv-result-list .result-secondary {
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.88);
}

.advanced-tasks {
  display: grid;
  gap: 1rem;
}

.advanced-tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.advanced-submit {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .advanced-header-main p {
    max-width: 100%;
  }
}

.g-label {
  font-weight: 600;
  color: rgba(226, 232, 240, 0.92);
}
.g-field textarea,
.g-field input,
.g-field select,
.g-select,
.g-input {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.7);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  color: #f8fafc;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}
.g-field textarea:focus,
.g-field input:focus,
.g-field select:focus,
.g-select:focus,
.g-input:focus {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  outline: none;
}

/* Select dropdown specific styles */
.g-field select,
.g-select {
  cursor: pointer;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22white%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3e%3cpolyline points=%226 9 12 15 18 9%22%3e%3c/polyline%3e%3c/svg%3e');
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2em;
  padding-right: 2.5rem;
}

.g-field select option,
.g-select option {
  background: #1e293b;
  color: #f8fafc;
  padding: 0.5rem;
}

.g-date-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.g-date-row .g-input {
  flex: 0 1 auto;
  width: auto;
  min-width: 200px;
  max-width: 100%;
}

.g-day-of-week {
  font-size: 1.15rem;
  color: #60a5fa;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.35rem 0.75rem;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  transition: all 0.2s ease;
}

.g-day-of-week--future {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}

.g-day-of-week--future::before {
  content: '❌ ';
  font-size: 1rem;
}

.g-day-of-week--past {
  color: #a1a1aa;
  background: rgba(161, 161, 170, 0.1);
  border-color: rgba(161, 161, 170, 0.25);
  font-weight: 500;
}

.g-day-of-week--past::before {
  content: '⏳ ';
  font-size: 0.9rem;
}

/* 8+ days ago - billing impact warning */
.g-day-of-week--late {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.3);
  font-weight: 600;
}

.g-day-of-week--late::before {
  content: '⚠️ ';
  font-size: 0.9rem;
}

.g-date-warning {
  font-size: 0.9rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  margin-top: 0.5rem;
  font-weight: 500;
  line-height: 1.4;
}

.g-date-warning--error {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.g-date-warning--warning {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Softer info style for recent past dates (1-3 days) */
.g-date-warning--info {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  font-weight: 400;
}

/* Gentle reminder for older dates (4+ days) */
.g-date-warning--gentle {
  color: #d4a574;
  background: rgba(180, 130, 80, 0.08);
  border: 1px solid rgba(180, 130, 80, 0.15);
  font-weight: 400;
}

/* Hours Input Group Styling */
.g-hours {
  display: grid;
  gap: 0.6rem;
}

.g-hours-input-group {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: 500px;
  position: relative;
}

.g-hours-btn {
  flex: 0 0 auto;
  width: 56px;
  min-width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: #f8fafc;
  background: rgba(71, 85, 105, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.18);
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.g-hours-minus {
  border-radius: 18px 0 0 18px;
  border-right: none;
}

.g-hours-plus {
  border-radius: 0 18px 18px 0;
  border-left: none;
}

.g-hours-btn:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.4);
  color: #ffffff;
  z-index: 1;
}

.g-hours-btn:active:not(:disabled) {
  background: rgba(99, 102, 241, 0.35);
  transform: scale(0.96);
}

.g-hours-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  z-index: 2;
}

.g-hours-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.g-hours-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0;
  background: rgba(15, 23, 42, 0.7);
  padding: 0.85rem 1rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: #f8fafc;
  text-align: center;
  transition: all 0.2s ease;
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Hide spinner buttons in WebKit browsers (Chrome, Safari, Edge) */
.g-hours-input::-webkit-outer-spin-button,
.g-hours-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
  display: none;
}

/* Hide spinner buttons in Firefox */
.g-hours-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.g-hours-input:focus {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  outline: none;
  z-index: 2;
}

.g-hours-input::placeholder {
  color: rgba(148, 163, 184, 0.5);
  font-weight: 500;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .g-hours-input-group {
    max-width: 100%;
  }
  
  .g-hours-btn {
    width: 52px;
    min-width: 52px;
    height: 52px;
    font-size: 1.4rem;
  }
  
  .g-hours-input {
    font-size: 1.25rem;
    padding: 0.75rem 0.85rem;
  }
}

@media (max-width: 480px) {
  .g-hours-btn {
    width: 48px;
    min-width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }
  
  .g-hours-input {
    font-size: 1.15rem;
    padding: 0.7rem 0.75rem;
  }
}

.g-inline-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Photo review actions - split layout with Add on left, Done on right */
.g-photo-review-actions {
  justify-content: space-between;
  flex-wrap: nowrap;
}

.g-photo-review-actions button {
  flex: 1;
  min-width: 0;
}

.g-photo-review-actions button:last-child {
  flex: 1.2; /* Done button slightly larger */
}

.g-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  background: rgba(71, 85, 105, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #f1f5f9;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
}
.g-ghost:hover,
.g-ghost:focus-visible {
  border-color: rgba(99, 102, 241, 0.65);
  background: rgba(99, 102, 241, 0.18);
  outline: none;
}
.g-ghost.is-recording {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.75);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
  animation: pulse-recording 1.5s ease-in-out infinite;
}

@keyframes pulse-recording {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.75);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.35);
    border-color: rgba(239, 68, 68, 1);
  }
}
.g-icon {
  font-size: 1rem;
}
.g-ghost-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Mobile: allow mic label to wrap if needed */
@media (max-width: 480px) {
  .g-ghost-label {
    white-space: normal;
    font-size: 0.85rem;
    line-height: 1.3;
  }
}

.g-assist {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.15), rgba(15, 23, 42, 0.75));
  border: 1px solid rgba(45, 212, 191, 0.2);
  max-width: 100%;
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
.g-assist-title {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(94, 234, 212, 0.85);
  margin-bottom: 0.75rem;
}
.g-assist-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  max-width: 100%;
  box-sizing: border-box;
}

.g-manual-search-prompt {
  width: 100%;
  padding: 0.75rem 0;
}

.g-manual-search-prompt p {
  text-align: center;
  color: rgba(203, 213, 225, 0.9);
}

.g-manual-search-section {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(15, 23, 42, 0.65));
  border: 1px solid rgba(59, 130, 246, 0.25);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.g-code-results {
  margin-top: 0.75rem;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.g-chip {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  background: rgba(15, 23, 42, 0.5);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  max-width: 100%;
  width: auto;
  box-sizing: border-box;
  overflow: hidden;
  word-break: break-word;
}
.g-chip:hover,
.g-chip:focus-visible {
  border-color: rgba(94, 234, 212, 0.55);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.18);
  outline: none;
}
.g-chip.is-selected {
  background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 50%, #3b82f6 100%);
  border: 2px solid #22d3ee;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.3), 
              0 12px 28px rgba(6, 182, 212, 0.45),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: scale(1.02);
}

/* Reduce scale on mobile to prevent overflow */
@media (max-width: 640px) {
  .g-chip.is-selected {
    transform: scale(1);
  }
  
  .g-assist-chips {
    padding: 0.5rem 0.25rem;
  }
}
.g-chip-code {
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  white-space: nowrap;
}
.g-chip.is-selected .g-chip-code {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.g-chip-label {
  opacity: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}
.g-chip.is-selected .g-chip-label {
  opacity: 1;
  color: #ffffff;
  font-weight: 500;
}

.g-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.g-list-item {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.g-list-button {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  color: #e2e8f0;
  transition: all 0.2s ease;
  box-sizing: border-box;
  overflow: hidden;
  word-wrap: break-word;
}
.g-list-button:hover,
.g-list-button:focus-visible {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.2);
  outline: none;
}
.g-list-button.is-selected {
  background: linear-gradient(125deg, rgba(99, 102, 241, 0.35), rgba(12, 18, 34, 0.9));
  border-color: rgba(99, 102, 241, 0.75);
}
.g-list-primary {
  font-weight: 700;
  letter-spacing: 0.05em;
  width: 100%;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.g-list-secondary {
  font-size: 0.9rem;
  color: rgba(203, 213, 225, 0.85);
  width: 100%;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.g-feedback {
  font-size: 0.85rem;
  color: rgba(248, 113, 113, 0.9);
}

.g-muted {
  color: rgba(148, 163, 184, 0.7);
  font-size: 0.85rem;
}

.g-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: calc(0.75rem + var(--kbInset, 0px));
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  flex-wrap: wrap;
}
.g-back {
  background: rgba(148, 163, 184, 0.1);
  color: rgba(226, 232, 240, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  font-weight: 600;
  padding: 0.65rem 1.2rem;
  transition: all 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
}
.g-back:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.35);
  transform: translateY(-1px);
}
.g-back:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.g-next {
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
  transition: all 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 120px;
}
.g-next:disabled {
  background: rgba(71, 85, 105, 0.35);
  box-shadow: none;
  color: rgba(226, 232, 240, 0.5);
  cursor: not-allowed;
}
.g-next:not(:disabled):hover,
.g-next:not(:disabled):focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  outline: none;
}

@media (max-width: 640px) {
  .g-shell {
    padding: 1.1rem;
    border-radius: 18px;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .menu-strip {
    padding: 0.6rem 0.75rem;
    gap: 0.4rem;
  }
  .menu-btn {
    flex: 1 1 calc(50% - 0.4rem);
    text-align: center;
    padding: 0.6rem 0.5rem;
    font-size: 0.85rem;
  }
  .g-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .g-back {
    width: 100%;
    order: 2;
  }
  .g-next {
    width: 100%;
    order: 1;
  }
  .g-inline-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  .g-inline-actions > * {
    width: 100%;
  }
  .pill {
    padding: 0.7rem 1rem;
  }
}
.g-assist-chips .g-muted {
  padding: 0.25rem 0;
}


.g-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.6rem 1.1rem;
  margin: 0.25rem 0.35rem 0.25rem 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
}
.g-choice:hover,
.g-choice:focus-visible {
  outline: none;
  border-color: rgba(99, 102, 241, 0.55);
  background: rgba(99, 102, 241, 0.18);
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.2);
}
.g-choice.is-active {
  background: linear-gradient(120deg, rgba(99, 102, 241, 0.8), rgba(67, 56, 202, 0.9));
  border-color: transparent;
  color: #f8fafc;
  box-shadow: 0 16px 28px rgba(67, 56, 202, 0.35);
}

.g-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1.25rem;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.g-card:hover,
.g-card:focus-visible {
  outline: none;
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.4);
}
.g-card.is-active {
  background: linear-gradient(130deg, rgba(37, 99, 235, 0.5), rgba(15, 23, 42, 0.9));
  border-color: rgba(129, 140, 248, 0.55);
  box-shadow: 0 20px 38px rgba(37, 99, 235, 0.35);
}
.g-card-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.g-card-body {
  font-size: 0.9rem;
  color: rgba(203, 213, 225, 0.85);
  line-height: 1.4;
}

.records-panel {
  display: grid;
  gap: 1.25rem;
  max-width: 600px; /* Match wizard width */
  margin: 0 auto; /* Center on desktop */
  padding: 0 1rem; /* Add horizontal padding */
}
.records-view[hidden] {
  display: none !important;
}

.records-view {
  display: none;
}

.records-view.active {
  display: block;
}

body[data-records-view="today"] #todayList {
  display: block;
  visibility: visible;
}

body[data-records-view="today"] #submittedList {
  display: none;
  visibility: hidden;
}

body[data-records-view="submitted"] #todayList {
  display: none;
  visibility: hidden;
}

body[data-records-view="submitted"] #submittedList {
  display: block;
  visibility: visible;
}

.records-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

#todayList,
#submittedList {
  min-width: 1px;
  min-height: 12px;
  padding-bottom: 12px;
}

#todayList::after,
#submittedList::after {
  content: '';
  display: block;
  height: 12px;
}

/* Date Section Headers */
.date-section-header {
  list-style: none;
  margin: 1.5rem 0 0.75rem 0;
  padding: 0;
}

.date-section-header:first-child {
  margin-top: 0;
}

.date-section-title {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--primary, #4a90e2);
  margin: 0;
  padding: 0.5rem 0;
  border-bottom: 2px solid rgba(99, 102, 241, 0.3);
}

.record-card {
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.record-card:hover,
.record-card:focus-visible {
  outline: none;
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.45);
}
.record-card--submitted {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.45), rgba(15, 23, 42, 0.75));
  border-color: rgba(129, 140, 248, 0.3);
}
.record-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.record-title {
  font-weight: 700;
  color: #f8fafc;
}
.record-hours {
  font-weight: 600;
  color: #c7d2fe;
  white-space: nowrap;
}
.record-desc {
  margin: 0;
  color: rgba(203, 213, 225, 0.88);
  line-height: 1.45;
}
.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: rgba(148, 163, 184, 0.85);
  font-size: 0.85rem;
}
.record-actions {
  margin-top: 0.65rem;
  display: flex;
  gap: 0.5rem;
}
.record-btn {
  appearance: none;
  border: 1px solid rgba(129, 140, 248, 0.45);
  background: rgba(79, 70, 229, 0.18);
  color: #e0e7ff;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.record-btn:hover,
.record-btn:focus-visible {
  border-color: rgba(165, 180, 252, 0.75);
  background: rgba(79, 70, 229, 0.28);
  box-shadow: 0 12px 20px rgba(99, 102, 241, 0.22);
  outline: none;
}
.record-btn:active {
  transform: translateY(1px);
}
.record-btn .record-btn-label {
  font-size: 0.85rem;
}
.record-btn--photo {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(52, 211, 153, 0.45);
  color: #bbf7d0;
}
.record-btn--photo:hover,
.record-btn--photo:focus-visible {
  background: rgba(34, 197, 94, 0.28);
  border-color: rgba(74, 222, 128, 0.75);
  box-shadow: 0 12px 20px rgba(34, 197, 94, 0.18);
}

/* Smart photo button states */
/* Photo button when photo EXISTS - bright green success */
.record-btn--photo-has {
  background: rgba(34, 197, 94, 0.35);
  border-color: rgba(74, 222, 128, 0.8);
  color: #86efac;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}
.record-btn--photo-has:hover,
.record-btn--photo-has:focus-visible {
  background: rgba(34, 197, 94, 0.45);
  border-color: rgba(134, 239, 172, 0.9);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

/* Photo button when NO photo - soft pulsing amber/red glow */
.record-btn--photo-needs {
  background: rgba(251, 146, 60, 0.2);
  border-color: rgba(251, 146, 60, 0.5);
  color: #fed7aa;
  animation: photo-needs-pulse 2s ease-in-out infinite;
}
.record-btn--photo-needs:hover,
.record-btn--photo-needs:focus-visible {
  background: rgba(251, 146, 60, 0.35);
  border-color: rgba(251, 146, 60, 0.8);
  animation: none;
  box-shadow: 0 0 15px rgba(251, 146, 60, 0.5);
}

@keyframes photo-needs-pulse {
  0%, 100% {
    box-shadow: 0 0 4px rgba(251, 146, 60, 0.3);
  }
  50% {
    box-shadow: 0 0 12px rgba(251, 146, 60, 0.6), 0 0 20px rgba(251, 146, 60, 0.3);
  }
}

.record-btn--edit {
  background: rgba(79, 70, 229, 0.18);
  border-color: rgba(129, 140, 248, 0.45);
}
.record-btn--edit:hover,
.record-btn--edit:focus-visible {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(165, 180, 252, 0.75);
}

/* Disabled edit button (task already edited once) */
.record-btn--edit.record-btn--disabled,
.record-btn--edit.record-btn--disabled:hover,
.record-btn--edit.record-btn--disabled:focus-visible {
  background: rgba(100, 116, 139, 0.15);
  border-color: rgba(100, 116, 139, 0.3);
  color: rgba(148, 163, 184, 0.7);
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none;
}
.record-btn--edit.record-btn--disabled:hover {
  transform: none;
}

.record-btn--delete {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca;
}
.record-btn--delete:hover,
.record-btn--delete:focus-visible {
  background: rgba(239, 68, 68, 0.28);
  border-color: rgba(248, 113, 113, 0.8);
  box-shadow: 0 12px 20px rgba(239, 68, 68, 0.2);
}

/* Notes button */
.record-btn--notes {
  background: rgba(234, 179, 8, 0.18);
  border-color: rgba(234, 179, 8, 0.45);
  color: #fef08a;
}
.record-btn--notes:hover,
.record-btn--notes:focus-visible {
  background: rgba(234, 179, 8, 0.28);
  border-color: rgba(250, 204, 21, 0.8);
  box-shadow: 0 12px 20px rgba(234, 179, 8, 0.2);
}

/* Notes display on task cards */
.record-notes {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}
.record-notes-icon {
  flex-shrink: 0;
  font-size: 1rem;
}
.record-notes-text {
  flex: 1;
  line-height: 1.4;
  word-break: break-word;
}

/* Notes Modal Overlay */
.g-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Notes Modal Content */
.notes-modal {
  background: linear-gradient(145deg, #1e1b4b, #0f172a);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notes-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.notes-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #f8fafc;
}

.notes-modal-close {
  appearance: none;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s ease;
}
.notes-modal-close:hover {
  color: #fff;
}

.notes-modal-task {
  padding: 0.75rem 1rem;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 8px;
  color: #c7d2fe;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.notes-modal-textarea {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: #f8fafc;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.notes-modal-textarea:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}
.notes-modal-textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.notes-modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  justify-content: flex-end;
}

@media (max-width: 480px) {
  .notes-modal {
    padding: 1.25rem;
  }
  .notes-modal-actions {
    flex-direction: column-reverse;
  }
  .notes-modal-actions .pill {
    width: 100%;
  }
}

/* ================================================================================
   TASK EDIT MODAL (Inline editing - containment fix)
   ================================================================================ */
.task-edit-modal {
  background: linear-gradient(145deg, #1e1b4b, #0f172a);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  animation: modalSlideIn 0.2s ease-out;
}

.task-edit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.task-edit-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #f8fafc;
}

.task-edit-modal-close {
  appearance: none;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s ease;
}
.task-edit-modal-close:hover {
  color: #fff;
}

.task-edit-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.task-edit-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  position: relative;
}

.task-edit-field-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #c7d2fe;
}

.task-edit-input,
.task-edit-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.8);
  color: #f8fafc;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.task-edit-input:focus,
.task-edit-textarea:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}
.task-edit-input::placeholder,
.task-edit-textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.task-edit-textarea {
  min-height: 80px;
  resize: vertical;
}

.task-edit-row {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}
.task-edit-row label {
  min-width: 60px;
  flex-shrink: 0;
}
.task-edit-hours,
.task-edit-miles {
  max-width: 120px;
}

.task-edit-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1e1b4b;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.task-edit-dropdown-item {
  padding: 0.625rem 0.875rem;
  color: #f8fafc;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 0.9rem;
}
.task-edit-dropdown-item:hover {
  background: rgba(99, 102, 241, 0.25);
}

.task-edit-code-label {
  font-size: 0.8rem;
  color: rgba(199, 210, 254, 0.7);
  margin-top: 0.25rem;
  min-height: 1.25rem;
}

.task-edit-modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
}

@media (max-width: 480px) {
  .task-edit-modal {
    padding: 1.25rem;
    max-height: 95vh;
  }
  .task-edit-modal-actions {
    flex-direction: column-reverse;
  }
  .task-edit-modal-actions .pill {
    width: 100%;
  }
  .task-edit-row {
    flex-direction: column;
    align-items: stretch;
  }
  .task-edit-row label {
    min-width: unset;
  }
  .task-edit-hours,
  .task-edit-miles {
    max-width: unset;
  }
}

.record-undo {
  appearance: none;
  border: 1px solid rgba(129, 140, 248, 0.55);
  background: transparent;
  color: #dbeafe;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.record-undo:hover:not(:disabled),
.record-undo:focus-visible:not(:disabled) {
  border-color: rgba(165, 180, 252, 0.85);
  box-shadow: 0 10px 20px rgba(129, 140, 248, 0.25);
  outline: none;
}
.record-undo:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: rgba(129, 140, 248, 0.25);
}
.record-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.18);
  color: #dbeafe;
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .record-card {
    padding: 0.9rem;
  }
  .record-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .records-list {
    gap: 0.7rem;
  }
}
.pill.secondary[aria-pressed="true"] {
  background: linear-gradient(120deg, #6366f1 0%, #4338ca 100%);
  color: #f8fafc;
  border-color: transparent;
  box-shadow: 0 14px 28px rgba(99, 102, 241, 0.35);
}

/* Selected Cost Code Display */
.g-selected-code {
  margin-bottom: 1.5rem;
  max-width: 100%;
  box-sizing: border-box;
}

.g-selected-code-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.g-selected-code-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border: 2px solid rgba(139, 92, 246, 0.4);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.g-selected-code-box:hover {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.25);
}

.g-selected-code-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  overflow: hidden;
}

.g-selected-code-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #a78bfa;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.g-selected-code-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.g-change-code-btn {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.5);
  color: #c4b5fd;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.g-change-code-btn:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.7);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.g-change-code-btn:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .g-selected-code-box {
    flex-direction: column;
    align-items: stretch;
  }
  
  .g-change-code-btn {
    width: 100%;
  }
  
  .g-selected-code-number {
    font-size: 1.25rem;
  }
}

/* Quick Links Navigation */
.quick-links {
  position: relative;
  z-index: 98;
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: clamp(0.5rem, 0.45rem + 0.4vw, 0.8rem) clamp(0.5rem, 2vw, 1rem);
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 100vw;
  min-height: 50px;
  margin: 0 auto;
  box-sizing: border-box;
  visibility: visible !important;
  opacity: 1 !important;
}

/* View Toggle Switch */
.view-toggle {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.95);
  border-radius: 999px;
  padding: 5px;
  gap: 4px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

/* When inside records panel, center the toggle */
.records-panel > .view-toggle {
  display: flex;
  justify-content: center;
  margin: 0 auto 1rem auto;
  width: fit-content;
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: clamp(0.72rem, 0.7rem + 0.25vw, 0.9rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  position: relative;
  min-width: 0;
}

.view-toggle-btn:hover:not(.active) {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
}

.view-toggle-btn.active {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 
    0 2px 8px rgba(34, 197, 94, 0.5),
    0 4px 16px rgba(34, 197, 94, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transform: scale(1.02);
}

.view-toggle-btn:focus-visible {
  outline: 2px solid rgba(34, 197, 94, 0.7);
  outline-offset: 2px;
}

.view-toggle-icon {
  font-size: 1em;
  flex-shrink: 0;
}

.view-toggle-label {
  font-weight: inherit;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive toggle for small screens */
@media (max-width: 400px) {
  .view-toggle {
    padding: 4px;
    gap: 2px;
  }
  
  .view-toggle-btn {
    padding: 0.45rem 0.65rem;
    font-size: 0.75rem;
    gap: 0.25rem;
  }
  
  .view-toggle-icon {
    font-size: 0.9em;
  }
}

.quick-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: rgba(255, 255, 255, 0.8);
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: clamp(0.75rem, 0.73rem + 0.25vw, 0.9rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.quick-link:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
  color: #c4b5fd;
  transform: translateY(-1px);
}

.quick-link.active,
.quick-link[aria-pressed="true"] {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #a78bfa;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.quick-link:focus-visible {
  outline: 2px solid rgba(148, 163, 184, 0.7);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25);
}

.quick-link:active {
  transform: translateY(0);
}

/* Submit Bar (sticky at bottom) */
.g-submit-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border-top: 2px solid rgba(139, 92, 246, 0.4);
  padding: 1rem;
  padding-bottom: calc(1rem + var(--kbInset, 0px));
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.g-submit-bar-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.g-submit-bar-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.g-task-count {
  font-size: 1.25rem;
  font-weight: 700;
  color: #a78bfa;
}

.g-task-hint {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.g-submit-btn {
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.g-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

@media (max-width: 640px) {
  .g-submit-bar-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .g-submit-btn {
    width: 100%;
  }
  
  .quick-links {
    padding: 0.5rem 0.5rem;
    gap: 8px;
    max-width: 100vw;
  }
  
  .quick-link {
    flex: 1 1 calc(50% - 4px);
    min-width: calc(50% - 4px);
    max-width: calc(50% - 4px);
    padding: 0.4rem 0.4rem;
    font-size: clamp(0.7rem, 0.68rem + 0.2vw, 0.8rem);
  }
  
  .view-toggle-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
  }
  
  .layout {
    padding: 1.5rem 0.75rem;
  }
}

@media (max-width: 550px) {
  .quick-links {
    padding: 0.4rem 0.4rem;
    gap: 6px;
  }
  
  .layout {
    padding: 1.5rem 0.5rem;
  }
}

.mobile-device .quick-links .quick-link {
  flex: 1 1 calc(50% - 5px);
  min-width: calc(50% - 5px);
  max-width: calc(50% - 5px);
}

/* Spanish language support - longer text */
html[lang="es"] .quick-link,
body.lang-es .quick-link {
  font-size: clamp(0.68rem, 0.66rem + 0.25vw, 0.85rem);
  padding: 0.45rem 0.5rem;
  letter-spacing: -0.01em;
}

html[lang="es"] .view-toggle-btn,
body.lang-es .view-toggle-btn {
  font-size: clamp(0.7rem, 0.68rem + 0.2vw, 0.85rem);
  padding: 0.45rem 0.7rem;
}

@media (max-width: 450px) {
  html[lang="es"] .quick-link,
  body.lang-es .quick-link {
    font-size: 0.68rem;
    padding: 0.4rem 0.35rem;
  }
  
  html[lang="es"] .view-toggle-btn,
  body.lang-es .view-toggle-btn {
    font-size: 0.7rem;
    padding: 0.4rem 0.55rem;
  }
}

/* Extra small screens - stack quick links */
@media (max-width: 400px) {
  .quick-links {
    padding: 0.4rem 0.5rem;
    gap: 6px;
  }
  
  .quick-link {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: 100%;
    padding: 0.5rem;
    font-size: 0.85rem;
  }
  
  .appbar-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .appbar .pill {
    flex: 1 1 auto;
    text-align: center;
    min-width: 0;
  }
}

/* Today Actions (buttons below today list) */
.today-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  margin-top: 1rem;
  border-top: 2px solid rgba(99, 102, 241, 0.2);
}

/* When only submit button is shown, make it prominent */
.today-actions:has(.action-btn:only-child) {
  padding: 2rem 1.5rem;
}

@media (max-width: 640px) {
  .today-actions {
    padding: 1.5rem 1rem;
  }
}

.today-actions[hidden] {
  display: none !important;
}

/* Task count warning */
.task-count-warning {
  width: 100%;
  max-width: 600px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.task-count-warning.warning-critical {
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.task-count-warning.warning-moderate {
  background: rgba(251, 191, 36, 0.15);
  border: 2px solid rgba(251, 191, 36, 0.4);
  color: #fcd34d;
}

.task-count-warning.warning-info {
  background: rgba(59, 130, 246, 0.15);
  border: 2px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.warning-add-task-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  margin-top: 0.5rem;
}

.warning-add-task-btn:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.warning-add-task-btn:active {
  transform: translateY(0);
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem 2.5rem;
  border: none;
  border-radius: 14px;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  min-width: 280px;
}

.action-btn[hidden] {
  display: none !important;
}

.action-btn.primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
}

.action-btn.primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.action-btn.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
}

.action-btn.success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

.action-icon {
  font-size: 1.25rem;
}

.g-photo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.g-photo-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.g-photo-item img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(20, 24, 41, 0.6);
}

.g-photo-chooser[hidden] {
  display: none;
}

.g-photo-chooser {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.g-chooser-card {
  background: #171b2d;
  border: 1px solid #3a4264;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  width: min(92vw, 420px);
  display: grid;
  gap: 14px;
}

.g-chooser-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.help-dialog::backdrop {
  background: rgba(4, 10, 20, 0.78);
  backdrop-filter: blur(6px);
}

.help-dialog {
  border: none;
  padding: 0;
  width: min(700px, 92vw);
}

.break-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.break-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.break-list li {
  background: #1e1b3a;
  border: 1px solid #3a4264;
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.break-list .remove {
  background: none;
  border: none;
  color: #eab308;
  cursor: pointer;
}

.break-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.break-dialog article {
  background: #171b2d;
  border: 1px solid #3a4264;
  border-radius: 12px;
  padding: 16px;
  width: min(92vw, 420px);
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  display: grid;
  gap: 12px;
  overflow-x: hidden;
}

/* Date selection list */
.date-selection-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.date-selection-btn {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  line-height: 1.4;
}

.date-selection-btn strong {
  display: block;
  font-size: 1.05em;
  margin-bottom: 4px;
}

.date-selection-btn small {
  opacity: 0.8;
  font-size: 0.9em;
}

.break-dialog .row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ========== Workday Time Simple Picker ========== */
.workday-time-simple {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0;
}

.time-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.time-picker-label {
  font-size: 1em;
  font-weight: 600;
  color: #a0aec0;
  min-width: 50px;
}

.time-picker-wrapper {
  flex: 1;
  position: relative;
  min-height: 52px;
}

.time-picker-display {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 1.25em;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  text-align: center;
  min-height: 52px;
  box-sizing: border-box;
  pointer-events: none;
}

/* Native time input overlays the display - transparent but tappable */
.time-input-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 16px; /* Prevents iOS zoom */
  -webkit-appearance: none;
  appearance: none;
  border: none;
  background: transparent;
}

/* Show focus state on the display when input is focused */
.time-input-overlay:focus + .time-picker-display,
.time-picker-wrapper:focus-within .time-picker-display {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5), 0 4px 12px rgba(99, 102, 241, 0.3);
}
/* ========== End Workday Time Simple Picker ========== */

.break-custom[hidden] {
  display: none;
}

/* Step 3 Photo Nag - Softer, Informative Style (like task count warning) */
/* Make "Go back & add" button a subtle primary action */
.g-step[data-step="3"] #gGoBackAddBtn {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #93c5fd !important;
  border: 2px solid rgba(59, 130, 246, 0.4) !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

.g-step[data-step="3"] #gGoBackAddBtn:hover {
  background: rgba(59, 130, 246, 0.3) !important;
  border-color: rgba(59, 130, 246, 0.6) !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}

/* Make "Skip anyway" button a subtle secondary action */
.g-step[data-step="3"] #gSkipAnywayBtn {
  background: rgba(156, 163, 175, 0.15) !important;
  color: #9ca3af !important;
  border: 2px solid rgba(156, 163, 175, 0.3) !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

.g-step[data-step="3"] #gSkipAnywayBtn:hover {
  background: rgba(156, 163, 175, 0.25) !important;
  border-color: rgba(156, 163, 175, 0.4) !important;
  box-shadow: 0 2px 8px rgba(156, 163, 175, 0.2) !important;
}

/* Completely disable and gray out Next button on Step 3 */
.g-step[data-step="3"] #guidedNext {
  background: #374151 !important;
  color: #6b7280 !important;
  border: 2px solid #4b5563 !important;
  box-shadow: none !important;
  animation: none !important;
  cursor: not-allowed !important;
  opacity: 0.5 !important;
  pointer-events: none !important;
}

.g-step[data-step="3"] #guidedNext:hover {
  background: #374151 !important;
  box-shadow: none !important;
}

/* Remove the glow/pulse animation from Next button on Step 3 */
.g-step[data-step="3"] #guidedNext::before,
.g-step[data-step="3"] #guidedNext::after {
  display: none !important;
}

/* Task Review Adjuster Summary Box */
#taskReviewAdjusterDialog .task-review-summary,
#taskReviewAdjusterDialog div[style*="background"] {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem;
}

#taskReviewAdjusterDialog strong,
#taskReviewTotal,
#taskReviewWorked {
  color: #ffffff !important;
  font-weight: 600;
}

#taskReviewCheckmark {
  filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.5));
}

/* Time Off Dialog */
.time-off-dialog::backdrop {
  background: rgba(4, 10, 20, 0.78);
  backdrop-filter: blur(6px);
}

.time-off-dialog {
  border: none;
  padding: 0;
  width: min(500px, 92vw);
  border-radius: 16px;
  background: linear-gradient(135deg, #1a1732 0%, #0f0d1f 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.time-off-dialog article.time-off {
  padding: 24px;
  color: #e4e7f1;
}

.time-off-dialog h2 {
  margin: 0 0 20px 0;
  font-size: 1.5rem;
  color: #fff;
}

.time-off-dialog .g-field {
  margin-bottom: 16px;
}

.time-off-dialog .g-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #c4c9e0;
}

.time-off-dialog .g-input,
.time-off-dialog .g-select {
  width: 100%;
  padding: 10px 12px;
  background: #1e1b3a;
  border: 1px solid #3a4264;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
}

.time-off-dialog .g-input:focus,
.time-off-dialog .g-select:focus {
  outline: none;
  border-color: #6c63ff;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.time-off-dialog .g-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding: 0;
}

.time-off-date-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 480px) {
  .time-off-date-range {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ========== Leaderboard Dialog ========== */
.leaderboard-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.leaderboard-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: 600px;
  width: 90vw;
  max-height: 80vh;
  overflow: hidden;
}

.leaderboard-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 80vh;
}

.leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.leaderboard-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: #1f2937;
}

.leaderboard-header .close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.leaderboard-header .close-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.leaderboard-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.leaderboard-tab {
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.leaderboard-tab:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.leaderboard-tab.active {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border-color: #6366f1;
}

.leaderboard-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  min-height: 300px;
}

.leaderboard-loading {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
  font-size: 1rem;
}

.leaderboard-error {
  text-align: center;
  padding: 40px 20px;
  color: #ef4444;
  font-size: 1rem;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #f9fafb;
  transition: all 0.2s ease;
}

.leaderboard-row:hover {
  background: #f3f4f6;
}

.leaderboard-row.highlight {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  font-weight: 600;
}

.leaderboard-rank {
  font-size: 1.25rem;
  font-weight: 700;
  color: #6b7280;
  min-width: 40px;
  text-align: center;
}

.leaderboard-rank.gold {
  color: #f59e0b;
  font-size: 1.5rem;
}

.leaderboard-rank.silver {
  color: #9ca3af;
  font-size: 1.35rem;
}

.leaderboard-rank.bronze {
  color: #cd7f32;
  font-size: 1.25rem;
}

.leaderboard-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.leaderboard-name {
  flex: 1;
  font-size: 1rem;
  font-weight: 500;
  color: #1f2937;
}

.leaderboard-score {
  font-size: 1.25rem;
  font-weight: 700;
  color: #6366f1;
  min-width: 60px;
  text-align: right;
}

.leaderboard-divider {
  height: 1px;
  background: #d1d5db;
  margin: 16px 0;
}

.leaderboard-subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: #6b7280;
  padding: 0 16px 16px 16px;
  line-height: 1.5;
}

.leaderboard-your-rank {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 0;
}

.leaderboard-motivation {
  font-size: 0.875rem;
  color: #10b981;
  font-weight: 500;
  text-align: center;
  padding: 4px 0 8px 0;
  font-style: italic;
}

.leaderboard-empty {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}

.leaderboard-empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.leaderboard-empty-text {
  font-size: 1rem;
  font-weight: 500;
}

.leaderboard-dialog .g-modal-actions {
  border-top: 1px solid #e5e7eb;
  padding: 16px 24px;
  display: flex;
  justify-content: center;
}

@media (max-width: 600px) {
  .leaderboard-tabs {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .leaderboard-tab {
    font-size: 0.75rem;
    padding: 8px 4px;
  }
  
  .leaderboard-dialog {
    width: 95vw;
    max-height: 90vh;
  }
}

/* Copyright Footer */
.app-copyright {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 4px 8px;
  background: transparent;
  z-index: 1;
  pointer-events: none;
}

.app-copyright p {
  margin: 0;
  font-size: 9px;
  color: rgba(128, 128, 128, 0.35);
  letter-spacing: 0.3px;
  font-weight: 300;
  transition: opacity 0.2s ease;
}

.app-copyright:hover p {
  opacity: 0.7;
}

@media (max-width: 768px) {
  .app-copyright p {
    font-size: 8px;
  }

  .desktop-only {
    display: none !important;
  }
}

/* Review Step - Interactive Rows */
.g-review {
  margin: 0;
  padding: 0;
}

.g-review dt,
.g-review dd {
  padding: 16px 20px;
  margin: 0;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.g-review dt {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 4px;
}

.g-review dd {
  color: white;
  font-size: 1.1em;
  font-weight: 500;
  padding-top: 4px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
}

.g-review dd:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.g-review dt:hover,
.g-review dd:hover {
  background: rgba(99, 102, 241, 0.15);
  transform: translateX(4px);
}

.g-review dt:active,
.g-review dd:active {
  background: rgba(99, 102, 241, 0.25);
  transform: translateX(2px);
}

/* ========== Admin Panel Styles ========== */

/* Footer admin link */
.admin-link {
  position: absolute;
  bottom: 10px;
  right: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  z-index: 100;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: auto; /* Override parent's pointer-events: none */
}

.admin-link:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
  background: rgba(255, 255, 255, 0.05);
}

.app-copyright {
  position: relative;
  padding-bottom: 35px;
}

/* Admin container */
.admin-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0f0b1f;
  z-index: 9999;
  overflow: auto;
}

/* Password gate */
.admin-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, #0f0b1f 0%, #1a1530 100%);
}

.admin-gate-card {
  background: #1e1b3a;
  border-radius: 16px;
  padding: 40px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.admin-gate-card h2 {
  color: white;
  margin: 0 0 12px 0;
  font-size: 1.8em;
}

.admin-gate-hint {
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 24px 0;
  font-size: 0.95em;
}

.admin-gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-gate-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  color: white;
  font-size: 1em;
  outline: none;
  transition: all 0.2s ease;
}

.admin-gate-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.admin-gate-btn {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  color: white;
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-gate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.admin-gate-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 12px;
  color: #fca5a5;
  font-size: 0.9em;
  margin-top: 12px;
}

.admin-gate-back {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  padding: 12px 0;
  margin-top: 16px;
  cursor: pointer;
  font-size: 0.9em;
  transition: color 0.2s ease;
}

.admin-gate-back:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Main admin panel */
.admin-panel {
  min-height: 100vh;
  max-height: 100vh;
  background: linear-gradient(135deg, #0f0b1f 0%, #1a1530 100%);
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.admin-header h1 {
  color: white;
  margin: 0;
  font-size: 2em;
}

.admin-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 16px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Tabs */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.admin-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 24px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.admin-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.admin-tab.active {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-color: transparent;
  color: white;
}

/* Content area */
.admin-content {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.admin-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.admin-search {
  flex: 1;
  min-width: 200px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 16px;
  color: white;
  font-size: 1em;
  outline: none;
  transition: all 0.2s ease;
}

.admin-search:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: #6366f1;
}

.admin-btn {
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95em;
  /* Prevent button text from wrapping on mobile */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 44px; /* Touch target */
}

.admin-btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
}

.admin-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.admin-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.admin-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.admin-btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* List */
.admin-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  min-height: 0;
}

.admin-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.admin-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.admin-item.inactive {
  opacity: 0.5;
}

.admin-item-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-item-name {
  color: white;
  font-weight: 500;
  font-size: 1.05em;
}

.admin-item-status {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 600;
}

.admin-item.inactive .admin-item-status {
  background: rgba(156, 163, 175, 0.2);
  color: #d1d5db;
}

.admin-item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Toggle switch */
.admin-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.admin-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.admin-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.3s;
  border-radius: 26px;
}

.admin-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.admin-toggle input:checked + .admin-toggle-slider {
  background-color: #22c55e;
}

.admin-toggle input:checked + .admin-toggle-slider:before {
  transform: translateX(22px);
}

/* Empty state */
.admin-empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.1em;
}

/* Dialog */
.admin-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.admin-dialog {
  background: #1e1b3a;
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.admin-dialog h3 {
  color: white;
  margin: 0 0 24px 0;
  font-size: 1.5em;
}

.admin-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  margin-bottom: 20px;
}

.admin-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  color: white;
  font-size: 1em;
  outline: none;
  transition: all 0.2s ease;
}

.admin-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.admin-dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.admin-policy-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-policy-section:last-of-type {
  border-bottom: none;
}

.admin-policy-section h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-policy-section .admin-label {
  margin-bottom: 12px;
}

.admin-policy-section .admin-label input[type="checkbox"] {
  margin-right: 8px;
  width: auto;
}

/* Toast notifications */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e1b3a;
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10001;
  max-width: 400px;
  font-weight: 500;
}

.admin-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.admin-toast-success {
  border-left: 4px solid #22c55e;
}

.admin-toast-error {
  border-left: 4px solid #ef4444;
}

.admin-toast-info {
  border-left: 4px solid #6366f1;
}

/* Offline message */
.admin-offline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px;
  text-align: center;
  background: linear-gradient(135deg, #0f0b1f 0%, #1a1530 100%);
}

.admin-offline h2 {
  color: white;
  font-size: 2em;
  margin: 0 0 16px 0;
}

.admin-offline p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1em;
  margin: 0 0 32px 0;
}

.admin-offline button {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-offline button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .admin-panel {
    padding: 12px;
  }
  
  .admin-header h1 {
    font-size: 1.5em;
  }
  
  .admin-toolbar {
    flex-direction: column;
  }
  
  .admin-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .admin-item-actions {
    width: 100%;
    /* Use CSS grid: toggle (fixed) + 3 equal button columns */
    display: grid;
    grid-template-columns: 56px 1fr 1fr 1fr;
    gap: 6px;
    align-items: center;
  }
  
  .admin-item-actions .admin-btn {
    padding: 8px 6px;
    font-size: 0.85em;
    min-height: 44px;
    text-align: center;
  }
  
  .admin-toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}

/* Desktop optimizations for 1920x1080 and larger screens */
@media screen and (min-width: 1400px) {
  .admin-panel {
    padding: 24px 40px;
  }
  
  .admin-header {
    max-width: 1600px;
    margin: 0 auto 24px;
    width: 100%;
  }
  
  .admin-header h1 {
    font-size: 2rem;
  }
  
  .admin-nav {
    gap: 12px;
  }
  
  .admin-nav button {
    padding: 12px 24px;
    font-size: 0.95em;
  }
  
  .admin-content {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
  }
  
  .admin-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 16px;
  }
  
  .admin-item {
    padding: 20px;
  }
  
  .admin-item-name {
    font-size: 1.05em;
  }
  
  .admin-toolbar {
    margin-bottom: 28px;
  }
  
  .admin-search {
    min-width: 300px;
    font-size: 1.05em;
    padding: 12px 20px;
  }
  
  .admin-btn {
    padding: 12px 24px;
    font-size: 0.95em;
  }
  
  /* Policy dialog sizing for desktop */
  .policy-dialog-content {
    max-width: 600px;
    max-height: 80vh;
  }
}

/* ========== Task Review Adjuster Styles ========== */
.task-adjuster-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
  min-width: 0;
  box-sizing: border-box;
}

.task-adjuster-info {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}

.task-adjuster-desc {
  font-weight: 500;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f8fafc;
  font-size: 0.95em;
}

.task-adjuster-meta {
  font-size: 0.85em;
  color: #94a3b8;
}

.task-adjuster-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.task-adjuster-hours {
  min-width: 3em;
  text-align: center;
  font-weight: 600;
  font-size: 1em;
  color: #f8fafc;
}

.task-adjuster-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #6366f1;
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  font-size: 1.2em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.task-adjuster-btn:hover {
  background: #6366f1;
  color: #fff;
  border-color: #818cf8;
}

.task-adjuster-btn:active {
  transform: scale(0.95);
}

.task-adjuster-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ========== Progress Bar Styles ========== */
.g-progress-bar {
  position: relative;
  height: 4px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 2px;
  margin-bottom: 1rem;
  overflow: visible;
}

/* Wizard Cancel/Close Button */
.wizard-cancel-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.wizard-cancel-btn:hover,
.wizard-cancel-btn:focus {
  background: rgba(239, 68, 68, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}
.wizard-cancel-btn:active {
  transform: scale(0.95);
}

.g-progress-fill {
  height: 100%;
  width: 20%; /* Default to step 1 of 5 */
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.g-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ========== Hour Presets Styles ========== */
.g-hours-presets {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.g-preset-btn {
  padding: 0.5rem 1rem;
  border: 2px solid rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.g-preset-btn:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: #6366f1;
  color: #fff;
  transform: translateY(-2px);
}

.g-preset-btn:active,
.g-preset-btn.preset-clicked {
  transform: scale(0.95);
  background: #6366f1;
  color: #fff;
}

/* ========== Keyboard Shortcuts Hint ========== */
.g-shortcuts {
  text-align: center;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

.shortcuts-hint {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.7);
}

.shortcuts-hint kbd {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: 0.75rem;
  color: #e2e8f0;
  background: rgba(71, 85, 105, 0.4);
  border: 1px solid rgba(100, 116, 139, 0.5);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Hide keyboard shortcuts on mobile/touch devices */
.is-touch .desktop-only,
.is-mobile .desktop-only,
.is-touch .g-shortcuts,
.is-mobile .g-shortcuts {
  display: none !important;
}

/* ========== Step Transition Animations ========== */
.g-step {
  animation: fadeSlideIn 0.3s ease-out;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Task added celebration */
.task-added-celebration {
  animation: taskPop 0.4s ease-out;
}

@keyframes taskPop {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

/* Step completion checkmark animation */
.step-complete-icon {
  display: inline-block;
  animation: checkPop 0.3s ease-out;
}

@keyframes checkPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ========== Enhanced Task Count Warning ========== */
.task-count-warning {
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  animation: fadeSlideIn 0.3s ease-out;
}

.warning-add-task-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background: rgba(99, 102, 241, 0.2);
  border: 2px solid #6366f1;
  color: #a5b4fc;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.warning-add-task-btn:hover {
  background: #6366f1;
  color: #fff;
  transform: translateY(-2px);
}

/* ========== Toast Animations ========== */
.g-toast.show {
  animation: toastSlideUp 0.3s ease-out;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== Spanish / i18n Text Overflow Fixes ========== */
/* Ensure buttons can accommodate longer Spanish translations */

/* Allow text to wrap in pills/buttons when needed */
.pill,
.quick-link,
.g-back,
.g-next,
.action-btn {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-align: center;
  line-height: 1.3;
}

/* Give Spanish buttons more padding */
html[lang="es"] .pill,
html[lang="es"] .quick-link {
  padding-left: 1em;
  padding-right: 1em;
}

/* Dialog buttons - ensure they fit */
.g-modal-actions .pill,
.break-dialog menu .pill {
  min-width: 100px;
  max-width: 200px;
  flex: 1 1 auto;
}

/* Quick links should not overflow */
.quick-links {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quick-link {
  flex: 0 1 auto;
  max-width: 150px;
  font-size: 0.85em;
  padding: 0.5em 0.75em;
}

/* Admin error page styling */
.admin-connection-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: linear-gradient(135deg, #1a1c2e 0%, #0f1119 100%);
}

.admin-error-card {
  background: rgba(30, 35, 55, 0.95);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(100, 100, 140, 0.2);
}

.admin-error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.admin-error-card h2 {
  color: #f5f5f5;
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.admin-error-subtitle {
  color: #94a3b8;
  margin: 0 0 1.5rem;
}

.admin-error-guidance {
  text-align: left;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.6;
}

.admin-error-guidance p {
  margin: 0 0 0.75rem;
}

.admin-error-guidance ol {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.admin-error-guidance a {
  color: #818cf8;
  text-decoration: underline;
}

.admin-error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.admin-error-actions button {
  min-width: 120px;
}

/* ========== Spanish Localization Button Overflow Fixes ========== */
/* Handle longer Spanish text in buttons and pills */
.pill {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Allow wrapping on smaller screens for action buttons */
@media (max-width: 480px) {
  .pill.primary,
  .pill.secondary,
  .action-btn {
    white-space: normal;
    text-align: center;
    min-height: 44px;
    padding: 0.5em 0.8em;
    line-height: 1.3;
  }
  
  .today-actions {
    gap: 8px;
  }
  
  .today-actions .action-btn {
    font-size: 0.9em;
    padding: 0.6em 0.8em;
  }
}

/* Ensure quick-links buttons don't overflow */
.quick-links {
  flex-wrap: wrap;
}

.quick-link {
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Modal action buttons - allow wrap for Spanish */
.g-modal-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.g-modal-actions .pill {
  min-width: 100px;
  flex-shrink: 1;
}

/* Date selection dialog buttons */
.date-selection-btn {
  white-space: normal;
  text-align: center;
  line-height: 1.3;
}

/* === COMPACT HEADER OVERRIDE === */
/* This section overrides all previous appbar styles for a minimal header */
.appbar {
  min-height: 36px !important;
  padding: 0.2rem 0.5rem !important;
}
.appbar .brand {
  gap: 6px !important;
}
.appbar .logo {
  width: 28px !important;
  height: 28px !important;
  border-radius: 5px !important;
}
/* Demo-only: Text-based BITTEK logo placeholder */
.appbar .logo.logo-text {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  color: white !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.5px !important;
  text-transform: uppercase !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2) !important;
}
.appbar h1 {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
}
.appbar .sub {
  display: none !important;
}
.appbar .pill {
  font-size: 0.7rem !important;
  padding: 0.28rem 0.55rem !important;
}
.appbar-content {
  padding: 0.15rem 0 !important;
  gap: 0.5rem !important;
}
@media (max-width: 700px) {
  .appbar {
    min-height: 34px !important;
    padding: 0.15rem 0.4rem !important;
  }
  .appbar .logo {
    width: 26px !important;
    height: 26px !important;
  }
  /* Demo-only: Adjust text logo size for mobile */
  .appbar .logo.logo-text {
    font-size: 0.75rem !important;
  }
  .appbar h1 {
    font-size: 0.8rem !important;
  }
  .appbar .pill {
    font-size: 0.65rem !important;
    padding: 0.25rem 0.45rem !important;
  }
}

/* === WIZARD CANCEL FOOTER BUTTON === */
/* Prominent cancel button on Review step and when editing */
.wizard-cancel-footer {
  background: var(--red, #dc3545) !important;
  color: white !important;
  border: none !important;
  padding: 0.5rem 1rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: background 0.2s ease, transform 0.1s ease !important;
  min-width: 90px !important;
}
.wizard-cancel-footer:hover {
  background: #c82333 !important;
  transform: scale(1.02);
}
.wizard-cancel-footer:active {
  transform: scale(0.98);
}

/* Footer layout when Cancel button is visible */
.wizard-footer:has(.wizard-cancel-footer:not([hidden])) {
  display: flex !important;
  justify-content: space-between !important;
  gap: 0.5rem !important;
}

/* === MOBILE-FIRST DIALOG & LAYOUT OPTIMIZATIONS === */
/* Ensure dialogs don't overflow on any screen size */
.break-dialog {
  margin: 0 auto;
  padding: 16px;
  max-width: 100vw;
  box-sizing: border-box;
}

.break-dialog article {
  max-width: calc(100vw - 32px) !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

/* Task Review Adjuster - Mobile Optimizations */
#taskReviewAdjusterDialog article {
  padding: 12px !important;
  width: min(92vw, 400px) !important;
  max-width: calc(100vw - 24px) !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

#taskReviewAdjusterDialog h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem 0;
}

#taskReviewAdjusterDialog p {
  font-size: 0.9rem;
  margin: 0;
}

.task-review-list {
  max-height: 40vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.task-adjuster-item {
  display: flex !important;
  flex-wrap: nowrap !important;
  padding: 0.5rem 0.5rem !important;
  gap: 0.4rem !important;
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.task-adjuster-info {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  margin-right: 0 !important;
}

.task-adjuster-desc {
  font-size: 0.85em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

.task-adjuster-meta {
  font-size: 0.75em !important;
}

.task-adjuster-controls {
  display: flex !important;
  flex-shrink: 0 !important;
  gap: 0.2rem !important;
  align-items: center !important;
}

.task-adjuster-hours {
  min-width: 2.2em !important;
  font-size: 0.9em !important;
  text-align: center !important;
}

.task-adjuster-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  font-size: 1.1em !important;
  flex-shrink: 0 !important;
}

/* Summary box in task adjuster */
#taskReviewAdjusterDialog > article > div[style*="display: flex"] {
  padding: 0.5rem !important;
  font-size: 0.85em !important;
}

/* Dialog menu buttons */
.break-dialog menu {
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.break-dialog menu .pill {
  flex: 1 1 auto;
  min-width: 80px;
  max-width: 150px;
}

/* Ensure all inputs don't cause horizontal scroll */
input, select, textarea, button {
  max-width: 100%;
  box-sizing: border-box;
}

/* Prevent any element from causing horizontal overflow */
* {
  max-width: 100vw;
}

/* Responsive text that doesn't break layout */
h3, p, span, div {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* iOS Safari touch improvements */
button, input, select, textarea {
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

/* Ensure proper touch targets (minimum 44x44 for iOS) */
@media (pointer: coarse) {
  button, .pill, [role="button"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  .task-adjuster-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
  }
}

/* Extra small screens (below 360px) */
@media (max-width: 360px) {
  .break-dialog article {
    padding: 10px !important;
    width: calc(100vw - 20px) !important;
  }
  
  #taskReviewAdjusterDialog h3 {
    font-size: 1rem;
  }
  
  .task-adjuster-item {
    padding: 0.4rem !important;
    gap: 0.3rem !important;
  }
  
  .task-adjuster-desc {
    font-size: 0.75em !important;
  }
  
  .task-adjuster-meta {
    font-size: 0.65em !important;
  }
  
  .task-adjuster-hours {
    min-width: 2em !important;
    font-size: 0.8em !important;
  }
  
  .task-adjuster-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    font-size: 0.9em !important;
  }
  
  .task-adjuster-controls {
    gap: 0.15rem !important;
  }
}

/* Task Review Dialog - New Semantic Classes */
.task-review-message {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.task-review-list {
  margin: 0.75rem 0;
}

.task-review-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  margin: 0.75rem 0;
  gap: 0.5rem;
}

.task-review-totals {
  font-size: 0.85rem;
  line-height: 1.5;
}

.task-review-totals strong {
  color: #a5b4fc;
}

.task-review-checkmark {
  font-size: 1.5em;
  display: none;
  flex-shrink: 0;
}

.task-review-checkmark.visible {
  display: block;
}

/* ========================================
   FAST FORM MODE STYLES
   Isolated from wizard and Advanced Mode
   ======================================== */

.fast-form-toggle-container {
  display: flex;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: transparent;
}

.fast-form-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.fast-form-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.fast-form-toggle-btn:active {
  transform: translateY(0);
}

.fast-form-toggle-btn.active {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.ff-toggle-icon {
  font-size: 1.1em;
}

/* Fast Form Panel */
.fast-form-panel {
  background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
  border-radius: 16px;
  margin: 0.5rem 1rem 1rem;
  padding: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.ff-shell {
  max-width: 600px;
  margin: 0 auto;
}

.ff-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ff-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fbbf24;
  margin: 0;
}

.ff-title-icon {
  font-size: 1.2em;
}

.ff-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ff-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Fast Form Fields */
.ff-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ff-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
}

.ff-field-locked {
  opacity: 0.7;
}

.ff-field-locked .ff-lock-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(25%);
  font-size: 0.9em;
  pointer-events: none;
}

.ff-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ff-input,
.ff-select,
.ff-textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  color: #f1f5f9;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ff-input:focus,
.ff-select:focus,
.ff-textarea:focus {
  outline: none;
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

.ff-input:disabled,
.ff-select:disabled {
  background: rgba(255, 255, 255, 0.02);
  cursor: not-allowed;
}

.ff-textarea {
  resize: vertical;
  min-height: 60px;
}

/* Hours row with +/- buttons */
.ff-hours-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ff-hours-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #fbbf24;
  font-size: 1.25rem;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.ff-hours-btn:hover {
  background: rgba(251, 191, 36, 0.2);
}

.ff-hours-btn:active {
  transform: scale(0.95);
}

.ff-hours-input {
  flex: 1;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
}

/* Dropdown for jobs and cost codes */
.ff-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  list-style: none;
  margin: 4px 0 0;
  padding: 0.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.ff-dropdown-item {
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #e2e8f0;
  transition: background 0.1s ease;
}

.ff-dropdown-item:hover {
  background: rgba(251, 191, 36, 0.15);
}

.ff-dropdown-item.selected {
  background: rgba(251, 191, 36, 0.25);
  color: #fbbf24;
}

/* Selected cost code display */
.ff-selected-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-top: 0.25rem;
}

.ff-selected-code span {
  color: #86efac;
  font-weight: 500;
}

.ff-clear-code {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.ff-clear-code:hover {
  color: #ef4444;
}

/* Use last cost code button */
.ff-use-last-code {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  margin-top: 0.35rem;
  background: rgba(251, 191, 36, 0.1);
  border: 1px dashed rgba(251, 191, 36, 0.4);
  border-radius: 8px;
  color: #fbbf24;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ff-use-last-code:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.6);
}

.ff-use-last-icon {
  font-size: 1.1em;
}

/* Feedback/validation messages */
.ff-feedback {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  color: #fca5a5;
  font-size: 0.9rem;
}

/* Cost Code Suggestions (Fast Entry) */
.ff-code-suggestions {
  margin-top: 0.5rem;
  padding: 0.5rem 0;
}

.ff-suggestions-label {
  display: block;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.8);
  margin-bottom: 0.35rem;
}

.ff-suggestions-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ff-suggestion-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 6px;
  color: #a5b4fc;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ff-suggestion-chip:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.5);
}

.ff-chip-code {
  font-weight: 600;
  color: #c7d2fe;
}

.ff-chip-label {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Add Task Button */
.ff-actions {
  margin-top: 0.5rem;
}

.ff-add-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  font-size: 1.1rem;
  font-weight: 700;
}

.ff-add-btn:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.ff-add-icon {
  font-size: 1.2em;
  font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .fast-form-panel {
    margin: 0.5rem;
    padding: 0.75rem;
  }
  
  .ff-field {
    gap: 0.2rem;
  }
  
  .ff-hours-btn {
    width: 44px;
    height: 44px;
  }
}

/* Fast Form Photo Upload Button */
.ff-photo-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.ff-add-photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px dashed rgba(96, 165, 250, 0.5);
  border-radius: 8px;
  color: #93c5fd;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ff-add-photo-btn:hover {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.7);
}

.ff-photo-icon {
  font-size: 1.1em;
}

.ff-photo-count {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  background: rgba(34, 197, 94, 0.2);
  border-radius: 12px;
  color: #86efac;
  font-size: 0.85rem;
  font-weight: 600;
}

.ff-photo-preview {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(30, 41, 59, 0.6);
  border-radius: 8px;
}

.ff-photo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ff-photo-item {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  background: #1e293b;
}

.ff-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ff-photo-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  padding: 0;
  background: rgba(239, 68, 68, 0.9);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Wizard Step 1 Photo Button */
.g-desc-photo-preview {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(30, 41, 59, 0.6);
  border-radius: 8px;
}

.g-desc-photo-count {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  background: rgba(34, 197, 94, 0.2);
  border-radius: 12px;
  color: #86efac;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.4rem;
}

/* Add to Home Screen Modal */
.add-to-home-modal {
  max-width: 380px;
}

.add-to-home-modal h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  text-align: center;
}

.add-to-home-instructions {
  padding: 1rem;
  background: rgba(30, 41, 59, 0.6);
  border-radius: 12px;
  line-height: 1.6;
  font-size: 0.95rem;
  color: #e2e8f0;
  text-align: center;
}

.add-to-home-instructions strong {
  color: #a78bfa;
}

.add-to-home-instructions .add-home-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  height: 1.5em;
  background: rgba(139, 92, 246, 0.3);
  border-radius: 4px;
  margin: 0 0.15em;
  font-size: 1.1em;
  vertical-align: middle;
}













