@import url("/preview/style.css");
.auth-card {
  max-width: 460px;
  margin: 35px auto;
}
.auth-card h1 {
  font-size: 30px;
}
.auth-card .small-button {
  margin-top: 15px;
}
.topbar {
  gap: 8px;
}
.card p,
.card strong,
.meta-value,
.identity {
  overflow-wrap: anywhere;
}
.card .button-row .primary {
  font-size: 13px;
}
#sync-status {
  min-height: 20px;
}
.footnote {
  font-size: 11px;
  line-height: 1.6;
  color: #647660;
}
.invitation-link {
  width: 100%;
  min-height: 84px;
  padding: 12px;
  border: 1px solid #c8d3c1;
  border-radius: 12px;
  font: inherit;
  font-size: 12px;
  resize: vertical;
}
.dialog-form:disabled {
  opacity: 0.65;
}
.bottom-nav button {
  min-width: 80px;
  min-height: 52px;
  font-weight: 650;
}
.team-actions {
  margin-top: 18px;
}
.sync-warning {
  background: #fff0d8;
  border-radius: 10px;
  padding: 12px;
  font-size: 12px;
}
.form-hint {
  font-size: 12px;
  line-height: 1.6;
}
.small-button {
  min-height: 44px;
}
button.busy {
  opacity: 0.6;
}
#identity {
  font-weight: 650;
}
#pending-request .button-row {
  flex-direction: column;
}
.customer-choice {
  width: 100%;
  text-align: left;
  line-height: 1.6;
  margin: 8px 0;
}
.card.selected {
  border-color: #476a36;
}
.field input[type="checkbox"] {
  width: auto;
  min-height: 24px;
}
.card-grid .card {
  overflow: hidden;
}

/* Summary width follows the card, not the viewport. A translated label and
   a large amount each get a full line on narrow cards, including at text zoom.
   Older browsers without container queries keep this readable stacked layout. */
