:root {
  --ink: #393e3f;
  --muted: #697074;
  --line: #cdd6d8;
  --panel: #ffffff;
  --wash: #edf7f9;
  --brand: #393e3f;
  --brand-dark: #252a2b;
  --accent: #b39c5f;
  --danger: #b91c1c;
  --ok: #2f7d49;
  --focus: #2563eb;
  --soft-blue: #edf7f9;
  --stone: #909596;
  --gold: #b39c5f;
  --charcoal: #393e3f;
  --shadow: 0 12px 34px rgba(57, 62, 63, .09);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--wash);
}
a { color: var(--brand-dark); }
button, input, select, textarea {
  font: inherit;
}
button {
  border: 1px solid var(--charcoal);
  background: var(--charcoal);
  color: white;
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
button.secondary { background: white; color: var(--ink); border-color: var(--line); }
button.success { background: var(--ok); border-color: var(--ok); color: white; }
button.warn {
  background: #fff1f1;
  border-color: #f3b7b7;
  color: #9f1717;
}
button:disabled { opacity: .45; cursor: not-allowed; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 6px;
  min-height: 39px;
  padding: 8px 10px;
}
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--gold);
}
textarea { min-height: 80px; resize: vertical; }
label { display: grid; gap: 5px; color: var(--muted); font-size: 13px; }
label span { color: var(--ink); font-weight: 650; }
.required-label > span::after {
  content: " *";
  color: var(--danger);
}
.field-missing input,
.field-missing select,
.field-missing textarea,
.field-missing .money-input {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 2px rgba(185, 28, 28, .08);
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid #2c3031;
  background: #393e3f;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 -4px 0 #b39c5f;
  position: sticky;
  top: 0;
  z-index: 2;
}
.impersonation-banner {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
  color: #7c2d12;
  font-size: 14px;
}
.impersonation-banner button {
  min-height: 30px;
  padding: 4px 10px;
}
.brand {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  flex: 0 0 auto;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 0;
  min-height: auto;
  font-size: 16px;
  white-space: nowrap;
}
.brand img {
  display: block;
  width: 176px;
  max-width: min(42vw, 176px);
  height: auto;
  flex: 0 0 auto;
}
.brand span {
  color: #b39c5f;
  font-size: 14px;
  font-weight: 750;
  margin-left: 0;
  white-space: nowrap;
  line-height: 1;
  transform: translateY(1px);
}
.brand:hover span { color: #9adff1; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.mobile-nav { display: none; }
.nav a {
  color: #edf7f9;
  text-decoration: none;
  border: 1px solid rgba(237, 247, 249, .2);
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 14px;
  background: rgba(255, 255, 255, .04);
}
.nav a.active, .nav a:hover { border-color: rgba(237, 247, 249, .35); background: rgba(237, 247, 249, .16); color: white; }
.notification-bell {
  display: inline-flex;
  align-items: center;
  color: #edf7f9;
  text-decoration: none;
  border: 1px solid rgba(237, 247, 249, .22);
  border-radius: 10px;
  padding: 5px;
  min-height: 34px;
  min-width: 42px;
  background: rgba(255, 255, 255, .06);
  font-size: 13px;
  justify-content: center;
}
.notification-bell strong {
  min-width: 28px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--wash);
  color: var(--muted);
  font-size: 12px;
}
.notification-bell.has-unread {
  border-color: rgba(154, 223, 241, .55);
  background: rgba(154, 223, 241, .15);
}
.notification-bell.has-unread strong {
  background: #9adff1;
  color: #263032;
}
.notification-bell.has-urgent {
  border-color: #fecaca;
  background: #fef2f2;
}
.notification-bell.has-urgent strong {
  background: var(--danger);
  color: white;
}
.topbar-search {
  width: clamp(132px, 18vw, 230px);
}
.topbar-search input {
  min-height: 34px;
  border-radius: 999px;
  padding: 6px 12px;
  border-color: rgba(237, 247, 249, .22);
  background: white;
}
.nav-upload {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 6px;
  background: #edf7f9;
  border-color: #edf7f9;
  color: #393e3f;
}
.nav-signout {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 14px;
  background: rgba(255, 255, 255, .08);
  border-color: rgba(237, 247, 249, .28);
  color: #edf7f9;
}
.nav-more {
  position: relative;
}
.nav-more summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 14px;
}
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more[open] summary,
.nav-more summary:hover {
  border-color: var(--line);
  background: var(--wash);
}
.nav-more div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, .16);
  z-index: 4;
  display: grid;
  gap: 2px;
}
.nav-more div a {
  display: block;
}
.main { padding: 22px; max-width: 1380px; width: 100%; margin: 0 auto; flex: 1; }
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.breadcrumbs a,
.breadcrumbs span {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.breadcrumb-back {
  min-height: 32px;
  padding: 5px 10px;
}
.breadcrumb-separator {
  color: #a0a7b2;
}
.app-version {
  color: #8a9099;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  padding: 10px 12px 14px;
}
.narrow { max-width: 520px; margin: 10vh auto; background: white; border: 1px solid #d8e2e4; border-radius: 8px; padding: 28px; box-shadow: var(--shadow); }
.narrow h1, .page-title h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.12;
  color: var(--charcoal);
  font-weight: 850;
}
.login-install {
  margin-top: 10px;
}
.dashboard-user-name {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 750;
}
.rank-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
}
.rank-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #d8c997;
  background: #fbf8ef;
  color: #7a6429;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}
