@font-face {
  font-family: Manrope;
  src: url("./fonts/manrope.woff2") format("woff2");
  font-display: swap;
  font-weight: 200 800;
}
@font-face {
  font-family: Inter;
  src: url("./fonts/inter-regular.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}
@font-face {
  font-family: Inter;
  src: url("./fonts/inter-bold.woff2") format("woff2");
  font-display: swap;
  font-weight: 700;
}
:root {
  font-family: var(--expr-font-primary), ui-sans-serif, system-ui, sans-serif;
  color: var(--expr-text-on-light);
  background: var(--expr-bg-light);
}
* {
  box-sizing: border-box;
}
body {
  min-width: 320px;
  margin: 0;
  background: linear-gradient(
    116deg,
    var(--expr-bg-light) 0 73%,
    color-mix(in srgb, var(--expr-accent-brand) 5%, var(--expr-bg-light)) 100%
  );
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--expr-accent-brand);
  outline-offset: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.local-banner {
  padding: 7px 18px;
  background: color-mix(
    in srgb,
    var(--expr-bg-dark) 92%,
    var(--expr-accent-brand)
  );
  color: color-mix(
    in srgb,
    var(--expr-text-on-dark) 84%,
    var(--expr-surface-muted)
  );
  font:
    700 11px/1.25 var(--expr-font-secondary),
    sans-serif;
  letter-spacing: 0.045em;
  text-align: center;
}
.topbar {
  min-height: 78px;
  padding: 14px clamp(18px, 4vw, 58px);
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  background: var(--expr-bg-dark);
  color: var(--expr-text-on-dark);
}
.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  color: inherit;
  font:
    800 12px/1 var(--expr-font-secondary),
    sans-serif;
  letter-spacing: 0.085em;
  text-decoration: none;
  white-space: nowrap;
}
.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.title {
  padding-left: clamp(14px, 2vw, 30px);
  border-left: 1px solid
    color-mix(in srgb, var(--expr-text-on-dark) 22%, transparent);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.global-search {
  width: min(360px, 30vw);
  margin-left: auto;
}
.global-search input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid
    color-mix(in srgb, var(--expr-text-on-dark) 18%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--expr-text-on-dark) 8%, transparent);
  color: var(--expr-text-on-dark);
  font:
    500 13px var(--expr-font-secondary),
    sans-serif;
}
.global-search input::placeholder {
  color: color-mix(in srgb, var(--expr-text-on-dark) 60%, transparent);
}
.credit {
  color: color-mix(in srgb, var(--expr-text-on-dark) 62%, transparent);
  font:
    600 11px var(--expr-font-secondary),
    sans-serif;
  white-space: nowrap;
}
main {
  max-width: 1500px;
  min-height: calc(100vh - 108px);
  margin: auto;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 68px);
  padding: 34px clamp(18px, 4vw, 58px) 70px;
}
.sidebar {
  position: sticky;
  top: 22px;
  display: grid;
  align-content: start;
  gap: 7px;
  height: max-content;
  padding: 12px 0;
  border-top: 2px solid var(--expr-bg-dark);
}
.sidebar button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 62%,
    var(--expr-surface-muted)
  );
  cursor: pointer;
  font:
    700 14px var(--expr-font-secondary),
    sans-serif;
  text-align: left;
}
.sidebar button span {
  width: 16px;
  color: var(--expr-accent-brand);
  font-size: 15px;
  text-align: center;
}
.sidebar button:hover {
  background: color-mix(in srgb, var(--expr-primitive-white) 70%, transparent);
  color: var(--expr-text-on-light);
}
.sidebar button[aria-current="page"] {
  background: var(--expr-bg-dark);
  color: var(--expr-text-on-dark);
  box-shadow: 0 8px 18px
    color-mix(in srgb, var(--expr-bg-dark) 16%, transparent);
}
.sidebar button[aria-current="page"] span {
  color: var(--expr-accent);
}
.content {
  min-width: 0;
}
.view[hidden],
.load-state[hidden] {
  display: none;
}
.load-state,
.empty {
  padding: 22px;
  border: 1px solid
    color-mix(
      in srgb,
      var(--expr-surface-muted) 72%,
      var(--expr-primitive-white)
    );
  border-radius: 10px;
  background: var(--expr-primitive-white);
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 64%,
    var(--expr-surface-muted)
  );
  line-height: 1.5;
}
.empty-action {
  display: inline-flex;
  margin-top: 12px;
}
h1,
h2,
h3 {
  color: var(--expr-bg-dark);
}
h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.062em;
}
h2 {
  margin: 0;
  font-size: clamp(25px, 2.4vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.052em;
}
h3 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: -0.015em;
}
.eyebrow {
  margin: 0 0 9px;
  color: var(--expr-accent-brand);
  font:
    800 10px/1.1 var(--expr-font-secondary),
    sans-serif;
  letter-spacing: 0.13em;
}
.lede,
.subtle,
.source-note {
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 63%,
    var(--expr-surface-muted)
  );
  line-height: 1.55;
}
.lede {
  max-width: 710px;
  margin: 13px 0 0;
  font-size: 16px;
}
.today-head,
.view-title-row,
.view-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}
.today-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  min-width: 255px;
  border: 1px solid
    color-mix(
      in srgb,
      var(--expr-surface-muted) 58%,
      var(--expr-primitive-white)
    );
  border-radius: 10px;
  overflow: hidden;
  background: var(--expr-primitive-white);
}
.summary-stat {
  min-height: 86px;
  padding: 16px;
  border-left: 1px solid
    color-mix(
      in srgb,
      var(--expr-surface-muted) 58%,
      var(--expr-primitive-white)
    );
}
.summary-stat:first-child {
  border-left: 0;
}
.summary-stat strong {
  display: block;
  color: var(--expr-bg-dark);
  font:
    800 27px/1 var(--expr-font-primary),
    sans-serif;
  letter-spacing: -0.06em;
}
.summary-stat span {
  display: block;
  margin-top: 6px;
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 60%,
    var(--expr-surface-muted)
  );
  font:
    700 10px/1.2 var(--expr-font-secondary),
    sans-serif;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.quick-actions,
