:root {
  --bg: #e8eef5;
  --ink: #152033;
  --accent: #2f9e44;
  --accent-bright: #39b54a;
  --panel: #ffffff;
  --muted: #5b6b7c;
  --error: #9b1c1c;
  --line: #d5dde6;
  --header: #071527;
  --header-ink: #f4f7fb;
  --nav-active: #2f9e44;
  --account-navy: #0a1b33;
  --account-navy-mid: #102744;
  --account-navy-ink: #f5f8fc;
  --rail-navy: #0d213d;
  --finance-alert: #c8102e;
  --finance-unavailable: #8e1f2f;
  --type-xs: 0.72rem;
  --type-sm: 0.84rem;
  --type-md: 0.95rem;
  --type-lg: 1.15rem;
  --type-xl: 1.55rem;
  --type-2xl: 1.85rem;
  --space-1: 0.35rem;
  --space-2: 0.75rem;
  --space-3: 1.25rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --focus: #2f9e44;
  --disabled-ink: #243328;
  --disabled-badge-bg: #e4ebe5;
  --disabled-badge-ink: #243328;
  --radius: 8px;
  --shadow-workspace: 0 8px 28px rgba(7, 21, 39, 0.14);
  --app-header-height: 4.25rem;
  --app-header-offset: var(--app-header-height);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
.app-body { min-height: 100vh; }
.auth-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #e7f0e6, #f7faf6 45%, #eef3ea); }
.auth-panel, .app-main { background: var(--panel); border: 1px solid var(--line); padding: 1.5rem; }
.auth-panel { width: min(420px, 92vw); border-radius: 8px; }
.app-main { margin: 1.25rem; border-radius: 8px; overflow-x: auto; }

.app-header {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 0.55rem 1.15rem;
  min-height: var(--app-header-height);
  background: var(--header);
  color: var(--header-ink);
  position: sticky;
  top: 0;
  /* Above all in-page dropdowns/filters so the main menu stays usable. */
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.app-header a { color: #e8eef8; text-decoration: none; }
.header-left, .header-right { display: flex; align-items: center; gap: 0.65rem; }
.brand {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.35rem 0.15rem 0;
  text-decoration: none;
  color: var(--header-ink);
}
.brand-logo {
  height: 52px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
}
.brand-divider {
  width: 1px;
  height: 2rem;
  background: rgba(255,255,255,0.22);
  margin-left: 0.35rem;
}
.chrome-btn {
  display: inline-grid;
  place-items: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.35rem;
  background: transparent;
  color: #f4f7fb;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}
.chrome-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.chrome-quick-add-btn {
  padding: 0;
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  color: #06210d;
}
.chrome-quick-add-icon {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
}
.chrome-icon {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}
.chrome-icon-search {
  width: 1.35rem;
  height: 1.35rem;
  background: #fff;
  /* Bolder ring + thicker handle (evenodd) */
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill-rule='evenodd'%3E%3Cpath fill='black' d='M10.5 2.25a8.25 8.25 0 0 1 6.42 13.44l3.695 3.695a1.35 1.35 0 0 1-1.91 1.91l-3.695-3.695A8.25 8.25 0 1 1 10.5 2.25Zm0 2.7a5.55 5.55 0 1 0 0 11.1 5.55 5.55 0 0 0 0-11.1Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill-rule='evenodd'%3E%3Cpath fill='black' d='M10.5 2.25a8.25 8.25 0 0 1 6.42 13.44l3.695 3.695a1.35 1.35 0 0 1-1.91 1.91l-3.695-3.695A8.25 8.25 0 1 1 10.5 2.25Zm0 2.7a5.55 5.55 0 1 0 0 11.1 5.55 5.55 0 0 0 0-11.1Z'/%3E%3C/svg%3E");
}
.chrome-icon-bell {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 22a2 2 0 0 0 2-2h-4a2 2 0 0 0 2 2zm6-6V11a6 6 0 1 0-12 0v5L4 18v1h16v-1l-2-2z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 22a2 2 0 0 0 2-2h-4a2 2 0 0 0 2 2zm6-6V11a6 6 0 1 0-12 0v5L4 18v1h16v-1l-2-2z'/%3E%3C/svg%3E");
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.5rem;
  padding: 0.2rem 0.65rem 0.2rem 0.25rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: #f4f7fb;
  cursor: pointer;
  font: inherit;
}
.user-chip:hover,
.user-chip:focus-visible {
  background: rgba(255,255,255,0.12);
}
.user-avatar {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #2f9e44, #1f7a32);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}
.user-chip-text { display: grid; line-height: 1.15; text-align: left; }
.user-menu-label {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--type-sm);
  font-weight: 600;
  color: #fff;
}
.user-role-hint {
  font-size: var(--type-xs);
  color: #9eb0c4;
}
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  color: inherit;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  margin: 0 auto;
  position: relative;
  content: "";
}
.nav-toggle-bars::before { position: absolute; top: -5px; left: 0; }
.nav-toggle-bars::after { position: absolute; top: 5px; left: 0; }

.primary-nav { flex: 1; min-width: 0; }
.nav-sections {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  align-items: center;
}
.nav-section { position: relative; }
.nav-section-btn,
.search-trigger,
.nav-link-button {
  background: transparent;
  color: #f4f7fb;
  border: 0;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  font: inherit;
  font-size: var(--type-md);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.nav-section-btn { display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 999px; }
/* Green pill only while hovering / focusing the section or its open submenu — not route-based. */
.nav-section:hover > .nav-section-btn,
.nav-section:focus-within > .nav-section-btn,
.nav-section.is-open > .nav-section-btn {
  background: var(--nav-active);
  color: #fff;
}
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 12.5rem;
  width: max-content;
  max-width: 18rem;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: #0a1b33;
  color: #f4f7fb;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  z-index: 1010;
}
.nav-section.is-open > .nav-dropdown { display: block; }
@media (min-width: 901px) {
  .nav-section:hover > .nav-dropdown,
  .nav-section:focus-within > .nav-dropdown {
    display: block;
  }
  .nav-dropdown {
    margin-top: 0;
  }
  .nav-dropdown::before {
    content: "";
    position: absolute;
    top: -0.45rem;
    left: 0;
    right: 0;
    height: 0.45rem;
  }
  .nav-dropdown .nav-link,
  .nav-dropdown .nav-link-button {
    color: #f0f5fb;
    font-family: inherit;
    font-size: var(--type-sm);
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    min-height: 2rem;
    line-height: 1.25;
  }
  .nav-dropdown .nav-link:hover,
  .nav-dropdown .nav-link:focus-visible,
  .nav-dropdown .nav-link-button:hover,
  .nav-dropdown .nav-link-button:focus-visible {
    background: rgba(57, 181, 74, 0.2);
    color: #fff;
  }
  .nav-dropdown .nav-link.is-current {
    font-weight: 700;
    color: #fff;
    background: rgba(57, 181, 74, 0.24);
    box-shadow: inset 3px 0 0 var(--accent-bright);
  }
  .nav-dropdown .nav-link.is-disabled,
  .nav-dropdown .nav-link-button:disabled {
    color: #93a4b8;
    background: transparent;
    cursor: not-allowed;
    opacity: 1;
  }
  .nav-dropdown .coming-later {
    color: #c7d4e4;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
    font-size: var(--type-xs);
  }
  .nav-dropdown .nav-sep {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 0.25rem 0;
  }
}
.nav-link, .nav-link-button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.85rem;
  min-height: 2rem;
  color: #f0f5fb;
  font-weight: 600;
  font-size: var(--type-sm);
  text-decoration: none;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.nav-link:hover, .nav-link:focus-visible, .nav-link-button:hover, .nav-link-button:focus-visible {
  background: rgba(57, 181, 74, 0.2);
  color: #fff;
}
.nav-link.is-current {
  font-weight: 700;
  color: #fff;
  background: rgba(57, 181, 74, 0.24);
  box-shadow: inset 3px 0 0 var(--accent-bright);
}
.nav-link.is-disabled {
  color: #93a4b8;
  cursor: not-allowed;
  opacity: 1;
  background: transparent;
  font-weight: 500;
}
.coming-later {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--disabled-badge-ink);
  background: var(--disabled-badge-bg);
  border: 1px solid #b7c4ba;
  border-radius: 3px;
  padding: 0.12rem 0.4rem;
  opacity: 1;
}
.logout-form { margin: 0; }
.search-trigger { /* chrome button styles */ }
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 22, 14, 0.45);
  z-index: 990;
}

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 22, 14, 0.5);
  z-index: 1100;
  display: grid;
  place-items: start center;
  padding: 4rem 1rem 1rem;
}
.search-overlay[hidden] { display: none !important; }
.search-panel {
  width: min(720px, 100%);
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 1rem;
  max-height: min(80vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.search-panel-head { display: flex; gap: 0.75rem; align-items: center; }
.search-field { flex: 1; margin: 0; }
.search-field input { margin-top: 0; }
.search-close { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.search-mode-row {
  display: flex;
  gap: 0.35rem;
  margin: 0.55rem 0 0.25rem;
  flex-wrap: wrap;
}
.search-mode-btn {
  background: #f3f5f7;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.3rem 0.65rem;
  font-size: 0.85rem;
  border-radius: 4px;
}
.search-mode-btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.search-status { margin: 0.45rem 0; flex: 0 0 auto; }
.search-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0.35rem 0 0.15rem;
  flex: 0 0 auto;
}
/* ~5 result blocks visible; scroll for the rest (not a hard result cap). */
.search-results-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 22rem;
  overflow-x: hidden;
  overflow-y: auto;
}
.search-results { list-style: none; padding: 0; margin: 0; }
.search-results li { border-bottom: 1px solid var(--line); }
.search-block-clickable {
  cursor: pointer;
  padding: 0.45rem 0.35rem;
}
.search-block-clickable:hover,
.search-block-clickable.is-active-nav,
.search-block-clickable:focus {
  background: #eef5ef;
  outline: none;
}
.search-result-link {
  display: block;
  padding: 0.45rem 0.35rem;
  color: inherit;
  text-decoration: none;
}
.search-account-block { padding: 0.45rem 0.35rem; }
.search-block-main strong { display: inline; }
.search-child-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  padding: 0.25rem 0 0;
}
.search-child-link { padding: 0.2rem 0 0.2rem 0.5rem; font-size: 0.92rem; }
.search-child-note { padding: 0.15rem 0; font-size: 0.85rem; }
.search-more-children {
  display: block;
  margin: 0.15rem 0 0.15rem 0.5rem;
  padding: 0;
  background: none;
  color: var(--accent);
  cursor: pointer;
}
.search-cat {
  display: inline-block;
  min-width: 4.5rem;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.notice {
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
}
.notice-warning { background: #fff6e5; border: 1px solid #e0c48a; color: #6a4b00; }
.notice-info { background: #e8f6ea; border: 1px solid #b7d8bc; }

.scheduling-test-date-banner {
  background: #7c2d12;
  color: #fff7ed;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.55rem 1rem;
  position: sticky;
  top: 0;
  z-index: 400;
}
.scheduling-test-date-banner a {
  color: #fed7aa;
  margin-left: 0.85rem;
  font-weight: 600;
}

label { display: block; margin: 0.75rem 0; }
input { width: 100%; padding: 0.55rem 0.65rem; margin-top: 0.3rem; }
button { background: var(--accent); color: #fff; border: 0; padding: 0.55rem 0.9rem; cursor: pointer; }
.muted { color: var(--muted); }
.error { color: var(--error); }
.inline { display: inline; }
.status-table { width: 100%; border-collapse: collapse; }
.status-table th, .status-table td { border-bottom: 1px solid var(--line); text-align: left; padding: 0.55rem 0.35rem; vertical-align: top; }
.status-table th { width: 220px; color: var(--muted); font-weight: 600; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.account-number { font-size: 1.35rem; font-weight: 700; color: var(--accent); margin: 0; }
.data-table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; }
.data-table th, .data-table td { border-bottom: 1px solid var(--line); text-align: left; padding: 0.5rem 0.35rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin-bottom: 1rem; }
.filters label { margin: 0; }
select, textarea { width: 100%; padding: 0.55rem 0.65rem; margin-top: 0.3rem; }
.button, a.button { display: inline-block; background: var(--accent); color: #fff; padding: 0.55rem 0.9rem; text-decoration: none; border-radius: 4px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.timeline { list-style: none; padding: 0; }
.timeline li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.flash { background: #e8f6ea; border: 1px solid #b7d8bc; padding: 0.65rem 0.8rem; }
.warning { background: #fff6e5; border: 1px solid #e0c48a; padding: 0.65rem 0.8rem; color: #6a4b00; }
.note-form textarea { min-height: 90px; }
.version-chip { white-space: nowrap; }

.launch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}
.launch-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #fff, #f7faf7);
  appearance: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.launch-card:hover { border-color: #9ec2a5; }
.launch-card .count { font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.launch-card-accent { background: linear-gradient(180deg, #e8f6ea, #f7faf7); }

.grouped-form .form-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: var(--space-2) var(--space-3);
  margin: var(--space-3) 0;
  background: linear-gradient(180deg, #fff, #f9fbf9);
}
.grouped-form legend { font-weight: 700; padding: 0 var(--space-1); }
.property-form .form-group {
  padding: var(--space-3) var(--space-4);
  box-shadow: 0 1px 0 rgba(29, 42, 31, 0.04);
}
.property-form legend {
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.property-form .form-row {
  margin-top: 0.65rem;
}
.property-form .form-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.5rem;
  align-items: center;
  margin: 0.35rem 0 0.85rem;
}
.property-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 0.5rem 0 1.25rem;
}
.property-credential-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}
.property-credential-controls input[type="hidden"] {
  display: none;
}
.property-credential-controls .btn-secondary {
  white-space: nowrap;
  padding: 0.35rem 0.7rem;
}

/* Shared Places API (New) address search mount — Account + Property */
.address-autocomplete { margin-bottom: var(--space-2); }
.address-search-block { margin-bottom: 0.65rem; }
.address-search-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.25rem;
}
.address-search-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.address-search-toolbar .address-search-label {
  margin-bottom: 0;
}
.address-import-billing {
  flex: 0 0 auto;
  padding: 0.3rem 0.7rem;
  font-size: 0.9rem;
}
.address-import-billing:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.address-search-host {
  display: block;
  width: 100%;
  min-height: 2.4rem;
}
/* Match AGLCRM text inputs — not Google's oversized dark default chrome */
.address-place-autocomplete,
.address-search-host gmp-place-autocomplete {
  display: block;
  width: 100%;
  color-scheme: light;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.3;
  min-height: 2.4rem;
  padding: 0;
  box-sizing: border-box;
  --gmp-mat-color-surface: #ffffff;
  --gmp-mat-color-on-surface: #1d2a1f;
  --gmp-mat-color-on-surface-variant: #4a5a4d;
  --gmp-mat-color-primary: #2f6b3a;
  --gmp-mat-color-outline: #d5dfd6;
  --gmp-mat-color-outline-variant: #d5dfd6;
}
.address-place-autocomplete:focus-within,
.address-search-host gmp-place-autocomplete:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--accent);
}
.address-search-fallback { margin: 0.35rem 0 0; }
.address-source-badge { margin: 0.25rem 0 0.75rem; }
.method-extension input { max-width: 8rem; }
.duplicate-warnings {
  background: #fff8ef;
  border: 1px solid #e0c48a;
  border-radius: 8px;
  padding: var(--space-2) var(--space-3);
  margin: var(--space-3) 0;
}
.duplicate-warnings h2 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.duplicate-card {
  border-top: 1px solid #ead7b2;
  padding: 0.75rem 0;
}
.duplicate-card:first-of-type { border-top: 0; }
.duplicate-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
}
.duplicate-title { font-weight: 700; margin: 0.25rem 0 0.5rem; }
.duplicate-actions { margin-top: 0.75rem; }
.live-duplicate-host { margin: var(--space-2) 0; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-2); }
.form-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }
.btn-primary, button.btn-primary, a.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
}
a.btn-primary:link,
a.btn-primary:visited,
a.btn-primary:hover,
a.btn-primary:active {
  color: #fff;
  text-decoration: none;
}
.btn-secondary, a.btn-secondary {
  display: inline-block;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.55rem 0.9rem;
  text-decoration: none;
  border-radius: 4px;
}
.btn-danger {
  display: inline-block;
  background: #8b2e2e;
  color: #fff;
  border: 0;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn-link { background: transparent; color: var(--accent); padding: 0; text-decoration: underline; }
.checkbox { display: flex; align-items: center; gap: 0.5rem; }
.checkbox input { width: auto; margin: 0; }
.validation-summary { background: #fdecec; border: 1px solid #e2a0a0; color: var(--error); padding: var(--space-2); border-radius: 6px; }
.empty-state { color: var(--muted); padding: var(--space-3) 0; }
.badge-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0 0.75rem; }
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #e8eee9;
  color: var(--ink);
}
.badge-status { background: #d9eedd; color: #1a4d24; }
.badge-hold { background: #f8e3c6; color: #6a3b00; }
.badge-review { background: #f6d6d6; color: #7a1d1d; }
.badge-priority { background: #fde68a; color: #7c2d12; }
.badge-muted { background: #e7ebe8; color: #334038; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 1px solid var(--line); margin: 1rem 0; }
.tab {
  padding: 0.55rem 0.85rem;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 3px solid transparent;
}
.tab.is-active { font-weight: 700; border-bottom-color: var(--accent); color: var(--accent); }
.entity-list { list-style: none; padding: 0; margin: 0; }
.entity-list li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; }
.fact-list { display: grid; grid-template-columns: 8rem 1fr; gap: 0.35rem 0.75rem; }
.fact-list dt { color: var(--muted); margin: 0; }
.fact-list dd { margin: 0; }
.inline-form { display: inline; }
.helper-block { border-left: 3px solid var(--accent); padding-left: var(--space-2); margin-top: var(--space-2); }
.primary-contact-summary { margin: 0.35rem 0 0; }
.recent-accounts { margin-bottom: var(--space-3); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .primary-nav {
    display: none;
    position: fixed;
    top: 3.4rem;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--header);
    padding: 0.75rem;
    overflow: auto;
    z-index: 995;
  }
  body.nav-open .primary-nav { display: block; }
  .nav-sections { flex-direction: column; align-items: stretch; }
  .nav-dropdown {
    position: static;
    display: none;
    box-shadow: none;
    border: 0;
    background: rgba(255,255,255,0.08);
    color: var(--header-ink);
    margin-top: 0.25rem;
  }
  .nav-section.is-open > .nav-dropdown { display: block; }
  .nav-link, .nav-link-button { color: #f4fff6; }
  .nav-link:hover, .nav-link-button:hover { background: rgba(255,255,255,0.12); }
  .nav-link.is-current {
    color: #fff;
    background: rgba(255,255,255,0.14);
    box-shadow: inset 3px 0 0 #9ed2a8;
  }
  .nav-link.is-disabled {
    color: #eef6f0;
    background: rgba(0,0,0,0.18);
  }
  .coming-later {
    color: #14301a;
    background: #d7eadc;
    border-color: #9ed2a8;
  }
  .header-right .user-menu .nav-dropdown {
    position: absolute;
    background: #fff;
    color: var(--ink);
  }
  .app-main { margin: 0.75rem; }
  .search-overlay { padding-top: 1rem; }
}

.searchable-select {
  position: relative;
  display: grid;
  gap: 0.25rem;
}
.searchable-select--native {
  width: 100%;
  min-width: 0;
}
select.searchable-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.searchable-select .searchable-input {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.55rem 0.65rem;
}
.searchable-options {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  border: 1px solid var(--border, #c5d0c8);
  background: #fff;
  max-height: 14rem;
  overflow: auto;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  z-index: 20;
}
.searchable-options li {
  padding: 0.4rem 0.65rem;
  cursor: pointer;
}
.searchable-options li:hover,
.searchable-options li:focus {
  background: #eef6f0;
  outline: none;
}
.searchable-options li.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.searchable-options li.is-disabled:hover,
.searchable-options li.is-disabled:focus {
  background: transparent;
}
.waiting-list-field .searchable-select .searchable-input,
.sched-field .searchable-select .searchable-input,
.list-toolbar-field .searchable-select .searchable-input {
  min-height: 2.1rem;
  margin-top: 0;
}
.address-source-badge {
  margin: 0.25rem 0 0.5rem;
}
.account-reference-note {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid #2f6b3a;
  background: #f3f8f4;
}
.account-reference-note.is-empty {
  border-left-color: #9bb5a1;
  background: #f7f9f7;
}
.method-row {
  align-items: end;
}

/* —— Account detail visual fidelity —— */
html.is-account-detail-page {
  background: var(--account-navy);
}
html.is-restoring-scroll body {
  opacity: 0;
}
body.is-account-detail {
  background: var(--account-navy);
}
body.is-account-detail .app-main {
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  overflow-x: hidden;
}
.account-page { color: var(--ink); }
.account-flash { margin: 0.75rem 1.25rem 0; }
.account-chrome {
  background: linear-gradient(180deg, var(--account-navy-mid), var(--account-navy));
  color: var(--account-navy-ink);
  padding: 1.35rem 1.5rem 1.15rem;
}
.account-chrome a { color: #b7e3c0; text-decoration: none; }
.account-chrome a:hover { color: #dff5e4; text-decoration: underline; }
.account-chrome-top {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.account-display-name {
  margin: 0;
  font-size: clamp(1.65rem, 2.4vw, var(--type-2xl));
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.15;
}
.account-title-row,
.workspace-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.icon-edit {
  color: #cfead4 !important;
  text-decoration: none !important;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0.2rem 0.3rem;
  border-radius: 4px;
}
.icon-edit:hover { background: rgba(255,255,255,0.08); }
.account-chrome .badge-status {
  background: #2f9e44;
  color: #fff;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: var(--type-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.account-meta,
.workspace-meta,
.account-primary-contact {
  margin: 0.55rem 0 0;
  color: #c3d0e0;
  font-size: var(--type-sm);
  font-weight: 500;
}
.meta-sep { opacity: 0.45; margin: 0 0.4rem; }
.account-subnav {
  display: flex;
  gap: 1rem;
  margin-top: 0.85rem;
}
.account-subnav-link {
  color: #9eb0c4 !important;
  font-size: var(--type-sm);
  font-weight: 600;
  text-decoration: none !important;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.15rem;
}
.account-subnav-link:hover,
.account-subnav-link.is-active {
  color: #fff !important;
  border-bottom-color: var(--accent-bright);
}
.finance-slots {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.finance-slot {
  min-width: 10.5rem;
  min-height: 4.6rem;
  background: var(--finance-alert);
  color: #fff;
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  display: grid;
  align-content: center;
  gap: 0.1rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.finance-slot.is-unavailable { background: var(--finance-unavailable); }
.finance-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.finance-value { font-size: 1.28rem; font-weight: 800; line-height: 1.2; }
.finance-hint { font-size: 0.68rem; opacity: 0.78; font-weight: 500; }
.finance-slots-sm .finance-slot { min-width: 8.75rem; min-height: 3.8rem; padding: 0.5rem 0.65rem; }
.finance-slots-sm .finance-value { font-size: 1.05rem; }
.workspace-finance-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.workspace-overflow {
  position: relative;
  flex: 0 0 auto;
  margin-top: 0.15rem;
}
.workspace-overflow-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--line, #d5dde6);
  border-radius: 6px;
  background: #fff;
  color: #243447;
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.workspace-overflow-btn:hover,
.workspace-overflow-btn[aria-expanded="true"] {
  background: #f3f6f8;
  border-color: #b7c3d1;
}
.account-chrome-finance-actions .workspace-overflow-btn {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #eef3f9;
}
.account-chrome-finance-actions .workspace-overflow-btn:hover,
.account-chrome-finance-actions .workspace-overflow-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
}
.workspace-overflow-menu {
  position: absolute;
  top: calc(100% + 0.3rem);
  right: 0;
  /* Above page content / maps; still below sticky app header (1000). */
  z-index: 200;
  min-width: 13.5rem;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line, #d5dde6);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(16, 32, 51, 0.14);
}
.workspace-overflow-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.85rem;
  border: 0;
  background: transparent;
  color: #102033;
  font: inherit;
  font-size: var(--type-sm);
  text-align: left;
  cursor: pointer;
}
.workspace-overflow-item:hover,
.workspace-overflow-item:focus-visible {
  background: #eef6f0;
  outline: none;
}
.workspace-overflow-item.is-disabled,
.workspace-overflow-item:disabled {
  color: #7a8796;
  cursor: not-allowed;
  background: transparent;
}
.workspace-overflow-coming-later {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #8a97a6;
  white-space: nowrap;
}

.account-summary-strip {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr 1.55fr;
  gap: 0;
  margin-top: 0.25rem;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  overflow: hidden;
}
.summary-cell {
  padding: 0.9rem 1rem;
  min-height: 8.75rem;
  border-right: 1px solid rgba(255,255,255,0.12);
}
.summary-cell:last-child { border-right: 0; }
.summary-cell h2 {
  margin: 0 0 0.55rem;
  font-size: var(--type-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a9bdd4;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.summary-cell p { margin: 0.2rem 0; color: #eef3f9; font-size: var(--type-sm); }
.summary-cell .muted { color: #9eb0c4; }
.summary-action { margin-top: 0.55rem !important; }
.summary-action a { font-size: var(--type-sm); color: #b7e3c0 !important; }
.summary-deferred-note { font-size: var(--type-xs) !important; margin-top: 0.45rem !important; }
.summary-cell-note { display: flex; flex-direction: column; min-width: 0; }
.reference-note-scroll {
  max-height: 5.75rem;
  overflow: auto;
  padding-right: 0.35rem;
  color: #eef3f9;
  font-size: var(--type-sm);
  line-height: 1.45;
  white-space: pre-wrap;
}
.activity-notes-panel { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.activity-notes-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.activity-notes-panel-head h2 {
  margin: 0;
  font-size: var(--type-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a9bdd4;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.activity-notes-panel--summary .muted,
.activity-notes-panel--summary .activity-note-meta,
.activity-notes-panel--summary .activity-note-body {
  color: #eef3f9;
}
.activity-notes-panel--summary .activity-notes-empty { color: #9eb0c4; margin: 0.2rem 0; }
.activity-notes-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.activity-notes-table .activity-note-col-body,
.activity-notes-table .activity-note-body { width: auto; }
.activity-notes-table .activity-note-col-meta,
.activity-notes-table .activity-note-meta { width: 4.25rem; }
.activity-notes-table .activity-note-col-actions,
.activity-notes-table .activity-note-actions { width: 1.35rem; }
.activity-note-body {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.4;
}
.activity-note-row.is-editable {
  cursor: pointer;
}
.activity-note-row.is-editable:hover td {
  background: rgba(47, 107, 58, 0.06);
}
.activity-notes-panel--summary .activity-note-row.is-editable:hover td {
  background: rgba(183, 227, 192, 0.08);
}
.activity-note-row.is-editable:focus-visible {
  outline: 2px solid var(--accent, #2f6b3a);
  outline-offset: -2px;
}
.activity-note-meta {
  text-align: right;
  line-height: 1.25;
  padding-left: 0.35rem !important;
}
.activity-note-date,
.activity-note-who {
  display: block;
}
.activity-note-who {
  font-size: 0.9em;
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-note-actions {
  text-align: right;
  padding-left: 0.15rem !important;
  padding-right: 0 !important;
}
.activity-note-actions form { margin: 0; }
.activity-note-archive-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.75;
  border-radius: 3px;
}
.activity-note-archive-btn:hover,
.activity-note-archive-btn:focus-visible {
  opacity: 1;
  outline: none;
  background: rgba(0, 0, 0, 0.08);
}
.activity-note-trash-icon { display: block; }
.activity-notes-panel--summary .activity-notes-table {
  font-size: var(--type-xs);
}
.activity-notes-panel--summary .activity-notes-table th {
  text-align: left;
  font-weight: 600;
  color: #9eb0c4;
  padding: 0.15rem 0.2rem 0.25rem 0;
  border-bottom: 1px solid rgba(158, 176, 196, 0.35);
}
.activity-notes-panel--summary .activity-notes-table th.activity-note-col-meta,
.activity-notes-panel--summary .activity-notes-table th.activity-note-col-actions {
  text-align: right;
}
.activity-notes-panel--summary .activity-notes-table td {
  padding: 0.35rem 0.2rem 0.35rem 0;
  vertical-align: top;
  border-bottom: 1px solid rgba(158, 176, 196, 0.18);
}
.activity-notes-panel--summary .activity-note-meta {
  color: #b7c7d8;
  font-size: var(--type-xs);
}
.activity-notes-panel--summary .activity-note-archive-btn { color: #b7e3c0; }
.activity-notes-panel--summary .activity-note-archive-btn:hover,
.activity-notes-panel--summary .activity-note-archive-btn:focus-visible {
  background: rgba(183, 227, 192, 0.15);
}
.activity-notes-scroll {
  max-height: 7.5rem;
  overflow: auto;
  padding-right: 0.25rem;
}
.activity-notes-panel--property {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f7;
}
.activity-notes-panel--property .activity-notes-panel-head h2 {
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
}
.activity-notes-panel--property .activity-notes-table {
  font-size: var(--type-sm);
}
.activity-notes-panel--property .activity-notes-table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  padding: 0.2rem 0.35rem 0.35rem 0;
  border-bottom: 1px solid var(--line);
}
.activity-notes-panel--property .activity-notes-table th.activity-note-col-meta,
.activity-notes-panel--property .activity-notes-table th.activity-note-col-actions {
  text-align: right;
}
.activity-notes-panel--property .activity-notes-table td {
  padding: 0.4rem 0.35rem 0.4rem 0;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.activity-notes-panel--property .activity-note-meta { color: var(--muted); }
.activity-notes-panel--property .activity-note-archive-btn { color: var(--muted); }
.activity-note-dialog-title {
  margin: 0;
  font-size: 1.05rem;
}
.activity-note-dialog textarea {
  width: 100%;
  min-height: 7rem;
  resize: vertical;
}
.activity-note-also-account {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--type-sm);
  margin: 0.35rem 0 0;
  width: auto;
}
.activity-note-also-account input[type="checkbox"] {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}
.history-activity-note-actions {
  margin: 0 0 0.85rem;
}
.summary-icon {
  width: 0.95rem;
  height: 0.95rem;
  display: inline-block;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  opacity: 0.9;
}
.summary-icon-pin {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 14.5 9 2.5 2.5 0 0 1 12 11.5z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 14.5 9 2.5 2.5 0 0 1 12 11.5z'/%3E%3C/svg%3E");
}
.summary-icon-card {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 6h18a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm1 3v2h16V9H4z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 6h18a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm1 3v2h16V9H4z'/%3E%3C/svg%3E");
}
.summary-icon-portal {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h16v11H4V5zm-1 13h18v2H3v-2z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h16v11H4V5zm-1 13h18v2H3v-2z'/%3E%3C/svg%3E");
}
.summary-icon-note {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h9l5 5v13H6V3zm8 1.5V9h4.5L14 4.5z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h9l5 5v13H6V3zm8 1.5V9h4.5L14 4.5z'/%3E%3C/svg%3E");
}
.deferred-badge {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: var(--type-xs);
  font-weight: 700;
  color: #14301a;
  background: #d7eadc;
  border: 1px solid #9ed2a8;
  border-radius: 3px;
  padding: 0.12rem 0.4rem;
}
.account-secondary-panel {
  margin: 0;
  padding: 1.1rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.35rem;
}
.panel-head h2 { margin: 0; font-size: var(--type-lg); }
.detail-section-title {
  margin: 1.1rem 0 0.55rem;
  font-size: var(--type-md);
  font-weight: 700;
  color: #1d2c40;
}

.account-split {
  display: grid;
  grid-template-columns: minmax(240px, 270px) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 32rem;
  background: var(--account-navy);
  padding: 0 0 1.25rem;
}
.property-rail {
  background: var(--rail-navy);
  color: #e8eef8;
  padding: 0.85rem 0.75rem 0.85rem;
  border-right: 1px solid rgba(255,255,255,0.08);
  box-sizing: border-box;
}
/*
 * Mode C (2026-08-13): one document scroll. Do not lock .account-split to the
 * viewport or give the left list / white pane inner overflow-y scroll.
 * Restore Mode B from docs/current/ACCOUNT_WORKSPACE_SCROLL.md if needed.
 */
body.is-account-detail .property-rail.has-floating-add {
  padding-bottom: 4.75rem;
}
.rail-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 0;
}
.rail-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 0.35rem;
  overflow: visible;
}
.rail-property-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
}
.rail-footer {
  flex: 0 0 auto;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}
body.is-account-detail .rail-footer {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 500;
  width: 270px;
  max-width: 100%;
  margin: 0;
  padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  background: var(--rail-navy);
  border-top: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 -8px 20px rgba(7, 21, 39, 0.28);
  box-sizing: border-box;
}
.rail-heading {
  margin: 0 0.35rem;
  font-size: var(--type-sm);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9eb0c4;
  flex: 0 0 auto;
}
.rail-heading-properties { margin-top: 0.55rem; }
.rail-context-list { flex: 0 0 auto; }
.rail-icon-account {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4zm0 2c-4 0-8 2-8 4v2h16v-2c0-2-4-4-8-4z'/%3E%3C/svg%3E") center / contain no-repeat !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4zm0 2c-4 0-8 2-8 4v2h16v-2c0-2-4-4-8-4z'/%3E%3C/svg%3E") center / contain no-repeat !important;
}
.rail-empty { color: #9eb0c4; font-size: var(--type-sm); margin: 0.5rem 0.35rem; }
.property-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.property-rail-list > li {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.property-rail-item {
  display: grid;
  grid-template-columns: 1.35rem 1fr;
  gap: 0.55rem;
  padding: 0.85rem 0.65rem;
  color: inherit;
  text-decoration: none;
  border-left: 3px solid transparent;
}
.property-rail-item:hover { background: rgba(255,255,255,0.04); }
.property-rail-item.is-selected {
  border-left-color: var(--accent-bright);
  background: rgba(57, 181, 74, 0.12);
}
.property-rail-icon {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  background: #9eb0c4;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3 3 10v11h6v-7h6v7h6V10L12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3 3 10v11h6v-7h6v7h6V10L12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.property-rail-item.is-selected .property-rail-icon { background: var(--accent-bright); }
.property-rail-body { display: grid; gap: 0.15rem; min-width: 0; }
.property-rail-name { font-weight: 700; font-size: var(--type-md); color: #fff; }
.property-rail-addr,
.property-rail-status,
.property-rail-balance { font-size: var(--type-sm); color: #a9bdd4; }
.property-rail-balance { color: #d5deea; }
.rail-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.55rem;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 6px;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: var(--type-sm);
  background: rgba(255,255,255,0.04);
  box-sizing: border-box;
}
.rail-add:hover { background: rgba(57, 181, 74, 0.2); border-color: var(--accent-bright); }

.property-workspace-wrap {
  padding: 0.9rem 1rem 0 0.75rem;
  min-width: 0;
}
.property-workspace {
  background: #fff;
  padding: 1.15rem 1.25rem 1.4rem;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-workspace);
  min-height: calc(100% - 0.25rem);
}
.workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.property-display-name {
  margin: 0;
  font-size: clamp(1.3rem, 1.8vw, 1.55rem);
  font-weight: 800;
  color: #102033;
}
.workspace-meta { color: var(--muted); }
.workspace-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.1rem;
  overflow-x: auto;
  border-bottom: 1px solid #e2e8ef;
  margin: 0 0 1.1rem;
  -webkit-overflow-scrolling: touch;
}
.workspace-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0.85rem;
  min-height: 2.65rem;
  text-decoration: none;
  color: #243447;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  font-size: var(--type-sm);
  font-weight: 600;
}
.workspace-tab.is-active {
  color: #147a2c;
  font-weight: 800;
  border-bottom-color: var(--accent-bright);
}
.workspace-tab.is-disabled {
  color: #8a97a6;
  cursor: not-allowed;
  opacity: 0.78;
}
.tab-icon {
  width: 0.95rem;
  height: 0.95rem;
  background: currentColor;
  opacity: 0.85;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}
.tab-icon-receipt, .tab-icon-calendar, .tab-icon-chat, .tab-icon-estimate,
.tab-icon-tag, .tab-icon-details, .tab-icon-form, .tab-icon-file,
.tab-icon-audit, .tab-icon-history {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h9l3 3v15H6V3zm2 5h8v2H8V8zm0 4h8v2H8v-2zm0 4h5v2H8v-2z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h9l3 3v15H6V3zm2 5h8v2H8V8zm0 4h8v2H8v-2zm0 4h5v2H8v-2z'/%3E%3C/svg%3E");
}
.workspace-panel { min-height: 12rem; }
.details-groups,
.details-cf-form {
  display: grid;
  gap: 0;
}
.details-group {
  padding: 0.55rem 0 0.7rem;
  border-bottom: 1px solid #e4ebf2;
}
.details-group:last-child { border-bottom: 0; }
.details-cf-form .details-group { margin-top: 0; }
.details-group .detail-section-title {
  margin: 0 0 0.45rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #eef2f6;
  font-size: var(--type-sm);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #1d2c40;
}
.fact-list-wide { grid-template-columns: 10.5rem 1fr; gap: 0.55rem 1rem; }
.fact-list-wide dt { font-size: var(--type-sm); font-weight: 600; color: #5b6b7c; }
.fact-list-wide dd { font-size: var(--type-md); font-weight: 600; color: #152033; }
.cf-fields-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem 0.85rem;
}
.cf-field {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  font-size: var(--type-sm);
  font-weight: 600;
  color: #5b6b7c;
  min-width: 0;
}
.cf-field input,
.cf-field textarea,
.cf-readonly {
  width: 100%;
  box-sizing: border-box;
  font-size: var(--type-md);
  font-weight: 600;
  color: #152033;
  min-width: 0;
}
.cf-readonly {
  min-height: 1.85rem;
  display: flex;
  align-items: center;
  padding: 0.2rem 0;
  line-height: 1.35;
  word-break: break-word;
}
.cf-readonly--note {
  align-items: flex-start;
  white-space: pre-wrap;
  min-height: 2.4rem;
}
.cf-field--wide {
  grid-column: 1 / -1;
}
.details-actions { margin-top: 0.85rem; }
.settings-search {
  margin: 0 0 1rem;
  display: grid;
  gap: 0.55rem;
}
.settings-search-field {
  margin: 0;
  max-width: 28rem;
}
.settings-search-input {
  width: 100%;
  margin: 0;
}
.settings-search-empty {
  margin: 0;
}
.settings-groups {
  display: grid;
  gap: 2.25rem;
}
.settings-group[hidden] {
  display: none !important;
}
.settings-group + .settings-group {
  padding-top: 1.35rem;
  border-top: 1px solid #e2e8ef;
}
.settings-group-title {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #334553;
}
.settings-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.85rem;
}
.settings-card {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}
.settings-card[hidden] { display: none !important; }
.settings-card:hover { border-color: #9db8cf; background: #f7fafc; }
.settings-card strong { font-size: 1.05rem; color: #152033; }
.settings-card span { font-size: var(--type-sm); color: var(--muted); }

.settings-services-tabs {
    display: flex;
    gap: 1rem;
    margin: 0.35rem 0 1rem;
}
.settings-services-tabs a { font-weight: 600; }
.settings-services-panel {
    margin: 1.5rem 0 2rem;
    padding-top: 0.25rem;
}
.settings-services-group {
    margin: 1.25rem 0 0.35rem;
    font-size: 1.05rem;
}
.settings-services-existing-block {
    margin: 0 0 2rem;
    padding: 1.15rem 1.1rem 0.35rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
.settings-services-existing-panel {
    margin: 0 0 1.5rem;
    padding-top: 0;
}
.settings-services-existing-panel + .settings-services-existing-panel {
    margin-top: 1.35rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}
.settings-services-existing-title {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
    font-weight: 650;
}
.settings-services-categories-table th,
.settings-services-categories-table td {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}
.settings-services-categories-table .checkbox {
    margin: 0;
    line-height: 1.3;
}
.settings-services-categories-table .checkbox input {
    margin: 0;
}
.settings-services-categories-table .col-actions .btn-link {
    line-height: 1.3;
    padding: 0;
}
.settings-admin-field-spacer {
    display: block;
    line-height: 1.2;
    visibility: hidden;
}
.settings-services-filters {
    margin: 0 0 0.85rem;
}
.settings-services-list-table .settings-services-desc {
    max-width: 22rem;
}
.settings-services-list-table .col-actions a {
    white-space: nowrap;
}
/* Inline row editing on Settings > Services, sharing the Routes list row pattern. */
.settings-services-inline-table .route-row.is-editing > td {
    background: #f7fafc;
    vertical-align: top;
}
.settings-services-inline-table .route-edit-fields input[type="text"] {
    margin: 0;
    width: 100%;
    min-width: 0;
}
.settings-row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.85rem;
    white-space: nowrap;
}
.settings-row-actions .inline-form {
    display: inline;
    margin: 0;
}
.settings-row-actions .btn-link {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: var(--accent, #2f6b3a);
    text-decoration: underline;
    cursor: pointer;
}
.page-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}
.page-head-row h1 {
    margin: 0;
}
.settings-admin-add-panel {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem 1rem;
    background: #f5f8fb;
    border: 1px solid #e2e8ef;
    border-radius: 8px;
}
.settings-admin-add-panel .form-group {
    margin: 0;
    padding: 0;
    border: 0;
}
.settings-admin-add-panel legend {
    margin: 0 0 0.55rem;
    padding: 0;
}
.settings-admin-add-row {
    display: grid;
    grid-template-columns: minmax(8rem, 1.2fr) minmax(10rem, 1.8fr) minmax(11rem, 0.95fr);
    gap: 0.75rem;
    align-items: end;
}
.settings-admin-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0;
    min-width: 0;
}
.settings-admin-field > span {
    display: block;
    line-height: 1.2;
}
.settings-admin-field input {
    margin-top: 0;
    width: 100%;
    box-sizing: border-box;
    min-height: 2.35rem;
}
.settings-admin-add-order-controls {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
}
.settings-admin-add-order-controls input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}
.settings-admin-add-order-controls button {
    flex: 0 0 auto;
    align-self: stretch;
    margin: 0;
    padding: 0 0.85rem;
    min-height: 2.35rem;
    white-space: nowrap;
    border-radius: 4px;
    font: inherit;
    line-height: 1;
}
.settings-admin-list-panel {
    margin-top: 0.25rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--line);
}
.settings-admin-list-panel h2 {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
}
.settings-admin-table input:not([type="checkbox"]):not([type="hidden"]),
.settings-admin-table select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.settings-admin-table .col-order {
    width: 5.5rem;
}
.settings-admin-table .col-active {
    width: 6rem;
    white-space: nowrap;
}
.settings-admin-table .col-actions {
    width: 4.5rem;
    white-space: nowrap;
    text-align: right;
}
.settings-admin-table td {
    vertical-align: middle;
}
.price-matrix-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.price-matrix-block:first-of-type {
  margin-top: 0.75rem;
  padding-top: 0;
  border-top: 0;
}
.price-matrix-block h3 { margin: 0 0 0.25rem; }
.price-matrix-form .form-row { align-items: end; }
.price-matrix-table {
  font-size: var(--type-sm);
  min-width: 48rem;
}
.price-matrix-table--equation {
  min-width: 72rem;
}
.price-matrix-table th,
.price-matrix-table td {
  vertical-align: middle;
  padding: 0.45rem 0.35rem;
}
.price-matrix-table input,
.price-matrix-table select {
  width: 100%;
  min-width: 0;
  margin-top: 0;
  min-height: 2.1rem;
  box-sizing: border-box;
  padding: 0.35rem 0.45rem;
}
.price-matrix-table .col-type { width: 6.5rem; }
.price-matrix-table .col-range { width: 7rem; }
.price-matrix-table .col-price { width: 7.5rem; }
.price-matrix-table .col-minutes { width: 6rem; }
.price-matrix-table .col-equation { width: 7rem; }
.price-matrix-row[data-tier-type="fixed"] [data-equation-fields] input {
  background: #f1f4f2;
  color: #7a8680;
  cursor: default;
}
.price-matrix-table .col-actions {
  width: 4.5rem;
  white-space: nowrap;
  text-align: right;
}
.price-matrix-empty td { padding: 0.85rem 0.35rem; }
.price-matrix-table input.is-invalid {
  border-color: var(--error, #b42318);
  box-shadow: 0 0 0 1px var(--error, #b42318);
}
.price-matrix-range-error-row td {
  padding: 0 0.35rem 0.45rem;
  border-bottom: 0;
}
.price-matrix-range-error {
  margin: 0;
  font-size: 0.9rem;
}
.price-matrix-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.55rem 0 0;
}

.package-visits-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.package-visits-head h2 { margin: 0 0 0.25rem; }
.package-visits-head .muted { margin: 0; max-width: 42rem; }

.package-job-show-panel {
  margin: 1rem 0 1.25rem;
}
.package-job-show-head {
  margin-bottom: 0.65rem;
}
.package-job-show-head h2 {
  margin: 0 0 0.2rem;
}
.package-job-show-head .muted {
  margin: 0;
}
.package-job-summary-table {
  width: 100%;
  max-width: 52rem;
}
.package-job-summary-table th,
.package-job-summary-table td {
  padding: 0.45rem 0.65rem;
  vertical-align: middle;
}
.package-job-summary-table th {
  width: 6.5rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: #3d4d5c;
  background: #f3f6f8;
  white-space: nowrap;
}
.package-job-visits-table .col-order {
  width: 2.5rem;
  text-align: center;
}
.package-job-preview-table .col-include {
  width: 4.75rem;
  text-align: center;
}
.package-visit-include-cell {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
}
.package-job-preview-table .package-visit-preview--past-due td {
  background: #fff8ee;
}
.package-job-preview-table .package-visit-preview--current td {
  background: #f3f8f4;
}
.package-visit-current-tag {
  display: block;
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: #2d6a4f;
}
.package-job-cell-stack {
  white-space: pre-line;
  line-height: 1.35;
  max-width: 16rem;
}
.package-job-notes-cell {
  max-width: 18rem;
  color: #334038;
  font-size: 0.78rem;
}
.package-job-details-panel h2 { margin-bottom: 0.65rem; }
.package-job-details-table {
  width: 100%;
  table-layout: fixed;
}
.package-job-details-table th,
.package-job-details-table td {
  vertical-align: middle;
  padding: 0.55rem 0.65rem;
}
.package-job-details-table th {
  width: 8.5rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: #3d4d5c;
  background: #f3f6f8;
  white-space: nowrap;
}
.package-job-details-table input[type="text"],
.package-job-details-table input[type="date"],
.package-job-details-table input:not([type="checkbox"]):not([type="hidden"]),
.package-job-details-table select {
  width: 100%;
  max-width: 22rem;
  margin: 0;
  box-sizing: border-box;
}
.package-job-details-table td[colspan] select {
  max-width: 28rem;
}
.package-job-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-weight: 500;
}
.package-job-field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
}
.package-job-conflict-days {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin-top: 0.35rem;
}
.property-conflict-days {
  margin: 0.75rem 0 0;
  padding: 0;
  border: 0;
}
.property-conflict-days > legend {
  font-weight: 650;
  font-size: 0.85rem;
  padding: 0;
}
.property-conflict-days-table {
  margin: 0.45rem 0 0;
  max-width: 44rem;
}
.property-conflict-days-table th,
.property-conflict-days-table td {
  vertical-align: middle;
}
.property-conflict-days-table .col-active {
  width: 4.5rem;
  text-align: center;
}
.property-conflict-days-table select {
  width: 100%;
  min-width: 10rem;
}
.visit-occurrence-services {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}
.visit-occurrence-services .package-visit-services-summary {
  max-width: none;
}
.visit-occurrence-reason {
  display: block;
  margin-top: 0.55rem;
  max-width: 28rem;
}
.package-job-details-table textarea {
  width: 100%;
  max-width: 28rem;
  margin: 0;
  box-sizing: border-box;
}
.package-visits-actions {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}
.package-visits-actions .btn-secondary {
  margin-right: auto;
}
/* Whole-form Save buttons on a page whose rows save themselves. */
.package-template-form-actions {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}
.package-visits-table-footer {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.75rem;
}
.package-visit-preview {
  display: grid;
  gap: 0.4rem;
  margin: 0.85rem 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border, #d5d9e0);
  border-radius: 6px;
}
.package-visit-preview--past-due {
  border-color: #d4a15c;
  background: #fff8ee;
}
.package-visit-include {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-weight: 500;
}
.package-visit-include input[type="checkbox"] {
  margin-top: 0.3rem;
}
.package-visit-past-due-tag {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #8a5a12;
}
.package-visit-table { font-size: var(--type-sm); }
.package-visit-table th,
.package-visit-table td {
  vertical-align: top;
  padding: 0.45rem 0.35rem;
}
.package-visit-table input[type="text"],
.package-visit-table input[type="number"],
.package-visit-table input:not([type="checkbox"]):not([type="hidden"]):not([type="button"]) {
  width: 100%;
  min-width: 0;
  margin-top: 0;
  min-height: 2.1rem;
  box-sizing: border-box;
  padding: 0.35rem 0.45rem;
}
.package-visit-table .col-order { width: 4.25rem; text-align: center; }
.package-visit-table .col-min-days { width: 7.5rem; }
.package-visit-table .col-notes { width: 6.5rem; white-space: nowrap; }
.package-visit-table .col-actions { width: 4.5rem; white-space: nowrap; }
/* Inline row editing (shares the Routes list .route-row / .route-view pattern). */
.package-visit-table--inline-edit .col-actions { width: 7.5rem; }
.package-visit-table--inline-edit .route-row.is-editing > td { background: #f7fafc; }
.package-visit-table--inline-edit .route-view { line-height: 1.35; }
.package-visit-row-remove { margin-top: 0.35rem; }
.package-visit-order-label {
  display: block;
  font-weight: 700;
  line-height: 1.2;
}
.package-visit-reorder {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
}
.package-visit-reorder .btn-link {
  text-decoration: none;
  font-size: 1rem;
  line-height: 1;
  padding: 0.1rem 0.2rem;
}
.package-visit-reorder .btn-link:disabled {
  opacity: 0.35;
  cursor: default;
}
.package-visit-services-summary {
  margin: 0 0 0.2rem;
  line-height: 1.35;
  max-width: 16rem;
  white-space: pre-line;
}
.package-visit-table .col-date-range { min-width: 13.5rem; }
.package-visit-date-range {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}
.package-visit-date-endpoint {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex: 0 0 auto;
}
.package-visit-date-range select {
  width: auto;
  min-width: 3.25rem;
  max-width: 4.85rem;
  margin-top: 0;
  min-height: 2.1rem;
  padding: 0.3rem 0.2rem;
}
.package-visit-date-range [data-eligible-day] {
  min-width: 2.75rem;
  max-width: 3.35rem;
}
.package-visit-table .route-edit-fields .package-visit-date-range select,
.package-visit-table--inline-edit .route-edit-fields .package-visit-date-range select {
  width: auto;
  min-width: 3.25rem;
  max-width: 4.85rem;
}
.package-visit-notes-btn.has-content { font-weight: 700; }
.package-visit-inherited-notes {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border, #d5d9e0);
  border-radius: 6px;
  background: var(--surface-muted, #f6f7f9);
}
.package-visit-inherited-notes h4 {
  margin: 0;
  font-size: 0.9rem;
}
.package-visit-inherited-notes-body {
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.35;
}
.package-visit-services-dialog {
  max-width: 36rem;
  width: calc(100% - 2rem);
  overflow: visible;
}
.package-visit-services-dialog .cm-dialog-form {
  overflow: visible;
}
.package-visit-services-dialog .searchable-input:focus,
.package-visit-services-dialog .searchable-input:focus-visible {
  outline: none;
  border-color: #9bb5a1;
  box-shadow: none;
}
.package-visit-services-dialog .searchable-input::-webkit-search-decoration,
.package-visit-services-dialog .searchable-input::-webkit-search-cancel-button,
.package-visit-services-dialog .searchable-input::-webkit-search-results-button,
.package-visit-services-dialog .searchable-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.package-visit-service-picker {
  display: grid;
  gap: 0.65rem;
  margin: 0.5rem 0 0.65rem;
  overflow: visible;
}
.package-visit-service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: start;
  position: relative;
  z-index: 1;
}
.package-visit-service-row:focus-within {
  z-index: 40;
}
.package-visit-service-row .searchable-select {
  width: 100%;
}
.package-visit-services-dialog .searchable-options {
  z-index: 50;
  box-shadow: 0 8px 20px rgba(7, 21, 39, 0.12);
}
.package-visit-service-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0 0 0.85rem;
}
.package-visit-add-service-btn {
  position: relative;
  z-index: 0;
  margin: 0;
}
.package-visit-create-service-toggle {
  margin: 0;
}
.package-visit-create-service-hint {
  margin: 0;
  flex: 1 1 100%;
}
.package-visit-create-service {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f7;
}
.package-visit-create-service[hidden] {
  display: none !important;
}
.package-visit-create-service h4 {
  margin: 0;
  font-size: 1rem;
}
.package-visit-create-service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.package-visit-remove-service {
  margin-top: 0.45rem;
  white-space: nowrap;
}
.package-visit-service-group { margin: 0.5rem 0 0.75rem; }
.package-visit-service-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.35rem;
}
.package-visit-empty td { padding: 0.85rem 0.35rem; }
.cf-admin-crumb { margin: 0 0 0.25rem; }
.cf-admin-head h1 { margin-bottom: 0.35rem; }
.cf-entity-tabs {
  display: flex;
  gap: 0.25rem;
  margin: 0 0 0.55rem;
  border-bottom: 1px solid var(--line);
}
.cf-entity-tab {
  padding: 0.4rem 0.75rem;
  text-decoration: none;
  color: #405066;
  font-weight: 650;
  font-size: var(--type-sm);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.cf-entity-tab.is-active {
  color: #152033;
  border-bottom-color: var(--accent, #39b54a);
}
.cf-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}
.cf-create-editor[hidden] { display: none !important; }
.cf-create-editor {
  display: none;
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.85rem 0.8rem;
  border: 1px solid #b7c9da;
  border-radius: 8px;
  background: #eef5fb;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}
.cf-create-editor.is-open { display: block; }
.cf-create-title {
  margin: 0 0 0.55rem;
  font-size: var(--type-sm);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1d2c40;
}
.cf-create-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.45rem 0.65rem;
}
.cf-create-form label {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  font-size: var(--type-sm);
  font-weight: 600;
  color: #5b6b7c;
}
.cf-create-name { flex: 1 1 14rem; min-width: 12rem; }
.cf-create-type { flex: 0 0 7.5rem; }
.cf-create-section { flex: 0 1 11rem; min-width: 9rem; }
.cf-create-order { flex: 0 0 4.5rem; }
.cf-create-order input { width: 3.5rem; }
.cf-create-check {
  display: inline-flex !important;
  align-items: center;
  gap: 0.3rem;
  align-self: center;
  margin-top: 1.1rem !important;
  white-space: nowrap;
}
.cf-create-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.15rem;
}
.cf-create-form input,
.cf-create-form select { min-height: 1.95rem; margin: 0; }
.cf-admin-list { display: grid; gap: 0.75rem; }
.cf-section-block {
  border: 1px solid #d5deea;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.cf-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  padding: 0.45rem 0.7rem;
  background: #f1f5f9;
  border-bottom: 1px solid #dbe3ec;
  margin: 0;
}
.cf-section-head-static { min-height: 2.3rem; }
.cf-sec-name {
  flex: 1 1 12rem;
  min-width: 10rem;
  margin: 0 !important;
  font-weight: 700;
}
.cf-sec-order {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  font-size: var(--type-sm);
  color: #5b6b7c;
  white-space: nowrap;
}
.cf-sec-order input { width: 3.5rem; min-height: 1.85rem; margin: 0; }
.cf-sec-check {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  font-size: var(--type-sm);
  white-space: nowrap;
}
.cf-sec-meta {
  font-size: var(--type-sm);
  white-space: nowrap;
  min-width: 4.25rem;
}
/* Section header row cells, sharing the Routes list view/edit swap. */
.cf-sec-name-cell {
  flex: 1 1 12rem;
  min-width: 10rem;
}
.cf-sec-actions-cell { margin-left: auto; }
.cf-section-head .cf-sec-order input[type="number"] {
  width: 3.5rem;
  flex: 0 0 3.5rem;
}
.cf-section-fields {
  padding: 0.4rem 0.65rem 0.65rem 2.15rem;
  margin-left: 0.35rem;
  border-left: 3px solid #c5d4e4;
  background: #fafcfe;
}
.cf-admin-empty-fields {
  margin: 0.35rem 0 0.15rem;
  font-size: var(--type-sm);
}
.cf-field-grid-head,
.cf-field-row {
  display: grid;
  grid-template-columns:
    minmax(10rem, 1.8fr)
    7rem
    minmax(8rem, 1fr)
    4.5rem
    3.75rem
    4.25rem
    4.25rem;
  gap: 0.4rem 0.55rem;
  align-items: center;
}
.cf-field-grid-head--property,
.cf-field-row--property {
  grid-template-columns:
    3.1rem
    minmax(8rem, 1.5fr)
    6.25rem
    minmax(6.5rem, 1fr)
    4rem
    3.4rem
    3.75rem
    3.9rem
    4.25rem;
}
.cf-field-grid-head {
  padding: 0.2rem 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6a7a8c;
}
.cf-field-grid-head span:nth-child(4),
.cf-field-grid-head span:nth-child(6),
.cf-field-grid-head--property span:nth-child(1),
.cf-field-grid-head--property span:nth-child(5),
.cf-field-grid-head--property span:nth-child(7),
.cf-field-grid-head--property span:nth-child(8) { text-align: center; }
.cf-field-row {
  padding: 0.28rem 0;
  border-top: 1px solid #e8eef4;
  margin: 0;
}
.cf-field-grid-head + .cf-field-row { border-top: 0; }
.cf-f-name { width: 100%; min-height: 1.85rem; margin: 0 !important; }
.cf-f-type {
  width: 100%;
  min-height: 1.85rem;
  margin: 0 !important;
  font-size: var(--type-sm);
}
.cf-f-section { width: 100%; min-height: 1.85rem; margin: 0 !important; }
.cf-f-order { width: 3.5rem; min-height: 1.85rem; margin: 0 !important; justify-self: start; }
.cf-f-check {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
}
.cf-create-icon { flex: 0 0 9.5rem; }
.cf-create-icon input[type="file"] { font-size: 0.72rem; max-width: 9.5rem; }
.cf-field-icon-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid #d7e2ec;
  border-radius: 4px;
  background: #f8fafc;
  overflow: hidden;
}
.cf-field-icon-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.cf-field-icon-empty { color: #9aa8b5; font-size: 0.78rem; }
.cf-f-icon-edit {
  display: grid;
  gap: 0.2rem;
}
.cf-f-icon-edit input[type="file"] {
  width: 100%;
  font-size: 0.68rem;
  margin: 0;
}
.cf-f-clear-icon {
  justify-content: flex-start;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #5b6b7c;
}
/* Field row cells, sharing the Routes list view/edit swap. */
.cf-f-cell { min-width: 0; }
.cf-f-cell--center { text-align: center; }
.cf-f-cell-actions { justify-self: end; }
.cf-row-error-cell { margin: 0; }
.cf-field-row .cf-row-error-cell { grid-column: 1 / -1; }
.cf-section-head .cf-row-error-cell { flex: 1 1 100%; }
@media (max-width: 1100px) {
  .cf-fields-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cf-field-grid-head { display: none; }
  .cf-field-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }
  .cf-f-cell-name { grid-column: 1 / -1; }
  .cf-f-cell-actions { justify-self: start; }
}
@media (max-width: 640px) {
  .cf-fields-grid { grid-template-columns: 1fr; }
  .cf-field-row { grid-template-columns: 1fr; }
  .cf-create-name,
  .cf-create-type,
  .cf-create-section { flex: 1 1 100%; }
}
.coming-later-panel {
  border: 1px dashed #c5d0db;
  background: #f7f9fb;
  border-radius: var(--radius);
  padding: 1.25rem;
}
.workspace-empty { padding: 2rem 1rem; text-align: left; }
.timeline li.is-property-linked { background: #f3faf4; }
.workspace-identity-with-photo {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.property-photo-slot {
  position: relative;
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 8px;
  overflow: hidden;
  background: #e8eef5;
  border: 1px solid var(--line);
}
.property-photo-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: #6b7c8f;
  font-size: var(--type-xs);
  text-align: center;
  padding: 0.5rem;
}
.property-photo-note { margin: 0.35rem 0 0; font-size: var(--type-xs); }
.property-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.property-photo-edit {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  padding: 0;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
}
@media (hover: hover) and (pointer: fine) {
  .property-photo-edit { opacity: 0; }
  .property-photo-slot:hover .property-photo-edit,
  .property-photo-slot:focus-within .property-photo-edit { opacity: 1; }
}
.property-photo-menu:not([open]) { display: none !important; }
.property-photo-menu {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  max-width: 18rem;
}
.mailbox-match-account {
  margin-top: 0.15rem;
  font-weight: 650;
  color: #1d2c40;
}
.mailbox-entity-link {
  font-weight: 650;
  color: #1a5fb4;
  text-decoration: none;
}
.mailbox-entity-link:hover { text-decoration: underline; }
.property-photo-menu-inner { display: grid; gap: 0.45rem; }
.property-photo-menu-title { margin: 0 0 0.25rem; font-weight: 600; }
.property-photo-menu-item { justify-self: start; }
.property-photo-actions {
  display: none;
}
.comms-workspace { display: grid; gap: 1.35rem; }
.comms-heading {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  color: #1d2c40;
}
.contact-manager {
  display: grid;
  gap: 0.55rem;
  padding-bottom: 0.35rem;
}
.contact-manager-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}
.contact-manager-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.cm-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.25rem;
}
.cm-toolbar-search {
  width: 14rem;
  max-width: 32%;
  flex: 0 1 14rem;
  min-height: 2.1rem;
  margin: 0;
}
.cm-toolbar-select select {
  min-height: 2.1rem;
  max-width: 11rem;
  margin: 0;
}
.cm-toolbar-menu {
  position: relative;
}
.cm-toolbar-menu > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  min-height: 2.1rem;
  display: inline-flex;
  align-items: center;
  background: #fff;
  font-size: var(--type-sm);
  font-weight: 600;
}
.cm-toolbar-menu > summary::-webkit-details-marker { display: none; }
.cm-toolbar-menu-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.25rem);
  left: 0;
  min-width: 11rem;
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(16, 34, 58, 0.12);
}
.cm-toolbar-clear { white-space: nowrap; }
.cm-toolbar-count {
  margin-left: auto;
  font-size: var(--type-sm);
  white-space: nowrap;
}
.contact-manager-table td,
.contact-manager-table th { vertical-align: top; }
.cm-methods { max-width: 14rem; font-size: var(--type-sm); }
.cm-flags { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.cm-prop-list { margin: 0; padding-left: 1rem; font-size: var(--type-sm); }
.cm-actions { white-space: nowrap; }
.cm-row-menu { position: relative; }
.cm-row-menu > summary {
  list-style: none;
  cursor: pointer;
  color: var(--accent-deep, #1d6b2e);
  font-size: var(--type-sm);
  font-weight: 600;
}
.cm-row-menu > summary::-webkit-details-marker { display: none; }
.cm-row-menu-panel {
  position: absolute;
  right: 0;
  z-index: 15;
  min-width: 9rem;
  display: grid;
  gap: 0.25rem;
  padding: 0.45rem 0.55rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(16, 34, 58, 0.12);
}
.comms-deferred {
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
  display: grid;
  gap: 0.4rem;
}
.comms-deferred-body {
  min-height: 3.5rem;
  padding: 0.65rem 0.75rem;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.comms-deferred-body p { margin: 0 0 0.35rem; }
.comms-deferred-body p:last-child { margin-bottom: 0; }
.cm-method-actions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.2rem;
}
.cm-method-actions .cm-email-btn {
    text-align: left;
    white-space: normal;
}
.comms-history {
    margin-top: var(--space-3);
}
.cm-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  max-width: 34rem;
  width: calc(100% - 2rem);
}
.cm-dialog-form { display: grid; gap: 0.7rem; }
.cm-dialog-actions { display: flex; gap: 0.55rem; align-items: center; }
.mailbox-page { display: grid; gap: var(--space-3); }
.mailbox-page-head { margin-bottom: 0; }
.mailbox-sync-form { margin: 0; }
.mailbox-status-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fb;
}
.mailbox-status-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.mailbox-status-label {
  font-size: var(--type-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5b6b7c;
  font-weight: 700;
}
.mailbox-status-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  font-size: var(--type-sm);
  color: #445566;
}
.mailbox-autosync { color: #6a7a8a; }
.mailbox-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f6;
}
.mailbox-view-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  color: #2a3a4d;
  font-size: var(--type-sm);
  font-weight: 600;
}
.mailbox-view-tab:hover { background: rgba(255, 255, 255, 0.7); }
.mailbox-view-tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(21, 32, 51, 0.08);
}
.mailbox-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.65rem 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel, #fff);
}
.mailbox-toolbar label {
  display: grid;
  gap: 0.25rem;
  font-size: var(--type-sm);
  color: #445566;
}
.mailbox-toolbar select,
.mailbox-toolbar input[type="search"] {
  min-height: 2.15rem;
}
.mailbox-search { flex: 1 1 14rem; min-width: 12rem; }
.mailbox-search input { width: 100%; }
.mailbox-check {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  padding-bottom: 0.35rem;
  white-space: nowrap;
}
.mailbox-result-count {
  margin-left: auto;
  padding-bottom: 0.4rem;
  font-size: var(--type-sm);
}
.mailbox-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.mailbox-table { margin: 0; }
.mailbox-table thead th {
  background: #f3f6f9;
  font-size: var(--type-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #5b6b7c;
  position: sticky;
  top: 0;
}
.mailbox-table td,
.mailbox-table th { padding: 0.7rem 0.75rem; }
.mailbox-col-done { width: 5.5rem; }
.mailbox-col-when { width: 9.5rem; white-space: nowrap; }
.mailbox-col-dir { width: 6.5rem; }
.mailbox-col-attach { width: 7.5rem; white-space: nowrap; }
.mailbox-col-match { width: 8rem; }
.mailbox-col-actions { width: 8.5rem; }
.mailbox-attach-label { font-weight: 600; color: var(--color-link, #0b5cab); }
.mailbox-detail-attachments { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--color-border, #d8dde6); }
.mailbox-attach-list { margin: 0.35rem 0 0; padding-left: 1.2rem; }
.workspace-email-attachments { margin-top: 0.35rem; display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; }
.workspace-email-row { cursor: pointer; }
.workspace-email-row:hover { background: #f5f8fb; }
.mailbox-empty-card {
  padding: 1.5rem 1.25rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
  background: #fafbfc;
}
.mailbox-row { cursor: pointer; }
.mailbox-row:hover { background: #f5f8fb; }
.mailbox-row-done { opacity: 0.72; }
.mailbox-detail-dialog { max-width: 42rem; }
.mailbox-attach-viewer {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 7rem);
  margin: -0.5rem 0 0;
}
.mailbox-attach-viewer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0 0.85rem;
  border-bottom: 1px solid var(--color-border, #d8dde6);
}
.mailbox-attach-viewer-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem;
}
.mailbox-attach-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.mailbox-attach-viewer-stage {
  flex: 1;
  min-height: 28rem;
  margin-top: 0.75rem;
  background: #1f2937;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.mailbox-attach-viewer-stage.is-image {
  touch-action: none;
  cursor: grab;
}
.mailbox-attach-viewer-stage.is-dragging { cursor: grabbing; }
.mailbox-attach-panzoom {
  width: 100%;
  height: min(70vh, 44rem);
  position: relative;
  overflow: hidden;
}
.mailbox-attach-transform {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.mailbox-attach-panzoom img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  background: #fff;
  user-select: none;
  -webkit-user-drag: none;
}
.mailbox-attach-hint,
.mailbox-attach-error {
  position: absolute;
  left: 0.75rem;
  bottom: 0.65rem;
  margin: 0;
  color: #e5eef8;
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
}
.mailbox-attach-error a { color: #fff; text-decoration: underline; }
.mailbox-attach-frame {
  width: 100%;
  height: min(75vh, 48rem);
  border: 0;
  background: #fff;
}
.mailbox-attach-video {
  display: block;
  width: 100%;
  max-height: min(75vh, 48rem);
  margin: 0 auto;
  background: #000;
}
.mailbox-detail-meta {
  display: grid;
  gap: 0.28rem;
  font-size: var(--type-sm);
  color: var(--ink, #1d2c40);
}
.mailbox-detail-meta strong {
  display: inline-block;
  min-width: 4.75rem;
  margin-right: 0.35rem;
  color: #243447;
}
.mailbox-detail-body {
  white-space: pre-wrap;
  max-height: 22rem;
  overflow: auto;
  line-height: 1.45;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbfc;
}
.cm-methods-fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  margin: 0;
}
.cm-existing-panel {
  border: 1px solid #c5d7e8;
  background: #f3f8fc;
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  display: grid;
  gap: 0.55rem;
}
.cm-existing-title {
  margin: 0;
  font-weight: 700;
  font-size: var(--type-sm);
  color: #1d2c40;
}
.cm-existing-card {
  display: grid;
  gap: 0.2rem;
  padding: 0.45rem 0;
  border-top: 1px solid #d5e3ef;
}
.cm-existing-card:first-of-type { border-top: 0; padding-top: 0; }
.cm-existing-links { margin-top: 0.25rem; font-size: var(--type-sm); }
.cm-existing-prop { padding-left: 0.35rem; }
.cm-existing-actions { margin-top: 0.35rem; }
.cm-link-banner {
  margin: 0;
  padding: 0.45rem 0.6rem;
  background: #eef8f0;
  border: 1px solid #b7dfc0;
  border-radius: 6px;
  font-size: var(--type-sm);
  color: #14301a;
}
.cm-selected-summary {
  border: 1px solid #c5d7e8;
  background: #f7fafc;
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  display: grid;
  gap: 0.2rem;
}
.cm-rel-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}
.cm-method-row { margin-bottom: 0.45rem; }
@media (max-width: 900px) {
  .cm-toolbar {
    flex-wrap: wrap;
  }
  .cm-toolbar-search {
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
  }
}
.btn-file { display: inline-flex; cursor: pointer; }
.btn-file input[type="file"] { display: none; }
.files-table tr.is-primary-photo { background: #f3faf4; }
.file-edit-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  max-width: 28rem;
  width: calc(100% - 2rem);
}
.file-edit-form { display: grid; gap: 0.75rem; }
.file-edit-actions { display: flex; gap: 0.55rem; }
.history-type-fieldset {
  border: 0;
  margin: 0 0 0.5rem;
  padding: 0;
}
.history-type-fieldset legend {
  font-size: var(--type-sm);
  font-weight: 800;
  color: #1d2c40;
  margin-bottom: 0.35rem;
}
.history-type-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
}
.history-type-hint { margin: 0.35rem 0 0; font-size: var(--type-xs); }
.inline-edit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.45rem;
}
.search-contact-card { padding: 0.65rem 0; }
.search-assoc-list { margin: 0.35rem 0 0; padding-left: 1.1rem; }
.search-assoc-list ul { margin: 0.2rem 0 0.4rem; padding-left: 1rem; }

.list-toolbar {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  background: #f5f8fb;
  border: 1px solid #e2e8ef;
  border-radius: 8px;
}
.list-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  align-items: end;
}
.list-toolbar-search { flex: 1 1 12rem; min-width: 10rem; }
.list-toolbar-search input,
.list-toolbar-field input,
.list-toolbar-field select {
  width: 100%;
  min-height: 2.2rem;
}
.list-toolbar-field {
  display: grid;
  gap: 0.2rem;
  font-size: var(--type-xs);
  font-weight: 700;
  color: #5b6b7c;
  min-width: 7.5rem;
}
.list-toolbar-actions {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
}
.list-toolbar-count {
  margin: 0;
  font-size: var(--type-sm);
  color: var(--muted);
}
.list-pagination {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.85rem;
}
.workspace-load-more-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}
.list-empty { margin-top: 0.75rem; }
.list-meta-note { margin-top: 0.65rem; font-size: var(--type-xs); }
.table-scroll { overflow-x: auto; }
.files-table .col-preview { width: 3.5rem; }
.files-table .col-actions { white-space: nowrap; }
.file-thumb {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  display: block;
}
.file-icon {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  background: #9eb0c4;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 2h9l5 5v15H6V2zm8 1.5V8h4.5'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 2h9l5 5v15H6V2zm8 1.5V8h4.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.file-type { font-size: var(--type-xs); color: #5b6b7c; word-break: break-all; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.35rem 0.55rem; align-items: center; }
.file-upload-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: end;
  margin: 0 0 0.85rem;
}
.event-type {
  font-weight: 700;
  font-size: var(--type-sm);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.contact-links { margin-top: 1.25rem; }
.contact-link-name {
  font-weight: 700;
  color: #1a5fb4;
  text-decoration: none;
}
a.contact-link-name:hover { text-decoration: underline; }
.contact-link-table th,
.contact-link-add-table th {
  white-space: nowrap;
}
.contact-link-table td,
.contact-link-add-table td {
  vertical-align: middle;
}
.contact-link-inline-form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
  margin: 0;
}
.contact-link-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  white-space: nowrap;
  font-weight: 500;
}
.contact-link-flag input { width: auto; margin: 0; }
.contact-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: center;
  white-space: nowrap;
}
.contact-link-picker-cell { min-width: 14rem; }
.contact-link-picker-cell .searchable-select { max-width: 22rem; }
.contact-link-add { margin-top: 1.5rem; }
.contact-link-property-hint {
  margin: 0.25rem 0 0;
  font-size: var(--type-sm, 0.85rem);
}

/* Contact show page still uses nested list layout */
.contact-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.contact-link-account {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  background: #fbfcfe;
}
.contact-link-account-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  align-items: baseline;
}
.contact-link-empty-props { margin: 0.45rem 0 0; }
.contact-link-properties {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0.55rem 0 0 0.85rem;
  border-top: 1px solid #e7eef5;
  display: grid;
  gap: 0.55rem;
}
.contact-link-properties a {
  font-weight: 650;
  color: #1a5fb4;
  text-decoration: none;
}
.contact-link-properties a:hover { text-decoration: underline; }

@media (max-width: 1280px) {
  .account-summary-strip { grid-template-columns: 1fr 1fr 1fr 1.35fr; }
}
@media (max-width: 1100px) {
  .account-summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-cell { border-bottom: 1px solid rgba(255,255,255,0.12); min-height: 7.5rem; }
  .summary-cell:nth-child(2n) { border-right: 0; }
}
@media (max-width: 900px) {
  .brand-divider { display: none; }
  .account-split { grid-template-columns: 1fr; padding-bottom: 0.75rem; align-items: start; }
  .property-workspace-wrap { padding: 0.75rem; }
  .property-rail {
    height: auto;
    min-height: 0;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .rail-body { overflow: visible; }
  .rail-property-scroll {
    overflow-x: auto;
    overflow-y: hidden;
  }
  .rail-property-scroll .property-rail-list,
  .rail-context-list {
    display: flex;
    gap: 0;
  }
  .rail-property-scroll .property-rail-list > li,
  .rail-context-list > li {
    flex: 0 0 min(78vw, 260px);
    border-bottom: 0;
    border-right: 1px solid rgba(255,255,255,0.08);
  }
  .rail-footer {
    margin-top: 0.5rem;
  }
  body.is-account-detail .rail-footer {
    left: 0.75rem;
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    width: min(260px, calc(100vw - 1.5rem));
    padding: 0.5rem;
    border-radius: 8px;
    border-top: 0;
    box-shadow: 0 8px 24px rgba(7, 21, 39, 0.4);
  }
  body.is-account-detail .property-rail.has-floating-add {
    padding-bottom: 0.85rem;
  }
  body.is-account-detail .app-main {
    padding-bottom: 4.75rem;
  }
  .user-chip-text { display: none; }
  .user-chip { padding: 0.2rem; }
}
@media (max-width: 640px) {
  .account-summary-strip { grid-template-columns: 1fr; }
  .summary-cell { border-right: 0; }
  .account-chrome { padding: 1rem; }
  .finance-slots { width: 100%; }
  .finance-slot { flex: 1 1 calc(50% - 0.4rem); }
}

/* Property Visits tab (Package Jobs / Upcoming / History) */
.property-visits-panel {
  display: grid;
  gap: 1rem;
}
.visits-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.85rem 1rem 1rem;
}
.visits-section-history { padding-top: 0.7rem; padding-bottom: 0.75rem; }
.visits-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.visits-section-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #152033;
}
.visits-section-sub {
  margin: 0.15rem 0 0;
  font-size: var(--type-sm);
  color: var(--muted);
}
.visits-add-btn {
  white-space: nowrap;
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: var(--type-sm);
  font-weight: 600;
}
.visits-table { width: 100%; margin: 0; }
.visits-table th {
  font-size: 0.72rem;
  color: #3d4d5c;
  background: #f3f6f8;
  padding: 0.45rem 0.5rem;
  white-space: nowrap;
}
.visits-table td {
  padding: 0.45rem 0.5rem;
  vertical-align: top;
  font-size: var(--type-sm);
}
.visits-table-compact td { padding: 0.35rem 0.5rem; }
.visits-link { color: #1a5fbf; font-weight: 600; text-decoration: none; }
.visits-link:hover { text-decoration: underline; }
.visits-muted-cell { color: var(--muted); }
.visits-date-stack { display: grid; gap: 0.1rem; min-width: 7.5rem; }
.visits-date-primary { font-weight: 600; color: #152033; line-height: 1.25; }
.visits-date-accent { color: #1f7a32; }
.visits-date-eligible {
  font-size: 0.72rem;
  color: #2f9e44;
  font-weight: 600;
  line-height: 1.2;
}
.visits-date-note { font-size: 0.72rem; color: var(--muted); line-height: 1.2; }
.visits-round { min-width: 7rem; }
.visits-progress {
  margin: 0.25rem 0 0.15rem;
  height: 5px;
  background: #e6ece8;
  border-radius: 999px;
  overflow: hidden;
}
.visits-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2f9e44, #39b54a);
}
.visits-progress-label { font-size: 0.7rem; color: var(--muted); }
.visits-service-list { margin: 0; padding-left: 1rem; list-style: disc; }
.visits-service-list li { margin: 0; line-height: 1.3; }
.visits-source { display: grid; gap: 0.15rem; }
.visits-source-detail { font-size: 0.7rem; color: var(--muted); line-height: 1.2; }
.visits-notes-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: #334038;
}
.visits-actions {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.visits-inline-form {
  display: inline-flex;
  margin: 0;
}
.visits-cancel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 1px solid #d9a0a0;
  border-radius: 5px;
  background: #fdf2f2;
  color: #8a1f1f;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.visits-cancel-btn:hover {
  background: #f8d4d4;
  border-color: #c07070;
}
.visits-cancel-package-dialog::backdrop {
  background: rgba(20, 28, 36, 0.45);
}
.visits-cancel-package-dialog p {
  margin: 0;
  line-height: 1.45;
}
.visits-cancel-package-job-list {
  margin: 0;
  padding-left: 1.2rem;
  font-weight: 650;
}
.visits-cancelled-packages {
  margin-top: 0.85rem;
  border: 1px solid var(--line, #d5d9e0);
  border-radius: 8px;
  background: #fafbfb;
  padding: 0.45rem 0.75rem 0.75rem;
}
.visits-cancelled-packages > summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 0.85rem;
  color: #3d4d5c;
  padding: 0.25rem 0;
}
.visits-cancelled-packages > summary .muted {
  font-weight: 500;
  margin-left: 0.25rem;
}
.visits-cancelled-packages[open] > summary {
  margin-bottom: 0.55rem;
}
.visits-row-btn {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  text-decoration: none;
  border-radius: 5px;
}
.visits-section-footer {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}
.visit-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}
.visit-badge-active,
.visit-badge-due,
.visit-badge-completed { background: #d9eedd; color: #1a4d24; }
.visit-badge-not-due { background: #f8e3c6; color: #6a3b00; }
.visit-badge-waiting { background: #dceaf8; color: #1a4a75; }
.visit-badge-on-deck { background: #d8f3ee; color: #0f5c52; }
.visit-badge-reschedule { background: #f7e0c8; color: #7a3d00; }
.visit-badge-late { background: #f8d4d4; color: #7a1f1f; }
.visit-badge-priority { background: #b45309; color: #fff; }
.visits-status-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; }
.visit-badge-dispatched { background: #c9daf0; color: #163a66; }
.visit-badge-cancelled { background: #f6d6d6; color: #7a1d1d; }
.visit-badge-muted,
.visit-badge-pending { background: #e7ebe8; color: #334038; }
.visit-badge-source-package { background: #dceaf8; color: #1a4a75; }
.visit-badge-source-oneoff { background: #f8e3c6; color: #6a3b00; }
.visit-badge-route { background: #ebe4f5; color: #4a2f6b; }
.visits-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
  font-size: 0.72rem;
  color: var(--muted);
}
.visits-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.waiting-list-filters {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.8rem;
  background: #f5f8fb;
  border: 1px solid #e2e8ef;
  border-radius: 8px;
}
.waiting-list-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  align-items: end;
}
.waiting-list-field {
  display: grid;
  gap: 0.15rem;
  font-size: var(--type-xs);
  font-weight: 700;
  color: #5b6b7c;
  min-width: 7rem;
}
.waiting-list-field input,
.waiting-list-field select { min-height: 2.1rem; }
.waiting-list-search { flex: 1 1 14rem; min-width: 12rem; }
.waiting-list-check {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  font-size: var(--type-sm);
  margin: 0;
  white-space: nowrap;
}
.waiting-list-status {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: center;
}
.waiting-list-status legend {
  font-size: var(--type-xs);
  font-weight: 700;
  color: #5b6b7c;
  padding: 0;
  margin-right: 0.35rem;
}
.waiting-list-overrides {
  align-items: center;
  padding-top: 0.2rem;
  border-top: 1px dashed #d5dde6;
}
.waiting-list-overrides-label {
  font-size: var(--type-xs);
  font-weight: 700;
  color: #5b6b7c;
}
.waiting-list-filter-actions {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  margin-left: auto;
}
.waiting-list-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  align-items: end;
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #eef5fb;
}
.waiting-list-bulk-form {
  display: inline-flex;
  gap: 0.4rem;
  align-items: end;
  margin: 0;
}
.waiting-list-table .col-select { width: 2rem; }
.waiting-list-services {
  max-width: 12rem;
  font-size: var(--type-sm);
}

.route-edit-head {
  align-items: flex-start;
}
.route-edit-crumb {
  margin: 0 0 0.35rem;
}
.route-edit-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  align-items: center;
}
.route-edit-title-row h1 {
  margin: 0;
}
.route-edit-sub {
  margin: 0.45rem 0 0;
  max-width: 42rem;
}
.route-edit-form {
  display: grid;
  gap: 1rem;
  margin: 0 0 2rem;
}
.route-edit-panel {
  margin: 0;
  padding: 1rem 1.1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.route-edit-panel-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin: 0 0 0.85rem;
}
.route-edit-panel-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 650;
}
.route-edit-panel-head .muted {
  margin: 0;
}
.route-edit-selected-count {
  font-size: var(--type-sm);
  white-space: nowrap;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #eef5fb;
  color: #33506a;
}
.route-edit-details-grid {
  display: grid;
  grid-template-columns: minmax(14rem, 1.6fr) minmax(8rem, 0.7fr) auto;
  gap: 0.75rem 1rem;
  align-items: end;
}
.route-edit-form .route-edit-details-grid {
  grid-template-columns: minmax(11rem, 1.2fr) minmax(9rem, 1fr) minmax(7.5rem, 0.7fr) minmax(5.5rem, 0.5fr) auto;
}
.route-edit-coords-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 28rem;
}
.route-edit-details-grid .settings-admin-field {
  margin: 0;
}
.route-edit-color .route-color-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.1rem;
}
.route-edit-color input[type="color"] {
  width: 2.4rem;
  height: 2.1rem;
  padding: 0.15rem;
  margin: 0;
  border: 1px solid #c9d5e1;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.route-color-hex {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--type-sm);
  color: #334553;
}
.route-color-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--type-xs);
  font-weight: 500;
}
.route-list-swatch {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--route-color, #64748b);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.28);
  pointer-events: none;
}
.route-list-swatch-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0 0.5rem 0 0;
  vertical-align: -0.25rem;
  cursor: pointer;
}
.route-list-swatch-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}
.route-list-swatch-label:hover .route-list-swatch {
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.35), 0 0 0 2px rgba(31, 75, 110, 0.28);
}
.route-list-swatch-label:focus-within .route-list-swatch {
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.35), 0 0 0 2px rgba(31, 75, 110, 0.4);
}
.route-list-swatch-label:has(.route-list-swatch-input:disabled) .route-list-swatch {
  opacity: 0.55;
}
.route-list-swatch-input:disabled {
  cursor: wait;
}
.route-pin-shape-select {
  min-width: 8rem;
  max-width: 10.5rem;
}
.route-list-employees {
  max-width: 14rem;
  white-space: normal;
  line-height: 1.35;
  font-size: var(--type-sm);
  color: #334553;
  vertical-align: top;
}
.route-employee-name-list {
  display: grid;
  gap: 0.1rem;
}
.route-employee-name-list > div {
  line-height: 1.3;
}
.routes-table .route-row.is-editing > td,
.inline-edit-table .route-row.is-editing > td {
  background: #f7fafc;
  vertical-align: top;
}
.routes-table .route-row.is-editing.is-multi-open {
  position: relative;
  z-index: 40;
}
.route-row:not(.is-editing) .route-edit-fields,
.route-row.is-editing .route-view {
  display: none !important;
}
.route-row.is-editing .route-edit-fields {
  display: block;
}
.route-row.is-editing .route-inline-actions {
  display: inline-flex;
}
.route-row.is-editing .route-inline-name {
  display: flex;
}
.route-inline-name {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.route-inline-name input[type="text"] {
  margin: 0;
  min-width: 9rem;
  width: 100%;
}
.route-edit-fields select,
.route-edit-fields input[type="number"],
.route-edit-fields input[type="text"] {
  margin: 0;
  width: 100%;
  min-width: 0;
}
.inline-edit-table .route-row.is-editing .route-inline-actions {
  display: flex;
}
.route-inline-active {
  margin: 0.25rem 0 0;
  white-space: nowrap;
}
.route-inline-actions {
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.branches-table .route-row.is-editing {
  position: relative;
  z-index: 60;
}
.branches-table .branch-address-cell {
  min-width: 18rem;
  overflow: visible;
}
.branch-inline-address {
  margin-bottom: 0;
  max-width: 34rem;
}
.branch-inline-address .address-search-host {
  min-height: 2.2rem;
  margin-bottom: 0.4rem;
}
.branch-inline-address .address-search-fallback {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
}
.branch-inline-address-grid {
  display: grid;
  grid-template-columns: minmax(7.5rem, 1.5fr) minmax(3.5rem, 0.7fr) minmax(5.5rem, 1fr) 3.1rem 4.2rem;
  gap: 0.35rem;
}
.branch-inline-address-grid [data-inline-field="address_1"] {
  grid-column: 1 / 3;
}
.branch-inline-address-grid [data-inline-field="address_2"] {
  grid-column: 3 / 6;
}
.branch-inline-address-grid [data-inline-field="city"] {
  grid-column: 1 / 3;
}
.branch-inline-address-grid [data-inline-field="state"] {
  grid-column: 3;
}
.branch-inline-address-grid [data-inline-field="postal_code"] {
  grid-column: 4 / 6;
}
.app-main:has(.branches-table .route-row.is-editing) {
  overflow: visible;
}
.route-employee-multi {
  min-width: 9.5rem;
  z-index: 50;
}
.route-employee-multi .sched-filter-options {
  min-width: 14rem;
}
.route-employee-multi .sched-filter-options label.is-disabled {
  opacity: 0.55;
}
.route-row-error {
  margin: 0.35rem 0 0;
  font-size: var(--type-xs);
}
.routes-table-footer {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.75rem;
}
.routes-table .col-start-time {
  width: 6.75rem;
  white-space: nowrap;
}
.routes-table input[type="time"] {
  max-width: 8rem;
}
.route-edit-active {
  margin: 0 0 0.15rem;
  align-self: end;
  white-space: nowrap;
}
.route-edit-key {
  margin: 0.75rem 0 0;
  font-size: var(--type-sm);
}
.route-edit-key code {
  font-size: 0.92em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: #f3f6f8;
  color: #3d4d5c;
}
.route-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.15rem 0.1rem 0;
}
.route-employees-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  align-items: end;
  margin: 0 0 0.7rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8ef;
  border-radius: 8px;
  background: #f5f8fb;
}
.route-employees-search {
  flex: 1 1 14rem;
  min-width: 12rem;
  margin: 0;
}
.route-employees-search input {
  width: 100%;
  min-height: 2.2rem;
}
.route-employees-role {
  display: grid;
  gap: 0.15rem;
  font-size: var(--type-xs);
  font-weight: 700;
  color: #5b6b7c;
  min-width: 9.5rem;
  margin: 0;
}
.route-employees-role select {
  min-height: 2.2rem;
}
.route-employees-selected-only {
  margin: 0 0 0.2rem;
  white-space: nowrap;
}
.route-employees-table-wrap {
  max-height: 24rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.route-employees-table {
  margin: 0;
}
.route-employees-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7faf8;
  box-shadow: inset 0 -1px 0 var(--line);
}
.route-employees-table .col-select {
  width: 4.25rem;
  text-align: center;
}
.route-employees-table th,
.route-employees-table td {
  padding: 0.42rem 0.55rem;
  font-size: var(--type-sm);
  vertical-align: middle;
}
.route-employees-table tbody tr:hover {
  background: #f7fafb;
}
.route-employees-table tbody tr.is-selected {
  background: #eef7f0;
}
.route-employees-table tbody tr.is-selected:hover {
  background: #e7f3ea;
}
.route-employees-name {
  font-weight: 600;
  color: #24323d;
}
.route-employees-role-cell {
  color: #4a5b6a;
}
.route-employees-empty {
  margin: 0.55rem 0 0;
}
@media (max-width: 720px) {
  .route-edit-details-grid {
    grid-template-columns: 1fr;
  }
}

.users-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(12rem, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
}
.users-edit-grid .settings-admin-field { margin: 0; }
.users-edit-span-2 { grid-column: 1 / -1; }
.users-edit-active { margin: 0 0 0.2rem; }
.users-edit-self-note { grid-column: 1 / -1; margin: 0; }
.users-avatar-row {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.users-avatar-preview,
.users-avatar-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #d0d5dd;
  background: #f5f6f8;
}
.users-avatar-placeholder {
  display: grid;
  place-items: center;
  color: #667085;
  font-size: 0.85rem;
}
.users-avatar-controls {
  display: grid;
  gap: 0.65rem;
  min-width: min(100%, 18rem);
}
.users-role-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.35rem 0.85rem;
}
.users-role-select {
  max-width: 28rem;
}
.users-role-select select {
  width: 100%;
}
.roles-permission-group {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem 0.55rem;
  border: 1px solid #e2e8ef;
  border-radius: 8px;
  background: #f8fafb;
}
.roles-permission-group legend {
  padding: 0 0.35rem;
  font-size: var(--type-sm);
  font-weight: 700;
  color: #334553;
}
.roles-permission-tabs {
  display: grid;
  gap: 0.75rem;
}
.roles-permission-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid #e2e8ef;
  padding-bottom: 0.15rem;
}
.roles-permission-tab {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: 0;
  background: transparent;
  color: #5b6b7c;
  font: inherit;
  font-size: var(--type-sm);
  font-weight: 700;
  padding: 0.55rem 0.8rem;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  margin-bottom: -1px;
}
.roles-permission-tab:hover {
  color: #102033;
  background: #f3f6f8;
}
.roles-permission-tab.is-active,
.roles-permission-tab[aria-selected="true"] {
  color: #14301a;
  background: #f8fafb;
  border-color: #e2e8ef;
  box-shadow: inset 0 -2px 0 #2f6b3a;
}
.roles-permission-panel {
  margin: 0;
  padding: 0.75rem 0.85rem 0.65rem;
  border: 1px solid #e2e8ef;
  border-radius: 8px;
  background: #f8fafb;
}
.roles-permission-panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0 0 0.7rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #e2e8ef;
}
.roles-permission-select-all {
  margin: 0;
  font-weight: 700;
}
.roles-permission-select-all input {
  width: auto;
  margin: 0;
}
.roles-permission-count {
  margin: 0;
  font-size: var(--type-xs);
}
.roles-permission-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.3rem 0.75rem;
}
.roles-permission-options .checkbox {
  align-items: flex-start;
  margin: 0;
}
.roles-permission-key {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
}
.route-employees-table tbody tr.is-inactive td {
  color: #6a7884;
}
@media (max-width: 720px) {
  .users-edit-grid {
    grid-template-columns: 1fr;
  }
}