.page-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.section-title-row h3 { margin: 0; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.upload-review-form,
.review-question-list {
  grid-template-columns: 1fr;
}
.upload-review-form > *,
.review-question-list > * {
  grid-column: 1 / -1;
}
.field-action {
  display: grid;
  gap: 8px;
}
.field-action button {
  justify-self: stretch;
}
.card {
  background: white;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 0 rgba(57, 62, 63, .03);
}
.metric {
  display: grid;
  gap: 8px;
  min-height: 110px;
}
.metric strong { font-size: 30px; }
.admin-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.dashboard-panel {
  background: white;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.dashboard-panel h2 {
  margin: 0;
  font-size: 18px;
}
.dashboard-panel summary {
  cursor: pointer;
  font-weight: 750;
}
.queue-list,
.tool-grid {
  display: grid;
  gap: 8px;
}
.work-queue {
  display: grid;
  gap: 14px;
}
.queue-section {
  display: grid;
  gap: 12px;
}
.queue-section-needs {
  border-color: #fecaca;
  background: #fffafa;
}
.queue-section-export {
  border-color: #fde68a;
  background: #fffdf4;
}
.queue-count {
  min-width: 36px;
  min-height: 36px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.queue-accordion {
  padding: 0;
  overflow: hidden;
}
.queue-accordion > summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
}
.queue-accordion > summary::-webkit-details-marker { display: none; }
.queue-accordion > summary strong {
  min-width: 32px;
  min-height: 32px;
  border-radius: 999px;
  background: var(--wash);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.queue-accordion .table-wrap {
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
}
.queue-actions {
  padding: 0 16px 16px;
}
.queue-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafafa;
  color: var(--ink);
  text-decoration: none;
}
.queue-item strong {
  font-size: 22px;
}
.settings-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.settings-link-grid a {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafafa;
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
}
.settings-link-grid a:hover { background: var(--wash); }
.ai-key-status {
  display: grid;
  align-content: end;
  gap: 8px;
  min-height: 86px;
}
.ai-key-status span {
  font-weight: 750;
  font-size: 14px;
}
.ai-key-status strong {
  display: inline-flex;
  width: max-content;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.ai-key-status .saved {
  color: #276749;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
}
.ai-key-status .blank {
  color: #7f1d1d;
  border: 1px solid #fecaca;
  background: #fef2f2;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ai-actions { justify-content: flex-start; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--wash);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 550;
}
.status.ok { color: var(--ok); border-color: #bde7ca; background: #f0fbf3; }
.status.warn { color: #876d2d; border-color: #decf9c; background: #fbf8ef; }
.status.bad { color: #9f1717; border-color: #f3b7b7; background: #fff1f1; }
.table-wrap { overflow: auto; border: 1px solid #d8e2e4; border-radius: 8px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th, td { text-align: left; padding: 10px 11px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0; background: #f8fbfc; }
th.sortable {
  cursor: pointer;
  user-select: none;
}
th.sortable::after {
  content: "↕";
  margin-left: 6px;
  color: #a0a7b2;
  font-size: 10px;
}
th.sort-asc::after { content: "↑"; color: var(--ink); }
th.sort-desc::after { content: "↓"; color: var(--ink); }
tr:last-child td { border-bottom: 0; }
.subnav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.subnav a {
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 8px 12px;
}
.subnav a.active {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: white;
}
.client-projects {
  display: grid;
  gap: 14px;
}
.client-directory-board {
  display: grid;
  gap: 14px;
}
.client-active-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}
.client-active-card {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  background: #fbfdfe;
  padding: 12px;
}
.client-active-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
}
.client-active-card p { margin: 0; }
.project-work-board {
  display: grid;
  gap: 14px;
}
.project-search {
  min-width: min(100%, 320px);
}
.project-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}
.project-work-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  background: #fbfdfe;
  padding: 12px;
}
.project-card-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.project-card-main h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}
.project-card-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.project-card-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-ledger-list {
  display: grid;
  gap: 14px;
}
.project-ledger-card {
  background: #f4fbfc;
  border: 1px solid #cddcdf;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(57, 62, 63, .05);
}
.project-ledger-card[open] {
  background: #f4fbfc;
  border-color: rgba(179, 156, 95, .72);
  box-shadow: 0 5px 0 rgba(179, 156, 95, .18), var(--shadow);
}
.project-ledger-card > summary {
  list-style: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1.5fr) minmax(180px, .8fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  cursor: pointer;
  background: #fbf7ec;
  border-left: 6px solid #b39c5f;
  border-bottom: 1px solid rgba(179, 156, 95, .32);
}
.project-ledger-card > summary:hover {
  background: #f7efd9;
}
.project-ledger-card[open] > summary {
  background: #f3ead2;
  border-bottom-color: rgba(179, 156, 95, .68);
}
.project-ledger-card > summary:focus-visible {
  outline: 3px solid rgba(179, 156, 95, .42);
  outline-offset: -3px;
}
.project-ledger-card > summary::-webkit-details-marker,
.staff-ledger-card > summary::-webkit-details-marker { display: none; }
.project-ledger-card > summary::before {
  content: "▸";
  align-self: center;
}
.project-ledger-card[open] > summary::before { content: "▾"; }
.project-ledger-summary-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}
.project-ledger-summary-main strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.project-date-chip {
  font-weight: 800;
  color: var(--brand-dark);
  background: #ecfdf5;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}
.project-client-name {
  color: var(--muted);
  font-weight: 700;
}
.project-ledger-summary-tags,
.project-ledger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.project-ledger-actions button {
  min-height: 34px;
  padding: 5px 9px;
}
.project-ledger-body {
  display: grid;
  gap: 14px;
  border-top: 0;
  padding: 14px;
  background: #f4fbfc;
  box-shadow: inset 0 -2px 0 rgba(57, 62, 63, .08);
}
.project-ledger-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.project-ledger-metrics div {
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  background: white;
  padding: 10px;
}
.project-ledger-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.project-ledger-metrics strong {
  font-size: 20px;
}
.project-staff-section,
.staff-ledger-list,
.staff-ledger-details,
.project-source-section,
.source-ledger-list {
  display: grid;
  gap: 10px;
}
.project-source-section {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.project-source-section h3 {
  margin: 0;
}
.project-source-section p {
  margin: 0;
}
.source-ledger-card {
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  background: white;
  overflow: hidden;
}
.source-ledger-card > summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}
.source-ledger-card > summary span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.source-ledger-card > summary button {
  min-height: 32px;
  padding: 5px 10px;
}
.source-ledger-card > summary::-webkit-details-marker { display: none; }
.source-ledger-list {
  padding: 0 12px 10px;
}
.staff-ledger-card {
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  background: white;
  overflow: hidden;
}
.staff-ledger-card > summary {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
}
.staff-ledger-card > summary strong {
  font-size: 16px;
}
.staff-ledger-card > summary span {
  color: var(--muted);
  font-weight: 700;
}
.staff-ledger-details {
  padding: 0 12px 12px;
}
.staff-ledger-details h4 {
  margin: 4px 0;
  color: var(--muted);
}
.ledger-mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 8px 0;
}
.ledger-mini-row span:first-child {
  overflow-wrap: anywhere;
}
.is-hidden {
  display: none !important;
}
.hidden {
  display: none !important;
}
.client-project-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
}
.client-project-card > summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px;
  font-weight: 800;
  list-style: none;
}
.client-project-card > summary::-webkit-details-marker { display: none; }
.client-project-card > summary::before {
  content: "▸";
  margin-right: 8px;
}
.client-project-card[open] > summary::before { content: "▾"; }
.client-project-card > summary span { flex: 1; }
.client-project-card > summary small {
  color: var(--muted);
  font-weight: 650;
}
.client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 14px;
}
.client-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 16px 14px;
}
.client-detail-grid div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  min-width: 0;
  background: #fafafa;
}
.client-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}
.client-detail-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.project-group {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}
.project-group h3 {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}
.profile-form {
  align-items: start;
}
.profile-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfd;
}
.profile-section h2,
.profile-section h3 {
  margin: 0;
}
.profile-help {
  display: grid;
  gap: 5px;
}
.phone-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
  background: white;
}
.phone-field legend {
  padding: 0 4px;
  font-weight: 750;
}
.required-fieldset legend {
  color: var(--ink);
}
.rewards-block {
  display: grid;
  gap: 10px;
}
.rewards-grid {
  display: grid;
  gap: 8px;
}
.reward-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.client-contact-rows {
  display: grid;
  gap: 10px;
}
.client-contact-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fafafa;
}
.client-contact-row .wide {
  grid-column: 1 / -2;
}
.client-contact-row .remove-client-contact {
  align-self: end;
}
.add-reward-row {
  justify-self: start;
}
.profile-admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fafafa;
}
.profile-admin-panel summary {
  cursor: pointer;
  font-weight: 800;
}
.profile-admin-panel .profile-section {
  margin-top: 12px;
}
.profile-actions {
  justify-content: flex-end;
}
.upload-zone {
  border: 2px dashed #aab3bd;
  border-radius: 8px;
  background: white;
  padding: 24px;
  display: grid;
  gap: 12px;
  align-items: stretch;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.upload-type-card,
#uploadForm {
  width: min(100%, 1060px);
  margin-left: auto;
  margin-right: auto;
}
.upload-zone.drag-over {
  border-color: #9adff1;
  background: #edf7f9;
  box-shadow: inset 0 0 0 2px rgba(154, 223, 241, .35);
}
.upload-zone-heading {
  display: grid;
  gap: 6px;
}
.upload-zone-heading h2,
.upload-zone-heading p {
  margin: 0;
}
.upload-drop-copy {
  min-height: 156px;
  border: 1px dashed rgba(57, 62, 63, .18);
  border-radius: 6px;
  background: #fbfdfe;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
  padding: 18px;
  cursor: pointer;
}
.upload-drop-copy:focus-visible {
  outline: 3px solid rgba(154, 223, 241, .8);
  outline-offset: 3px;
}
.upload-zone input,
.upload-zone button {
  cursor: auto;
}
.upload-drop-copy strong {
  font-size: 18px;
}
.upload-drop-copy small {
  color: var(--muted);
}
.upload-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  color: #b39c5f;
  background: #edf7f9;
  border: 1px solid rgba(179, 156, 95, .35);
}
.upload-primary {
  width: 100%;
  justify-self: stretch;
}
.upload-add-button {
  width: 100%;
  justify-self: stretch;
}
.upload-type-chooser {
  display: grid;
  gap: 12px;
  padding: 4px 0 10px;
}
.upload-type-chooser h2 {
  margin: 0;
  font-size: 20px;
}
.upload-type-button-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.upload-type-choice {
  min-height: 58px;
  border: 1px solid rgba(179, 156, 95, .55);
  border-radius: 8px;
  background: #fbf8ef;
  color: var(--brand);
  font-weight: 800;
  text-align: left;
  padding: 12px 14px;
  box-shadow: 0 1px 0 rgba(57, 62, 63, .06);
}
.upload-type-choice:hover,
.upload-type-choice:focus {
  border-color: #b39c5f;
  background: #fffaf0;
}
.upload-pending-questions {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .62);
  padding: 16px;
  filter: blur(.35px);
  opacity: .72;
  pointer-events: none;
}
.upload-pending-questions p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}
.ai-waiting-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 260px;
  padding: 38px 18px;
  border: 1px solid rgba(141, 166, 176, .28);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fdfe, #edf7f9);
  text-align: center;
}
.ai-waiting-panel h2 {
  margin: 0;
  font-size: 24px;
}
.ai-waiting-panel p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}
.ai-waiting-loader {
  width: min(520px, 88%);
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(57, 62, 63, .09);
}
.ai-waiting-loader::after {
  content: "";
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(179, 156, 95, .35), var(--accent), rgba(141, 166, 176, .55));
  animation: aiWaiting 1.15s ease-in-out infinite;
}
@keyframes aiWaiting {
  0% { transform: translateX(-105%); }
  100% { transform: translateX(270%); }
}
.pending-question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pending-question-box,
.pending-question-line {
  height: 46px;
  border-radius: 7px;
  background: linear-gradient(90deg, #f3f7f8, #edf7f9);
  border: 1px solid rgba(57, 62, 63, .08);
}
.pending-question-line {
  height: 72px;
}
.pending-question-line.short {
  width: 64%;
  height: 20px;
}
.project-upload-field,
.receipt-inputs {
  display: grid;
  gap: 10px;
}
.receipt-inputs input[type="file"],
.document-file-inputs input[type="file"] {
  width: 100%;
}
.phone-save-reminder {
  display: block;
  max-width: 620px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.small-help {
  font-size: 12px;
  margin: 0;
}
.split {
  display: grid;
  grid-template-columns: minmax(360px, 48%) minmax(380px, 1fr);
  gap: 16px;
  align-items: start;
}
.preview {
  height: calc(100vh - 104px);
  min-height: 520px;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
  position: sticky;
  top: 78px;
  display: flex;
  flex-direction: column;
  color: white;
}
.preview iframe { width: 100%; flex: 1; min-height: 0; border: 0; background: white; }
.pdf-stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: white;
}
.pdf-stage object {
  display: block;
  width: 100%;
  min-height: 100%;
  height: 100%;
  border: 0;
  background: white;
}
.pdf-fallback {
  min-height: 420px;
  color: var(--ink);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
}
.preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px;
  background: rgba(17, 17, 17, .92);
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.preview-toolbar button {
  min-width: 48px;
  min-height: 42px;
  padding: 7px 10px;
}
.tool-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 7px 10px;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
}
.image-stage {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #0b0b0c;
  touch-action: pan-x pan-y pinch-zoom;
  cursor: default;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: auto;
}
.image-stage img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border: 0;
  background: white;
  user-select: none;
  display: block;
  margin: 0 auto;
}
.form-section { display: grid; gap: 12px; }
.wide { grid-column: 1 / -1; }
.compact-title { margin-bottom: 10px; }
.file-context-small {
  margin: 4px 0 0;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.inline { display: flex; gap: 10px; align-items: end; }
.inline > * { flex: 1; }
.checkbox { display: flex; gap: 9px; align-items: center; color: var(--ink); }
.checkbox input { width: auto; min-height: auto; }
.shared-expense,
.conditional-section,
.project-review-field,
.custom-questions,
.question-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 12px;
  background: #fafafa;
}
.custom-questions h3,
.question-field legend {
  margin: 0 0 8px;
  font-weight: 750;
}
.question-add-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fafafa;
}
.question-add-panel summary {
  cursor: pointer;
  font-weight: 750;
}
.question-add-panel form {
  margin-top: 14px;
}
.question-new-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(179, 156, 95, .45);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #fbf8ef;
}
.question-new-box div {
  display: grid;
  gap: 3px;
}
.question-new-box span {
  color: var(--muted);
}
.question-choice-editor {
  display: grid;
  gap: 10px;
}
.question-choice-list {
  display: grid;
  gap: 8px;
}
.question-choice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.question-choice-row input {
  min-width: 0;
}
.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.suggestion-chip {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.suggestion-chip span {
  overflow-wrap: anywhere;
}
.muted-chip {
  background: #f3f4f6;
}
.drag-handle {
  width: 1%;
  white-space: nowrap;
  cursor: grab;
  text-align: center;
  vertical-align: middle;
}
.drag-handle-icon {
  display: inline-block;
  position: relative;
  width: 28px;
  height: 22px;
}
.drag-handle-icon::before {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  top: 3px;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--ink);
  opacity: 0.78;
  box-shadow: 0 7px 0 var(--ink), 0 14px 0 var(--ink);
}
tr.dragging {
  opacity: 0.55;
}
.mention-menu {
  position: absolute;
  z-index: 90;
  display: none;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 14px 35px rgba(17, 24, 39, 0.18);
}
.mention-menu.show {
  display: grid;
}
.mention-menu button {
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  background: white;
  color: var(--ink);
  text-align: left;
}
.mention-menu button:hover {
  background: #eef6ff;
}
.question-field {
  margin: 0;
}
.choice-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.choice-button.selected {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}
.money-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  overflow: hidden;
}
.money-input span {
  min-width: 50px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink);
  font-weight: 750;
}
.money-input input {
  border: 0;
  border-radius: 0;
}
.ai-field .money-input {
  border-color: #93c5fd;
}
.currency-field {
  display: grid;
  gap: 8px;
}
#customCurrencyWrap {
  display: none;
}
#customCurrencyWrap.show {
  display: grid;
}
.currency-custom-wrap {
  display: none;
}
.currency-custom-wrap.show {
  display: grid;
}
.project-review-field {
  background: white;
}
.project-review-field.project-alert {
  border-color: #fecaca;
  background: #fff7f7;
}
.project-review-field.project-alert select {
  border-color: var(--danger);
  background: #fef2f2;
}
.project-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.review-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.footer-left { justify-self: start; }
.footer-middle { justify-self: center; }
.footer-right { justify-self: end; }
.admin-review-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(150px, .8fr);
  gap: 10px;
  align-items: stretch;
  justify-self: start;
  width: min(100%, 980px);
}
.admin-review-actions button {
  min-height: 48px;
}
.admin-review-actions button:first-child {
  font-weight: 750;
}
.review-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.receipt-count {
  color: var(--muted);
  font-weight: 750;
  min-width: 48px;
  text-align: center;
}
.top-review-nav {
  align-self: center;
}
.conditional-detail,
#approvedByTeamLeader,
#approvedByText {
  display: none;
}
.conditional-detail.show,
#approvedByTeamLeader.show,
#approvedByText.show {
  display: grid;
}
.shared-details {
  display: none;
  gap: 12px;
}
.shared-details.show { display: grid; }
.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.person-check {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 8px 10px;
}
.other-toggle { align-self: start; }
#otherPeopleBox { display: none; }
#otherPeopleBox.show { display: grid; }
.notice {
  border-left: 4px solid var(--gold);
  background: #fbf8ef;
  padding: 12px;
  border-radius: 6px;
}
.warning-notice {
  border-left-color: var(--accent);
  background: #fff7ed;
}
.danger-notice {
  border-left-color: var(--danger);
  background: #fef2f2;
}
.ai-notice {
  border-left-color: #8da6b0;
  background: #f2f8fa;
}
.ai-field span {
  color: var(--focus);
}
.ai-field input,
.ai-field select {
  border-color: #93c5fd;
  background: #f8fbff;
}
.review-progress {
  display: grid;
  gap: 7px;
}
.progress-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.progress-track {
  height: 9px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: inherit;
}
.fast-choice {
  align-self: end;
  min-width: 116px;
}
.duplicate-compare {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fafafa;
}
.duplicate-compare h3,
.portal-group h3 {
  margin: 0 0 10px;
}
.duplicate-card dl {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 4px 10px;
  margin: 10px 0;
}
.duplicate-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.duplicate-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.duplicate-modal {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.duplicate-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.duplicate-preview-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fafafa;
  min-width: 0;
}
.duplicate-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.duplicate-preview-panel dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 4px 10px;
  margin: 0 0 10px;
  font-size: 13px;
}
.duplicate-preview-panel dt {
  color: var(--muted);
  font-weight: 800;
}
.duplicate-preview-panel dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.duplicate-preview-frame {
  height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
  margin-bottom: 10px;
}
.duplicate-preview-frame .preview {
  position: static;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
}
.duplicate-preview-frame .image-stage,
.duplicate-preview-frame .pdf-stage {
  height: 100%;
}
.duplicate-preview-frame img {
  max-height: 100%;
  object-fit: contain;
}
.portal-groups {
  gap: 18px;
}
.loading {
  position: fixed;
  inset: 0;
  background: rgba(244,246,248,.96);
  display: none;
  place-items: center;
  z-index: 10;
  text-align: center;
}
.loading.show { display: grid; }
.wait-card {
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 24px;
}
.spinner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 5px solid #cbd5e1;
  border-top-color: var(--brand);
  animation: spin 1s linear infinite;
  margin: 0 auto 18px;
}
.small-spinner {
  width: 38px;
  height: 38px;
  border-width: 4px;
  margin-bottom: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { background: white; color: var(--ink); border-color: var(--line); }
.tabs button.active { background: var(--charcoal); border-color: var(--charcoal); color: white; }
.question-type-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.question-type-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 12px;
  align-items: center;
  min-height: 90px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
}
.question-type-card:hover {
  border-color: #9ca3af;
  background: #fafafa;
  text-decoration: none;
}
.question-type-label {
  min-width: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
}
.question-type-count {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}
.question-type-card.is-active {
  border-color: #d8c997;
  background: #fbf8ef;
  box-shadow: inset 4px 0 0 var(--gold), 0 1px 0 rgba(15, 23, 42, .04);
}
.question-type-card.is-active .question-type-label {
  color: var(--charcoal);
}
.question-type-card.is-active .question-type-count {
  background: white;
  color: #7a6429;
  border: 1px solid #d8c997;
}
.danger-text { color: var(--danger); font-weight: 700; }
.app-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(3px);
}
.app-modal {
  width: min(460px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .28);
  padding: 22px;
  display: grid;
  gap: 14px;
}
.app-modal h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}
.app-modal p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.app-modal-input {
  min-height: 46px;
}
.app-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 2px;
}
.app-modal-actions.three-choice {
  display: grid;
  grid-template-columns: 1fr;
}
.app-modal-actions.three-choice button {
  width: 100%;
  min-height: 48px;
}

