:root {
  --ink: #f8fafc;
  --muted: #aab4c8;
  --faint: #778398;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.34);
  --panel: #1a202c;
  --panel-2: #151b26;
  --surface: #111722;
  --surface-raised: #222a38;
  --canvas: #0d1119;
  --deep: #4169e1;
  --deep-2: #6f8dff;
  --aqua: #4169e1;
  --mint: #15234a;
  --coral: #ef6b4e;
  --amber: #c8861a;
  --violet: #6f5aa7;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.2);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  color: inherit;
}

svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

[hidden] {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(20, 28, 43, 0.96) 0, rgba(13, 17, 25, 0.98) 230px, #0b0f16 100%);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 11px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 20, 31, 0.94);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.app-header::after {
  position: absolute;
  right: 24px;
  bottom: -1px;
  left: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(65, 105, 225, 0.62), transparent);
  content: "";
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 162px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, #315bdc, var(--deep-2));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 24px rgba(65, 105, 225, 0.26);
  font-size: 0.78rem;
  font-weight: 900;
}

.brand-mark.small {
  width: 34px;
  height: 34px;
}

.brand strong {
  display: block;
  font-size: 0.98rem;
}

.brand-name {
  color: #f8fafc;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 1.18rem;
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 22px rgba(111, 141, 255, 0.22);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 10px;
  background: rgba(8, 13, 22, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow-x: auto;
  scrollbar-width: thin;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #b6c0d2;
  background: transparent;
  font-weight: 800;
  white-space: nowrap;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.nav-button:hover {
  color: #fff;
  border-color: rgba(111, 141, 255, 0.24);
  background: rgba(31, 41, 55, 0.72);
}

.nav-button.active {
  color: #fff;
  border-color: rgba(111, 141, 255, 0.4);
  background: rgba(65, 105, 225, 0.18);
  box-shadow:
    inset 0 -2px 0 rgba(111, 141, 255, 0.96),
    0 8px 20px rgba(65, 105, 225, 0.14);
}

.nav-icon,
.button-icon,
.mini-icon {
  display: inline-grid;
  place-items: center;
  color: inherit;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-badge {
  display: inline-grid;
  gap: 2px;
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid rgba(111, 141, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(18, 26, 39, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.account-badge strong {
  font-size: 0.88rem;
}

.account-badge span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.main {
  min-width: 0;
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px 28px 0;
}

.content {
  display: grid;
  gap: 18px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px 28px 42px;
}

.auth-shell {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
}

.auth-panel {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
  gap: 20px;
}

.auth-panel > .panel {
  min-height: 100%;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(111, 141, 255, 0.24);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(65, 105, 225, 0.14);
  font-size: 0.74rem;
  font-weight: 900;
}

.auth-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.auth-list li {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(11, 17, 25, 0.82);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.auth-helper {
  color: var(--muted);
  font-size: 0.86rem;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: #f8b4b4;
  font-size: 0.86rem;
  font-weight: 700;
}

.form-message.success {
  color: #9ae6b4;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--deep-2);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: #f8fafc;
  font-size: 1.42rem;
  font-weight: 900;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  color: #f8fafc;
  font-size: 1.18rem;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
  letter-spacing: 0;
}

.role-switcher {
  display: grid;
  gap: 3px;
  min-width: 180px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.role-switcher select,
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(12, 18, 28, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  outline: 0;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.role-switcher select,
input,
select {
  min-height: 38px;
  padding: 0 12px;
}

textarea {
  padding: 10px 12px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #6f7b90;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  border-color: rgba(111, 141, 255, 0.78);
  box-shadow:
    0 0 0 3px rgba(65, 105, 225, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 850;
  transition:
    transform 140ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.button {
  padding: 0 14px;
}

.button.primary {
  color: #fff;
  border-color: rgba(111, 141, 255, 0.42);
  background: linear-gradient(180deg, #5478ed, #315bdc);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 10px 24px rgba(65, 105, 225, 0.2);
}

.button.primary:hover {
  background: linear-gradient(180deg, #6f8dff, #4169e1);
  transform: translateY(-1px);
}

.button.secondary {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(20, 27, 39, 0.94);
}

.button.secondary:hover {
  border-color: rgba(111, 141, 255, 0.5);
  background: rgba(30, 40, 57, 0.96);
  transform: translateY(-1px);
}

.button.ghost {
  color: #dbeafe;
  border-color: rgba(111, 141, 255, 0.18);
  background: rgba(65, 105, 225, 0.16);
}

.button.warning {
  color: #fff;
  border-color: rgba(239, 107, 78, 0.55);
  background: linear-gradient(180deg, #f07b63, #d64f35);
}

.button.compact {
  min-height: 38px;
  padding: 0 12px;
}

.button:disabled,
.icon-button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.icon-button {
  width: 40px;
  padding: 0;
  color: var(--ink);
  border-color: var(--line);
  background: rgba(20, 27, 39, 0.94);
}

.icon-button:hover {
  border-color: rgba(111, 141, 255, 0.5);
  background: rgba(30, 40, 57, 0.96);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.95fr);
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.stat-card,
.record-card,
.customer-row,
.inventory-row,
.schedule-card,
.report-card,
.tech-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 37, 50, 0.98), rgba(22, 28, 39, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 34px rgba(0, 0, 0, 0.14);
}

.panel {
  padding: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    var(--shadow-soft);
}

.options-panel {
  max-width: 820px;
}

.settings-list {
  display: grid;
  gap: 12px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 18, 27, 0.72);
}

.setting-row h3 {
  margin: 0 0 4px;
}

.setting-row p {
  margin: 0;
  color: var(--muted);
}

.setting-row > div:first-child {
  min-width: 0;
}

.setting-row .button {
  flex: 0 0 auto;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.segmented-control {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 13, 22, 0.42);
}

.segment {
  min-width: 82px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 850;
}

.segment.active {
  color: #fff;
  border-color: rgba(111, 141, 255, 0.48);
  background: var(--deep);
}

.wide-panel {
  grid-column: 1 / -1;
}

.panel-header,
.section-header,
.record-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.compact-header {
  margin-bottom: 8px;
}

.panel-header p,
.section-header p,
.record-card p,
.customer-row p,
.inventory-row p,
.muted {
  color: var(--muted);
}

.panel-header p,
.section-header p {
  margin-bottom: 0;
}

.panel-header h2,
.section-header h2,
.record-header h3 {
  margin-bottom: 4px;
}

.stat-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 17px 18px;
  text-align: left;
  overflow: hidden;
}

.stat-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--deep);
  content: "";
}

.stat-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.stat-card strong {
  font-size: 1.9rem;
  line-height: 1;
}

.stat-card small {
  color: var(--deep-2);
  font-weight: 850;
}

.stat-button:hover {
  border-color: rgba(111, 141, 255, 0.55);
  box-shadow:
    inset 3px 0 0 var(--aqua),
    0 16px 36px rgba(65, 105, 225, 0.14);
  transform: translateY(-1px);
}

.status-pill,
.priority-pill,
.tag,
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
}

.status-pill {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(239, 68, 68, 0.16);
}

.status-pill.scheduled {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(239, 68, 68, 0.16);
}

.status-pill.pending {
  color: #fde68a;
  border-color: rgba(234, 179, 8, 0.48);
  background: rgba(234, 179, 8, 0.16);
}

.status-pill.completed {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(34, 197, 94, 0.16);
}

.priority-pill {
  color: #bfdbfe;
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.16);
}

.priority-pill.low {
  color: #ddd6fe;
  border-color: rgba(168, 85, 247, 0.42);
  background: rgba(168, 85, 247, 0.16);
}

.priority-pill.normal {
  color: #bfdbfe;
  border-color: rgba(59, 130, 246, 0.42);
  background: rgba(59, 130, 246, 0.16);
}

.priority-pill.high {
  color: #fed7aa;
  border-color: rgba(249, 115, 22, 0.46);
  background: rgba(249, 115, 22, 0.16);
}

.tag {
  color: #dbeafe;
  border-color: rgba(111, 141, 255, 0.22);
  background: rgba(65, 105, 225, 0.15);
}

.tag.unassigned {
  color: #d1d5db;
  border-color: rgba(156, 163, 175, 0.32);
  background: rgba(75, 85, 99, 0.38);
}

.tag.assignee-icon {
  width: 28px;
  min-width: 28px;
  padding: 3px 0;
  color: #fff;
  background: var(--deep);
}

.count-badge {
  color: #fff;
  border-color: rgba(111, 141, 255, 0.34);
  background: rgba(65, 105, 225, 0.7);
}

.list {
  display: grid;
  gap: 10px;
}

.filters,
.record-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters {
  margin-bottom: 12px;
}

.chip,
.schedule-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(13, 18, 27, 0.92);
  font-weight: 850;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.chip.active,
.chip:hover,
.schedule-tab.active,
.schedule-tab:hover {
  color: #fff;
  border-color: rgba(111, 141, 255, 0.55);
  background: rgba(65, 105, 225, 0.72);
  box-shadow: 0 10px 22px rgba(65, 105, 225, 0.16);
}

.schedule-panel {
  display: grid;
  gap: 16px;
}

.schedule-header {
  display: grid;
  gap: 14px;
}

.schedule-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 999px;
  background: rgba(8, 13, 22, 0.34);
}

.date-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 18, 27, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.date-nav h2 {
  min-width: min(420px, 58vw);
  margin: 0;
  text-align: center;
}

.daily-schedule {
  max-width: 920px;
}

.schedule-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px;
  color: inherit;
  text-align: left;
}

.schedule-card:hover,
.record-card.selected {
  border-color: rgba(111, 141, 255, 0.55);
  box-shadow:
    inset 3px 0 0 var(--aqua),
    0 16px 36px rgba(65, 105, 225, 0.13);
}

.schedule-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.calendar-board {
  display: grid;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.weekly-board {
  grid-template-columns: repeat(7, minmax(170px, 1fr));
}

.day-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 170px;
  height: 430px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 18, 27, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.day-column h3,
.month-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mini-work {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 0;
  padding: 10px;
  border: 1px solid rgba(65, 105, 225, 0.16);
  border-left: 4px solid var(--aqua);
  border-radius: 6px;
  color: inherit;
  background: rgba(65, 105, 225, 0.1);
  text-align: left;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 140ms ease;
}

.mini-work:hover {
  border-color: rgba(111, 141, 255, 0.35);
  background: rgba(65, 105, 225, 0.17);
}

.calendar-jobs {
  display: grid;
  grid-template-rows: repeat(var(--job-count), minmax(0, 1fr));
  gap: 4px;
  min-height: 0;
  overflow: hidden;
}

.calendar-jobs.empty {
  display: block;
}

.calendar-jobs .mini-work {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: 6px;
  row-gap: 0;
  padding: 4px 6px;
  border-left-width: 3px;
  overflow: hidden;
}

.calendar-jobs .mini-work strong {
  grid-row: auto;
  align-self: center;
  color: var(--deep);
  font-size: 0.74rem;
  line-height: 1.1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-jobs .mini-work span {
  min-width: 0;
  overflow: hidden;
  font-size: 0.72rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-jobs .mini-work .muted {
  font-size: 0.66rem;
}

.mini-work.repair {
  border-left-color: var(--coral);
}

.mini-work.inspection {
  border-left-color: var(--violet);
}

.month-weekdays,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  gap: 8px;
}

.month-weekdays span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.month-cell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 260px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 18, 27, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.month-grid .calendar-jobs .mini-work {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 5px;
  padding: 3px 5px;
}

.month-grid .calendar-jobs .mini-work strong {
  grid-row: auto;
  font-size: 0.62rem;
}

.month-grid .calendar-jobs .mini-work span,
.month-grid .calendar-jobs .mini-work .muted {
  font-size: 0.64rem;
}

.schedule-monthly {
  gap: 12px;
}

.schedule-monthly .schedule-header {
  gap: 10px;
}

.schedule-monthly .date-nav {
  padding: 8px;
}

.schedule-monthly .month-weekdays,
.schedule-monthly .month-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  overflow: hidden;
}

.schedule-monthly .month-grid {
  grid-auto-rows: minmax(0, 1fr);
  height: clamp(390px, calc(100vh - 350px), 640px);
}

.schedule-monthly .month-weekdays span {
  font-size: 0.72rem;
}

.schedule-monthly .month-cell {
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 7px;
}

.schedule-monthly .month-date {
  min-height: 18px;
  font-size: 0.78rem;
}

.schedule-monthly .calendar-jobs {
  gap: 3px;
}

.schedule-monthly .month-grid .calendar-jobs .mini-work {
  padding: 2px 5px;
}

.schedule-monthly .month-grid .calendar-jobs .mini-work strong,
.schedule-monthly .month-grid .calendar-jobs .mini-work span,
.schedule-monthly .month-grid .calendar-jobs .mini-work .muted {
  font-size: 0.6rem;
  line-height: 1;
}

.muted-cell {
  background: rgba(17, 24, 39, 0.36);
}

.record-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 140ms ease;
}

.record-card:hover,
.customer-row:hover,
.inventory-row:hover,
.tech-card:hover {
  border-color: rgba(148, 163, 184, 0.34);
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.title-stack {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-page {
  display: grid;
  gap: 18px;
}

.detail-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 18, 28, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.detail-box strong {
  display: block;
  margin-bottom: 4px;
}

.detail-box p {
  margin-bottom: 0;
  line-height: 1.45;
}

.checklist {
  display: grid;
  gap: 8px;
}

.check-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.completion-notes label,
.field-note-box label,
.admin-edit-grid label,
.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.completion-notes {
  display: grid;
  gap: 10px;
}

.admin-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.field-note-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.4fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 18, 28, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.equipment-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 18, 28, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.equipment-list {
  display: grid;
  gap: 8px;
}

.config-list {
  display: grid;
  gap: 8px;
}

.config-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.equipment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(30, 37, 50, 0.8);
}

.equipment-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.customer-row,
.inventory-row,
.tech-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 140ms ease;
}

.customer-row {
  grid-template-columns: 1fr auto;
  align-items: start;
  width: 100%;
  color: inherit;
  text-align: left;
}

.customer-row.active {
  border-color: rgba(111, 141, 255, 0.58);
  box-shadow:
    inset 3px 0 0 var(--deep-2),
    0 16px 34px rgba(65, 105, 225, 0.14);
}

.customer-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-name strong {
  font-size: 1rem;
}

.customer-row p,
.inventory-row p {
  margin-bottom: 0;
  line-height: 1.35;
}

.searchbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 12px;
}

.inventory-searchbar {
  grid-template-columns: minmax(170px, 0.28fr) minmax(0, 1fr) auto;
}

.search-group {
  margin-bottom: 12px;
}

.search-group h3 {
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.inventory-row {
  grid-template-columns: minmax(180px, 1fr) repeat(4, minmax(78px, auto)) auto;
  align-items: center;
}

.inventory-breakdown {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.inventory-breakdown-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(65, 105, 225, 0.1);
}

.inventory-breakdown-row small {
  display: block;
  color: var(--muted);
}

.inventory-breakdown-count {
  min-width: 42px;
  text-align: right;
  font-weight: 900;
}

.technician-dashboard {
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 1fr);
  gap: 16px;
}

.technician-list,
.vehicle-grid {
  display: grid;
  gap: 10px;
}

.vehicle-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.tech-select-card,
.vehicle-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 18, 28, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.tech-select-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 12px;
  color: inherit;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.tech-select-card.active,
.tech-select-card:hover {
  border-color: rgba(111, 141, 255, 0.55);
  background: rgba(65, 105, 225, 0.1);
  box-shadow:
    inset 3px 0 0 var(--aqua),
    0 14px 30px rgba(65, 105, 225, 0.12);
}

.tech-select-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.vehicle-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.dashboard-vehicle {
  max-width: 760px;
}

.vehicle-assign {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.vehicle-items {
  display: grid;
  gap: 6px;
}

.vehicle-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(65, 105, 225, 0.1);
}

.vehicle-item-row small {
  display: block;
  color: var(--muted);
}

.stock-low {
  color: #fb923c;
  font-weight: 900;
}

.stock-ok {
  color: #4ade80;
  font-weight: 900;
}

.report-card {
  display: grid;
  gap: 10px;
  padding: 16px;
}

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

.permission-table th,
.permission-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.permission-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.modal {
  width: min(820px, calc(100vw - 24px));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: var(--shadow);
}

.auth-modal {
  width: min(440px, calc(100vw - 24px));
}

.confirm-modal {
  width: min(460px, calc(100vw - 24px));
}

.modal::backdrop {
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.modal-frame {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(31, 39, 54, 0.99), rgba(17, 24, 39, 0.99));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.modal-frame header,
.modal-frame footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-frame header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.modal-frame footer {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.confirm-frame {
  gap: 18px;
}

.confirm-frame footer {
  justify-content: flex-end;
}

.confirm-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.empty-state {
  padding: 22px;
  border: 1px dashed rgba(148, 163, 184, 0.34);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(12, 18, 28, 0.62);
}

hr {
  width: 100%;
  height: 1px;
  border: 0;
  background: var(--line);
}

::selection {
  color: #fff;
  background: rgba(65, 105, 225, 0.55);
}

* {
  scrollbar-color: rgba(111, 141, 255, 0.55) rgba(12, 18, 28, 0.72);
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: rgba(12, 18, 28, 0.72);
}

::-webkit-scrollbar-thumb {
  border: 3px solid rgba(12, 18, 28, 0.72);
  border-radius: 999px;
  background: rgba(111, 141, 255, 0.62);
}

body[data-theme="light"] {
  --ink: #111827;
  --muted: #5f6b7e;
  --faint: #7b8798;
  --line: rgba(31, 41, 55, 0.14);
  --line-strong: rgba(31, 41, 55, 0.24);
  --panel: #ffffff;
  --panel-2: #f4f7fb;
  --surface: #eef3f8;
  --surface-raised: #ffffff;
  --canvas: #e8edf4;
  --mint: #e8efff;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
  color: var(--ink);
  background: var(--canvas);
}

body[data-theme="light"] .app-shell {
  background: linear-gradient(180deg, #f8fbff 0, #edf3fa 250px, #e6ecf4 100%);
}

body[data-theme="light"] .app-header {
  border-bottom-color: rgba(31, 41, 55, 0.12);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.09);
}

body[data-theme="light"] .brand-name,
body[data-theme="light"] .page-title h1,
body[data-theme="light"] .panel-header h2,
body[data-theme="light"] .section-header h2,
body[data-theme="light"] .record-header h3,
body[data-theme="light"] .auth-panel h2 {
  color: var(--ink);
}

body[data-theme="light"] .auth-kicker {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.32);
  background: rgba(219, 234, 254, 0.96);
}

body[data-theme="light"] .auth-list li {
  color: #475569;
  border-color: rgba(31, 41, 55, 0.16);
  background: rgba(248, 250, 252, 0.96);
}

body[data-theme="light"] .auth-helper a {
  color: #1d4ed8;
  font-weight: 850;
}

body[data-theme="light"] .form-message {
  color: #b42318;
}

body[data-theme="light"] .form-message.success {
  color: #166534;
}

body[data-theme="light"] .nav-list,
body[data-theme="light"] .segmented-control {
  border-color: rgba(31, 41, 55, 0.18);
  background: rgba(231, 237, 247, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .nav-button {
  color: #4b5565;
}

body[data-theme="light"] .nav-button:hover {
  color: var(--ink);
  border-color: rgba(65, 105, 225, 0.34);
  background: rgba(255, 255, 255, 0.96);
}

body[data-theme="light"] .nav-button.active {
  color: #fff;
  border-color: rgba(31, 75, 205, 0.72);
  background: linear-gradient(180deg, #4f73ea, #315bdc);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 8px 18px rgba(49, 91, 220, 0.2);
}

body[data-theme="light"] .role-switcher select,
body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

body[data-theme="light"] .button.secondary,
body[data-theme="light"] .icon-button {
  color: #152033;
  border-color: rgba(31, 41, 55, 0.22);
  background: linear-gradient(180deg, #ffffff, #edf2f8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 16px rgba(15, 23, 42, 0.06);
}

body[data-theme="light"] .button.secondary:hover,
body[data-theme="light"] .icon-button:hover {
  border-color: rgba(65, 105, 225, 0.42);
  background: #fff;
}

body[data-theme="light"] .panel,
body[data-theme="light"] .stat-card,
body[data-theme="light"] .record-card,
body[data-theme="light"] .customer-row,
body[data-theme="light"] .inventory-row,
body[data-theme="light"] .schedule-card,
body[data-theme="light"] .report-card,
body[data-theme="light"] .tech-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    var(--shadow-soft);
}

body[data-theme="light"] .setting-row,
body[data-theme="light"] .schedule-panel,
body[data-theme="light"] .schedule-tabs,
body[data-theme="light"] .date-nav,
body[data-theme="light"] .detail-box,
body[data-theme="light"] .check-row,
body[data-theme="light"] .field-note-box,
body[data-theme="light"] .customer-detail-card,
body[data-theme="light"] .vehicle-card,
body[data-theme="light"] .inventory-breakdown-row,
body[data-theme="light"] .vehicle-item-row,
body[data-theme="light"] .day-column,
body[data-theme="light"] .month-cell,
body[data-theme="light"] .muted-cell,
body[data-theme="light"] .empty-state,
body[data-theme="light"] .modal-frame {
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 8px 18px rgba(15, 23, 42, 0.04);
}

body[data-theme="light"] .empty-state {
  color: #4b5565;
  border-color: rgba(31, 41, 55, 0.22);
  background: rgba(255, 255, 255, 0.88);
}

body[data-theme="light"] .date-nav h2,
body[data-theme="light"] .day-column h3,
body[data-theme="light"] .month-date,
body[data-theme="light"] .month-weekdays span {
  color: #111827;
}

body[data-theme="light"] .modal-frame {
  background: linear-gradient(180deg, #ffffff, #f5f8fc);
}

body[data-theme="light"] .modal::backdrop {
  background: rgba(15, 23, 42, 0.28);
}

body[data-theme="light"] .chip,
body[data-theme="light"] .schedule-tab {
  color: #39465a;
  border-color: rgba(31, 41, 55, 0.2);
  background: linear-gradient(180deg, #ffffff, #edf2f8);
}

body[data-theme="light"] .chip.active,
body[data-theme="light"] .chip:hover,
body[data-theme="light"] .schedule-tab.active,
body[data-theme="light"] .schedule-tab:hover {
  color: #fff;
  border-color: rgba(31, 75, 205, 0.72);
  background: linear-gradient(180deg, #4f73ea, #315bdc);
}

body[data-theme="light"] .segment {
  color: #39465a;
  border-color: rgba(31, 41, 55, 0.16);
  background: rgba(255, 255, 255, 0.68);
}

body[data-theme="light"] .segment.active {
  color: #fff;
  border-color: rgba(31, 75, 205, 0.72);
  background: linear-gradient(180deg, #4f73ea, #315bdc);
}

body[data-theme="light"] .status-pill {
  color: #991b1b;
  border-color: rgba(185, 28, 28, 0.36);
  background: rgba(254, 226, 226, 0.95);
}

body[data-theme="light"] .status-pill.scheduled {
  color: #991b1b;
  border-color: rgba(185, 28, 28, 0.4);
  background: rgba(254, 226, 226, 0.98);
}

body[data-theme="light"] .status-pill.pending {
  color: #854d0e;
  border-color: rgba(180, 83, 9, 0.44);
  background: rgba(254, 243, 199, 0.98);
}

body[data-theme="light"] .status-pill.completed {
  color: #166534;
  border-color: rgba(22, 101, 52, 0.36);
  background: rgba(220, 252, 231, 0.98);
}

body[data-theme="light"] .priority-pill {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.36);
  background: rgba(219, 234, 254, 0.98);
}

body[data-theme="light"] .priority-pill.low {
  color: #6d28d9;
  border-color: rgba(109, 40, 217, 0.36);
  background: rgba(237, 233, 254, 0.98);
}

body[data-theme="light"] .priority-pill.normal {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.38);
  background: rgba(219, 234, 254, 0.98);
}

body[data-theme="light"] .priority-pill.high {
  color: #c2410c;
  border-color: rgba(194, 65, 12, 0.4);
  background: rgba(255, 237, 213, 0.98);
}

body[data-theme="light"] .tag,
body[data-theme="light"] .count-badge {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.36);
  background: rgba(219, 234, 254, 0.98);
}

body[data-theme="light"] .tag.unassigned {
  color: #374151;
  border-color: rgba(75, 85, 99, 0.34);
  background: rgba(243, 244, 246, 0.98);
}

body[data-theme="light"] .tag.assignee-icon {
  color: #fff;
  border-color: rgba(31, 75, 205, 0.72);
  background: #315bdc;
}

body[data-theme="light"] * {
  scrollbar-color: rgba(65, 105, 225, 0.45) rgba(226, 233, 243, 0.9);
}

.print-sheet {
  display: none;
}

@media (max-width: 1160px) {
  .app-header {
    grid-template-columns: 1fr auto;
  }

  .nav-list {
    grid-column: 1 / -1;
    order: 3;
  }

  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-header {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 12px;
  }

  .app-header::after {
    right: 12px;
    left: 12px;
  }

  .brand {
    min-width: 0;
  }

  .header-tools {
    align-items: stretch;
    flex-wrap: wrap;
    width: 100%;
    gap: 8px;
  }

  .account-badge {
    flex: 1 1 112px;
    min-height: 36px;
    padding: 0 8px;
    font-size: 0.74rem;
  }

  .header-tools .button.compact {
    min-height: 36px;
    padding: 0 10px;
  }

  .nav-list {
    order: initial;
    width: 100%;
  }

  .nav-button {
    min-height: 40px;
    padding: 0 10px;
  }

  .page-title {
    padding: 16px 16px 0;
  }

  .content {
    padding: 16px;
  }

  .panel {
    padding: 16px;
  }

  .panel-header,
  .section-header,
  .record-header {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-actions,
  .record-actions {
    width: 100%;
  }

  .setting-row {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
  }

  .segment {
    flex: 1 1 0;
  }

  .inline-actions .button,
  .record-actions .button,
  .searchbar .button {
    flex: 1 1 auto;
  }

  .grid.three,
  .grid.four,
  .detail-grid,
  .admin-edit-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .schedule-card,
  .customer-row,
  .inventory-row,
  .inventory-breakdown-row,
  .field-note-box,
  .technician-dashboard {
    grid-template-columns: 1fr;
  }

  .inventory-breakdown-count {
    text-align: left;
  }

  .date-nav {
    justify-content: space-between;
  }

  .date-nav h2 {
    min-width: 0;
    font-size: 1rem;
  }

  .month-weekdays,
  .month-grid {
    grid-template-columns: repeat(7, minmax(86px, 1fr));
    overflow-x: auto;
  }

  .month-cell {
    height: 220px;
  }

  .day-column {
    height: 380px;
  }
}

@page {
  size: letter;
  margin: 0.32in;
}

@media print {
  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html,
  body {
    width: auto;
    min-height: 0;
    background: #fff !important;
    color: #111 !important;
  }

  body {
    margin: 0;
  }

  .app-shell,
  .modal,
  dialog {
    display: none !important;
  }

  .print-sheet {
    display: block !important;
    margin: 0;
    padding: 0;
    color: #111;
    font: 10pt/1.3 Arial, Helvetica, sans-serif;
  }

  .print-document {
    display: block;
  }

  .print-header {
    display: grid;
    grid-template-columns: 1fr 2.2in;
    gap: 16px;
    align-items: start;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 2px solid #111;
    break-inside: avoid;
  }

  .print-kicker,
  .print-meta span,
  .print-summary span,
  .print-field span,
  .print-completion-grid span {
    display: block;
    color: #444;
    font-size: 7.5pt;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .print-sheet h1 {
    margin: 2px 0 0;
    color: #111;
    font-size: 25pt;
    line-height: 1;
  }

  .print-header p {
    margin: 4px 0 0;
  }

  .print-meta {
    border: 1px solid #111;
  }

  .print-meta div {
    display: grid;
    grid-template-columns: 0.8in 1fr;
    gap: 6px;
    min-height: 0.28in;
    padding: 5px 7px;
    border-bottom: 1px solid #111;
  }

  .print-meta div:last-child {
    border-bottom: 0;
  }

  .print-meta .print-meta-compact {
    min-height: 0.22in;
    padding-top: 3px;
    padding-bottom: 3px;
  }

  .print-meta strong,
  .print-summary strong,
  .print-field strong {
    font-weight: 700;
  }

  .print-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 8px;
    border: 1px solid #111;
    break-inside: avoid;
  }

  .print-summary div {
    min-height: 0.34in;
    padding: 6px 8px;
    border-right: 1px solid #111;
  }

  .print-summary div:last-child {
    border-right: 0;
  }

  .print-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 8px;
  }

  .print-panel,
  .print-section {
    border: 1px solid #111;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-panel {
    min-height: 0.78in;
    padding: 7px;
  }

  .print-panel-full {
    grid-column: 1 / -1;
  }

  .print-panel h2,
  .print-section h2 {
    margin: 0;
    color: #111;
    font-size: 10pt;
    line-height: 1.1;
  }

  .print-panel h2 {
    padding-bottom: 4px;
    margin-bottom: 5px;
    border-bottom: 1px solid #111;
  }

  .print-field-list {
    display: grid;
    gap: 4px;
  }

  .print-field {
    display: grid;
    grid-template-columns: 1.1in 1fr;
    gap: 8px;
    min-height: 15px;
    padding-bottom: 2px;
    border-bottom: 1px solid #d0d0d0;
  }

  .print-field:last-child {
    border-bottom: 0;
  }

  .print-field strong {
    white-space: pre-line;
  }

  .print-note-box {
    min-height: 0.38in;
    white-space: pre-line;
  }

  .print-section {
    margin-top: 6px;
  }

  .print-checklist-section {
    margin-top: 0;
    break-before: page;
    page-break-before: always;
  }

  .print-section h2 {
    padding: 5px 8px;
    border-bottom: 1px solid #111;
    background: #f2f2f2 !important;
  }

  .print-checklist {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .print-check-row {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 9px;
    align-items: start;
    min-height: 26px;
    padding-bottom: 7px;
    border-bottom: 1px solid #d0d0d0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-check-row:last-child {
    border-bottom: 0;
  }

  .print-check-box {
    display: inline-grid;
    place-items: center;
    width: 15px;
    height: 15px;
    margin-top: 1px;
    border: 1px solid #111;
    font-size: 9pt;
    font-weight: 700;
    line-height: 1;
  }

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

  .print-table th,
  .print-table td {
    height: 0.24in;
    padding: 4px 6px;
    border: 1px solid #111;
    text-align: left;
    vertical-align: top;
  }

  .print-table th {
    background: #f2f2f2 !important;
    font-size: 8pt;
    text-transform: uppercase;
  }

  .print-table th:first-child,
  .print-table td:first-child {
    width: 0.55in;
  }

  .print-table th:nth-child(3),
  .print-table td:nth-child(3),
  .print-table th:nth-child(4),
  .print-table td:nth-child(4) {
    width: 1.05in;
  }

  .print-completion-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 7px;
  }

  .print-write-box {
    min-height: 1.2in;
    margin-top: 5px;
    padding: 5px;
    border: 1px solid #111;
    white-space: pre-line;
  }
}

/* BEGIN TEMP BUILD BADGE — safe to delete this whole block anytime.
   Pairs with the badge div in index.html and build-badge.js. Kept in an
   external stylesheet (not an inline style attribute) because both the
   website and the desktop app enforce a CSP that blocks inline styles. */
.build-badge {
  position: fixed;
  bottom: 8px;
  right: 8px;
  z-index: 99999;
  font: 11px/1.4 system-ui, sans-serif;
  background: rgba(20, 20, 20, 0.72);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.15s;
  display: none;
}
.build-badge--visible {
  display: block;
}
.build-badge--visible:hover {
  opacity: 1;
}
/* END TEMP BUILD BADGE */