.card-grid .finance-card {
  container-type: inline-size;
  overflow: visible;
}
.finance-amounts {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.finance-amounts > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.375rem;
  min-width: 0;
  padding: 0.75rem 0;
  border-bottom: 1px solid #edf0e8;
}
.finance-amounts > div:first-child {
  padding-top: 0;
}
.finance-amounts > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.finance-amounts span,
.finance-amounts strong {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.finance-amounts span {
  font-size: 0.75rem;
  line-height: 1.5;
}
.finance-amounts strong {
  font-size: 1.3125rem;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
@supports (grid-template-rows: subgrid) {
  @container (min-width: 28rem) {
    .finance-amounts {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      grid-template-rows: auto auto;
      gap: 0.5rem 0.75rem;
    }
    .finance-amounts > div {
      grid-row: span 2;
      grid-template-rows: subgrid;
      padding: 0;
      border: 0;
    }
  }
}
@media (max-width: 380px) {
  .topbar-actions {
    gap: 4px;
  }
  .brand {
    font-size: 29px;
  }
  .small-button {
    padding: 8px;
  }
  .bottom-nav {
    gap: 2px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .bottom-nav button {
    padding: 6px;
    min-width: 0;
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* Normal-size information stays above AA 4.5:1 on both white and page backgrounds. */
.photo-placeholder,
.finance-note,
.helper,
#sync-status.helper,
.meta-label,
.finance-amounts span,
.bottom-nav button,
.order-id {
  color: #526649;
}
.bottom-nav button {
  overflow-wrap: anywhere;
}
.section-header {
  flex-wrap: wrap;
}

.field-error {
  color: #833b22;
  font-size: 12px;
  line-height: 1.5;
  min-width: 0;
  overflow-wrap: anywhere;
}
.field [aria-invalid="true"] {
  border-color: #b35b36;
  box-shadow: 0 0 0 1px #b35b36;
}
.schedule-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}
.schedule-row .field {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}
.schedule-row input {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
/* Keep Safari's native date/time value inside its full-width input without
   replacing the platform picker or clipping the selected value. */
.schedule-row input::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}
.dialog-form > .button-row > button {
  flex: 1 1 9rem;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.customer-review-panel {
  border: 1px solid #cad8bf;
  background: #f5f8f0;
  border-radius: 14px;
  padding: 15px;
  margin: 18px 0;
}
.customer-review-panel .helper {
  margin-top: 0;
}
.customer-card {
  border-top: 1px solid #dce4d4;
  margin: 14px 0;
  overflow-wrap: anywhere;
}
.customer-review-panel .wide + .wide {
  margin-top: 8px;
}
.customer-review-panel button {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.customer-review-panel[aria-invalid="true"] {
  border-color: #b35b36;
}
.customer-review-panel:focus-visible,
.customer-id-lookup summary:focus-visible {
  outline: 2px solid #476a36;
  outline-offset: 3px;
}
.customer-search-actions .helper {
  margin: 10px 0;
}
.customer-id-lookup {
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid #dce4d4;
  overflow-wrap: anywhere;
}
.customer-id-lookup summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
  color: #526649;
  font-size: 13px;
  line-height: 1.5;
}
/* Native date/time controls need more room than plain text on mobile Safari.
   Stack each date and time on phones rather than squeezing two pickers in. */
@media (max-width: 600px) {
  .schedule-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}

.price-confirmation {
  border: 1px solid #d6bb89;
  background: #fff4df;
  border-radius: 14px;
  padding: 15px;
  margin: 12px 0 18px;
  overflow-wrap: anywhere;
}
.price-confirmation .helper {
  margin-top: 0;
}
.price-confirmation button {
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.price-confirmation .wide + .wide {
  margin-top: 8px;
}
.price-confirmation:focus-visible {
  outline: 2px solid #8b6328;
  outline-offset: 3px;
}
.price-confirmation[aria-invalid="true"] {
  border-color: #b35b36;
}

/* Work and payment are independent facts; status never relies on color alone. */
.order-work-summary,
.order-payment-summary {
  padding: 0.75rem;
  margin: 0.5rem 0;
  border-radius: 12px;
  overflow-wrap: anywhere;
  min-width: 0;
  border: 1px solid #d9e2d2;
}
.order-work-summary p,
.order-payment-summary p {
  margin: 0.3rem 0 0;
}
.work-state,
.payment-state {
  font-weight: 700;
}
.payment-confirmed {
  background: #eef6e6;
  border-color: #719551;
}
.payment-pending {
  background: #fff6de;
  border: 2px solid #936000;
  color: #563900;
}
.payment-guidance {
  font-size: 0.9rem;
}
.card-bottom button {
  min-height: 44px;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .card-bottom {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .card-bottom button {
    max-width: 100%;
  }
}

/* Explicit acknowledgement after a rejected phone edit, no fixed mobile width. */
.phone-review {
  min-width: 0;
}
.phone-review button {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Readable order details: no narrow multi-column contact rows on phones. */
.order-detail-block {
  padding: 1rem;
  margin: 0.85rem 0;
  background: #f5f8f1;
  border: 1px solid #b9c9af;
  border-radius: 14px;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #173d30;
}
.order-detail-block h3,
.order-detail-block dt {
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 650;
  margin: 0 0 0.35rem;
  color: #345244;
}
.order-detail-block dl {
  margin: 0;
}
.order-detail-block dd {
  margin: 0 0 1rem;
}
.order-detail-block dd:last-child {
  margin-bottom: 0;
}
.detail-value {
  font-size: 1.125rem;
  line-height: 1.55;
  font-weight: 600;
  color: #173d30;
  margin: 0.25rem 0;
  overflow-wrap: anywhere;
  min-width: 0;
}
.order-call-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  margin-top: 0.75rem;
  border: 2px solid #245440;
  border-radius: 12px;
  font-size: 1.125rem;
  line-height: 1.5;
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #173d30;
  background: #fff;
  text-underline-offset: 0.2em;
}
.call-caption {
  font-size: 1rem;
  font-weight: 650;
}
.order-call-link:focus-visible,
.order-contact:focus {
  outline: 3px solid #518238;
  outline-offset: 3px;
}

/* Full scheduled interval stays legible, including cross-date appointments. */
#order-list .order-meta {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 0.85rem;
}
#order-list .order-meta > div {
  min-width: 0;
}
#order-list .order-meta .meta-label {
  font-size: 1rem;
  line-height: 1.5;
  color: #345244;
}
#order-list .order-meta .meta-value {
  font-size: 1.125rem;
  line-height: 1.55;
  color: #173d30;
  overflow-wrap: anywhere;
  min-width: 0;
}

.schedule-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}
.schedule-controls label,
.schedule-controls input {
  min-width: 0;
  max-width: 100%;
}
.schedule-empty-filter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  font-size: 1rem;
}
.schedule-empty-filter input {
  width: 24px;
  min-height: 24px;
  flex-shrink: 0;
}
.schedule-matrix-scroll {
  overflow-x: auto;
  max-width: 100%;
  margin: 1rem 0;
  border: 1px solid #b9c9af;
  border-radius: 12px;
}
.schedule-matrix {
  border-collapse: collapse;
  width: 100%;
  color: #173d30;
  font-size: 1rem;
}
.schedule-matrix caption {
  padding: 0.75rem;
  text-align: left;
  font-weight: 700;
}
.schedule-matrix th,
.schedule-matrix td {
  text-align: left;
  vertical-align: top;
  border: 1px solid #cbd7c2;
  padding: 0.75rem;
  min-width: 180px;
  max-width: 260px;
  overflow-wrap: anywhere;
}
.schedule-matrix th {
  background: #edf3e6;
}
.schedule-matrix tbody th {
  min-width: 150px;
}
.schedule-staff-id {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  overflow-wrap: anywhere;
}
.schedule-slot {
  background: #fff;
  border: 1px solid #bdcdb3;
  border-radius: 8px;
  padding: 0.65rem;
  margin: 0.4rem 0;
}
.schedule-slot p {
  margin: 0.3rem 0;
}
.schedule-slot strong {
  font-size: 1.125rem;
}
.schedule-warning {
  color: #763c0b;
}
#schedule-section button {
  min-height: 44px;
  white-space: normal;
}
#schedule-section .button-row {
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .schedule-controls {
    grid-template-columns: 1fr;
  }
  .bottom-nav {
    flex-wrap: wrap;
  }
}
/* Row identity stays visible while comparing later dates. */
.schedule-matrix tbody th,
.schedule-matrix thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #edf3e6;
  box-shadow: 1px 0 #b9c9af;
}
.schedule-matrix thead th:first-child {
  z-index: 3;
}
.schedule-slot summary {
  min-height: 44px;
  padding: 0.5rem 0;
  cursor: pointer;
  font-size: 1rem;
}
.schedule-order-reference {
  overflow-wrap: anywhere;
}

