:root {
  --bg: #f4f6f7;
  --panel: #ffffff;
  --panel-strong: #fdfdfb;
  --text: #202427;
  --muted: #687176;
  --line: #dfe5e7;
  --line-strong: #c7d1d5;
  --teal: #146c68;
  --teal-soft: #dcefed;
  --amber: #b46b18;
  --amber-soft: #fff0da;
  --blue: #285f9f;
  --blue-soft: #e3effc;
  --green: #227348;
  --green-soft: #e2f2e8;
  --red: #b33d35;
  --red-soft: #fbe5e2;
  --ink: #182022;
  --shadow: 0 16px 40px rgba(31, 42, 46, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(244, 246, 247, 0.88)),
    var(--bg);
  color: var(--text);
}

body.auth-locked .app-shell {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 252px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 28px;
  border-right: 1px solid var(--line);
  background: #fbfcfc;
  padding: 22px 16px;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #badbd8;
  border-radius: 8px;
  background: linear-gradient(135deg, #e5f6f4, #ffffff 58%, #ffe8c5);
  color: var(--teal);
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #394146;
  padding: 10px 12px;
  text-align: left;
}

.nav-item:hover {
  border-color: var(--line);
  background: #ffffff;
}

.nav-item.active {
  border-color: #b9d9d5;
  background: var(--teal-soft);
  color: #0d5451;
  font-weight: 700;
}

.nav-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  background: #eef3f4;
  color: #4b5960;
  font-size: 13px;
  font-weight: 800;
}

.nav-item.active .nav-icon {
  background: #ffffff;
  color: var(--teal);
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}

.sidebar-footer strong {
  color: var(--green);
}

.workspace {
  min-width: 0;
  padding: 22px 28px 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.topbar h2 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.15;
}

.topbar-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.search-box {
  display: grid;
  gap: 5px;
  min-width: 260px;
  color: var(--muted);
  font-size: 12px;
}

.user-switcher {
  display: grid;
  gap: 5px;
  min-width: 170px;
  color: var(--muted);
  font-size: 12px;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  padding: 10px 11px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #6ab3ad;
  box-shadow: 0 0 0 3px rgba(20, 108, 104, 0.15);
}

.button,
.icon-button,
.status-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 12px;
  font-weight: 700;
  line-height: 1.1;
}

.button.primary {
  background: var(--teal);
  color: #ffffff;
}

.button.primary:hover {
  background: #0f5c58;
}

.button.ghost {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--text);
}

.button.ghost:hover {
  background: #f7fafb;
}

.icon-button {
  width: 36px;
  padding: 0;
  border-color: var(--line);
  background: #ffffff;
  color: var(--muted);
}

.view {
  min-width: 0;
}

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

.metric {
  grid-column: span 3;
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
  box-shadow: var(--shadow);
}

.metric .label {
  color: var(--muted);
  font-size: 13px;
}

.metric .value {
  margin: 8px 0 6px;
  color: var(--ink);
  font-size: 31px;
  font-weight: 800;
}

.metric .trend {
  color: var(--muted);
  font-size: 13px;
}

.metric.teal {
  border-top: 4px solid var(--teal);
}

.metric.amber {
  border-top: 4px solid var(--amber);
}

.metric.blue {
  border-top: 4px solid var(--blue);
}