/* Scheduling Board — operational layout */
.sched-board { display: grid; gap: 0.75rem; }
.sched-board-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  align-items: center;
  position: relative;
  z-index: 90;
}
.sched-board-head h1 { margin: 0; }
.sched-board-head-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
}
.sched-board-head-actions {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  position: relative;
  z-index: 91;
}
.sched-saved-view {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}
.sched-saved-view select {
  min-width: 11rem;
  max-width: 16rem;
  height: 2.15rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid #c9d5e1;
  border-radius: 6px;
  background: #fff;
  font-size: var(--type-sm);
}
.sched-saved-view .btn-secondary {
  height: 2.15rem;
  padding: 0.25rem 0.75rem;
}
.sched-board-head-actions .workspace-overflow {
  margin-top: 0;
}
.sched-board-views {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.sched-board-view {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border: 1px solid #c9d5e1;
  border-radius: 999px;
  background: #fff;
  font-size: var(--type-sm);
  font-weight: 600;
  color: #3d4f5f;
  text-decoration: none;
}
.sched-board-view.is-active {
  background: #1f4b6e;
  border-color: #1f4b6e;
  color: #fff;
}
.sched-board-view.has-unresolved:not(.is-active) {
  background: #fff4e5;
  border-color: #d97706;
  color: #9a3412;
}
.sched-days-overdue {
  font-weight: 700;
  color: #9a3412;
}
.visit-badge-blocking {
  background: #e8eef4;
  color: #3d4f5f;
  font-weight: 600;
}
.sched-unresolved-dialog {
  max-width: 32rem;
  padding: 0;
}
.sched-unresolved-dialog-body {
  display: grid;
  gap: 0.75rem;
  padding: 1.1rem 1.2rem 1.15rem;
}
.sched-unresolved-dialog-body h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #9a3412;
}
.sched-unresolved-dialog-body p {
  margin: 0;
  line-height: 1.45;
}
.sched-board-filters {
  position: relative;
  z-index: 60;
  padding: 0.5rem 0.65rem;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #f5f8fb;
}
.sched-board-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  align-items: center;
}
.sched-board-filters-row--primary {
  flex-wrap: nowrap;
  overflow: visible;
  gap: 0.35rem 0.4rem;
}
.sched-field {
  display: grid;
  gap: 0.12rem;
  font-size: var(--type-xs);
  font-weight: 700;
  color: #5b6b7c;
  min-width: 7rem;
}
.sched-field input,
.sched-field select { min-height: 2rem; }
.sched-filter-control,
.sched-filter-multi,
.sched-status-multi {
  position: relative;
  flex: 0 0 auto;
  min-width: 7.5rem;
}
.sched-filter-control {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0.2rem 0.45rem 0.2rem 0.55rem;
  border: 1px solid #c9d5e1;
  border-radius: 6px;
  background: #fff;
  margin: 0;
  font-size: var(--type-sm);
  font-weight: 600;
  color: #1f4b6e;
  white-space: nowrap;
}
.sched-filter-control-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #5b6b7c;
  font-size: var(--type-xs);
  font-weight: 700;
}
.sched-filter-date input[type="date"] {
  position: relative;
  margin: 0;
  border: 0;
  background: transparent;
  min-height: 1.6rem;
  padding: 0.1rem 0;
  font-size: var(--type-sm);
  font-weight: 600;
  color: var(--ink);
  width: 9.6rem;
  cursor: pointer;
}
.sched-filter-date input[type="date"]::-webkit-calendar-picker-indicator,
.sched-click-date::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
  opacity: 0;
}
.sched-click-date {
  position: relative;
  cursor: pointer;
}
.sched-filter-date input[type="date"]:focus {
  outline: none;
}
.sched-filter-control:focus-within {
  border-color: #7aa0c2;
  box-shadow: 0 0 0 2px rgba(47, 158, 68, 0.12);
}
.sched-check {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  font-size: var(--type-sm);
  white-space: nowrap;
  margin: 0;
}
.sched-filter-actions {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  margin-left: auto;
  flex: 0 0 auto;
}
.sched-filter-multi summary,
.sched-status-multi summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid #c9d5e1;
  border-radius: 6px;
  background: #fff;
  padding: 0.4rem 0.55rem;
  font-size: var(--type-sm);
  font-weight: 600;
  white-space: nowrap;
  min-height: 2rem;
  display: flex;
  align-items: center;
  color: #1f4b6e;
}
.sched-filter-multi summary::-webkit-details-marker,
.sched-status-multi summary::-webkit-details-marker { display: none; }
.sched-filter-multi[open],
.sched-status-multi[open] {
  z-index: 70;
}
.sched-filter-options,
.sched-status-options {
  position: absolute;
  z-index: 80;
  top: calc(100% + 2px);
  left: 0;
  min-width: 14rem;
  max-height: 16rem;
  margin: 0;
  padding: 0.35rem;
  border: 1px solid #c9d5e1;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 35, 55, 0.18);
  display: grid;
  gap: 0.25rem;
  grid-template-rows: auto minmax(0, 1fr);
}
.sched-filter-search {
  width: 100%;
  margin: 0;
  min-height: 1.85rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid #d5dee8;
  border-radius: 4px;
  font-size: var(--type-sm);
  font-weight: 500;
}
.sched-filter-options-list {
  display: grid;
  gap: 0.15rem;
  max-height: 12rem;
  overflow: auto;
}
.sched-filter-options label,
.sched-status-options label {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  box-sizing: border-box;
  font-size: var(--type-sm);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  margin: 0;
  padding: 0.35rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
}
.sched-filter-options label:hover,
.sched-status-options label:hover {
  background: #e8f0f7;
}
.sched-filter-options label:focus-within,
.sched-status-options label:focus-within {
  background: #e0ebf4;
}
.sched-filter-options label input[type="checkbox"],
.sched-status-options label input[type="checkbox"] {
  width: auto;
  min-width: 1rem;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}