.customer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 25px 0 30px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--expr-bg-elevated);
  border-radius: 7px;
  background: var(--expr-bg-elevated);
  color: var(--expr-text-on-dark);
  cursor: pointer;
  font:
    800 13px var(--expr-font-secondary),
    sans-serif;
  text-decoration: none;
}
.button:hover {
  background: color-mix(
    in srgb,
    var(--expr-bg-elevated) 89%,
    var(--expr-bg-dark)
  );
}
.button.secondary {
  border-color: color-mix(
    in srgb,
    var(--expr-text-on-light) 15%,
    var(--expr-primitive-white)
  );
  background: var(--expr-primitive-white);
  color: var(--expr-text-on-light);
}
.button.secondary:hover {
  border-color: var(--expr-accent-brand);
  color: var(--expr-accent-brand);
}
.reference-list {
  max-width: 900px;
}
.worklist {
  max-width: 980px;
}
.worklist-group {
  margin: 27px 0 0;
}
.worklist-group h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
  font:
    800 13px var(--expr-font-secondary),
    sans-serif;
  letter-spacing: 0.03em;
}
.worklist-group h2::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--expr-accent-brand);
}
.worklist-group.is-past h2::before {
  background: var(--expr-accent);
}
.reference-list article,
.property-row,
.task-row,
.visit-row {
  min-width: 0;
}
.reference-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 24px;
  padding: 17px 18px;
  border: 1px solid
    color-mix(
      in srgb,
      var(--expr-surface-muted) 54%,
      var(--expr-primitive-white)
    );
  border-radius: 9px;
  background: var(--expr-primitive-white);
  box-shadow: 0 5px 17px color-mix(in srgb, var(--expr-bg-dark) 4%, transparent);
}
.reference-list article + article {
  margin-top: 9px;
}
.reference-list article strong {
  font-size: 15px;
}
.reference-list article p {
  grid-column: 1;
  margin: 0;
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 65%,
    var(--expr-surface-muted)
  );
  font-size: 13px;
  line-height: 1.42;
}
.reference-list article small {
  grid-column: 1;
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 52%,
    var(--expr-surface-muted)
  );
  font:
    600 11px/1.4 var(--expr-font-secondary),
    sans-serif;
}
.reference-list article .text-button {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
}
.text-button {
  min-height: 40px;
  padding: 0 5px;
  border: 0;
  background: transparent;
  color: var(--expr-accent-brand);
  cursor: pointer;
  font:
    800 12px var(--expr-font-secondary),
    sans-serif;
  text-align: left;
}
.text-button:hover {
  color: var(--expr-bg-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.view-title-row .button {
  flex: 0 0 auto;
}
.view-head {
  margin-bottom: 24px;
}
.search {
  display: grid;
  gap: 7px;
  min-width: min(340px, 100%);
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 62%,
    var(--expr-surface-muted)
  );
  font:
    800 11px var(--expr-font-secondary),
    sans-serif;
  letter-spacing: 0.035em;
}
.search input,
.compact-form input,
.compact-form textarea,
.compact-form select,
.note-form textarea,
.inline-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid
    color-mix(
      in srgb,
      var(--expr-surface-muted) 82%,
      var(--expr-primitive-white)
    );
  border-radius: 6px;
  background: var(--expr-primitive-white);
  color: var(--expr-text-on-light);
  font-size: 16px;
}
.search input {
  min-width: 0;
}
.compact-form textarea,
.note-form textarea {
  min-height: 82px;
  resize: vertical;
}
.new-customer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  max-width: 980px;
  margin: 0 0 24px;
  padding: 20px;
  border: 1px solid
    color-mix(
      in srgb,
      var(--expr-accent-brand) 20%,
      var(--expr-primitive-white)
    );
  border-radius: 10px;
  background: color-mix(
    in srgb,
    var(--expr-accent-brand) 4%,
    var(--expr-primitive-white)
  );
}