@media (max-width: 850px) {
  .topbar {
    height: auto;
    min-height: 58px;
    align-items: center;
    padding: 12px;
    gap: 8px;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .main { padding: 14px; }
  .grid.two, .grid.three, .grid.four, .split, .admin-dashboard, .settings-link-grid { grid-template-columns: 1fr; }
  .topbar > .nav { display: none; }
  .mobile-nav {
    display: block;
    margin-left: auto;
    position: relative;
  }
  .mobile-nav summary {
    list-style: none;
    cursor: pointer;
    border: 1px solid rgba(237, 247, 249, .28);
    color: #edf7f9;
    border-radius: 6px;
    padding: 8px 13px;
    background: rgba(255, 255, 255, .08);
  }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(86vw, 320px);
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .24);
    z-index: 8;
    display: grid;
    gap: 8px;
  }
  .mobile-nav-panel a,
  .mobile-nav-panel button,
  .mobile-nav-panel .nav-upload {
    width: 100%;
    min-height: 38px;
    padding: 7px 8px;
    font-size: 14px;
    text-align: center;
    justify-content: center;
  }
  .mobile-nav-panel a {
    display: block;
    color: var(--ink);
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
  }
  .mobile-nav-panel a.active {
    border-color: #b39c5f;
    background: #fbf6e8;
  }
  .mobile-notification {
    display: flex !important;
    align-items: center;
    justify-content: space-between !important;
    gap: 10px;
  }
  .mobile-notification strong {
    min-width: 28px;
    min-height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #9adff1;
    color: #263032;
  }
  .mobile-notification.has-urgent strong {
    color: white;
    background: var(--danger);
  }
  .mobile-nav-panel .topbar-search { width: 100%; }
  .topbar-search input { width: 100%; }
  .brand { font-size: 18px; justify-content: flex-start; }
  .brand img { width: 172px; max-width: 72vw; }
  .upload-zone { padding: 18px; }
  .upload-drop-copy { min-height: 118px; padding: 16px; }
  .upload-type-button-grid,
  .pending-question-grid { grid-template-columns: 1fr; }
  .upload-type-choice { text-align: center; }
  .project-card-grid { grid-template-columns: 1fr; }
  .project-work-card { grid-template-columns: 1fr; }
  .project-work-card button { width: 100%; }
  .client-active-card { flex-direction: column; }
  .project-ledger-card > summary,
  .staff-ledger-card > summary,
  .ledger-mini-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .project-ledger-metrics { grid-template-columns: 1fr; }
  .project-ledger-actions button,
  .ledger-mini-row button { width: 100%; }
  .client-project-card > summary { align-items: flex-start; flex-direction: column; }
  .section-title-row { align-items: stretch; flex-direction: column; }
  .project-search { min-width: 0; }
  .preview {
    position: relative;
    top: auto;
    height: min(58vh, 480px);
    min-height: 340px;
  }
  .image-stage,
  .pdf-stage {
    overflow: hidden;
    touch-action: pan-y;
    overscroll-behavior-y: auto;
  }
  .image-stage img {
    width: 100% !important;
    height: 100%;
    object-fit: contain;
    background: #0b0b0c;
  }
  .pdf-stage object {
    pointer-events: none;
  }
  .preview-toolbar { justify-content: space-between; }
  .preview-toolbar button { flex: 1; }
  .tool-link { flex: 1 1 100%; }
  .check-list { grid-template-columns: 1fr; }
  .person-check { min-height: 46px; }
  .page-title { align-items: stretch; flex-direction: column; }
  .inline { flex-direction: column; align-items: stretch; }
  .fast-choice { width: 100%; }
  .duplicate-card dl { grid-template-columns: 1fr; }
  .review-footer { grid-template-columns: 1fr; }
  .footer-left, .footer-middle, .footer-right { justify-self: stretch; }
  .footer-left button, .footer-right button, .review-nav button, .admin-review-actions button { width: 100%; }
  .admin-review-actions { grid-template-columns: 1fr; }
  .review-nav { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; }
  .nav-more div { left: 0; right: auto; }
  .phone-field, .reward-row, .client-detail-grid, .client-contact-row { grid-template-columns: 1fr; }
  .client-contact-row .wide { grid-column: auto; }
  .app-modal { padding: 18px; }
  .app-modal-actions { display: grid; grid-template-columns: 1fr; }
  .app-modal-actions button { width: 100%; }
}