.sched-filter-options label[hidden] { display: none; }
.sched-board-advanced { display: none; margin-top: 0.55rem; padding-top: 0.45rem; border-top: 1px dashed #d5dde6; }
.sched-board-advanced.is-open { display: block; }

.sched-board-workspace {
  --sched-workspace-height: min(68vh, 44rem);
  display: grid;
  grid-template-columns: minmax(17rem, 22rem) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
  height: var(--sched-workspace-height);
  min-height: var(--sched-workspace-height);
  max-height: var(--sched-workspace-height);
}
.sched-board-panel {
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}
.sched-side-card {
  display: grid;
  gap: 0.7rem;
  padding: 0.75rem 0.8rem 0.7rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.sched-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: nowrap;
  min-width: 0;
}
.sched-side-counts {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: #1d2c40;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
}
.sched-stats-scope {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
}
.sched-stats-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  width: auto;
  max-width: 100%;
  height: 1.45rem;
  padding: 0 0.28rem 0 0.4rem;
  border: 1px solid #9aa8b5;
  border-radius: 6px;
  background: #fff;
  color: #334553;
  cursor: pointer;
}
.sched-stats-scope-name {
  display: block;
  max-width: 7.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  color: #1f4b6e;
}
.sched-stats-filter-btn svg {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
  display: block;
}
.sched-stats-filter-btn:hover,
.sched-stats-filter-btn[aria-expanded="true"],
.sched-stats-scope.is-filtered .sched-stats-filter-btn {
  border-color: #1f4b6e;
  color: #1f4b6e;
  background: #eef4f9;
}
.sched-stats-scope-panel {
  position: fixed;
  z-index: 12000;
  width: min(16.5rem, calc(100vw - 1.5rem));
  padding: 0.55rem;
  border: 1px solid #c5d3e0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(20, 40, 60, 0.18);
}
.sched-stats-scope-panel[hidden] {
  display: none !important;
}
.sched-stats-scope-label,
.sched-stats-scope .searchable-select--native,
.sched-stats-scope select {
  display: block;
  width: 100%;
  min-width: 0;
}
.sched-stats-scope .searchable-select .searchable-input {
  margin-top: 0;
  min-height: 1.75rem;
  padding: 0.22rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 650;
}
.sched-side-head-sep {
  margin: 0 0.2rem;
  font-weight: 600;
  color: #8a97a6;
}
.sched-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.42rem 0.85rem;
}
.sched-stat-item {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  gap: 0.4rem;
  align-items: center;
  min-width: 0;
  font-size: 0.8rem;
  color: #334553;
}
.sched-stat-icon {
  width: 1.2rem;
  height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2f9e44;
}
.sched-stat-icon svg,
.sched-stat-icon img {
  width: 1.15rem;
  height: 1.15rem;
  object-fit: contain;
  display: block;
}
.sched-stat-item--drive .sched-stat-icon,
.sched-stat-item--work .sched-stat-icon,
.sched-stat-item--total .sched-stat-icon,
.sched-stat-item--custom .sched-stat-icon { color: #3d4f63; }
.sched-stat-item--missed .sched-stat-icon { color: #222; }
.sched-stat-copy {
  min-width: 0;
  line-height: 1.25;
}
.sched-stat-copy strong {
  font-weight: 700;
  color: #1d2c40;
}
.sched-stat-item.is-attention .sched-stat-copy strong { color: #6b4508; }
.sched-assign-form--combined {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.25rem;
}
.sched-assign-form--combined .sched-field {
  min-width: 0;
}
.sched-assign-form--combined .sched-field input,
.sched-assign-form--combined .sched-field select {
  width: 100%;
  min-height: 2.25rem;
  margin: 0;
  padding: 0.4rem 0.6rem;
  border: 1px solid #c5d0db;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: var(--type-sm);
  font-weight: 600;
  color: #1d2c40;
  box-sizing: border-box;
}
.sched-assign-form--combined .sched-field select {
  padding-right: 1.75rem;
}
.sched-assign-form--combined .sched-field input:focus,
.sched-assign-form--combined .sched-field select:focus,
.sched-assign-form--combined .sched-assign-date-input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: #8fb59a;
}
.sched-assign-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 2.25rem;
  column-gap: 0.5rem;
  row-gap: 0.12rem;
  align-items: stretch;
}
.sched-assign-date-label {
  grid-column: 1;
  grid-row: 1;
  font-size: var(--type-xs);
  font-weight: 700;
  color: #5b6b7c;
  line-height: 1.2;
}
.sched-assign-form--combined .sched-assign-date-input {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0 0.6rem;
  border: 1px solid #c5d0db;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: var(--type-sm);
  font-weight: 600;
  color: #1d2c40;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.sched-assign-form--combined .sched-assign-date-input::-webkit-datetime-edit,
.sched-assign-form--combined .sched-assign-date-input::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
  margin: 0;
  height: 100%;
  display: flex;
  align-items: center;
}
.sched-assign-form--combined .sched-assign-submit {
  grid-column: 2;
  grid-row: 2;
  width: auto;
  min-width: 4.75rem;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0 1rem;
  border: 0;
  border-radius: 6px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: var(--type-sm);
  font-weight: 600;
}
.sched-order-tools {
  display: grid;
  gap: 0.4rem;
  padding-top: 0.15rem;
  border-top: 1px solid #e5edf4;
}
.sched-order-tools[hidden] {
  display: none !important;
}
.sched-stop-order-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.sched-stop-order-form {
  display: flex;
  align-items: center;
  margin: 0;
}
.sched-stop-order-form[hidden] {
  display: none !important;
}
.sched-stop-order-actions .btn-primary,
.sched-stop-order-actions .btn-secondary {
  box-sizing: border-box;
  height: 2.25rem;
  min-height: 2.25rem;
  margin: 0;
  padding: 0 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 6px;
  font-size: var(--type-sm);
  font-weight: 600;
}
.sched-stop-order-actions .btn-primary[data-sched-save-order] {
  min-width: 9.75rem;
}
.sched-stop-order-actions .btn-primary[data-sched-save-order].is-saving {
  opacity: 0.88;
}
.sched-stop-order-actions .btn-primary[data-sched-save-order].is-saved {
  background: #1f7a32;
}
.sched-flag-cards {
  padding: 0 0.8rem 0.75rem;
  flex: 0 0 auto;
}
.sched-panel-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-bottom: 1px solid #e5edf4;
  background: #f7fafc;
  flex: 0 0 auto;
}
.sched-panel-tab {
  border: 0;
  background: transparent;
  padding: 0.65rem 0.35rem;
  font-size: var(--type-xs);
  font-weight: 700;
  color: #5b6b7c;
  cursor: pointer;
}
.sched-panel-tab.is-active {
  background: #fff;
  color: #1f4b6e;
  box-shadow: inset 0 -2px 0 #1f4b6e;
}
.sched-panel-shared {
  display: grid;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem 0.65rem;
  border-top: 1px solid #e5edf4;
  margin-top: auto;
  background: #f7fafc;
  flex: 0 0 auto;
}
.sched-selection-summary {
  display: grid;
  gap: 0.4rem;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  background: #f8fafc;
}
.sched-selection-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.sched-selection-head strong { font-size: 0.92rem; }
.sched-selection-hint { margin: 0; font-size: 0.78rem; }
.sched-selection-custom { margin-top: 0.15rem; }
.sched-panel-pane { display: none; padding: 0.7rem 0.75rem 0.85rem; gap: 0.65rem; }
.sched-panel-pane.is-active { display: grid; flex: 1 1 auto; min-height: 0; overflow: auto; }
.sched-panel-pane h3 { margin: 0; font-size: 0.95rem; }
.sched-conflict-actions {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.35rem;
}
.sched-conflict-actions .btn-secondary {
  width: 100%;
  font-size: var(--type-xs);
  padding: 0.35rem 0.5rem;
}
.sched-conflicts-dialog {
  width: fit-content;
  max-width: calc(100vw - 1.5rem);
  padding: 0;
  overflow: visible;
}
.sched-conflicts-dialog-form {
  padding: 0.85rem 0.9rem 0.9rem;
  gap: 0.55rem;
  overflow: visible;
}
.sched-conflicts-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.sched-conflicts-dialog .sched-conflicts-dialog-head,
.sched-conflicts-dialog .sched-conflicts-dialog-hint,
.sched-conflicts-dialog .sched-conflicts-dialog-actions {
  width: 0;
  min-width: 100%;
}
.sched-conflicts-dialog-head h2 {
  margin: 0;
  font-size: 1.1rem;
}
.sched-conflicts-dialog-hint {
  margin: 0;
  font-size: var(--type-xs);
}
.sched-conflicts-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: min(60vh, 28rem);
  border: 1px solid #d7e2ec;
  border-radius: 8px;
}
.sched-conflicts-dialog .sched-conflicts-table-wrap {
  width: fit-content;
  max-width: 100%;
}
.sched-conflicts-table {
  width: auto;
  table-layout: auto;
  border-collapse: collapse;
  font-size: var(--type-sm);
}
.sched-conflicts-table th,
.sched-conflicts-table td {
  padding: 0.32rem 0.35rem;
  border-bottom: 1px solid #e5edf4;
  vertical-align: middle;
  text-align: left;
}
.sched-conflicts-table th {
  position: sticky;
  top: 0;
  background: #f7fafc;
  z-index: 1;
  font-size: var(--type-xs);
  white-space: nowrap;
}
.sched-conflicts-table .sched-conflicts-account {
  min-width: 12.5rem;
  max-width: 18rem;
}
.sched-conflicts-table .sched-conflicts-services {
  min-width: 9.5rem;
  max-width: 14rem;
}
.sched-conflicts-table .sched-conflicts-conflict {
  min-width: 9rem;
  max-width: 13.5rem;
}
.sched-conflicts-table .sched-conflicts-account,
.sched-conflicts-table .sched-conflicts-services,
.sched-conflicts-table .sched-conflicts-conflict {
  width: auto;
  white-space: nowrap;
  padding-right: 1.15rem;
}
.sched-conflicts-table .sched-conflicts-status-col {
  padding-left: 0.75rem;
}
.sched-conflicts-table .sched-conflicts-account strong,
.sched-conflicts-table .sched-conflicts-services,
.sched-conflicts-table .sched-conflicts-conflict strong,
.sched-conflicts-table .sched-conflicts-muted {
  overflow: hidden;
  text-overflow: ellipsis;
}
.sched-conflicts-table .sched-conflicts-conflict strong {
  display: block;
}
.sched-conflicts-table .sched-conflicts-status-col,
.sched-conflicts-table .sched-conflicts-date-col,
.sched-conflicts-table .sched-conflicts-reason-col,
.sched-conflicts-table .sched-conflicts-save-col {
  width: 1%;
  white-space: nowrap;
}
.sched-conflicts-save-col .btn-secondary {
  padding: 0.35rem 0.65rem;
  font-size: var(--type-sm);
  white-space: nowrap;
}
.sched-conflicts-muted {
  display: block;
  font-size: var(--type-xs);
  color: #5b6b7c;
}
.sched-conflicts-date-cell,
.sched-conflicts-reason-cell,
.sched-conflicts-status-cell {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  white-space: nowrap;
}
.sched-conflicts-status-cell select,
.sched-conflicts-date-cell input[type="date"],
.sched-conflicts-reason-cell select {
  box-sizing: border-box;
  flex: 0 0 auto;
  min-width: 0;
  height: 2.15rem;
  min-height: 2.15rem;
  margin: 0;
  padding: 0 0.4rem;
  border: 1px solid #c5d3e0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: var(--type-sm);
  line-height: 1.2;
  vertical-align: middle;
}
.sched-conflicts-status-cell select {
  width: 11.75rem;
}
.sched-conflicts-date-cell input[type="date"] {
  width: 10.25rem;
}
.sched-conflicts-reason-cell select {
  width: 17.25rem;
}
.sched-conflicts-date-cell input[type="date"] {
  position: relative;
  cursor: pointer;
}
.sched-conflicts-date-cell input[type="date"]:disabled,
.sched-conflicts-date-cell input.is-disabled {
  cursor: not-allowed;
}
.sched-conflicts-date-cell input:disabled,
.sched-conflicts-date-cell input.is-disabled,
.sched-conflicts-reason-cell select:disabled,
.sched-conflicts-reason-cell select.is-disabled {
  opacity: 0.55;
  background: #eef2f6;
  color: #5b6b7c;
  cursor: not-allowed;
}
.sched-conflicts-fill-down {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  min-width: 2.15rem;
  min-height: 2.15rem;
  padding: 0;
  border: 1px solid #c5d3e0;
  border-radius: 6px;
  background: #fff;
  color: #334553;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}
.sched-conflicts-fill-down:hover {
  border-color: #1f4b6e;
  color: #1f4b6e;
}
.sched-conflicts-dialog-actions {
  justify-content: flex-end;
}
.sched-day-staffing-dialog {
  max-width: min(42rem, calc(100vw - 1.5rem));
  width: calc(100% - 1.5rem);
  padding: 0;
}
.sched-day-staffing-dialog-form {
  padding: 1rem 1.1rem 1.05rem;
  gap: 0.65rem;
}
.sched-day-staffing-date {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 12rem;
  margin: 0;
  font-size: var(--type-sm);
  font-weight: 600;
}
.sched-day-staffing-date input[type="date"] {
  margin: 0;
}
.sched-day-staffing-table .route-list-swatch {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.35rem;
}
.sched-day-staffing-override-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: #eef4ff;
  color: #3158a0;
  font-size: var(--type-xs);
  font-weight: 600;
  vertical-align: middle;
}
.sched-day-staffing-override-badge[hidden] {
  display: none !important;
}
.sched-flag-card {
  border: 1px solid #e5edf4;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  background: #f8fafc;
}
.sched-flag-card strong { display: block; margin-bottom: 0.15rem; }
.sched-flag-card p { margin: 0 0 0.25rem; font-size: var(--type-sm); color: var(--muted); }
.sched-flag-card.is-conflict {
  border-color: #7f1111;
  background: var(--finance-alert, #c8102e);
  color: #fff;
}
.sched-flag-card.is-conflict strong,
.sched-flag-card.is-conflict p {
  color: #fff;
  font-weight: 800;
}
.sched-flag-card.is-conflict .btn-secondary {
  background: #fff;
  border-color: #fff;
  color: #7f1111;
  font-weight: 700;
}
.sched-flag-card.is-order { border-color: #f1d48a; background: #fffbeb; }
.sched-assign-form { display: grid; gap: 0.5rem; }
.sched-assign-submit { width: 100%; }
.sched-conflict-controls { display: grid; gap: 0.4rem; }
.sched-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.65rem;
  font-size: var(--type-sm);
}
.sched-unordered-stat {
  border-radius: 6px;
  padding: 0.15rem 0.3rem;
  margin: -0.15rem -0.3rem;
}
.sched-unordered-stat.is-attention {
  border: 1px solid #f1d48a;
  background: #fffbeb;
  color: #7a5410;
  font-weight: 600;
}
.sched-unordered-stat.is-attention strong { color: #6b4508; }
.sched-optimize-future { margin: 0.35rem 0 0; padding-left: 1.1rem; }

.sched-board-map-panel {
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  /* Keep Google Maps internal z-index layers below the board head ⋯ menu. */
  position: relative;
  z-index: 1;
}
.sched-board-map-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e5edf4;
  background: #f7fafc;
  flex: 0 0 auto;
}
.sched-board-map-head h2 { margin: 0; font-size: 1rem; }
.sched-board-map-title,
.sched-pane-head {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.sched-map-clear-selection {
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 650;
  white-space: nowrap;
}
.sched-pane-head h3 { margin: 0; }
.help-btn,
.sched-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 1px solid #9aa8b5;
  border-radius: 999px;
  background: #fff;
  color: #334553;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.help-btn:hover,
.help-btn[aria-expanded="true"],
.sched-help-btn:hover,
.sched-help-btn[aria-expanded="true"] {
  border-color: #1f4b6e;
  color: #1f4b6e;
  background: #eef4f9;
}
.help-popover,
.sched-help-popover,
[data-help-panel],
[data-sched-help-panel] {
  position: fixed;
  z-index: 12000;
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(70vh, 28rem);
  overflow: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid #c5d3e0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(20, 40, 60, 0.18);
  font-size: var(--type-xs);
  color: #445566;
  line-height: 1.45;
}
.help-popover[hidden],
.sched-help-popover[hidden],
[data-help-panel][hidden],
[data-sched-help-panel][hidden] {
  display: none !important;
}
.help-popover h3,
.sched-help-popover h3,
[data-help-panel] h3,
[data-sched-help-panel] h3 {
  margin: 0.35rem 0 0.25rem;
  font-size: 0.8rem;
  color: #243542;
}
.help-popover h3:first-child,
.sched-help-popover h3:first-child,
[data-help-panel] h3:first-child,
[data-sched-help-panel] h3:first-child { margin-top: 0; }
.help-popover p,
.sched-help-popover p,
[data-help-panel] p,
[data-sched-help-panel] p {
  margin: 0 0 0.4rem;
}
.help-popover p:last-child,
.sched-help-popover p:last-child,
[data-help-panel] p:last-child,
[data-sched-help-panel] p:last-child { margin-bottom: 0; }
.help-popover ul,
.sched-help-popover ul,
[data-help-panel] ul,
[data-sched-help-panel] ul {
  margin: 0 0 0.35rem;
  padding-left: 1.1rem;
}
.help-popover li,
.sched-help-popover li,
[data-help-panel] li,
[data-sched-help-panel] li { margin: 0.15rem 0; }
.sched-board-map-tools { display: inline-flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.sched-optimize-dialog {
  max-width: min(28rem, calc(100vw - 1.5rem));
  width: calc(100% - 1.5rem);
  padding: 0;
}
.sched-optimize-dialog-form {
  padding: 1rem 1.1rem 1.05rem;
  gap: 0.65rem;
}
.sched-optimize-date,
.sched-optimize-routes-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  font-size: var(--type-sm);
  font-weight: 600;
}
.sched-optimize-date input[type="date"] {
  margin: 0;
  max-width: 12rem;
}
.sched-optimize-routes-label {
  font-weight: 600;
}
.sched-order-reset-dialog,
.sched-order-reset-dialog .cm-dialog-form,
.sched-order-reset-dialog .sched-optimize-routes-field,
.sched-order-reset-dialog .sched-optimize-route-multi {
  overflow: visible;
}
.sched-order-reset-dialog-form {
  padding: 0;
  min-width: min(22rem, 100%);
  overflow: visible;
}
.sched-order-reset-dialog .sched-optimize-routes-field {
  position: relative;
  z-index: 2;
}
.sched-order-reset-dialog .sched-filter-multi[open] {
  z-index: 90;
}
.sched-order-reset-dialog .sched-filter-options {
  max-height: min(24rem, 55vh);
}
.sched-order-reset-dialog .sched-filter-options-list {
  max-height: none;
  overflow: auto;
}
.sched-order-reset-dialog .sched-filter-options[popover] {
  inset: unset;
  margin: 0;
  overflow: auto;
}
.sched-order-reset-dialog .sched-filter-options[popover]:popover-open {
  display: grid;
}
.sched-order-reset-pins {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}
.sched-order-reset-pins > span {
  font-size: var(--type-sm);
  font-weight: 600;
}
.sched-optimize-route-multi {
  width: 100%;
  max-width: 100%;
}
.sched-mode-badge {
  font-size: var(--type-xs);
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #e8eef4;
  color: #334553;
}
.sched-mode-badge.is-order { background: #1f4b6e; color: #fff; }
.sched-mode-badge.is-group { background: #0f766e; color: #fff; }
.sched-board-map {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  background: #e8eef4;
}
.sched-board-map-panel [data-sched-map-hint],
.sched-map-status {
  margin: 0;
  padding: 0.4rem 0.75rem 0.35rem;
}
.sched-map-status[hidden] {
  display: none !important;
}
.sched-unordered-hint:empty {
  display: none;
}
.sched-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  padding: 0.35rem 0.75rem 0.55rem;
  font-size: var(--type-xs);
  color: #5b6b7c;
}
.sched-legend-dot {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  margin-right: 0.25rem;
  vertical-align: middle;
  background: #2563eb;
}
.sched-legend-dot.is-unassigned { background: #94a3b8; }
.sched-legend-dot.is-unmapped { background: #d97706; }

.sched-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #eef5fb;
}
.sched-table-search { flex: 1 1 14rem; min-width: 12rem; }
.sched-table-search input { width: 100%; }
.sched-table-selection {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  font-size: var(--type-sm);
  font-weight: 600;
  min-height: 2.15rem;
}
.sched-table-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-left: auto;
}
.sched-inline-form {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  margin: 0;
}
.sched-table-toolbar .btn-primary,
.sched-table-toolbar .btn-secondary,
.sched-table-toolbar .btn-danger,
.sched-table-toolbar select,
.sched-table-toolbar input[type="search"],
.sched-table-toolbar input[type="date"] {
  box-sizing: border-box;
  height: 2.15rem;
  min-height: 2.15rem;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  vertical-align: middle;
}
.sched-table-toolbar input[type="search"],
.sched-table-toolbar input[type="date"],
.sched-table-toolbar select {
  display: inline-block;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}
.sched-table-toolbar .searchable-select {
  gap: 0;
  height: 2.15rem;
  min-height: 2.15rem;
}
.sched-table-toolbar .searchable-select .searchable-input {
  box-sizing: border-box;
  margin-top: 0;
  height: 2.15rem;
  min-height: 2.15rem;
  padding-top: 0;
  padding-bottom: 0;
}
.sched-more-actions summary {
  cursor: pointer;
  font-size: var(--type-sm);
  font-weight: 700;
  color: #1f4b6e;
}
.sched-board-table-wrap { margin: 0; }
.sched-board-table td,
.sched-board-table th {
  padding-top: 0.32rem;
  padding-bottom: 0.32rem;
  vertical-align: top;
}
.sched-board-table th .sched-sort-link {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.sched-board-table th .sched-sort-link:hover {
  color: #1f4b6e;
  text-decoration: underline;
}
.sched-board-table th .sched-sort-link.is-active {
  color: #1f4b6e;
  font-weight: 700;
}
.visits-date-scheduled {
  color: #1f4b6e;
}
.sched-board-table tr.is-selected { background: #e8f1fa; }
.sched-board-table tr.is-conflict { background: #fff4e8; }
.sched-board-table tr.is-conflict.is-selected { background: #ffe0c2; }
.sched-board-table tr.is-high-priority td:first-child,
.sched-board-table.is-high-priority-focus tr[data-high-priority="1"] {
  box-shadow: inset 3px 0 0 #b45309;
}
.sched-board-table.is-high-priority-focus tr[data-high-priority="1"] { background: #fffbeb; }
.sched-board-table tr.is-unmapped .visits-muted-cell { color: #9a6b1f; }
.sched-route-swatch {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  background: var(--route-color, #64748b);
  margin-right: 0.25rem;
  vertical-align: middle;
}
.sched-stop-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #334553;
}
.sched-time-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 0.85rem;
  color: #334553;
  vertical-align: top;
}
.sched-time-cell .sched-work-label {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  line-height: 1.2;
}
.sched-conflict-cell .visit-badge-conflict {
  background: #b45309;
  color: #fff;
  font-weight: 700;
}
.visit-badge-conflict-allowed { background: #78716c; color: #fff; }
.sched-board-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
}
.sched-marker-popup { font-size: 0.85rem; line-height: 1.35; max-width: 19rem; }
.sched-board-map .gm-style-iw,
.sched-board-map .gm-style-iw-c,
.sched-board-map .gm-style-iw-d,
.sched-marker-popup {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.sched-marker-popup input,
.sched-marker-popup textarea,
.sched-marker-popup select {
  user-select: text;
  -webkit-user-select: text;
}
.sched-pin-head {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}
.sched-pin-head strong { flex: 1; min-width: 0; }
.sched-pin-property-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}
.sched-pin-property-link:hover {
  color: #1f4b6e;
}
.sched-pin-gps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  border: 1px solid #9aa8b5;
  border-radius: 6px;
  background: #fff;
  color: #1f4b6e;
  cursor: pointer;
  flex: 0 0 auto;
}
.sched-pin-gps-btn:hover {
  border-color: #1f4b6e;
  background: #eef4f9;
}
.sched-pin-gps-title { font-weight: 700; margin-bottom: 0.2rem; }
.sched-pin-gps-k { color: #5b6b7c; font-size: 0.68rem; font-weight: 700; }
.sched-pin-gps-form {
  display: grid;
  gap: 0.35rem;
  margin: 0.45rem 0 0.25rem;
}
.sched-pin-field-wide { grid-column: 1 / -1; }
.sched-pin-actions { display: flex; gap: 0.35rem; align-items: center; }
html.sched-gps-edit-active .sched-board-map { cursor: grab; }
html.sched-gps-pin-dragging,
html.sched-gps-pin-dragging * {
  cursor: grabbing !important;
}
html.sched-gps-pin-dragging .sched-board-map {
  pointer-events: none;
}
html.sched-popup-map-panning,
html.sched-popup-map-panning * {
  cursor: grabbing !important;
  user-select: none !important;
}
.sched-popup-conflict {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0;
  border: 0;
  background: none;
  color: #b45309;
  font-weight: 700;
  font-size: inherit;
  font-family: inherit;
  text-decoration: underline;
  cursor: pointer;
  text-align: left;
}
.sched-popup-conflict:hover {
  color: #9b1c1c;
}
.sched-pin-conflict-dialog {
  max-width: 28rem;
}
.sched-pin-conflict-account {
  margin: 0;
  font-weight: 700;
}
.sched-pin-conflict-meta {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}
.sched-pin-conflict-meta div {
  display: grid;
  gap: 0.1rem;
}
.sched-pin-conflict-meta dt {
  font-size: var(--type-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #5b6b7c;
}
.sched-pin-conflict-meta dd {
  margin: 0;
  font-weight: 600;
}
.sched-pin-conflict-approve {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
}
.sched-pin-conflict-note {
  display: grid;
  gap: 0.2rem;
  font-size: var(--type-sm);
  font-weight: 700;
}
.sched-pin-conflict-note select {
  font-weight: 600;
}
.sched-pin-conflict-note .required {
  color: var(--error, #9b1c1c);
}
.sched-pin-conflict-note-hint {
  margin: 0;
  font-size: var(--type-xs);
}
.sched-popup-late { color: #b45309; font-weight: 700; font-size: 0.78rem; }
.sched-popup-priority { color: #b45309; font-weight: 700; font-size: 0.78rem; }
.sched-pin-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.45rem;
  margin: 0.35rem 0 0.25rem;
}
.sched-pin-field {
  display: grid;
  gap: 0.08rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #5b6b7c;
  min-width: 0;
}
.sched-pin-field input,
.sched-pin-field select {
  min-height: 1.7rem;
  width: 100%;
  font-size: 0.8rem;
  font-weight: 600;
}
.sched-pin-conflict,
.sched-pin-error,
.sched-pin-actions {
  grid-column: 1 / -1;
}
.sched-pin-conflict {
  display: grid;
  gap: 0.25rem;
  padding: 0.3rem 0.35rem;
  border: 1px solid #f5d0a8;
  border-radius: 6px;
  background: #fff7ed;
}
.sched-pin-conflict[hidden],
.sched-pin-error[hidden] {
  display: none;
}
.sched-pin-allow {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #9a3412;
}
.sched-pin-conflict select { min-height: 1.7rem; font-size: 0.78rem; }
.sched-pin-error { color: #b91c1c; font-size: 0.75rem; font-weight: 600; }
.sched-pin-save { min-height: 1.75rem; font-size: 0.8rem; padding: 0.2rem 0.7rem; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
html.sched-order-mode-active .sched-mode-badge { background: #1f4b6e; color: #fff; }

@media (max-width: 1100px) {
  .sched-board-workspace {
    grid-template-columns: 1fr;
    --sched-workspace-height: auto;
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .sched-board-panel {
    height: min(52vh, 34rem);
    max-height: min(52vh, 34rem);
  }
  .sched-board-map-panel {
    height: min(52vh, 34rem);
    max-height: min(52vh, 34rem);
  }
}

.invoice-header-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 0 1rem;
}
.invoice-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-variant-numeric: tabular-nums;
}
.invoice-total strong { font-size: 1.15rem; }
.invoice-lines-table .col-qty,
.invoice-lines-table .col-money,
.invoices-list-table .col-money {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.invoice-line-note { margin: 0.2rem 0 0; font-size: 0.8rem; }
.invoice-create-form {
  display: grid;
  gap: 0.85rem;
  max-width: 32rem;
}
.invoice-date-form,
.invoice-header-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: flex-end;
}
.invoice-header-form {
  display: grid;
  gap: 0.65rem;
  max-width: 36rem;
}
.invoice-header-form textarea,
.invoice-note-form textarea {
  width: 100%;
  min-height: 4.5rem;
}
.invoice-snapshot p { margin: 0 0 0.35rem; }
.invoice-internal-notes {
  margin-top: 1.5rem;
  max-width: 40rem;
}
.invoice-note-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.invoice-note-list li {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  background: #fafbfb;
}
.invoice-note-list p { margin: 0 0 0.25rem; }
.invoice-txn-create-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.65rem 0.85rem;
  align-items: end;
}
.invoice-txn-create-actions { margin: 0; }
.invoice-txn-list {
  display: grid;
  gap: 0.55rem;
}
.invoice-txn-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfb;
  padding: 0.7rem 0.85rem;
}
.invoice-txn-card:hover {
  border-color: #9aa7b5;
  background: #f3f6f8;
}
.invoice-txn-card-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: baseline;
}
.invoice-txn-number { font-weight: 700; color: #152033; }
.invoice-txn-date { color: #152033; }
.invoice-txn-status {
  font-size: 0.75rem;
  font-weight: 650;
  color: #1a4a75;
}
.invoice-txn-property,
.invoice-txn-memo {
  margin: 0.25rem 0 0;
  font-size: var(--type-sm);
  color: var(--muted);
}
.invoice-txn-card-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.4rem;
  font-size: var(--type-sm);
  font-variant-numeric: tabular-nums;
}
.invoice-txn-balance { color: var(--muted); }
.billing-recipient-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: flex-end;
}
.billing-recipient-row .btn-link {
  margin-bottom: 0.35rem;
}
.billing-settings-facts .muted {
  margin: 0.15rem 0 0;
}

