:root {
  color-scheme: light;
  --ink: #191c1d;
  --muted: #686b68;
  --clay: #c3482d;
  --clay-dark: #a93a24;
  --limestone: #f5f1eb;
  --surface: #fffefc;
  --surface-muted: #f0ede7;
  --border: #d7d2ca;
  --green: #2e6b43;
  --green-soft: #e2eee3;
  --amber: #76561d;
  --amber-soft: #f7e8ca;
  --shadow: 0 18px 50px -32px rgba(64, 46, 37, 0.38);
  --header-height: 72px;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--limestone);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--limestone);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--clay) 70%, white);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.brand img {
  flex: 0 0 auto;
}

.brand-compact {
  font-size: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--clay);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 120ms ease;
}

.button:active,
.capture-button:active,
.customer-row:active,
.recent-item:active {
  transform: translateY(1px) scale(0.99);
}

.button-primary {
  background: var(--clay);
  color: white;
}

.button-primary:hover {
  background: var(--clay-dark);
}

.button-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: #bcb5ab;
  background: var(--surface-muted);
}

.text-button,
.back-button {
  border: 0;
  background: transparent;
  color: var(--clay);
  font-weight: 700;
  cursor: pointer;
}

/* Landing */

.landing-page {
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.82), transparent 32%),
    var(--limestone);
}

.landing-header {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(1320px, calc(100% - 64px));
  height: 88px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.header-login {
  border-bottom: 2px solid var(--clay);
  padding: 8px 0 5px;
  font-weight: 700;
}

.landing-main {
  display: grid;
  width: min(1320px, calc(100% - 64px));
  min-height: calc(100dvh - 88px);
  grid-template-columns: minmax(0, 1.45fr) minmax(380px, 0.55fr);
  margin: 0 auto;
}

.hero {
  display: flex;
  min-height: 720px;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--border);
  padding: 72px 9vw 60px 32px;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(56px, 6.4vw, 94px);
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.hero-lead {
  margin: 30px 0 0;
  color: #353937;
  font-size: clamp(20px, 2vw, 27px);
  letter-spacing: -0.02em;
  line-height: 1.34;
}

.brick-line {
  display: grid;
  width: 242px;
  grid-template-columns: repeat(5, 42px);
  grid-auto-rows: 30px;
  gap: 6px;
  margin: 68px 0 50px 62px;
}

.brick-line span {
  border: 2px solid var(--clay);
}

.brick-line span:nth-child(1) {
  grid-column: 3;
}

.brick-line span:nth-child(2) {
  grid-column: 2;
}

.brick-line span:nth-child(3) {
  grid-column: 3;
}

.brick-line span:nth-child(4) {
  grid-column: 4;
}

.brick-line span:nth-child(5) {
  grid-column: 1;
}

.brick-line span:nth-child(6) {
  grid-column: 2;
}

.brick-line span:nth-child(7) {
  grid-column: 3;
}

.brick-line span:nth-child(8) {
  grid-column: 4;
}

.brick-line span:nth-child(9) {
  grid-column: 5;
}

.proof-line {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.proof-line span {
  display: flex;
  align-items: center;
  gap: 22px;
}

.proof-line span:not(:last-child)::after {
  width: 22px;
  height: 1px;
  background: var(--border);
  content: "";
}

.login-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 32px 80px 56px;
}

.login-card {
  display: grid;
  width: min(100%, 390px);
  gap: 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 254, 252, 0.82);
  box-shadow: var(--shadow);
  padding: 34px;
}

.login-card h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.form-intro {
  margin: 7px 0 0;
  color: var(--muted);
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label {
  font-size: 14px;
  font-weight: 700;
}

.field-group > input,
.input-shell {
  min-height: 50px;
  border: 1px solid #bdb8b0;
  border-radius: 7px;
  background: var(--surface);
}

.field-group > input {
  width: 100%;
  padding: 0 14px;
  color: var(--ink);
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}

.input-shell svg {
  width: 20px;
  fill: none;
  stroke: #5f625f;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.input-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.field-error {
  min-height: 0;
  margin: 0;
  color: #9c301e;
  font-size: 13px;
}

.field-error:empty {
  display: none;
}

.login-submit {
  width: 100%;
}

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

/* App shell */

.app-page {
  padding-bottom: 0;
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 254, 252, 0.96);
  backdrop-filter: blur(12px);
}