/* Explicit office travel-gap review; text remains meaningful without color. */
.gap-warning {
  border: 2px solid #9b6100;
  background: #fff8e8;
  color: #302108;
  padding: 1rem;
  border-radius: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.gap-warning h3,
.gap-warning p {
  margin: 0.4rem 0;
}
.gap-warning button {
  min-height: 44px;
  margin: 0.5rem 0.5rem 0 0;
  white-space: normal;
  max-width: 100%;
}
.gap-neighbor {
  border-top: 1px solid #b99451;
  padding: 0.65rem 0;
  font-size: 1rem;
}
.gap-interval {
  font-size: 1.125rem;
  font-weight: 600;
}

/* Read-only order search and compact, fully settled history. */
.order-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
}
.order-filter-grid .field {
  margin: 0;
  min-width: 0;
}
.order-filter-grid input,
.order-filter-grid select,
.order-filter-grid button {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  font-size: 1rem;
}
.order-filter-grid button {
  white-space: normal;
  overflow-wrap: anywhere;
}
.history-pending-notice {
  border-left: 4px solid #996515;
  background: #fff1d9;
  padding: 0.8rem;
  margin: 1rem 0;
  border-radius: 8px;
  font-size: 1rem;
}
.history-pending-notice button {
  min-height: 44px;
  white-space: normal;
}
.settled-history {
  grid-column: 1 / -1;
  min-width: 0;
  border-top: 2px solid #c8d3c1;
  margin-top: 1rem;
  padding-top: 1rem;
}
.settled-history h2 {
  font-size: 1.2rem;
  overflow-wrap: anywhere;
}
.settled-history-list {
  display: grid;
  gap: 0.6rem;
}
.settled-card {
  padding: 0.85rem;
  background: #f3f6ef;
}
.settled-card h3 {
  font-size: 1.1rem;
  margin: 0.4rem 0;
}
.settled-card p {
  margin: 0.25rem 0;
  font-size: 1rem;
}
.settled-card .order-meta {
  margin: 0.5rem 0;
  gap: 0.5rem;
}
.settled-card .meta-label {
  font-size: 0.875rem;
}
.settled-card .meta-value {
  font-size: 1rem;
}
.settled-card .card-bottom {
  margin-top: 0.5rem;
}
.settled-card button {
  min-height: 44px;
  font-size: 1rem;
  white-space: normal;
}
@media (max-width: 650px) {
  .order-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .order-filter-grid input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
  }
  .settled-card .order-meta {
    grid-template-columns: minmax(0, 1fr);
  }
  .settled-card .card-bottom {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}