.new-customer-panel {
  max-width: 980px;
  margin: 0 0 24px;
  border: 1px solid
    color-mix(
      in srgb,
      var(--expr-accent-brand) 20%,
      var(--expr-primitive-white)
    );
  border-radius: 10px;
  background: color-mix(
    in srgb,
    var(--expr-accent-brand) 4%,
    var(--expr-primitive-white)
  );
}

.new-customer-panel > summary {
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  cursor: pointer;
  color: var(--expr-accent-brand);
  font:
    800 13px var(--expr-font-secondary),
    sans-serif;
}

.new-customer-panel[open] > summary {
  color: var(--expr-text-on-light);
}
.new-customer-panel .new-customer {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.new-customer h2,
.new-customer .subtle,
.new-customer output {
  grid-column: 1 / -1;
}
.new-customer p {
  margin: -5px 0 2px;
  font-size: 13px;
}
.compact-form label,
.note-form label {
  display: grid;
  gap: 6px;
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 72%,
    var(--expr-surface-muted)
  );
  font:
    800 12px var(--expr-font-secondary),
    sans-serif;
}
.compact-form output,
.note-form output {
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 65%,
    var(--expr-surface-muted)
  );
  font-size: 12px;
}
.two-column {
  display: grid;
  grid-template-columns: minmax(270px, 0.72fr) minmax(0, 1.45fr);
  gap: 22px;
  align-items: start;
}
.list {
  border-top: 1px solid
    color-mix(
      in srgb,
      var(--expr-surface-muted) 72%,
      var(--expr-primitive-white)
    );
}
.customer-row {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 15px 11px;
  border: 0;
  border-bottom: 1px solid
    color-mix(
      in srgb,
      var(--expr-surface-muted) 70%,
      var(--expr-primitive-white)
    );
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.customer-row:hover,
.customer-row[aria-pressed="true"] {
  background: var(--expr-primitive-white);
}
.customer-row[aria-pressed="true"] {
  box-shadow: inset 3px 0 0 var(--expr-accent-brand);
}
.customer-row strong {
  font-size: 15px;
}
.customer-row span {
  color: var(--expr-accent-brand);
  font:
    800 12px var(--expr-font-secondary),
    sans-serif;
}
.customer-row small {
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 58%,
    var(--expr-surface-muted)
  );
  font:
    500 12px var(--expr-font-secondary),
    sans-serif;
}
.detail {
  min-height: 550px;
  padding: clamp(22px, 3.4vw, 42px);
  border-top: 5px solid var(--expr-accent-brand);
  border-radius: 0 0 10px 10px;
  background: var(--expr-primitive-white);
  box-shadow: 0 20px 50px
    color-mix(in srgb, var(--expr-bg-dark) 8%, transparent);
}
.back-to-list {
  display: none;
  min-height: 44px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--expr-accent-brand);
  cursor: pointer;
  font:
    800 13px var(--expr-font-secondary),
    sans-serif;
}
.customer-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}
.action-status {
  display: inline-block;
  margin: 12px 0 0;
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 64%,
    var(--expr-surface-muted)
  );
  font:
    600 11px var(--expr-font-secondary),
    sans-serif;
}
.customer-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  min-width: 220px;
  border-left: 1px solid
    color-mix(
      in srgb,
      var(--expr-surface-muted) 65%,
      var(--expr-primitive-white)
    );
}
.customer-overview span {
  padding: 4px 0 4px 15px;
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 64%,
    var(--expr-surface-muted)
  );
  font:
    700 11px/1.4 var(--expr-font-secondary),
    sans-serif;
}
.customer-overview strong {
  display: block;
  color: var(--expr-bg-dark);
  font-size: 16px;
}
.customer-actions {
  margin: 20px 0 22px;
}
.customer-work > section {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid
    color-mix(
      in srgb,
      var(--expr-surface-muted) 64%,
      var(--expr-primitive-white)
    );
}
.action-details {
  margin-top: 13px;
  border-top: 1px solid
    color-mix(
      in srgb,
      var(--expr-surface-muted) 64%,
      var(--expr-primitive-white)
    );
  border-bottom: 1px solid
    color-mix(
      in srgb,
      var(--expr-surface-muted) 64%,
      var(--expr-primitive-white)
    );
}
.action-details summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  color: var(--expr-accent-brand);
  cursor: pointer;
  font:
    800 13px var(--expr-font-secondary),
    sans-serif;
}
.action-details[open] summary {
  color: var(--expr-text-on-light);
}
.contact-details {
  margin-top: 18px;
}
.detail dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 14px;
  padding: 8px 0;
}
dt {
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 55%,
    var(--expr-surface-muted)
  );
  font:
    800 10px var(--expr-font-secondary),
    sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.compact-form,