.app-header-inner {
  display: grid;
  width: min(1200px, calc(100% - 48px));
  height: 100%;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 0 auto;
}

.desktop-nav {
  display: flex;
  height: 100%;
  align-items: stretch;
  gap: 36px;
}

.desktop-nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: #313532;
  font-weight: 700;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  content: "";
}

.desktop-nav a.active {
  color: var(--clay);
}

.desktop-nav a.active::after {
  background: var(--clay);
}

.nav-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  margin-left: 6px;
  border-radius: 10px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 11px;
}

.profile-button {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 9px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.profile-button > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--ink);
  font-weight: 700;
}

.profile-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.profile-name {
  font-size: 14px;
  font-weight: 700;
}

.app-main {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0 72px;
}

.view {
  animation: view-in 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.view-heading h1,
.customer-header h1,
.capture-heading h1 {
  margin: 0;
  font-size: clamp(31px, 4vw, 42px);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.view-description {
  margin: 9px 0 0;
  color: var(--muted);
}

/* Capture */

.capture-view {
  display: grid;
  place-items: start center;
}

.capture-column {
  width: min(100%, 560px);
}

.capture-heading {
  align-items: center;
}

.location-status {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  padding: 0 13px;
  color: #4e524e;
  font-size: 14px;
  font-weight: 700;
}

.location-status.ready {
  color: var(--green);
}

.location-status svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.capture-actions {
  display: grid;
  gap: 16px;
}

.capture-button {
  display: grid;
  min-height: 148px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  box-shadow: 0 15px 30px -24px rgba(42, 28, 24, 0.58);
  transition: filter 160ms ease, transform 120ms ease;
}

.capture-button:hover {
  filter: brightness(0.96);
}

.capture-button svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.capture-button span {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.capture-button small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.photo-button {
  background: var(--clay);
}

.record-button {
  background: var(--green);
}

.record-button.recording {
  background: #8f3325;
}

.record-button.recording svg {
  animation: record-pulse 1.2s ease-in-out infinite;
}

@keyframes record-pulse {
  50% { transform: scale(0.92); opacity: 0.65; }
}

.recent-section {
  margin-top: 32px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title-row h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.recent-item {
  display: grid;
  width: 100%;
  grid-template-columns: 80px 1fr 24px;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.recent-copy {
  display: grid;
  gap: 4px;
}

.recent-copy strong {
  font-size: 16px;
}

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

.evidence-photo {
  display: block;
  height: 68px;
  border-radius: 5px;
  background-color: #a7583c;
  box-shadow: inset 0 0 0 1px rgba(50, 30, 23, 0.2);
}

.brick-photo {
  background-image:
    linear-gradient(90deg, transparent 47%, rgba(243, 220, 185, 0.85) 48%, rgba(243, 220, 185, 0.85) 52%, transparent 53%),
    linear-gradient(rgba(243, 220, 185, 0.9) 5%, transparent 6%, transparent 47%, rgba(243, 220, 185, 0.85) 48%, rgba(243, 220, 185, 0.85) 54%, transparent 55%),
    linear-gradient(135deg, #c17855, #8a412e);
  background-size: 44px 28px, 44px 28px, 100% 100%;
}

.arch-photo {
  background-image:
    linear-gradient(180deg, transparent 46%, #30291f 47%, #181818 57%, #72513e 58%),
    repeating-linear-gradient(0deg, transparent 0 17px, #e1c39d 18px 20px),
    repeating-linear-gradient(90deg, #a65137 0 26px, #e1c39d 27px 29px);
}

.chevron {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

/* Inbox */

.table-shell {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 16px 34px -32px rgba(56, 42, 32, 0.52);
}

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

.inbox-table th,
.inbox-table td {
  border-bottom: 1px solid var(--border);
  padding: 15px 18px;
  text-align: left;
  vertical-align: middle;
}

.inbox-table th {
  color: #4a4e4a;
  font-size: 12px;
  font-weight: 700;
}

.inbox-table td {
  font-size: 14px;
}

.inbox-table tbody tr {
  cursor: pointer;
  transition: background-color 140ms ease;
}

.inbox-table tbody tr:hover {
  background: #fbf8f3;
}

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

.inbox-table th:nth-child(1) { width: 78px; }
.inbox-table th:nth-child(2) { width: 31%; }
.inbox-table th:nth-child(3) { width: 22%; }
.inbox-table th:nth-child(4) { width: 18%; }
.inbox-table th:nth-child(5) { width: 130px; }
.inbox-table th:nth-child(6) { width: 48px; }

.type-icon {
  position: relative;
  display: inline-block;
  width: 25px;
  height: 25px;
  color: var(--ink);
}

.image-type::before {
  position: absolute;
  inset: 4px 2px 3px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
  content: "";
}

.image-type::after {
  position: absolute;
  right: 5px;
  bottom: 6px;
  width: 12px;
  height: 8px;
  background: currentColor;
  clip-path: polygon(0 100%, 42% 35%, 64% 63%, 78% 45%, 100% 100%);
  content: "";
}

.audio-type::before {
  position: absolute;
  top: 2px;
  left: 8px;
  width: 8px;
  height: 14px;
  border: 1.8px solid currentColor;
  border-radius: 5px;
  content: "";
}

.audio-type::after {
  position: absolute;
  top: 9px;
  left: 4px;
  width: 16px;
  height: 11px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  border-left: 1.8px solid currentColor;
  border-radius: 0 0 9px 9px;
  content: "";
}

.file-type::before {
  position: absolute;
  inset: 2px 4px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
  content: "";
}

.file-type::after {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 9px;
  height: 6px;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
}

.status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 7px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.status-processing {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-ready {
  background: var(--green-soft);
  color: var(--green);
}

.empty-state {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed var(--border);
  border-radius: 9px;
  text-align: center;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.empty-state p {
  margin-bottom: 10px;
  color: var(--muted);
}

/* Customers */

.customer-list {
  border-top: 1px solid var(--border);
}

.customer-row {
  display: grid;
  width: 100%;
  min-height: 96px;
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.7fr) 24px;
  align-items: center;
  gap: 24px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  padding: 18px 8px;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease, transform 120ms ease;
}

.customer-row:hover {
  background: rgba(255, 254, 252, 0.5);
}

.customer-main,
.customer-activity {
  display: grid;
  gap: 4px;
}

.customer-main strong {
  font-size: 18px;
}

.customer-main span,
.customer-activity span {
  color: var(--muted);
  font-size: 13px;
}

.customer-activity strong {
  font-size: 14px;
}

/* Customer detail */

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  color: #4b4f4c;
  font-size: 13px;
}

.back-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.customer-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.customer-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 30px;
  margin-top: 28px;
  border-bottom: 1px solid var(--border);
}

.tabs button {
  position: relative;
  border: 0;
  background: transparent;
  padding: 12px 2px 14px;
  color: #474b48;
  font-weight: 700;
  cursor: pointer;
}

.tabs button[aria-selected="true"] {
  color: var(--clay);
}

.tabs button[aria-selected="true"]::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: var(--clay);
  content: "";
}

.timeline {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-left: 54px;
}

.timeline::before {
  position: absolute;
  top: 19px;
  bottom: 19px;
  left: 20px;
  width: 1px;
  background: var(--border);
  content: "";
}

.evidence-card {
  position: relative;
  display: grid;
  min-height: 124px;
  grid-template-columns: 112px minmax(0, 1.3fr) minmax(180px, 0.7fr);
  align-items: stretch;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.timeline-icon {
  position: absolute;
  top: 18px;
  left: -48px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 3px solid var(--limestone);
  border-radius: 50%;
  background: var(--clay);
}

.timeline-icon::before,
.timeline-icon::after {
  position: absolute;
  content: "";
}

.camera-timeline::before {
  width: 14px;
  height: 10px;
  border: 1.5px solid white;
  border-radius: 2px;
}

.camera-timeline::after {
  width: 4px;
  height: 4px;
  border: 1px solid white;
  border-radius: 50%;
}

.audio-timeline {
  background: var(--green);
}

.audio-timeline::before {
  width: 7px;
  height: 12px;
  border: 1.5px solid white;
  border-radius: 5px;
}

.audio-timeline::after {
  top: 8px;
  width: 13px;
  height: 11px;
  border-right: 1.5px solid white;
  border-bottom: 1.5px solid white;
  border-left: 1.5px solid white;
  border-radius: 0 0 7px 7px;
}

.evidence-card .evidence-photo {
  width: 112px;
  height: 100%;
  min-height: 98px;
}

.evidence-content {
  display: grid;
  align-content: center;
  gap: 10px;
}

.evidence-no-photo {
  grid-column: 1 / 3;
}

.evidence-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.evidence-title-row h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.015em;
}

.evidence-title-row span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.evidence-content blockquote {
  margin: 0;
  color: #454945;
  font-size: 14px;
  line-height: 1.45;
}

.ai-copy {
  display: grid;
  align-content: center;
  gap: 8px;
  border-left: 1px solid var(--border);
  padding-left: 18px;
}

.ai-copy span {
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.ai-copy p {
  margin: 0;
  color: #434743;
  font-size: 13px;
  line-height: 1.4;
}

/* Mobile navigation and dialogs */

.mobile-nav {
  display: none;
}

.customer-dialog {
  width: min(92vw, 500px);
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 0;
}

.customer-dialog::backdrop {
  background: rgba(25, 28, 29, 0.42);
  backdrop-filter: blur(2px);
}

.dialog-card {
  display: grid;
  gap: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 28px;
}

.dialog-heading,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dialog-heading h2 {
  margin: 0;
  font-size: 26px;
}

.dialog-actions {
  justify-content: end;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
}

.icon-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.toast {
  position: fixed;
  z-index: 30;
  right: 24px;
  bottom: 24px;
  max-width: min(380px, calc(100vw - 32px));
  border: 1px solid #b7cbb9;
  border-radius: 8px;
  background: var(--green-soft);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  color: #224d32;
  font-weight: 700;
}

@media (max-width: 900px) {
  .landing-main {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
  }

  .hero {
    padding-left: 8px;
    padding-right: 5vw;
  }

  .login-zone {
    padding-left: 28px;
    padding-right: 0;
  }

  .app-header-inner,
  .app-main {
    width: min(100% - 32px, 1200px);
  }

  .desktop-nav {
    gap: 20px;
  }

  .profile-name {
    display: none;
  }

  .evidence-card {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .evidence-card .evidence-photo {
    width: 94px;
  }

  .ai-copy {
    grid-column: 2;
    border-top: 1px solid var(--border);
    border-left: 0;
    padding-top: 12px;
    padding-left: 0;
  }

  .evidence-no-photo {
    grid-column: 1 / 3;
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: 64px;
  }

  .landing-header {
    width: calc(100% - 32px);
    height: 72px;
  }

  .landing-header .brand {
    font-size: 22px;
  }

  .landing-main {
    display: block;
    width: 100%;
  }

  .hero {
    min-height: auto;
    border-right: 0;
    padding: 108px 20px 17px;
  }

  .hero > .eyebrow {
    display: none;
  }

  .hero h1 {
    font-size: clamp(36px, 10.5vw, 42px);
    line-height: 1.06;
  }

  .hero-lead {
    margin-top: 24px;
    font-size: 18px;
  }

  .brick-line {
    margin-top: 38px;
    margin-bottom: 0;
    margin-left: 18px;
    transform: scale(0.84);
    transform-origin: left center;
  }

  .proof-line {
    display: none;
  }

  .login-zone {
    border-top: 1px solid var(--border);
    padding: 0 16px 72px;
  }

  .login-card {
    width: 100%;
    gap: 16px;
    padding: 20px;
  }

  .login-card h2 {
    font-size: 25px;
  }

  .login-card > .eyebrow,
  .login-card .form-intro,
  .login-hint {
    display: none;
  }

  .field-group {
    gap: 6px;
  }

  .field-group > input,
  .input-shell {
    min-height: 46px;
  }

  .app-page {
    padding-bottom: 82px;
  }

  .app-header {
    position: relative;
    background: var(--surface);
  }

  .app-header-inner {
    display: flex;
    width: calc(100% - 32px);
    justify-content: space-between;
  }

  .brand-compact {
    font-size: 21px;
  }

  .desktop-nav,
  .profile-name,
  .desktop-only {
    display: none !important;
  }

  .profile-button > span:first-child {
    width: 36px;
    height: 36px;
  }

  .app-main {
    width: 100%;
    padding: 26px 16px 32px;
  }

  .view-heading {
    align-items: center;
    margin-bottom: 22px;
  }

  .view-heading h1,
  .customer-header h1,
  .capture-heading h1 {
    font-size: 32px;
  }

  .view-description {
    display: none;
  }

  .capture-heading {
    display: grid;
    align-items: stretch;
  }

  .location-status {
    min-height: 46px;
    justify-content: flex-start;
    grid-row: 2;
  }

  .capture-button {
    min-height: 134px;
  }

  .capture-button span {
    font-size: 21px;
  }

  .recent-item {
    grid-template-columns: 68px 1fr 20px;
    gap: 12px;
  }

  .recent-item .evidence-photo {
    height: 64px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    min-height: 76px;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border);
    background: rgba(255, 254, 252, 0.98);
    padding: 7px max(10px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    backdrop-filter: blur(12px);
  }

  .mobile-nav a {
    position: relative;
    display: grid;
    min-height: 54px;
    place-items: center;
    align-content: center;
    gap: 3px;
    border-radius: 7px;
    color: #4f5350;
    font-size: 11px;
    font-weight: 700;
  }

  .mobile-nav a.active {
    color: var(--clay);
  }

  .mobile-nav svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.65;
  }

  .mobile-count {
    position: absolute;
    top: 2px;
    left: calc(50% + 10px);
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 2px solid var(--surface);
    border-radius: 9px;
    background: var(--clay);
    color: white;
    font-size: 9px;
  }

  .table-shell {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .inbox-table,
  .inbox-table tbody {
    display: grid;
    gap: 10px;
  }

  .inbox-table thead {
    display: none;
  }

  .inbox-table tr {
    position: relative;
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    padding: 13px 12px;
  }

  .inbox-table td {
    display: block;
    border: 0;
    padding: 0;
    font-size: 13px;
  }

  .inbox-table td:nth-child(1) {
    grid-row: 1 / 3;
  }

  .inbox-table td:nth-child(2) {
    grid-column: 2;
  }

  .inbox-table td:nth-child(3) {
    grid-column: 2;
    color: var(--muted);
  }

  .inbox-table td:nth-child(4) {
    display: none;
  }

  .inbox-table td:nth-child(5) {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .inbox-table td:nth-child(6) {
    display: none;
  }

  .status {
    padding-inline: 8px;
  }

  .customer-row {
    min-height: 90px;
    grid-template-columns: 1fr 20px;
    gap: 10px;
    padding-inline: 2px;
  }

  .customer-activity {
    display: none;
  }

  .customer-header {
    display: block;
  }

  .tabs {
    margin-top: 20px;
  }

  .timeline {
    gap: 12px;
    padding-left: 0;
  }

  .timeline::before,
  .timeline-icon {
    display: none;
  }

  .evidence-card {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
  }

  .evidence-card .evidence-photo {
    width: 82px;
    min-height: 90px;
  }

  .evidence-title-row {
    display: grid;
    gap: 3px;
  }

  .evidence-content blockquote {
    font-size: 13px;
  }

  .evidence-no-photo {
    grid-column: 1 / 3;
  }

  .ai-copy {
    grid-column: 1 / 3;
    gap: 4px;
  }

  .dialog-card {
    padding: 22px;
  }

  .dialog-actions .button {
    flex: 1;
  }

  .toast {
    right: 16px;
    bottom: 92px;
    left: 16px;
  }
}

/* Working app additions */

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #bdb8b0;
  border-radius: 7px;
  background: var(--surface);
  padding: 12px 14px;
  color: var(--ink);
  font: inherit;
}

.field-group label span,
.muted-copy {
  color: var(--muted);
  font-weight: 400;
}

.recent-list,
.reports-list {
  display: grid;
  gap: 10px;
}

.recent-preview {
  width: 80px;
  height: 68px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--surface-muted);
}

.recent-file {
  justify-self: center;
  transform: scale(1.35);
}

.row-error {
  display: block;
  max-width: 360px;
  margin-top: 4px;
  overflow: hidden;
  color: #9c301e;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-error {
  background: #f5ded8;
  color: #8d2d1f;
}

.customer-actions {
  display: flex;
  gap: 10px;
}

.case-overview {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(340px, 1.2fr);
  gap: 22px;
  margin-top: 28px;
}

.case-map,
.new-case-map {
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-muted);
}

.new-case-map {
  min-height: 170px;
}

.checklist-panel {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  padding: 20px;
}

.checklist-panel h2 {
  margin: 0;
  font-size: 22px;
}

.checklist-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.checklist-form input {
  min-width: 0;
  min-height: 48px;
  border: 1px solid #bdb8b0;
  border-radius: 7px;
  padding: 0 13px;
}

.checklist {
  display: grid;
  gap: 2px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
}

.checklist label {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checklist input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}

.checklist input:checked + span {
  color: var(--muted);
  text-decoration: line-through;
}

.checklist .icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  color: var(--muted);
  font-size: 22px;
}

.checklist-empty {
  justify-content: flex-start !important;
  color: var(--muted);
  font-size: 14px;
}

.evidence-card-live {
  grid-template-columns: 150px minmax(0, 1fr) minmax(150px, 0.42fr);
}

.evidence-media {
  display: grid;
  min-height: 112px;
  place-items: center;
  overflow: hidden;
  border-radius: 5px;
  background: var(--surface-muted);
}

.evidence-image {
  width: 100%;
  height: 100%;
  max-height: 190px;
  object-fit: cover;
}

.evidence-media audio {
  width: min(100%, 270px);
}

.evidence-content p {
  margin: 0;
  color: #454945;
  font-size: 14px;
}

.file-link {
  color: var(--clay);
  font-weight: 700;
  text-align: center;
}

.ai-copy .status {
  width: max-content;
  text-transform: none;
}

.compact-empty {
  min-height: 260px;
  grid-column: 1 / -1;
}

.report-card {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  padding: 24px;
}

.report-card h2 {
  margin: 0;
}

.report-card pre {
  margin: 22px 0 0;
  overflow-wrap: anywhere;
  color: #343835;
  font: 14px/1.65 Arial, Helvetica, sans-serif;
  white-space: pre-wrap;
}

.guide-steps {
  display: grid;
  max-width: 820px;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-steps li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  padding: 25px 0;
}

.guide-steps li > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--clay);
  color: white;
  font-weight: 700;
}

.guide-steps h2,
.guide-steps p {
  margin: 0;
}

.guide-steps p {
  margin-top: 5px;
  color: var(--muted);
}

.guide-steps .text-button {
  margin-top: 10px;
  padding: 0;
}

.address-field {
  position: relative;
}

.field-help {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.address-suggestions {
  position: absolute;
  z-index: 1001;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.address-suggestions button {
  min-height: 46px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 9px 13px;
  text-align: left;
  cursor: pointer;
}

.address-suggestions button:hover,
.address-suggestions button:focus-visible {
  background: var(--surface-muted);
}

.toast[data-kind="error"] {
  border-color: #d9aaa0;
  background: #f5ded8;
  color: #7f271b;
}

.toast[data-kind="warning"] {
  border-color: #d7bd85;
  background: var(--amber-soft);
  color: var(--amber);
}

@media (max-width: 767px) {
  .mobile-nav {
    grid-template-columns: repeat(4, 1fr);
  }

  .customer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 18px;
  }

  .case-overview {
    grid-template-columns: 1fr;
  }

  .case-map {
    min-height: 210px;
  }

  .checklist-panel {
    padding: 16px;
  }

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

  .evidence-card-live {
    grid-template-columns: 1fr;
  }

  .evidence-media,
  .evidence-content,
  .evidence-card-live .ai-copy {
    grid-column: 1;
  }

  .evidence-image {
    max-height: 280px;
  }

  .recent-preview {
    width: 68px;
    height: 64px;
  }

  .dialog-card {
    max-height: 90dvh;
    overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