.settled-summary {
  color: #315a37;
  font-weight: 650;
}
.settled-card .order-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 650px) {
  .settled-card .order-meta {
    grid-template-columns: minmax(0, 1fr);
  }
}
.order-advanced-filters {
  margin: 0.75rem 0 1rem;
  min-width: 0;
}
.order-advanced-filters > summary {
  min-height: 44px;
  box-sizing: border-box;
  padding: 0.65rem;
  font-size: 1rem;
  font-weight: 650;
  cursor: pointer;
  overflow-wrap: anywhere;
  border: 1px solid #c8d3c1;
  border-radius: 8px;
}
.order-advanced-filters > summary:focus-visible {
  outline: 3px solid #587d44;
  outline-offset: 2px;
}
.order-advanced-filters[open] > summary {
  margin-bottom: 0.75rem;
}

/* Read-only work attention. Text, not color alone, conveys the condition. */
.work-overrun {
  border: 2px solid #a52c27;
  border-radius: 0.7rem;
  background: #fff4f1;
  color: #63231f;
  padding: 0.75rem;
  margin-block: 0.65rem;
  overflow-wrap: anywhere;
  min-width: 0;
}
.work-overrun[hidden] {
  display: none;
}
.work-overrun strong {
  display: block;
  font-size: 1rem;
}
.work-overrun p {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
}
.work-overrun-stale {
  font-weight: 700;
}

.schedule-attention {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #b6c7d4;
  border-radius: 16px;
  background: #f6f9fc;
  min-width: 0;
}
.schedule-attention h2 {
  margin-top: 0;
  font-size: 1.15rem;
}
#schedule-attention-list {
  display: grid;
  gap: 0.8rem;
}
.schedule-attention-item {
  background: white;
  padding: 0.8rem;
  border-radius: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.schedule-attention-item h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}
.schedule-attention-item button {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
}
.schedule-order-notice {
  border-inline-start: 4px solid #738496;
  padding: 0.6rem 0.8rem;
  margin: 0.6rem 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.schedule-order-notice.warning {
  border-color: #946000;
  background: #fff7df;
  color: #573a00;
}
.schedule-order-notice.danger {
  border-color: #b42318;
  background: #fff0ee;
  color: #7a1b14;
}
.schedule-order-notice p {
  margin: 0.25rem 0;
}
.schedule-order-notice .helper {
  color: inherit;
}
.schedule-reason {
  font-weight: 650;
}

.order-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  min-width: 0;
}
.order-map-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  box-sizing: border-box;
  max-width: 100%;
  border: 2px solid #285443;
  border-radius: 12px;
  color: #285443;
  background: #fff;
  font-size: 1rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.order-map-link:focus-visible {
  outline: 3px solid #587d44;
  outline-offset: 3px;
}
@media (max-width: 650px) {
  .order-map-actions {
    flex-direction: column;
  }
  .order-map-link {
    width: 100%;
  }
}