.note-form {
  display: grid;
  gap: 12px;
  margin: 0 0 15px;
}
.task-row,
.property-row {
  padding: 11px 0;
  border-bottom: 1px solid
    color-mix(
      in srgb,
      var(--expr-surface-muted) 46%,
      var(--expr-primitive-white)
    );
}
.task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
}
.task-row span {
  font-size: 14px;
}
.task-row small,
.property-row small {
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 55%,
    var(--expr-surface-muted)
  );
  font:
    600 11px var(--expr-font-secondary),
    sans-serif;
}
.task-row .text-button {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}
.property-row {
  margin: 0;
  line-height: 1.45;
}
.property-row p {
  margin: 3px 0;
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 65%,
    var(--expr-surface-muted)
  );
  font-size: 13px;
}
.visit-row {
  margin-top: 10px;
  padding: 15px;
  border: 1px solid
    color-mix(
      in srgb,
      var(--expr-accent-brand) 22%,
      var(--expr-primitive-white)
    );
  border-radius: 8px;
  background: color-mix(
    in srgb,
    var(--expr-accent-brand) 3%,
    var(--expr-primitive-white)
  );
}
.visit-row p {
  margin: 4px 0;
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 65%,
    var(--expr-surface-muted)
  );
  font-size: 13px;
}
.visit-row small,
.report-history {
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 54%,
    var(--expr-surface-muted)
  );
  font:
    600 11px/1.45 var(--expr-font-secondary),
    sans-serif;
}
.report-history {
  margin: 8px 0 0;
}
.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}
.inline-form label {
  grid-column: 1 / -1;
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 62%,
    var(--expr-surface-muted)
  );
  font:
    700 11px var(--expr-font-secondary),
    sans-serif;
}
.inline-form[hidden] {
  display: none;
}
.local-details {
  max-width: 820px;
  margin-top: 10px;
  border-bottom: 1px solid
    color-mix(
      in srgb,
      var(--expr-surface-muted) 60%,
      var(--expr-primitive-white)
    );
}
.local-details summary {
  min-height: 50px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 800;
}
footer {
  padding: 20px;
  border-top: 1px solid
    color-mix(
      in srgb,
      var(--expr-surface-muted) 60%,
      var(--expr-primitive-white)
    );
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 54%,
    var(--expr-surface-muted)
  );
  font:
    600 11px var(--expr-font-secondary),
    sans-serif;
  text-align: center;
}
@media (max-width: 780px) {
  .sidebar {
    top: auto;
  }
  body.customers-view .global-search {
    display: none;
  }
  .topbar {
    min-height: 66px;
    padding: 11px 18px;
  }
  .brand span,
  .credit,
  .title {
    display: none;
  }
  .brand {
    margin-right: 2px;
  }
  .global-search {
    width: auto;
    flex: 1;
    margin-left: 0;
  }
  main {
    display: block;
    min-height: calc(100vh - 96px);
    padding: 23px 18px 88px;
  }
  .sidebar {
    position: fixed;
    z-index: 4;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid
      color-mix(in srgb, var(--expr-text-on-dark) 14%, transparent);
    border-bottom: 0;
    background: var(--expr-bg-dark);
    box-shadow: 0 -10px 26px
      color-mix(in srgb, var(--expr-bg-dark) 20%, transparent);
  }
  .sidebar button {
    min-height: 47px;
    justify-content: center;
    gap: 4px;
    padding: 0 3px;
    border-radius: 5px;
    color: color-mix(in srgb, var(--expr-text-on-dark) 66%, transparent);
    font-size: 11px;
    text-align: center;
  }
  .sidebar button span {
    width: auto;
    color: inherit;
    font-size: 14px;
  }
  .sidebar button[aria-current="page"] {
    background: color-mix(in srgb, var(--expr-text-on-dark) 12%, transparent);
    color: var(--expr-text-on-dark);
    box-shadow: none;
  }
  .sidebar button[aria-current="page"] span {
    color: var(--expr-accent);
  }
  h1 {
    font-size: clamp(30px, 10vw, 38px);
  }
  .today-head,
  .view-title-row,
  .view-head {
    display: grid;
    gap: 18px;
    align-items: start;
  }
  .today-summary {
    width: 100%;
    min-width: 0;
  }
  .summary-stat {
    min-height: 74px;
  }
  .view-title-row .button {
    width: 100%;
  }
  .reference-list article {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }
  .reference-list article .text-button {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    min-height: 44px;
    padding: 0;
  }
  .new-customer {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .new-customer .button {
    width: 100%;
  }
  .two-column {
    grid-template-columns: minmax(0, 1fr);
  }
  .detail {
    min-height: 0;
    margin-top: 16px;
    padding: 23px 18px;
  }
  .back-to-list {
    display: block;
  }
  .customer-heading {
    display: grid;
    gap: 17px;
  }
  .customer-overview {
    width: 100%;
    min-width: 0;
    border-top: 1px solid
      color-mix(
        in srgb,
        var(--expr-surface-muted) 65%,
        var(--expr-primitive-white)
      );
    border-left: 0;
  }
  .customer-overview span {
    padding: 12px 0 0;
  }
  .detail dl {
    grid-template-columns: 1fr;
  }
  .customer-work > section {
    margin-top: 21px;
  }
}
@media (max-width: 460px) {
  .local-banner {
    padding-inline: 12px;
  }
  .quick-actions,
  .customer-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .quick-actions .button,
  .customer-actions .button {
    width: 100%;
  }
  .inline-form {
    grid-template-columns: 1fr;
  }
  .inline-form .text-button {
    justify-self: start;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Centro de Ema: rail de despacho y directorio verificable, sin datos inferidos. */
main {
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 34px;
}
.sidebar {
  gap: 4px;
  padding: 18px 12px;
  border: 0;
  border-radius: 12px;
  background: var(--expr-bg-elevated);
  box-shadow: 0 15px 35px
    color-mix(in srgb, var(--expr-accent-brand) 21%, transparent);
}
.rail-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  margin: 0 4px 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid
    color-mix(in srgb, var(--expr-text-on-dark) 21%, transparent);
  color: var(--expr-text-on-dark);
  font:
    800 12px var(--expr-font-secondary),
    sans-serif;
  letter-spacing: 0.1em;
  text-decoration: none;
}
.rail-brand img {
  width: 31px;
  height: 31px;
  object-fit: contain;
}
.sidebar button {
  color: color-mix(in srgb, var(--expr-text-on-dark) 76%, transparent);
}
.sidebar button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.sidebar button:hover {
  background: color-mix(in srgb, var(--expr-text-on-dark) 12%, transparent);
  color: var(--expr-text-on-dark);
}
.sidebar button[aria-current="page"] {
  background: var(--expr-primitive-white);
  color: var(--expr-accent-brand);
  box-shadow: none;
}
.sidebar button {
  color: var(--expr-text-on-dark);
}
.global-search input {
  min-height: 44px;
  font-size: 16px;
}
@media (max-width: 780px) {
  .brand {
    width: 44px;
    justify-content: center;
  }
}
.today-summary {
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  min-width: 360px;
}
.summary-stat {
  min-height: 72px;
  padding: 14px;
}
h1 {
  font-size: clamp(30px, 3vw, 40px);
}
.today-head {
  align-items: center;
}
.lede {
  margin-top: 9px;
}
.empty-action {
  display: flex;
  width: max-content;
  margin-top: 14px;
}
@media (max-width: 780px) {
  .today-summary {
    min-width: 0;
  }
}
.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 30px;
  align-items: start;
}
.section-title {
  margin: 0;
  font-size: 15px;
}
.customer-directory {
  padding: 20px;
  border: 1px solid
    color-mix(
      in srgb,
      var(--expr-accent-brand) 20%,
      var(--expr-primitive-white)
    );
  border-radius: 10px;
  background: color-mix(
    in srgb,
    var(--expr-accent-brand) 3%,
    var(--expr-primitive-white)
  );
}
.customer-directory h2 {
  font-size: 18px;
}
.customer-directory .subtle {
  margin: 7px 0 12px;
  font-size: 12px;
}
.directory-row {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 52px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid
    color-mix(
      in srgb,
      var(--expr-accent-brand) 15%,
      var(--expr-primitive-white)
    );
  background: transparent;
  color: var(--expr-text-on-light);
  cursor: pointer;
  text-align: left;
}
.directory-row strong {
  font-size: 13px;
}
.directory-row small {
  color: color-mix(
    in srgb,
    var(--expr-text-on-light) 59%,
    var(--expr-surface-muted)
  );
  font:
    500 11px var(--expr-font-secondary),
    sans-serif;
}
.customer-directory > .text-button {
  margin-top: 9px;
}
@media (max-width: 780px) {
  .rail-brand {
    display: none;
  }
  .sidebar {
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border-radius: 0;
  }
  .today-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .customer-directory {
    padding: 18px;
  }
  #view-customers:has(.customer-work) .new-customer-panel,
  #view-customers:has(.customer-work) .new-customer,
  #view-customers:has(.customer-work) .list {
    display: none;
  }
}