.metric.red {
  border-top: 4px solid var(--red);
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.panel-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.panel-header span {
  color: var(--muted);
  font-size: 13px;
}

.panel-body {
  padding: 14px 16px 16px;
}

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

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

.work-item {
  display: grid;
  min-width: 0;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  padding: 12px;
}

.work-item-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.work-item h4 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.work-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.chip.teal {
  border-color: #b9d9d5;
  background: var(--teal-soft);
  color: #0f5c58;
}

.chip.amber {
  border-color: #f1d2a8;
  background: var(--amber-soft);
  color: #8a4d0e;
}

.chip.blue {
  border-color: #bed4ee;
  background: var(--blue-soft);
  color: #214f83;
}

.chip.green {
  border-color: #b9dfc7;
  background: var(--green-soft);
  color: #1b5c38;
}

.chip.red {
  border-color: #efc4bf;
  background: var(--red-soft);
  color: #913028;
}

.chip.gray {
  border-color: var(--line);
  background: #eef2f3;
  color: #465158;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

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

.segmented {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
}

.segmented button {
  min-height: 36px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 8px 11px;
  font-weight: 700;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  background: var(--ink);
  color: #ffffff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

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

.data-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.data-table td {
  color: var(--text);
  font-size: 14px;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.table-scroll {
  overflow-x: auto;
}

.name-cell {
  display: grid;
  gap: 4px;
  min-width: 150px;
}

.name-cell strong {
  color: var(--ink);
}

.name-cell span {
  color: var(--muted);
  font-size: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 6px;
}

.work-item .actions .status-button {
  flex: 1 1 118px;
  min-width: 0;
  white-space: normal;
}

.work-item .actions {
  display: grid;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  justify-self: stretch;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.work-item .actions .status-button {
  width: 100%;
}

.status-button {
  min-height: 31px;
  min-width: 0;
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--text);
  padding: 7px 9px;
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.status-button:hover {
  background: #f4f7f8;
}

.status-button.active {
  border-color: #b9d9d5;
  background: var(--teal-soft);
  color: #0f5c58;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.pipeline-column {
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.pipeline-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}

.pipeline-column h4 {
  margin: 0;
  font-size: 13px;
}

.pipeline-column .list {
  padding: 10px;
}

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

.calendar-navigation {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-navigation .button {
  min-height: 36px;
}

.calendar-week-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.calendar-week {
  display: grid;
  min-width: 1120px;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  background: #ffffff;
}

.calendar-day {
  min-height: 510px;
  border-right: 1px solid var(--line);
  background: #fbfcfc;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.calendar-day:last-child {
  border-right: 0;
}

.calendar-day.drag-over {
  background: #eaf6f4;
  box-shadow: inset 0 0 0 2px var(--teal);
}

.calendar-day-header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  padding: 9px;
}

.calendar-day-header div {
  display: grid;
  gap: 2px;
}

.calendar-day-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-day-header strong {
  color: var(--ink);
  font-size: 20px;
}

.calendar-day.today .calendar-day-header {
  background: var(--teal-soft);
}

.calendar-day.today .calendar-day-header strong {
  color: var(--teal);
}

.calendar-day-events {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 8px;
}

.calendar-day-empty {
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.calendar-event {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  background: #ffffff;
  padding: 9px;
  box-shadow: 0 4px 12px rgba(31, 42, 46, 0.06);
}

.calendar-event.measurement {
  border-left-color: var(--teal);
}

.calendar-event.installation {
  border-left-color: var(--green);
}

.calendar-event.recheck {
  border-left-color: var(--amber);
}

.calendar-event[draggable="true"] {
  cursor: grab;
}

.calendar-event.dragging {
  opacity: 0.45;
}

.calendar-event-time {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.calendar-event button {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.calendar-event button strong,
.calendar-event button span {
  overflow-wrap: anywhere;
}

.calendar-event button strong {
  color: var(--ink);
  font-size: 13px;
}

.calendar-event button span {
  color: var(--muted);
  font-size: 11px;
}

.calendar-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding: 0 0 10px;
}

.calendar-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.calendar-date {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
  text-align: center;
}

.calendar-date strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.calendar-date span {
  color: var(--muted);
  font-size: 11px;
}

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

.progress-row {
  display: grid;
  gap: 6px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ecee;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.bar .teal {
  background: var(--teal);
}

.bar .amber {
  background: var(--amber);
}

.bar .blue {
  background: var(--blue);
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.modal {
  width: min(760px, calc(100vw - 24px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
}

.modal::backdrop {
  background: rgba(21, 30, 32, 0.46);
}

.modal-panel {
  background: #ffffff;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
}

.modal-header h3 {
  margin: 0;
}

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

.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-grid .span-2 {
  grid-column: span 2;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 14px 18px 18px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.section-stack {
  display: grid;
  gap: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 14px;
}

.detail-sidebar {
  display: grid;
  gap: 10px;
  align-self: start;
}

.detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.detail-card h4,
.form-section h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
}

.detail-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.detail-stat:last-child {
  border-bottom: 0;
}

.detail-stat strong {
  color: var(--ink);
}

.mobile-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  align-items: start;
  gap: 12px;
}

.measurement-lines {
  display: grid;
  gap: 8px;
}

.measurement-line {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(3, minmax(70px, 90px)) minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 9px;
  font-size: 13px;
}

.money-strong {
  color: var(--green);
  font-size: 16px;
  font-weight: 800;
}

.balance-due {
  color: var(--red);
  font-weight: 800;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.photo-tile {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.photo-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eef2f3;
}

.photo-tile div {
  display: grid;
  gap: 2px;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}

.photo-tile strong {
  color: var(--ink);
}

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

.form-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

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

.inline-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.inline-form-grid .span-2 {
  grid-column: span 2;
}

.inline-form-grid .span-3 {
  grid-column: span 3;
}

.quote-preview {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 12px;
}

.quote-preview strong {
  color: var(--ink);
}

.quote-estimate-meta {
  display: grid;
  gap: 5px;
}

.quote-estimate-meta span {
  color: var(--muted);
  font-size: 12px;
}

.quote-price-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quote-price-comparison div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  padding: 10px;
}

.quote-price-comparison div:last-child {
  border-color: #9acbc7;
  background: #edf8f6;
}

.quote-price-comparison span,
.quote-price-comparison small {
  color: var(--muted);
  font-size: 11px;
}

.quote-price-comparison strong {
  font-size: 18px;
}

.payment-quote-list {
  display: grid;
  gap: 10px;
}

.payment-quote {
  padding: 0;
}

.payment-quote-toggle {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 16px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  padding: 14px;
  text-align: left;
}

.payment-quote-toggle:hover {
  background: #f7fafb;
}

.payment-quote-main,
.payment-amounts {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.payment-quote-main strong {
  overflow-wrap: anywhere;
}

.payment-quote-main small,
.payment-amounts small {
  color: var(--muted);
}

.payment-amounts {
  justify-items: end;
  text-align: right;
}

.payment-chevron {
  color: var(--muted);
  font-size: 18px;
  text-align: center;
}

.payment-history {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: #f8fafb;
  padding: 14px;
}

.payment-history > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.payment-history > header span {
  color: var(--muted);
  font-size: 12px;
}

.payment-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.payment-history-row > div {
  display: grid;
  gap: 3px;
}

.payment-history-row span {
  color: var(--muted);
  font-size: 12px;
}

.payment-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.payment-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 12px;
}

.payment-summary > div {
  display: grid;
  gap: 3px;
}

.payment-summary span {
  color: var(--muted);
  font-size: 11px;
}

.payment-summary strong {
  overflow-wrap: anywhere;
  color: var(--ink);
}

.payment-summary-balance strong {
  color: var(--red);
}

.payment-summary p {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.print-note {
  color: var(--muted);
  font-size: 12px;
}

.danger-zone {
  border-color: #efc4bf;
  background: #fff8f7;
}

.small-input {
  max-width: 140px;
}

.nowrap {
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(244, 246, 247, 0.88);
  padding: 18px;
}

.login-panel {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.18);
  padding: 22px;
}

.login-panel h2 {
  margin: 0 0 6px;
  color: var(--ink);
}

.login-panel p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.login-panel form {
  display: grid;
  gap: 12px;
}

.login-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-error {
  min-height: 18px;
  color: var(--red);
  font-size: 13px;
}

.production-mode .topbar-actions [data-action="new-request"],
.production-mode .topbar-actions [data-action="reset-demo"],
.production-mode .user-switcher {
  display: none;
}

@media print {
  body {
    background: #ffffff;
  }

  .sidebar,
  .topbar,
  .toolbar,
  .actions,
  .modal {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .workspace {
    padding: 0;
  }

  .panel {
    border: 0;
    box-shadow: none;
  }
}

@media (max-width: 1060px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    gap: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .sidebar-footer {
    display: none;
  }

  .workspace {
    padding: 18px;
  }

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

  .topbar-actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .search-box {
    min-width: min(100%, 360px);
  }

  .user-switcher {
    min-width: min(100%, 260px);
  }

  .metric {
    grid-column: span 6;
  }

  .span-4,
  .span-5,
  .span-7,
  .span-8 {
    grid-column: span 12;
  }

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

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

  .inline-form-grid .span-3 {
    grid-column: span 2;
  }

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

@media (max-width: 680px) {
  .sidebar {
    padding: 14px;
  }

  .brand h1 {
    font-size: 16px;
  }

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

  .nav-item {
    padding: 9px 10px;
  }

  .workspace {
    padding: 14px;
  }

  .topbar h2 {
    font-size: 22px;
  }

  .topbar-actions,
  .button {
    width: 100%;
  }

  .metric {
    grid-column: span 12;
  }

  .panel-header,
  .work-item-header,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .form-grid .span-2 {
    grid-column: span 1;
  }

  .inline-form-grid {
    grid-template-columns: 1fr;
  }

  .inline-form-grid .span-2,
  .inline-form-grid .span-3 {
    grid-column: span 1;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .button {
    width: 100%;
  }

  .calendar-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .calendar-navigation {
    width: 100%;
  }

  .calendar-navigation .button {
    width: auto;
    flex: 1;
  }

  .quote-price-comparison,
  .payment-summary {
    grid-template-columns: 1fr;
  }

  .payment-summary p {
    grid-column: span 1;
  }

  .payment-quote-toggle {
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 10px;
  }

  .payment-amounts {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-items: start;
    text-align: left;
  }

  .payment-chevron {
    grid-column: 2;
    grid-row: 1;
  }

  .payment-history > header,
  .payment-history-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .measurement-line {
    grid-template-columns: 1fr;
  }
}
