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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  background: #f4f5f7;
  color: #222;
}

/* ── Navbar ── */
:root { --navbar-height: 70px; }
.navbar {
  background: #1a1a2e;
  color: #fff;
  padding: 0 1.5rem;
  padding-top: env(safe-area-inset-top);
  height: calc(var(--navbar-height) + env(safe-area-inset-top));
  display: flex;
  align-items: flex-end;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner { position: relative; }
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  flex-wrap: nowrap;
  gap: 12px;
}
.nav-brand { font-size: 16px; font-weight: 600; letter-spacing: 0.3px; }
.nav-links { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.nav-link { color: #e0e0e0; font-size: 14px; text-decoration: none; }
.nav-link:hover { color: #fff; }
.nav-logout { color: #e0e0e0; font-size: 14px; text-decoration: none; }
.nav-logout:hover { color: #fff; }

/* ── Settings ── */
.settings-section {
  margin-bottom: 2rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}
.settings-section:last-child { border-bottom: none; }
.settings-section h3 { font-size: 14px; font-weight: 600; color: #444; margin-bottom: 12px; }
.settings-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.settings-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px; background: #f8f8f8; border-radius: 6px;
  border: 1px solid #eee; font-size: 13px;
}
.btn-remove {
  background: none; border: none; color: #999; cursor: pointer;
  font-size: 14px; padding: 2px 6px; border-radius: 4px;
}
.btn-remove:hover { background: #fde8e8; color: #b71c1c; }
.settings-add-form { display: flex; gap: 8px; }
.settings-add-form input[type=text],
.settings-add-form input[type=password] {
  flex: 1; padding: 7px 10px; border: 1px solid #ccc;
  border-radius: 6px; font-size: 13px;
}
.btn-add-item {
  padding: 7px 16px; background: #1a1a2e; color: #fff;
  border: none; border-radius: 6px; font-size: 13px; cursor: pointer;
  white-space: nowrap;
}
.btn-add-item:hover { background: #2d2d4e; }

/* ── Import ── */
.import-instructions {
  background: #f8f8f8; border: 1px solid #eee; border-radius: 8px;
  padding: 1rem 1.25rem; margin-bottom: 1.5rem; font-size: 13px; color: #444;
}
.col-list {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.col-list span {
  background: #e8e8e8; border-radius: 4px; padding: 2px 8px;
  font-size: 12px; color: #333;
}
.import-form { display: flex; flex-direction: column; }
.file-drop {
  border: 2px dashed #ccc; border-radius: 8px; padding: 2rem;
  text-align: center; cursor: pointer; transition: border-color 0.2s;
  position: relative;
}
.file-drop input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.file-drop:hover, .file-drop.drag-over { border-color: #1a1a2e; background: #f0f0f8; }
.drop-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.drop-text { display: block; font-size: 14px; font-weight: 500; color: #333; }
.drop-sub  { display: block; font-size: 12px; color: #888; margin-top: 4px; }
.import-results {
  background: #f0fff4; border: 1px solid #c8e6c9; border-radius: 8px;
  padding: 1rem 1.25rem; margin-bottom: 1.5rem;
}
.import-results.has-errors { background: #fff8f0; border-color: #ffe0b2; }
.result-counts { display: flex; gap: 1.5rem; margin-bottom: 10px; }
.result-count { display: flex; flex-direction: column; align-items: center; }
.count-num { font-size: 28px; font-weight: 600; line-height: 1; }
.count-label { font-size: 12px; color: #666; margin-top: 2px; }
.result-count.success .count-num { color: #2e7d32; }
.result-count.warn .count-num { color: #e65100; }
.error-list { margin-top: 10px; }
.error-item {
  font-size: 12px; color: #b71c1c; padding: 4px 8px;
  background: #fde8e8; border-radius: 4px; margin-bottom: 4px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

/* ── Login ── */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: #f4f5f7;
}
.login-box {
  background: #fff; border-radius: 12px; padding: 2.5rem 3rem;
  width: 100%; max-width: 440px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}
.login-box h1 { font-size: 26px; margin-bottom: 4px; }
.login-sub { color: #666; font-size: 15px; margin-bottom: 2rem; }
.login-box img { width: 220px; margin-bottom: 16px; }
.login-box input[type=password],
.login-box input[type=text] {
  width: 100%; padding: 13px 16px; border: 1px solid #ddd;
  border-radius: 8px; font-size: 16px; margin-bottom: 14px;
}
.login-box input:focus {
  outline: none; border-color: #1a1a2e;
  box-shadow: 0 0 0 3px rgba(26,26,46,0.08);
}
.login-box button {
  width: 100%; padding: 14px; background: #1a1a2e; color: #fff;
  border: none; border-radius: 8px; font-size: 16px; cursor: pointer;
  margin-top: 4px;
}
.login-box button:hover { background: #2d2d4e; }

/* ── Alerts ── */
.alert {
  padding: 8px 14px; border-radius: 6px; margin-bottom: 12px;
  font-size: 13px;
}
.alert-error { background: #fde8e8; color: #b71c1c; border: 1px solid #f5c6c6; }
.alert-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #c8e6c9; }

/* ── Board header ── */
.board-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.board-header h2 { font-size: 18px; font-weight: 600; }
.btn-add {
  background: #1a1a2e; color: #fff; text-decoration: none;
  padding: 7px 16px; border-radius: 6px; font-size: 13px;
}
.btn-add:hover { background: #2d2d4e; }

/* ── Filter bar ── */
.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-bottom: 10px;
}
.filter-bar .btn-add { margin-left: auto; }
.filter-bar input[type=text],
.filter-bar select {
  padding: 6px 10px; border: 1px solid #ccc; border-radius: 6px;
  font-size: 13px; background: #fff; height: 34px;
}
.filter-bar input[type=text] { width: 200px; }
.btn-filter {
  padding: 6px 14px; background: #444; color: #fff; border: none;
  border-radius: 6px; cursor: pointer; font-size: 13px; height: 34px;
}
.btn-filter:hover { background: #222; }
.btn-clear {
  padding: 6px 12px; color: #555; text-decoration: none; font-size: 13px;
  border: 1px solid #ccc; border-radius: 6px; background: #fff; height: 34px;
  display: inline-flex; align-items: center;
}
.btn-clear:hover { background: #f0f0f0; }

/* ── Legend ── */
.legend {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px;
}
.leg {
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 12px; text-transform: uppercase; letter-spacing: 0.4px;
}
.leg-notstarted { background: #b7e4ba; color: #1b5e20; }
.leg-inprogress { background: #fff176; color: #b38f00; }
.leg-complete   { background: #ef9a9a; color: #b71c1c; }
.leg-billed     { background: #80deea; color: #006064; }
.leg-approved   { background: #e0e0e0; color: #555; }
.leg-void       { background: #f5f5f5; color: #999; border: 1px solid #ddd; }

/* ── Table ── */
.table-wrap { border-radius: 8px; }

.wo-table {
  width: 100%; border-collapse: collapse;
  background: #fff; border-radius: 8px;
  font-size: 13px;
}
.wo-table thead th {
  background: #2a2a3e; color: #ddd;
  padding: 9px 10px; text-align: left;
  font-size: 12px; font-weight: 500;
  white-space: nowrap;
  position: sticky;
  top: calc(var(--navbar-height) + env(safe-area-inset-top));
  z-index: 10;
}
@media (max-width: 480px) {
  :root { --navbar-height: 80px; }
  .wo-table thead th {
    top: calc(var(--navbar-height) + env(safe-area-inset-top));
  }
}
/* Prevent horizontal scroll breaking sticky - use body scroll */
body { overflow-x: hidden; }
.wo-table thead th:first-child { border-radius: 8px 0 0 0; }
.wo-table thead th:last-child  { border-radius: 0 8px 0 0; }

.wo-table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  max-width: 220px;
  text-overflow: ellipsis;
}
.wo-desc { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Row colors */
.row-notstarted td { background: #b7e4ba; }
.row-inprogress td { background: #fff176; }
.row-complete   td { background: #ef9a9a; }
.row-billed     td { background: #80deea; }
.row-billapproved td { background: #e0e0e0; }
.row-void td { background: #f5f5f5; color: #999; }

.wo-table tbody tr:hover td { filter: brightness(0.95); }

/* Inline status select */
.status-select {
  font-size: 12px; padding: 3px 6px; border: 1px solid #bbb;
  border-radius: 5px; background: rgba(255,255,255,0.7);
  cursor: pointer; width: 120px;
}

.btn-edit { font-size: 15px; text-decoration: none; }
.no-results { text-align: center; padding: 2rem; color: #888; }

.table-footer {
  font-size: 12px; color: #888; text-align: right;
  margin-top: 6px;
}

/* ── Form pages ── */
.form-page {
  max-width: 760px; margin: 0 auto;
  background: #fff; border-radius: 10px; padding: 1.5rem 2rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}
.form-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 1.5rem;
}
.form-header h2 { font-size: 18px; font-weight: 600; }
.back-link { font-size: 13px; color: #555; text-decoration: none; }
.back-link:hover { color: #000; }

.wo-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-group { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 160px; }
.form-group.wide { flex: 2; }
.form-group label { font-size: 12px; font-weight: 500; color: #555; }
.form-group input[type=text],
.form-group input[type=date],
.form-group select,
.form-group textarea {
  padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px;
  font-size: 13px; font-family: inherit; background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: #888; box-shadow: 0 0 0 2px rgba(0,0,0,0.06);
}
.disabled-input { background: #f5f5f5 !important; color: #888; }

.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.btn-save {
  padding: 9px 20px; background: #1a1a2e; color: #fff; border: none;
  border-radius: 6px; font-size: 14px; cursor: pointer;
}
.btn-save:hover { background: #2d2d4e; }
.btn-cancel {
  padding: 9px 16px; color: #555; text-decoration: none;
  border: 1px solid #ccc; border-radius: 6px; font-size: 14px;
  background: #fff;
}
.btn-cancel:hover { background: #f5f5f5; }
.btn-delete {
  padding: 9px 16px; background: #b71c1c; color: #fff; border: none;
  border-radius: 6px; font-size: 14px; cursor: pointer; margin-left: auto;
}
.btn-delete:hover { background: #8b0000; }

/* ── Notes section ── */
.notes-section {
  margin-top: 2rem; border-top: 1px solid #eee; padding-top: 1rem;
}
.notes-section h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: #444; }
.note-entry {
  display: flex; gap: 12px; padding: 7px 0;
  border-bottom: 1px solid #f0f0f0; font-size: 13px;
}
.note-ts { color: #888; white-space: nowrap; font-size: 12px; min-width: 130px; }
.note-text { color: #222; }

/* ── Mobile ── */
@media (max-width: 640px) {
  .filter-bar input[type=text] { width: 100%; }
  .form-row { flex-direction: column; }
  .wo-table { font-size: 12px; }
  .wo-table td { max-width: 140px; }
}

/* ── Inline notes ── */
.notes-btn {
  background: rgba(0,0,0,0.08); border: none; border-radius: 10px;
  padding: 2px 7px; font-size: 11px; cursor: pointer; margin-left: 6px;
  vertical-align: middle; white-space: nowrap;
}
.notes-btn:hover { background: rgba(0,0,0,0.18); }
.notes-row td { padding: 0 !important; border-bottom: 2px solid rgba(0,0,0,0.08); }
.notes-panel {
  padding: 10px 16px 12px 32px;
  background: rgba(0,0,0,0.04);
  display: flex; flex-direction: column; gap: 6px;
}
.notes-loading { font-size: 13px; color: #888; font-style: italic; }
.note-inline {
  display: flex; gap: 14px; font-size: 13px;
  padding: 4px 0; border-bottom: 1px solid rgba(0,0,0,0.05);
}
.note-inline:last-child { border-bottom: none; }
.note-inline-ts { color: #888; font-size: 12px; white-space: nowrap; min-width: 130px; }
.note-inline-text { color: #222; }

/* ── Expand button ── */
.expand-btn {
  background: rgba(0,0,0,0.10); border: none; border-radius: 10px;
  padding: 1px 6px; font-size: 11px; cursor: pointer; margin-left: 5px;
  vertical-align: middle; white-space: nowrap; transition: transform 0.15s;
}
.expand-btn:hover { background: rgba(0,0,0,0.20); }
.expand-btn.expanded { transform: rotate(180deg); display: inline-block; }
.note-count-badge {
  background: #1a1a2e; color: #fff; border-radius: 8px;
  padding: 0px 5px; font-size: 10px; margin-left: 3px;
}
.expand-desc {
  font-size: 13px; color: #222; padding: 4px 0 6px;
  border-bottom: 1px solid rgba(0,0,0,0.07); margin-bottom: 6px;
  white-space: normal; word-wrap: break-word;
}
.expand-label {
  font-size: 11px; font-weight: 600; color: #666;
  text-transform: uppercase; letter-spacing: 0.4px;
}

/* ── Nav logo ── */
.nav-logo {
  height: 44px;
  width: auto;
  flex-shrink: 0;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}

/* ── Nav title ── */
.nav-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 3px;
  text-transform: uppercase;
  white-space: nowrap;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* ── Mobile navbar ── */
@media (max-width: 480px) {
  .navbar {
    padding: 0 1rem;
    padding-top: env(safe-area-inset-top);
    min-height: calc(80px + env(safe-area-inset-top));
    align-items: flex-end;
  }
  .nav-inner {
    padding-bottom: 10px;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .nav-brand {
    flex-basis: 100%;
    justify-content: flex-start;
    gap: 8px;
  }
  .nav-logo { height: 30px; }
  .nav-title { font-size: 13px; letter-spacing: 0.3px; }
  .nav-links {
    flex-basis: 100%;
    justify-content: flex-end;
    gap: 14px;
    padding-bottom: 4px;
  }
  .nav-link { font-size: 13px; }
  .nav-logout { font-size: 13px; }
}

/* ── Row tap to expand ── */
.wo-row { cursor: pointer; }
.wo-row.row-expanded td { filter: brightness(0.92); }
.wo-row:active td { filter: brightness(0.85); }

/* ── Board controls ── */
.board-controls {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.btn-toggle {
  padding: 7px 14px; font-size: 13px; border-radius: 6px; cursor: pointer;
  border: 1px solid #ccc; background: #fff; color: #444;
  white-space: nowrap;
}
.btn-toggle:hover { background: #f0f0f0; }
.btn-toggle-active {
  background: #1a1a2e; color: #fff; border-color: #1a1a2e;
}
.btn-toggle-active:hover { background: #2d2d4e; }

/* ── Dark mode ── */
body.dark-mode {
  background: #0f0f1a;
  color: #ddd;
}
body.dark-mode .navbar { background: #0a0a18; border-bottom: 1px solid #2a2a4e; }
body.dark-mode .container { background: transparent; }
body.dark-mode .filter-bar input,
body.dark-mode .filter-bar select {
  background: #1a1a2e; color: #ddd; border-color: #3a3a5e;
}
body.dark-mode .btn-filter { background: #3a3a5e; }
body.dark-mode .btn-clear { background: #1a1a2e; color: #aaa; border-color: #3a3a5e; }
body.dark-mode .btn-toggle { background: #1a1a2e; color: #ddd; border-color: #3a3a5e; }
body.dark-mode .btn-toggle:hover { background: #2a2a3e; }
body.dark-mode .btn-toggle-active { background: #FFD700; color: #000; border-color: #FFD700; }
body.dark-mode .btn-add { background: #2a2a4e; }
body.dark-mode .board-header h2 { color: #ddd; }

/* Dark mode row colors — more vivid on dark bg */
body.dark-mode .row-notstarted td { background: rgba(100,180,100,0.22); }
body.dark-mode .row-inprogress td { background: rgba(255,230,50,0.18); }
body.dark-mode .row-complete   td { background: rgba(220,80,80,0.22); }
body.dark-mode .row-billed     td { background: rgba(0,180,200,0.18); }
body.dark-mode .row-billapproved td { background: rgba(160,160,160,0.15); }
body.dark-mode .row-void       td { background: rgba(80,80,80,0.15); color: #666; }

body.dark-mode .wo-table { background: #12121f; }
body.dark-mode .wo-table td { border-bottom-color: rgba(255,255,255,0.05); color: #ddd; }
body.dark-mode .wo-table tbody tr:hover td { filter: brightness(1.2); }
body.dark-mode .notes-panel { background: rgba(255,255,255,0.04); }
body.dark-mode .note-inline-ts { color: #666; }
body.dark-mode .note-inline-text { color: #ccc; }
body.dark-mode .expand-desc { color: #ccc; border-bottom-color: rgba(255,255,255,0.07); }
body.dark-mode .status-select {
  background: rgba(255,255,255,0.08); color: #ddd; border-color: #3a3a5e;
}
body.dark-mode .table-footer { color: #555; }
body.dark-mode .form-page { background: #1a1a2e; }
body.dark-mode .form-group label { color: #aaa; }
body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
  background: #12121f; color: #ddd; border-color: #3a3a5e;
}
body.dark-mode .legend { filter: brightness(0.85); }

/* ── Reports ── */
.report-page { max-width: 1200px; margin: 0 auto; }
.report-filters {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
  background: #fff; border-radius: 8px; padding: 1rem 1.25rem;
  margin-bottom: 1.5rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.report-banner {
  display: flex; gap: 24px; flex-wrap: wrap;
  background: #1a1a2e; border-radius: 10px;
  padding: 1.25rem 2rem; margin-bottom: 1.5rem;
}
.report-stat { display: flex; flex-direction: column; align-items: center; }
.stat-num {
  font-size: 28px; font-weight: 700; color: #fff; line-height: 1;
}
.report-stat.highlight .stat-num { color: #FFD700; font-size: 32px; }
.stat-label { font-size: 12px; color: #888; margin-top: 4px; text-transform: uppercase; }
.report-section-title {
  font-size: 15px; font-weight: 600; color: #444;
  margin-bottom: 10px; margin-top: 0;
}
.invoice-col { text-align: right; white-space: nowrap; }

/* Print styles */
@media print {
  .navbar, .report-filters, .report-banner, .back-link,
  .btn-save, .btn-cancel, .btn-toggle { display: none !important; }
  .report-page { max-width: 100%; }
  body { background: #fff; color: #000; }
}

/* Dark mode reports */
body.dark-mode .report-filters { background: #1a1a2e; }
body.dark-mode .report-section-title { color: #aaa; }

/* ── Work type badges ── */
.type-badge {
  display: inline-block; padding: 2px 7px; border-radius: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.3px;
  white-space: nowrap;
}
.type-time___material { background: #e3f2fd; color: #1565c0; }
.type-proposal        { background: #f3e5f5; color: #6a1b9a; }

/* ── Multi-select dropdown ── */
.multi-select-wrap { position: relative; display: inline-block; }
.multi-select-btn {
  padding: 6px 10px; border: 1px solid #ccc; border-radius: 6px;
  background: #fff; color: #333; font-size: 13px; cursor: pointer;
  height: 34px; white-space: nowrap; min-width: 130px; text-align: left;
}
.multi-select-btn:hover { background: #f5f5f5; }
.multi-select-menu {
  display: none; position: absolute; top: 100%; left: 0; z-index: 200;
  background: #fff; border: 1px solid #ccc; border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12); min-width: 180px;
  padding: 6px 0; margin-top: 2px;
}
.multi-select-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; font-size: 13px; cursor: pointer;
  white-space: nowrap;
}
.multi-select-item:hover { background: #f5f5f5; }
.multi-select-item input { cursor: pointer; }
.multi-select-actions {
  display: flex; gap: 6px; padding: 8px 10px 4px;
  border-top: 1px solid #eee; margin-top: 4px;
}
.multi-select-actions button {
  flex: 1; padding: 5px; font-size: 12px; border-radius: 5px;
  cursor: pointer; border: 1px solid #ccc; background: #f5f5f5;
}
.multi-select-actions button:last-child {
  background: #1a1a2e; color: #fff; border-color: #1a1a2e;
}

/* Dark mode multi-select */
body.dark-mode .multi-select-btn { background: #1a1a2e; color: #ddd; border-color: #3a3a5e; }
body.dark-mode .multi-select-menu { background: #1a1a2e; border-color: #3a3a5e; }
body.dark-mode .multi-select-item:hover { background: #2a2a3e; }
body.dark-mode .multi-select-actions { border-top-color: #2a2a3e; }
body.dark-mode .multi-select-actions button { background: #2a2a3e; color: #ddd; border-color: #3a3a5e; }

/* ── Settings toggle switches ── */
.pref-list { display: flex; flex-direction: column; gap: 0; }
.pref-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid #f0f0f0;
}
.pref-item:last-child { border-bottom: none; }
.pref-label { font-size: 14px; font-weight: 500; color: #222; }
.pref-desc  { font-size: 12px; color: #888; margin-top: 2px; }

.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #ccc; border-radius: 24px; transition: 0.2s;
}
.toggle-slider:before {
  content: ""; position: absolute;
  height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: #1a1a2e; }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }

body.dark-mode .pref-label { color: #ddd; }
body.dark-mode .pref-item { border-bottom-color: #2a2a3e; }
body.dark-mode .toggle-switch input:checked + .toggle-slider { background: #FFD700; }

/* ── Nav username ── */
.nav-user {
  color: #aaa; font-size: 13px;
  padding: 0 4px;
  border-left: 1px solid #333;
  padding-left: 12px;
}

/* ── Waiting on parts status ── */
.row-inprogresswaitingonparts td { background: #ffe0b2; }
.leg-waiting { background: #ffe0b2; color: #e65100; }

/* ── On hold status ── */
.row-onhold td { background: #e1bee7; }
.leg-onhold { background: #e1bee7; color: #6a1b9a; }

/* ── Export button ── */
.btn-export {
  padding: 6px 14px; font-size: 13px; border-radius: 6px;
  border: 1px solid #ccc; background: #fff; color: #444;
  text-decoration: none; height: 34px; display: inline-flex;
  align-items: center; white-space: nowrap;
}
.btn-export:hover { background: #f0f0f0; }
body.dark-mode .btn-export { background: #1a1a2e; color: #ddd; border-color: #3a3a5e; }

/* ── Contract Jobs additional statuses ── */
.row-estimating       td { background: #e8eaf6; }
.row-proposalsent     td { background: #fff3e0; }
.row-approved         td { background: #e0f7fa; }
.row-invoiced         td { background: #f3e5f5; }
.row-paid             td { background: #e8f5e9; }
.leg-estimating   { background: #e8eaf6; color: #3949ab; }
.leg-proposalsent { background: #fff3e0; color: #e65100; }
.leg-approved     { background: #e0f7fa; color: #00838f; }
.leg-invoiced     { background: #f3e5f5; color: #6a1b9a; }
.leg-paid         { background: #e8f5e9; color: #2e7d32; }