/* Hoy prioriza consultas; las tareas y visitas independientes se consultan bajo demanda. */
.legacy-worklist { margin-top: 10px; }
.legacy-worklist > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--expr-text-on-light); font: 700 13px var(--expr-font-secondary), sans-serif; }
.legacy-worklist > .subtle { margin: 0 0 10px; font-size: 12px; }
.legacy-empty { margin: 10px 0 0; font-size: 13px; }
.customer-directory { padding: 3px 0 3px 18px; border: 0; border-left: 1px solid color-mix(in srgb, var(--expr-surface-muted) 58%, var(--expr-primitive-white)); border-radius: 0; background: transparent; box-shadow: none; }
.customer-directory h2 { margin-top: 0; font-size: 14px; }
.directory-row { padding: 8px 0; border-radius: 0; }
@media (max-width: 780px) { .customer-directory { padding: 0; border-left: 0; } }
@media (max-width: 780px) { #view-today .text-button { min-height: 44px; } }

.mobile-workspace-nav { display: none; }
@media (max-width: 780px) { .mobile-workspace-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 18px 0; } .mobile-workspace-nav a { display: flex; align-items: center; min-height: 48px; padding: 12px; border: 1px solid var(--expr-surface-muted); border-radius: 8px; background: var(--expr-primitive-white); color: var(--expr-text-on-light); text-decoration: none; font-weight: 700; } }

/* Agenda: time and status are readable before opening the existing case. */
.agenda-toolbar,.agenda-navigation,.agenda-modes{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;min-width:0}
.agenda-toolbar{justify-content:space-between;margin:1rem 0}
.agenda-modes{background:var(--expr-primitive-white);border:1px solid var(--expr-surface-muted);border-radius:12px;padding:4px}
.agenda-modes button[aria-pressed=true]{background:var(--expr-bg-dark);color:var(--expr-text-on-dark);border-radius:8px}
.agenda-date-label{font-size:.75rem;display:grid;gap:2px}
.agenda-date-label input{max-width:160px;min-height:40px;border:1px solid var(--expr-surface-muted);border-radius:8px;background:var(--expr-primitive-white);padding:4px 8px}
.agenda-grid{display:grid;gap:8px;min-width:0}
.agenda-week{grid-template-columns:repeat(7,minmax(0,1fr))}
.agenda-list,.agenda-day{grid-template-columns:1fr}
.agenda-day{min-width:0;background:var(--expr-primitive-white);border:1px solid var(--expr-surface-muted);border-radius:12px;padding:10px}
.agenda-day h3{margin:0 0 12px;font-size:.875rem}
.agenda-empty{font-size:.8rem;color:var(--expr-text-on-light);opacity:.7;margin:0;padding:1rem 0}
.agenda-appointment{display:flex;flex-direction:column;align-items:flex-start;gap:8px;text-align:left;width:100%;min-width:0;padding:12px 10px;margin:0 0 8px;border:1px solid var(--expr-surface-muted);border-inline-start:4px solid var(--expr-accent-brand);border-radius:8px;background:var(--expr-bg-light);color:var(--expr-text-on-light);cursor:pointer;overflow-wrap:anywhere;font-size:.8rem;line-height:1.45}
.agenda-appointment strong{font-size:.9rem}
.agenda-time{font-family:var(--expr-font-secondary);font-weight:700}
.agenda-status{border-radius:4px;background:var(--expr-primitive-white);padding:3px 5px;font-size:.75rem;font-weight:700}
.agenda-appointment[data-status=proposed],.agenda-appointment[data-status=rescheduled]{border-inline-start-color:var(--expr-accent)}
.agenda-appointment[data-status=cancelled],.agenda-appointment[data-status=no_show]{border-inline-start-color:var(--expr-surface-muted);border-style:dashed}
.agenda-appointment[data-status=completed]{border-inline-start-color:var(--expr-bg-dark)}
.agenda-legacy{margin-top:20px}
@media(max-width:1100px){.agenda-week{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.agenda-week{grid-template-columns:1fr}.agenda-toolbar{align-items:flex-start}.agenda-navigation{width:100%}.agenda-appointment{padding:14px;font-size:.9rem}.agenda-day h3{font-size:1rem}}

@media(max-width:600px){.agenda-day:has(.agenda-empty){display:flex;align-items:center;justify-content:space-between;gap:12px}.agenda-day:has(.agenda-empty) h3{margin:0}.agenda-day .agenda-empty{padding:4px 0}}

/* Legacy row actions occupy distinct grid cells instead of overlapping. */
.agenda-legacy > article > .text-button { grid-row: 4; align-self: start; justify-self: start; min-height: 44px; }
.agenda-legacy > article > .text-button:first-of-type { grid-column: 1; }
.agenda-legacy > article > .text-button:nth-of-type(2) { grid-column: 2; }
.agenda-legacy > article > .inline-form { grid-column: 1 / -1; grid-row: 5; }
.agenda-legacy > article > .inline-form[hidden] { display: none; }
