/* EIS shared shell + Home — modern maintenance portal */
:root {
  --eis-ink: #3a4556;
  --eis-muted: #4a5563;
  --eis-forest: #3d5070;
  --eis-forest-deep: #334462;
  --eis-sage: #5a6d8c;
  --eis-mint: #f2f4f8;
  --eis-mist: #f8f9fb;
  --eis-line: #e2e6ed;
  --eis-paper: #ffffff;
  --eis-amber: #b39a58;
  --eis-amber-soft: #f8f5ee;
  --eis-danger: #b45a4e;
  --eis-danger-soft: #fdecea;
  --eis-radius: 14px;
  --eis-radius-sm: 10px;
  --eis-shadow: 0 18px 40px rgba(61, 80, 112, 0.07);
  --eis-shadow-sm: 0 6px 18px rgba(61, 80, 112, 0.05);
  --font-display: "Inter", Arial, Helvetica, sans-serif;
  --font-body: "Inter", Arial, Helvetica, sans-serif;
  --font-brand: "Cormorant Garamond", Georgia, "Times New Roman", serif;

  /* Tenant-overridable portal chrome (set inline from company brand colors) */
  --hz-header: #103354;
  --hz-accent: #c6a568;
  --hz-page-bg: #f4f6f8;
  --hz-header-text: #ffffff;
  --hz-header-muted: rgba(255, 255, 255, 0.72);
  --hz-nav-active: #c6a568;
  --hz-book-btn: #c6a568;
  --hz-book-btn-text: #103354;
  --hz-chrome-h: 76px;

  /* Shared product tokens (Speed Write + Work Order) */
  --eis-navy: #103354;
  --eis-navy-deep: #0a2a50;
  --eis-navy-mid: #1a4a7a;
  --eis-success: #1f7a3f;
  --eis-success-soft: #e8f6ec;
  --eis-success-line: #9fceb0;
  --eis-warn: #8a6d1b;
  --eis-warn-soft: #fff6d6;
  --eis-warn-line: #e6d27a;
  --eis-field-border: #cfd6df;
  --eis-field-radius: 8px;
  --eis-control-h: 40px;
  --eis-space-1: 4px;
  --eis-space-2: 8px;
  --eis-space-3: 12px;
  --eis-space-4: 16px;
  --eis-space-5: 24px;
  --eis-space-6: 32px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
  overflow-x: clip;
}

.app-body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--eis-ink);
  background: var(--hz-page-bg, #f4f6f8);
  overflow-x: hidden;
  overflow-x: clip;
}

.hz-shell {
  width: min(1280px, 92%);
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hz-chrome {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--hz-chrome-h, 76px);
  min-height: var(--hz-chrome-h, 76px);
  background: var(--hz-header, #103354);
  border-bottom: 2px solid var(--hz-accent, #c6a568);
  box-shadow: 0 6px 18px rgba(16, 51, 84, 0.14);
}

.hz-chrome-inner {
  width: min(1280px, 92%);
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  min-height: var(--hz-chrome-h, 76px);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 4px;
}

.hz-header {
  display: none;
}

.hz-brand-block {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  padding: 0;
}

.hz-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  color: var(--hz-header-text, #fff);
  min-height: 44px;
  min-width: 0;
  border-radius: 6px;
}

.hz-brand-link:focus-visible {
  outline: 2px solid var(--hz-accent, #c6a568);
  outline-offset: 3px;
}

.hz-brand-text {
  /* Logo carries the brand — avoid duplicating the company name. */
  display: none;
}

.hz-brand-primary {
  font-family: var(--font-brand);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--hz-header-text, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.hz-brand-secondary {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hz-header-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.hz-logo-mark {
  width: auto;
  max-width: 220px;
  height: 70px;
  min-height: 70px;
  object-fit: contain;
  object-position: left center;
  display: block;
  border-radius: 0;
  flex: 0 0 auto;
  background: transparent;
  box-shadow: none;
  position: relative;
  top: -10px;
}

.hz-logo {
  display: none;
}

.hz-brand-sub,
.hz-org {
  display: none;
}

.hz-nav-toggle {
  display: none;
  align-self: center;
  width: 44px;
  height: 44px;
  border: 1px solid color-mix(in srgb, var(--hz-header-text, #fff) 28%, transparent);
  border-radius: 10px;
  background: transparent;
  padding: 11px 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}

.hz-nav-toggle span {
  display: block;
  height: 2px;
  background: var(--hz-header-text, #fff);
  border-radius: 2px;
}

.hz-nav-toggle:focus-visible {
  outline: 2px solid var(--hz-accent, #b39a58);
  outline-offset: 2px;
}

.hz-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow-x: auto;
  height: 100%;
}

.hz-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  min-height: 44px;
  padding: 0 13px;
  margin: 0;
  border-radius: 0;
  color: color-mix(in srgb, var(--hz-header-text, #fff) 92%, transparent);
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color 0.15s ease;
  background: transparent;
}

.hz-nav-mobile-only {
  display: none !important;
}

.hz-nav a:hover {
  background: transparent;
  color: var(--hz-header-text, #fff);
}

.hz-nav a:focus-visible {
  outline: 2px solid var(--hz-accent, #c6a568);
  outline-offset: -4px;
}

.hz-nav a.nav-active {
  color: var(--hz-nav-active, var(--hz-accent, #c6a568));
  background: transparent;
  font-weight: 500;
}

.hz-nav a.nav-active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 0;
  height: 2px;
  border-radius: 0;
  background: var(--hz-nav-active, var(--hz-accent, #c6a568));
}

.hz-chrome-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0;
  height: 100%;
}

.hz-book-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 6px;
  background: var(--hz-book-btn, var(--hz-accent, #c6a568)) !important;
  color: var(--hz-book-btn-text, var(--hz-header, #103354)) !important;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
  border: 0;
  white-space: nowrap;
  box-shadow: none;
}

.hz-book-cta::before {
  content: "";
  width: 15px;
  height: 14px;
  flex: 0 0 auto;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  background:
    linear-gradient(currentColor, currentColor) 3px 0 / 1.5px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 9.5px 0 / 1.5px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 0 4px / 100% 1.5px no-repeat;
  opacity: 0.9;
  box-sizing: border-box;
}

.hz-book-cta:hover {
  filter: brightness(1.05);
}

.hz-book-cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.hz-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--hz-header-text, #fff) 55%, transparent);
  background: transparent;
  color: var(--hz-header-text, #fff) !important;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none !important;
}

.hz-help-icon:hover,
.hz-help-icon.nav-active {
  background: color-mix(in srgb, var(--hz-header-text, #fff) 12%, transparent);
}

.hz-help-icon:focus-visible {
  outline: 2px solid var(--hz-accent, #c6a568);
  outline-offset: 2px;
}

.hz-user-menu {
  position: relative;
}

.hz-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 8px 4px 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--hz-header-text, #fff);
}

.hz-user-trigger:hover,
.hz-user-menu.is-open .hz-user-trigger {
  background: color-mix(in srgb, var(--hz-header-text, #fff) 10%, transparent);
  border-color: color-mix(in srgb, var(--hz-header-text, #fff) 18%, transparent);
}

.hz-user-trigger:focus-visible {
  outline: 2px solid var(--hz-accent, #c6a568);
  outline-offset: 2px;
}

.hz-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--hz-header, #103354);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.hz-user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  min-width: 0;
}

.hz-user-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--hz-header-text, #fff);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hz-user-role {
  display: none;
}

.hz-user-chevron {
  color: var(--hz-header-muted);
  font-size: 0.75rem;
}

.hz-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--eis-line);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(16, 51, 84, 0.22);
  z-index: 120;
  color: var(--eis-ink);
}

.hz-user-dropdown-head {
  padding: 10px 12px 8px;
  border-bottom: 1px solid #eef1f6;
  margin-bottom: 4px;
}

.hz-user-dropdown-name {
  display: block;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--eis-ink);
  line-height: 1.25;
}

.hz-user-dropdown-role {
  display: block;
  margin-top: 2px;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--eis-muted);
  border-bottom: 0;
  margin-bottom: 0;
}

.hz-user-item {
  display: block;
  padding: 10px 12px;
  min-height: 44px;
  box-sizing: border-box;
  border-radius: 8px;
  color: var(--eis-ink) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 24px;
}

.hz-user-item:hover,
.hz-user-item.is-active {
  background: #eef1f6;
}

.hz-user-item:focus-visible {
  outline: 2px solid var(--hz-header, #0d3564);
  outline-offset: 1px;
}

.hz-user-signout {
  color: #b45a4e !important;
  margin-top: 2px;
  border-top: 1px solid #eef1f6;
  border-radius: 0 0 8px 8px;
}

.hz-user {
  display: none;
}

.nav-logout {
  display: none !important;
}

.hz-body {
  animation: rise-in 0.55s ease both;
  animation-delay: 0.08s;
}

.hz-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding: 18px 8px 0;
  border-top: 1px solid var(--eis-line);
  color: var(--eis-muted);
  font-size: 0.85rem;
}

.hz-footer-links {
  display: flex;
  gap: 16px;
}

.hz-footer a {
  color: var(--eis-sage);
  text-decoration: none;
  font-weight: 600;
}

.hz-footer a:hover {
  text-decoration: underline;
}

.legal-page {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 8px 0 40px;
}
.legal-hero {
  margin-bottom: 18px;
}
.legal-hero h1 {
  margin: 4px 0 8px;
  font-size: 1.85rem;
  line-height: 1.2;
  color: #1f2a37;
}
.legal-updated {
  margin: 0;
  color: #6b7280;
  font-size: .9rem;
}
.legal-card {
  background: #fff;
  border: 1px solid var(--eis-line, #e4e8ee);
  border-radius: 14px;
  padding: 22px 24px 28px;
  color: #374151;
  line-height: 1.55;
}
.legal-card h2 {
  margin: 22px 0 8px;
  font-size: 1.05rem;
  color: #1f2a37;
}
.legal-card p,
.legal-card ul {
  margin: 0 0 12px;
}
.legal-card ul {
  padding-left: 1.2rem;
}
.legal-card li {
  margin: 0 0 6px;
}
.legal-card a {
  color: var(--eis-sage, #2a3d63);
  font-weight: 600;
}

/* Page hero */
.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--eis-forest);
}

.page-sub {
  margin: 6px 0 0;
  color: var(--eis-muted);
  font-size: 0.95rem;
}

.legend {
  font-size: 0.82rem;
  font-weight: 600;
  color: #8a7a58;
  background: var(--eis-amber-soft);
  border: 1px solid #e6d4b0;
  border-radius: 999px;
  padding: 8px 12px;
}

/* Filters */
.hz-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  padding: 16px;
  margin-bottom: 16px;
  background: var(--eis-paper);
  border: 1px solid var(--eis-line);
  border-radius: var(--eis-radius);
  box-shadow: var(--eis-shadow-sm);
}

.hz-filters .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hz-filters .field:first-child {
  flex-direction: row;
  align-items: flex-end;
  flex-wrap: wrap;
}

.field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eis-muted);
}

.filter-input,
.filter-select,
.page-input {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--eis-ink);
  background: var(--eis-mist);
  border: 1px solid var(--eis-line);
  border-radius: var(--eis-radius-sm);
  padding: 10px 12px;
  min-height: 42px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.filter-input:focus,
.filter-select:focus,
.page-input:focus {
  background: #fff;
  border-color: var(--eis-sage);
  box-shadow: 0 0 0 3px rgba(90, 109, 140, 0.18);
}

.filter-input {
  min-width: 180px;
}

.filter-select {
  min-width: 200px;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-chip {
  font-family: var(--font-body);
  font-weight: 700;
  border-radius: var(--eis-radius-sm);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

a.btn-primary,
a.btn-secondary,
button.btn-primary,
button.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
}

a.btn-primary:hover,
a.btn-primary:focus,
a.btn-secondary:hover,
a.btn-secondary:focus {
  text-decoration: none !important;
}

.btn-primary {
  background: var(--eis-forest);
  color: #fff;
  border: 1px solid var(--eis-forest-deep);
  padding: 10px 16px;
  min-height: 42px;
  box-shadow: 0 8px 16px rgba(61, 80, 112, 0.18);
}

.btn-primary:hover {
  background: var(--eis-sage);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  color: var(--eis-forest);
  border: 1px solid var(--eis-line);
  padding: 10px 14px;
  min-height: 42px;
}

.btn-secondary:hover {
  background: var(--eis-mint);
  border-color: #c9d2e3;
}

.btn-chip {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 0.78rem;
  padding: 6px 10px;
  background: var(--eis-mist);
  color: var(--eis-forest);
  border: 1px solid var(--eis-line);
  margin-left: 4px;
}

.btn-chip.accent {
  background: var(--eis-forest);
  color: #fff;
  border-color: var(--eis-forest-deep);
}

.btn-chip:hover {
  transform: translateY(-1px);
}

/* Table */
.table-shell {
  background: var(--eis-paper);
  border: 1px solid var(--eis-line);
  border-radius: var(--eis-radius);
  box-shadow: var(--eis-shadow);
  overflow: auto;
}

.work-grid {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.work-grid thead th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eis-muted);
  background: linear-gradient(180deg, #f7f8fa, #eef1f6);
  border-bottom: 1px solid var(--eis-line);
  padding: 14px 14px;
  white-space: nowrap;
}

.work-grid tbody td {
  padding: 14px;
  border-bottom: 1px solid #e6eaf0;
  font-size: 0.92rem;
  vertical-align: middle;
}

.work-grid tbody tr:last-child td {
  border-bottom: none;
}

.work-grid tbody tr:hover {
  background: #f3f5f9;
}

.work-grid tr.alt {
  background: #f8f9fb;
}

.work-grid tr.is-today {
  box-shadow: inset 3px 0 0 #c4a35a;
}

.work-grid tr.is-today:hover {
  background: #f7f5ef;
}

.work-grid tr.is-overdue {
  background: linear-gradient(90deg, #fdeceb, #fff8f7);
  box-shadow: inset 3px 0 0 #d92d20;
}

.work-grid tr.is-overdue:hover {
  background: linear-gradient(90deg, #fcdad7, #fff1ef);
}

.cell-link {
  color: var(--eis-forest);
  font-weight: 700;
  text-decoration: none;
}

.cell-link:hover {
  text-decoration: underline;
}

.cell-muted {
  color: var(--eis-muted);
  white-space: nowrap;
}

.cell-actions {
  white-space: nowrap;
  text-align: left;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--eis-mist);
  color: var(--eis-muted);
  border: 1px solid var(--eis-line);
}

.status-booked {
  background: #e7f6ec;
  color: #1f7a3f;
  border-color: #b7dfc4;
}

.status-in-progress {
  background: #e8f1ff;
  color: #1d4f91;
  border-color: #b9d0f2;
}

.status-ready {
  background: #eef6ff;
  color: #2a5f9e;
  border-color: #c5daf5;
}

.status-review {
  background: #fff4e5;
  color: #9a6700;
  border-color: #f0d4a0;
}

.status-agreements-pending {
  background: #fff4e5;
  color: #9a6700;
  border-color: #f0d4a0;
}

.status-overdue {
  background: #fdeceb;
  color: #b42318;
  border-color: #f3c1bc;
}

.status-reschedule {
  background: #fff6e8;
  color: #8a4b08;
  border-color: #f0d2a4;
}

.status-completed {
  background: #eef1f6;
  color: #3d5070;
  border-color: #c9d2e3;
}

.status-cancelled,
.status-canceled {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #d1d5db;
}

/* Pager + bottom */
.pager-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 4px 2px;
}

.pager-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pager-links a {
  color: var(--eis-forest);
  font-weight: 700;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
}

.pager-links a:hover {
  background: var(--eis-mint);
}

.pager-links a.is-disabled,
.pager-links a.is-disabled:hover {
  color: var(--eis-muted);
  background: transparent;
  cursor: default;
  pointer-events: none;
  opacity: 0.45;
}

#homeQueue.is-loading .table-shell {
  opacity: 0.55;
  pointer-events: none;
}

.pager-meta,
.total-meta {
  color: var(--eis-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.page-input {
  width: 52px;
  min-height: 34px;
  padding: 6px 8px;
  text-align: center;
  margin: 0 4px;
}

.bottom-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--eis-line);
}

.bottom-actions .left {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subscription {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--eis-muted);
}

.error-box {
  background: var(--eis-danger-soft);
  color: var(--eis-danger);
  border: 1px solid #f0c4bd;
  border-radius: var(--eis-radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-weight: 600;
}

.success-box {
  background: #e8f5ef;
  color: #1b5e3b;
  border: 1px solid #b7dfc8;
  border-radius: var(--eis-radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-weight: 600;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 960px) {
  .hz-user-name {
    display: none;
  }

  .hz-user-meta {
    display: none;
  }
}

@media (max-width: 760px) {
  .hz-shell {
    width: 94%;
    max-width: 94%;
    padding: 14px 0 28px;
  }

  .hz-chrome-inner {
    width: 94%;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 0;
  }

  .hz-brand-block {
    flex: 1 1 auto;
    min-width: 0;
  }

  .hz-brand-link {
    min-width: 0;
  }

  .hz-logo-mark {
    height: 56px;
    min-height: 56px;
    max-width: min(200px, 52vw);
    top: -4px;
  }

  .hz-nav-toggle {
    display: flex;
    order: 2;
    flex: 0 0 auto;
  }

  .hz-chrome-actions {
    order: 3;
    margin-left: 0;
    padding: 0;
    gap: 6px;
  }

  .hz-book-cta,
  .hz-help-icon {
    display: none;
  }

  .hz-nav-mobile-only {
    display: flex !important;
  }

  .hz-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 120;
    order: 0;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    width: auto;
    height: auto;
    max-height: min(70vh, calc(100dvh - var(--hz-chrome-h, 76px) - env(safe-area-inset-top, 0px)));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    margin: 0;
    background: var(--hz-header, #103354);
    border: 0;
    border-bottom: 2px solid var(--hz-accent, #c6a568);
    border-radius: 0 0 14px 14px;
    box-shadow: 0 16px 28px rgba(16, 51, 84, 0.28);
  }

  body.hz-nav-open {
    overflow: hidden;
    touch-action: none;
  }

  body.hz-nav-open .hz-nav {
    display: flex;
  }

  .hz-nav a {
    margin: 0;
    min-height: 44px;
    height: auto;
    padding: 12px 14px;
    font-size: 15.5px;
    font-weight: 500;
    border-radius: 6px;
  }

  .hz-nav a.nav-active::after {
    display: none;
  }

  .hz-nav a.nav-active {
    background: transparent;
    box-shadow: inset 3px 0 0 var(--hz-nav-active, var(--hz-accent, #c6a568));
    color: var(--hz-nav-active, var(--hz-accent, #c6a568));
  }

  .hz-book-cta {
    height: 44px;
    min-height: 44px;
    padding: 0 12px;
    font-size: 0.85rem;
    border-radius: 6px;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .hz-filters .field:first-child {
    width: 100%;
  }

  .filter-input,
  .filter-select {
    width: 100%;
    min-width: 0;
    font-size: 16px;
  }

  .hz-brand-primary {
    max-width: min(140px, 28vw);
  }

  .hz-brand-secondary {
    max-width: min(160px, 32vw);
  }

  .hz-shell {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }

  .hz-chrome {
    padding-top: env(safe-area-inset-top);
  }

  .work-grid {
    min-width: 640px;
  }

  .work-grid thead th,
  .work-grid tbody td {
    padding: 10px 8px;
    font-size: 0.86rem;
  }

  /* Keep the densest columns off small screens; table still scrolls for the rest */
  .work-grid thead th:nth-child(2),
  .work-grid tbody td:nth-child(2),
  .work-grid thead th:nth-child(5),
  .work-grid tbody td:nth-child(5) {
    display: none;
  }

  .home-filters-bar.home-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .home-filters-bar .home-filter-search,
  .home-filters-bar .field {
    min-width: 0;
    width: 100%;
    flex: 1 1 auto;
  }

  .pager-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .bottom-actions .left {
    width: 100%;
  }

  .bottom-actions .btn-secondary,
  .bottom-actions .btn-primary {
    flex: 1 1 auto;
    min-height: 44px;
    justify-content: center;
  }

  .wo-toolbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 6px;
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .wo-tool-btn,
  .wo-tool-link {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 0.84rem;
  }

  .wo-status {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .home-btn {
    min-height: 44px;
    padding: 10px 12px;
  }

  .wo input:not([type="checkbox"]):not([type="radio"]),
  .wo select,
  .wo textarea,
  .rw input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .rw select,
  .rw textarea {
    font-size: 16px;
  }
}

/* ==== PROFILE (bundled so it always loads) v20260731b ==== */
.pf {
  max-width: none;
  animation: rise-in 0.45s ease both;
}

.pf-hero {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--eis-line, #d9dee6);
}

.pf-hero h1 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--eis-forest);
}

.pf-hero p {
  margin: 8px 0 0;
  font-size: 0.98rem;
  color: var(--eis-muted, #6b7280);
  line-height: 1.5;
  max-width: none;
  width: 100%;
}

.pf-flash {
  background: #eef1f6;
  color: #3d5070;
  border: 1px solid #c9d2e3;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 0.92rem;
}

.pf-section {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 28px;
  align-items: start;
}

.pf-section-label {
  padding-top: 6px;
}

.pf-kicker {
  display: block;
  margin-bottom: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eis-sage, #2a3d63);
}

.pf-section-label h2 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--eis-forest-deep, #334462);
}

.pf-section-label p {
  margin: 8px 0 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--eis-muted, #6b7280);
}

.pf-card {
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(61, 80, 112, 0.05);
  overflow: hidden;
}

.pf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border-bottom: 1px solid #eef1f6;
  transition: background 0.15s ease;
}

.pf-row:last-child {
  border-bottom: none;
}

.pf-row:hover {
  background: #f7f8fa;
}

.pf-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.pf-copy strong {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--eis-ink, #3a4556);
}

.pf-copy span,
.pf-copy {
  font-size: 0.84rem;
  color: var(--eis-muted, #6b7280);
  line-height: 1.4;
}

.pf-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-shrink: 0;
}

.pf-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none !important;
  color: var(--eis-sage, #2a3d63) !important;
  background: transparent;
  border: none;
  padding: 6px 4px;
  cursor: pointer;
}

.pf-link:hover {
  color: var(--eis-forest-deep, #334462) !important;
  text-decoration: underline !important;
}

.pf-btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none !important;
  color: #fff !important;
  background: var(--eis-forest, #3d5070);
  border: 1px solid var(--eis-forest-deep, #334462);
  border-radius: 9px;
  padding: 7px 13px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(61, 80, 112, 0.16);
  transition: background 0.15s ease, transform 0.15s ease;
}

.pf-btn:hover {
  background: var(--eis-sage, #2a3d63);
  transform: translateY(-1px);
  color: #fff !important;
  text-decoration: none !important;
}

.pf-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  width: 68px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.18s ease;
  overflow: hidden;
}

.pf-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: left 0.18s ease, right 0.18s ease;
  pointer-events: none;
}

.pf-toggle.on {
  background: #2f6fed;
  border-color: #2563d4;
  color: #fff !important;
  justify-content: flex-start;
  padding-left: 10px;
  padding-right: 28px;
}

.pf-toggle.on::after {
  right: 3px;
  left: auto;
}

.pf-toggle.off {
  background: #d5dae3;
  border-color: #c9d2e3;
  color: #3a4556 !important;
  justify-content: flex-end;
  padding-right: 9px;
  padding-left: 28px;
}

.pf-toggle.off::after {
  left: 3px;
  right: auto;
}

@media (max-width: 820px) {
  .pf-section {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pf-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .pf-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ==== Manage Inspectors ==== */
.insp {
  animation: rise-in 0.45s ease both;
}

.insp-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.insp-hero h1 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--eis-forest);
}

.insp-hero p {
  margin: 6px 0 0;
  color: var(--eis-muted, #6b7280);
  font-size: 0.95rem;
}

.insp-back {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--eis-forest, #3d5070);
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  padding: 9px 14px;
}

.insp-back:hover {
  background: var(--eis-mint, #eef1f6);
}

.insp-card {
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 16px;
  box-shadow: var(--eis-shadow-sm, 0 6px 18px rgba(61, 80, 112, 0.06));
  overflow: auto;
}

.insp-grid {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.insp-grid thead th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
  background: linear-gradient(180deg, #f7f8fa, #eef1f6);
  border-bottom: 1px solid var(--eis-line, #d9dee6);
  padding: 13px 14px;
  white-space: nowrap;
}

.insp-grid tbody td {
  padding: 14px;
  border-bottom: 1px solid #e6eaf0;
  font-size: 0.92rem;
  vertical-align: middle;
}

.insp-grid tbody tr:last-child td {
  border-bottom: none;
}

.insp-grid tbody tr:hover {
  background: #f7f8fa;
}

.insp-name {
  font-weight: 700;
  color: var(--eis-forest, #3d5070);
  text-decoration: none;
}

.insp-name:hover {
  text-decoration: underline;
}

.insp-primary {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--eis-sage, #2a3d63);
  background: var(--eis-mint, #eef1f6);
  border: 1px solid #c9d2e3;
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: middle;
}

.insp-user {
  color: var(--eis-muted, #6b7280);
}

.insp-company {
  font-weight: 600;
  color: var(--eis-forest, #3d5070);
  max-width: 220px;
}

.insp-status {
  font-weight: 800;
  font-size: 0.86rem;
}

.insp-status.on {
  color: #3d5070;
}

.insp-status.off {
  color: #8a6b32;
}

.insp-link {
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--eis-sage, #2a3d63);
  text-decoration: none;
}

.insp-link:hover {
  text-decoration: underline;
  color: var(--eis-forest-deep, #334462);
}

.insp-sort {
  white-space: nowrap;
}

.insp-sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 2px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--eis-sage, #2a3d63);
  background: var(--eis-mist, #f7f8fa);
  border: 1px solid var(--eis-line, #d9dee6);
  font-size: 0.75rem;
}

.insp-sort-btn:hover {
  background: var(--eis-mint, #eef1f6);
}

.insp-end {
  text-align: left;
}

.insp-btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: var(--eis-forest, #3d5070);
  border: 1px solid var(--eis-forest-deep, #334462);
  border-radius: 9px;
  padding: 8px 12px;
  box-shadow: 0 4px 12px rgba(61, 80, 112, 0.16);
}

.insp-btn:hover {
  background: var(--eis-sage, #2a3d63);
  color: #fff;
  text-decoration: none;
}

.insp-empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--eis-muted, #6b7280);
  font-weight: 600;
}

.insp-footer-actions {
  margin-top: 18px;
}

.insp-note {
  margin: 12px 0 0;
  font-size: 0.86rem;
  color: var(--eis-muted, #6b7280);
}

/* ==== Edit Inspector ==== */
.iedit {
  max-width: none;
  animation: rise-in 0.45s ease both;
}

.iedit-hero {
  margin-bottom: 18px;
}

.iedit-hero h1 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--eis-forest);
}

.iedit-hero p {
  margin: 6px 0 0;
  color: var(--eis-muted, #6b7280);
}

.iedit-card {
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--eis-shadow-sm, 0 6px 18px rgba(61, 80, 112, 0.06));
}

.iedit-card.muted {
  background: #f5f6f9;
}

.iedit-card.soft {
  background: #f8f9fb;
}

.iedit-section-title,
.iedit-subhead,
.iedit-priv-col h3,
.iedit-activity h3,
.iedit-card.soft h3 {
  margin: 0 0 12px;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.1rem;
  color: var(--eis-forest-deep, #334462);
}

.iedit-subhead {
  margin-top: 18px;
}

.iedit-field {
  margin-bottom: 14px;
}

.iedit-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
  margin-bottom: 6px;
}

.iedit-field-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.iedit-input {
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.95rem;
  width: 100%;
  min-width: 220px;
  max-width: 360px;
  padding: 10px 12px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  background: #fff;
  color: var(--eis-ink, #3a4556);
}

.iedit-input:focus {
  outline: none;
  border-color: var(--eis-sage, #2a3d63);
  box-shadow: 0 0 0 3px rgba(90, 109, 140, 0.18);
}

.iedit-hint {
  display: inline-block;
  max-width: 280px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--eis-muted, #6b7280);
  background: #eef1f6;
  border: 1px solid #d9dee6;
  border-radius: 10px;
  padding: 8px 10px;
}

.iedit-sub {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--eis-muted, #6b7280);
}

.iedit-company-box {
  display: inline-block;
  font-weight: 700;
  color: var(--eis-forest-deep, #334462);
  background: #eef1f6;
  border: 1px solid #d9dee6;
  border-radius: 10px;
  padding: 10px 14px;
}

.iedit-text-link {
  font-weight: 700;
  color: var(--eis-sage, #2a3d63);
  text-decoration: none;
}

.iedit-text-link:hover {
  text-decoration: underline;
}

.iedit-change-pwd {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.iedit-grid-5,
.iedit-grid-3 {
  display: grid;
  gap: 12px;
}

.iedit-grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.iedit-name-row,
.iedit-license-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.iedit-license-row {
  margin-top: 12px;
}

.iedit-grid-3 {
  grid-template-columns: 2fr 1fr 1fr;
}

.iedit-grid-5 .iedit-input,
.iedit-grid-3 .iedit-input,
.iedit-name-row .iedit-input,
.iedit-license-row .iedit-input {
  max-width: none;
  min-width: 0;
}

.iedit-note {
  margin: 10px 0 0;
  font-size: 0.84rem;
  color: var(--eis-muted, #6b7280);
  line-height: 1.45;
}

.iedit-check-admin {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
  color: var(--eis-ink, #3a4556);
}

.iedit-priv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.iedit-priv-col {
  border: 1px dashed #c9d2e3;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8f9fb;
}

.iedit-checks label {
  display: block;
  margin: 6px 0;
  font-size: 0.88rem;
  color: var(--eis-ink, #3a4556);
}

.iedit-services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 4px 16px;
  margin-top: 8px;
}

.iedit-services label {
  padding: 8px 10px;
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  background: #f8f9fb;
}

.svc-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.svc-pick {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid #d9dee6;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.svc-pick:hover {
  border-color: #c9d2e3;
  box-shadow: 0 4px 14px rgba(61, 80, 112, 0.06);
}

.svc-pick:has(input:checked) {
  border-color: #2a3d63;
  background: #eef1f6;
  box-shadow: 0 0 0 1px rgba(90, 109, 140, 0.25);
}

.svc-pick input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #2a3d63;
  cursor: pointer;
}

.svc-pick-swatch {
  flex: 0 0 auto;
  width: 10px;
  align-self: stretch;
  min-height: 42px;
  border-radius: 999px;
  background: #8b95a5;
}

.svc-pick-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.svc-pick-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--eis-ink, #3a4556);
  line-height: 1.3;
}

.svc-pick-meta {
  font-size: 0.8rem;
  color: var(--eis-muted, #6b7280);
  line-height: 1.35;
}

.svc-drag-col,
.svc-drag-cell {
  width: 36px;
  text-align: center;
}

.svc-catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 12px;
}

.svc-catalog-head .fees-block-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0;
}
.svc-catalog-count {
  font-family: var(--font-body, Inter, Arial, Helvetica, sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--eis-muted, #6b7280);
  font-variant-numeric: tabular-nums;
}

.svc-cat-filter {
  margin: 0;
  min-width: 220px;
  max-width: 320px;
  flex: 1 1 220px;
}

.svc-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #6b7280;
  font-size: 0.95rem;
  letter-spacing: -0.12em;
  cursor: grab;
  user-select: none;
  background: #f7f8fa;
  border: 1px solid #d9dee6;
}

.svc-row {
  cursor: grab;
}

.svc-row.is-dragging {
  opacity: 0.55;
  background: #eef1f6 !important;
}

.svc-row.is-drag-over {
  box-shadow: inset 0 2px 0 #2a3d63;
}

.svc-row:active .svc-drag-handle {
  cursor: grabbing;
}

.svc-swatch-cell {
  width: 28px;
}

.svc-swatch {
  display: inline-block;
  width: 12px;
  height: 28px;
  border-radius: 999px;
  vertical-align: middle;
}

.svc-status {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
}

.svc-status.is-on {
  color: #3d5070;
  background: #eef1f6;
}

.svc-status.is-off {
  color: #6b5c4c;
  background: #f3eee6;
}

@media (max-width: 720px) {
  .fees.svc .fees-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .fees.svc .fees-hero .btn-primary {
    align-self: stretch;
    text-align: center;
  }

  .fees.svc .fees-lead {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .fees.svc .fees-card {
    padding: 14px 12px;
    overflow: visible;
  }

  .svc-catalog-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .svc-cat-filter {
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
    width: 100%;
  }

  .svc-grid,
  .svc-grid tbody {
    display: block;
    width: 100%;
  }

  .svc-grid thead {
    display: none;
  }

  .svc-grid .svc-row {
    display: block;
    position: relative;
    padding: 12px 72px 12px 52px;
    margin: 0 0 10px;
    border: 1px solid rgba(23, 44, 62, 0.1);
    border-radius: 12px;
    background: #fafbfc;
    box-shadow: none;
  }

  .svc-grid .svc-row:last-child {
    margin-bottom: 0;
  }

  .svc-grid .svc-row.is-drag-over {
    box-shadow: inset 0 2px 0 #2a3d63;
  }

  .svc-grid .svc-row td {
    display: block;
    border: 0 !important;
    padding: 0;
    background: transparent !important;
    font-size: 0.88rem;
  }

  .svc-grid .svc-drag-cell {
    position: absolute;
    left: 8px;
    top: 12px;
    width: auto;
  }

  .svc-grid .svc-swatch-cell {
    position: absolute;
    left: 40px;
    top: 16px;
    width: auto;
  }

  .svc-grid .svc-swatch {
    width: 10px;
    height: 22px;
  }

  .svc-grid .svc-col-name {
    font-weight: 700;
    color: #172c3e;
    line-height: 1.3;
    margin: 0 0 4px;
    word-break: break-word;
  }

  .svc-grid .svc-col-edit {
    position: absolute;
    right: 10px;
    top: 12px;
    text-align: right;
    white-space: nowrap;
  }

  .svc-grid .svc-col-code,
  .svc-grid .svc-col-category,
  .svc-grid .svc-col-duration,
  .svc-grid .svc-col-price,
  .svc-grid .svc-col-status {
    display: inline;
    color: #5d7083;
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .svc-grid .svc-col-code {
    font-weight: 700;
    color: #33485c;
  }

  .svc-grid .svc-col-price {
    color: #33485c;
    font-weight: 600;
  }

  .svc-grid .svc-col-code::after,
  .svc-grid .svc-col-category::after,
  .svc-grid .svc-col-duration::after,
  .svc-grid .svc-col-price::after {
    content: " · ";
    font-weight: 500;
    color: #9aa8b5;
  }

  .svc-grid .svc-col-status {
    display: inline-block;
    vertical-align: middle;
  }

  .svc-grid .svc-col-status .svc-status {
    font-size: 0.68rem;
    padding: 2px 7px;
  }

  .svc-grid .svc-drag-handle {
    width: 30px;
    height: 30px;
  }
}

.fees-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.fees-field-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.fees-edit-card .fees-input,
.fees-edit-card .fees-textarea {
  width: 100%;
  box-sizing: border-box;
}

.fees-char-count {
  margin: 4px 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
  text-align: right;
  line-height: 1.2;
}

.fees-field .fees-char-count + .fees-hint {
  margin-top: 6px;
}

.fees-field .fees-hint {
  margin: 6px 0 0;
  font-size: 0.82rem;
}

.svc-color-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.svc-color-picker {
  width: 44px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.svc-subs {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--eis-line, #d9dee6);
}

.svc-subs-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.svc-subs-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--eis-forest-deep, #334462);
}

.svc-subs-table-wrap {
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  background: #f8f9fb;
  overflow: hidden;
}

.svc-subs-table {
  width: 100%;
  border-collapse: collapse;
}

.svc-subs-table th,
.svc-subs-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e6eaf0;
  vertical-align: middle;
}

.svc-subs-table th {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
  background: #f3f5f9;
}

.svc-subs-table tbody tr:last-child td {
  border-bottom: 0;
}

.svc-subs-table tbody tr:hover {
  background: #f3f5f9;
}

.svc-sub-swatch-cell {
  width: 28px;
  padding-right: 0 !important;
}

.svc-sub-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(20, 56, 46, 0.18);
}

.svc-sub-name {
  font-weight: 700;
  color: var(--eis-forest-deep, #334462);
}

.svc-sub-desc {
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--eis-muted, #6b7280);
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.svc-sub-meta {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--eis-ink, #3a4556);
  font-size: 0.9rem;
}

.svc-sub-actions {
  white-space: nowrap;
  text-align: right;
}

.svc-sub-actions .btn-chip {
  margin-right: 8px;
}

.btn-link-danger {
  border: 0;
  background: transparent;
  color: #b42318;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.btn-link-danger:hover {
  text-decoration: underline;
}

.svc-subs-empty {
  margin: 0;
  padding: 16px;
  color: var(--eis-muted, #6b7280);
  font-size: 0.9rem;
}

.disc-modal-panel.svc-sub-dialog {
  width: min(920px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px);
  max-height: min(92vh, 820px);
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
  margin: auto;
}

.svc-sub-modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  margin: 0 !important;
  z-index: 10000 !important;
  display: grid !important;
  align-items: center;
  justify-items: center;
  padding: 16px !important;
  overflow: hidden;
  overscroll-behavior: contain;
}

.svc-sub-modal[hidden] {
  display: none !important;
}

.svc-sub-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--eis-line, #d9dee6);
  flex: 0 0 auto;
}

.svc-sub-dialog-head h2 {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 1.15rem;
  line-height: 1.25;
}

.svc-sub-dialog-close {
  border: 0;
  background: transparent;
  color: var(--eis-muted, #6b7280);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 8px;
}

.svc-sub-dialog-close:hover {
  background: #eef1f6;
  color: var(--eis-ink, #3a4556);
}

.svc-sub-dialog-body {
  padding: 14px 18px 10px;
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.svc-sub-dialog-body .fees-field {
  margin-bottom: 10px;
}

.svc-sub-dialog-body .fees-label {
  margin-bottom: 4px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #4b5563;
}

.svc-sub-ref-field .fees-hint {
  margin-top: 5px;
  line-height: 1.4;
}

.svc-sub-dialog-body .fees-input,
.svc-sub-dialog-body .fees-textarea {
  width: 100%;
  box-sizing: border-box;
}

.svc-sub-dialog-body .fees-textarea,
.svc-sub-dialog-body .svc-sub-textarea-sm {
  min-height: 72px;
  height: 72px;
  padding: 8px 10px;
  font-size: 0.92rem;
  resize: vertical;
}

.svc-sub-dialog-body .svc-color-picker {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.svc-sub-dialog-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 0;
}

.svc-sub-dialog-row-3 {
  grid-template-columns: 1fr 1fr 1.15fr;
}

.svc-sub-online-field {
  margin: 4px 0 2px !important;
}

.svc-sub-dialog-footer {
  margin: 0 !important;
  padding: 12px 18px !important;
  justify-content: flex-end;
  flex: 0 0 auto;
  border-top: 1px solid var(--eis-line, #d9dee6);
  background: #fff;
}

@media (max-width: 640px) {
  .svc-sub-dialog-row,
  .svc-sub-dialog-row-3 {
    grid-template-columns: 1fr;
  }
  .svc-sub-desc {
    max-width: 180px;
  }
  .svc-sub-modal {
    padding: 10px !important;
    align-items: end;
  }
  .disc-modal-panel.svc-sub-dialog {
    max-height: min(94vh, 900px);
    width: 100% !important;
  }
}

.fees-row-actions {
  white-space: nowrap;
  text-align: right;
}

.svc-edit .fees-edit-card {
  max-width: none;
}

.fees-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
}

.fees-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

@media (max-width: 860px) {
  .fees-field-row,
  .fees-field-row-3 {
    grid-template-columns: 1fr;
  }
}

.insp-services {
  max-width: 16rem;
  color: var(--eis-muted, #6b7280);
  font-size: 0.88rem;
  line-height: 1.35;
}

.iedit-actions {
  display: flex;
  justify-content: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 8px;
  align-items: flex-start;
}

.iedit-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-left: 8px;
}

.iedit-required {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--eis-muted, #6b7280);
}

.iedit-activity {
  min-width: 280px;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.iedit-activity h3 {
  margin: 0 0 10px;
  flex: 0 0 auto;
}
.iedit-activity-scroll {
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0 -4px;
  padding: 0 4px;
  overscroll-behavior: contain;
}
.iedit-activity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.iedit-activity-table thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.iedit-activity-table th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--eis-muted, #6b7280);
  border-bottom: 1px solid #e6eaf0;
  padding: 6px 4px;
}

.iedit-activity-table td {
  padding: 8px 4px;
  border-bottom: 1px solid #f0f2f6;
}

.iedit-activity-table .muted {
  color: var(--eis-muted, #6b7280);
}

@media (max-width: 960px) {
  .iedit-grid-5,
  .iedit-grid-3,
  .iedit-name-row,
  .iedit-license-row,
  .iedit-priv-grid {
    grid-template-columns: 1fr;
  }
}

/* ==== Company Information ==== */
.co {
  max-width: none;
  animation: rise-in 0.45s ease both;
}

.co-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.co-hero h1 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--eis-forest);
}

.co-hero p {
  margin: 6px 0 0;
  color: var(--eis-muted, #6b7280);
}

.co-card {
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--eis-shadow-sm, 0 6px 18px rgba(61, 80, 112, 0.06));
}

.plat-grid { width: 100%; }
.plat-seats { max-width: 90px; }
.plat-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.plat-ops .btn-primary,
.plat-ops .btn-secondary {
  padding: 6px 10px;
  font-size: .82rem;
}

.co-span-3 {
  grid-column: span 3;
}

.co-span-4 {
  grid-column: 1 / -1;
}

.co-logo-inline {
  align-self: end;
}

.co-logo-inline-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
}

.co-logo-inline-controls {
  flex: 1;
  min-width: 0;
}

.co-logo-inline .co-file {
  max-width: 100%;
}

.co-logo-hint {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: #6b778a;
  line-height: 1.35;
}

.co-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.co-color-swatch {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--eis-field-border, #cfd6df);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  flex: 0 0 auto;
}

.co-color-swatch:focus-visible {
  outline: 2px solid var(--hz-accent, #b39a58);
  outline-offset: 2px;
}

.co-color-hex {
  max-width: 140px;
  text-transform: uppercase;
  font-family: ui-monospace, Consolas, monospace;
  letter-spacing: 0.04em;
}

.co-file {
  display: block;
  width: 100%;
  max-width: 420px;
  font-size: .9rem;
}
.co-logo-actions {
  margin-top: 6px;
  font-size: .82rem;
}
.co-logo-preview-wrap {
  text-align: center;
  flex: 0 0 auto;
}
.co-logo-preview {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  border-radius: 12px;
  background: #f7f8fa;
  border: 1px solid var(--eis-line, #d9dee6);
  box-shadow: 0 2px 8px rgba(61, 80, 112, 0.08);
}
@media (max-width: 900px) {
  .co-span-3,
  .co-span-4 {
    grid-column: auto;
  }

  .co-logo-inline-row {
    align-items: flex-start;
  }
}

.co-card.muted {
  background: #f5f6f9;
}

.co-section-title {
  margin: 0 0 6px;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.25rem;
  color: var(--eis-ink, #3a4556);
}

.co-travel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}
.co-travel-input {
  max-width: 140px;
}

.co-modal[hidden] {
  display: none !important;
}
.co-modal {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  margin: 0 !important;
  z-index: 100000 !important;
  display: grid !important;
  place-items: center;
  padding: 20px;
  box-sizing: border-box;
  overscroll-behavior: contain;
}
html.co-modal-open,
body.co-modal-open {
  overflow: hidden;
}
.co-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 36, 30, .55);
}
.co-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  background: #fff;
  border: 1px solid #d9dee6;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(16, 36, 30, .22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 720px);
}
.co-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #e6eaf0;
  background: #f7f8fa;
}
.co-modal-kicker {
  margin: 0 0 4px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
}
.co-modal-head h3 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--eis-forest-deep, #334462);
  line-height: 1.2;
}
.co-modal-x {
  border: 0;
  background: transparent;
  color: var(--eis-muted, #6b7280);
  font-size: 1.5rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  flex: 0 0 auto;
}
.co-modal-x:hover {
  background: #e6eaf0;
  color: var(--eis-ink, #3a4556);
}
.co-modal-body {
  padding: 16px 20px 8px;
  overflow: auto;
}
.co-modal-lead {
  margin: 0 0 14px;
  font-size: .9rem;
  line-height: 1.45;
  color: var(--eis-muted, #6b7280);
}
.co-tax-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.co-tax-card {
  border: 1px solid #d9dee6;
  border-radius: 12px;
  background: #f8f9fb;
  padding: 14px;
}
.co-tax-card h4 {
  margin: 0 0 12px;
  font-size: .9rem;
  font-weight: 800;
  color: var(--eis-forest-deep, #334462);
}
.co-tax-fields {
  display: flex;
  gap: 10px;
  align-items: end;
}
.co-tax-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.co-tax-field.is-grow {
  flex: 1;
}
.co-tax-field.is-rate {
  width: 96px;
  flex: 0 0 96px;
}
.co-tax-rate-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px;
}
.co-tax-rate-wrap .co-input {
  text-align: right;
  padding-right: 8px;
}
.co-tax-rate-wrap > span {
  font-size: .86rem;
  font-weight: 700;
  color: var(--eis-muted, #6b7280);
}
.co-modal-body .fees-ajax-status {
  min-height: 1.2em;
  margin: 12px 0 4px;
}
.co-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px 16px;
  border-top: 1px solid #e6eaf0;
  background: #fff;
}
@media (max-width: 640px) {
  .co-tax-grid {
    grid-template-columns: 1fr;
  }
  .co-tax-fields {
    flex-direction: column;
    align-items: stretch;
  }
  .co-tax-field.is-rate {
    width: 100%;
    flex: 1;
  }
  .co-tax-rate-wrap {
    max-width: 140px;
  }
}

.co-fee-options {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.co-fee-options .fees-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  font-size: .92rem;
  color: var(--eis-ink, #3a4556);
}
.co-show-fee {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e6eaf0;
}

.co-section-lead,
.co-hint {
  margin: 0 0 14px;
  color: var(--eis-muted, #6b7280);
  font-size: 0.92rem;
  line-height: 1.45;
}

.co-hint {
  margin-top: 12px;
  margin-bottom: 0;
}

.co-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 14px;
}

.co-span-2 {
  grid-column: span 2;
}

.co-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
  margin-bottom: 6px;
}

.co-input,
.co-list {
  width: 100%;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  background: #fff;
  color: var(--eis-ink, #3a4556);
}

.co-input:focus,
.co-list:focus {
  outline: none;
  border-color: var(--eis-sage, #2a3d63);
  box-shadow: 0 0 0 3px rgba(90, 109, 140, 0.18);
}

.co-list {
  min-height: 140px;
}

.co-required {
  margin: 12px 0 0;
  font-size: 0.84rem;
  font-style: italic;
  color: var(--eis-muted, #6b7280);
}

.co-settings-row {
  display: grid;
  grid-template-columns: 180px 180px 200px 1fr;
  gap: 16px;
  align-items: start;
}

.co-sublabel {
  display: block;
  margin: 8px 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--eis-muted, #6b7280);
}

.co-select {
  width: 100%;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.95rem;
  padding: 8px 10px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  background: #fff;
  color: var(--eis-ink, #3a4556);
}

.co-callout {
  background: #eef1f6;
  border: 1px solid #d9dee6;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--eis-muted, #6b7280);
}

.co-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.co-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}
.co-actions a.btn-secondary {
  color: var(--eis-forest);
}

@media (max-width: 900px) {
  .co-grid,
  .co-settings-row {
    grid-template-columns: 1fr;
  }

  .co-span-2,
  .co-span-3,
  .co-span-4 {
    grid-column: auto;
  }
}

/* ==== Business Reports / Select and Sort Graphs ==== */
.br {
  max-width: none;
  animation: rise-in 0.45s ease both;
}

.br-hero {
  margin-bottom: 18px;
}

.br-hero h1 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--eis-forest);
}

.br-hero p {
  margin: 6px 0 0;
  color: var(--eis-muted, #6b7280);
}

.br-section {
  margin-bottom: 20px;
}

.br-section h2 {
  margin: 0 0 10px;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.2rem;
  color: var(--eis-forest-deep, #334462);
}

.br-group {
  margin: 1rem 0 0.35rem;
  color: #5E6A78;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#brSearch {
  max-width: 320px;
  margin-bottom: 0.75rem;
}

.br-card {
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 16px;
  box-shadow: var(--eis-shadow-sm, 0 6px 18px rgba(61, 80, 112, 0.06));
  overflow: hidden;
}

.br-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid #eef1f6;
}

.br-row.is-draggable .br-name {
  flex: 1;
}

.br-row:last-child {
  border-bottom: none;
}

.br-row:hover {
  background: #f7f8fa;
}

.br-name {
  font-weight: 700;
  color: var(--eis-ink, #3a4556);
}

.br-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.br-move {
  display: inline-flex;
  gap: 4px;
}

.br-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  padding: 7px 11px;
  border: 1px solid transparent;
}

button.br-btn {
  cursor: pointer;
  appearance: none;
}

.br-btn.edit {
  color: var(--eis-forest, #3d5070);
  background: #f7f8fa;
  border-color: #d9dee6;
}

.br-btn.move {
  min-width: 30px;
  color: #fff;
  background: var(--eis-sage, #2a3d63);
  border-color: #3d5070;
}

.br-btn.remove {
  color: #fff;
  background: #b45309;
  border-color: #92400e;
}

.br-btn.add {
  color: #fff;
  background: var(--eis-forest, #3d5070);
  border-color: var(--eis-forest-deep, #334462);
}

.br-btn:hover {
  filter: brightness(1.05);
  text-decoration: none;
  color: inherit;
}

.br-btn.remove:hover,
.br-btn.move:hover,
.br-btn.add:hover {
  color: #fff;
}

.br-empty {
  padding: 22px 16px;
  text-align: center;
  color: var(--eis-muted, #6b7280);
  font-weight: 600;
}

.br-loading {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(1px);
}

.br-loading[hidden] {
  display: none !important;
}

.br-loading-panel {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  color: #334155;
  font-size: 0.92rem;
  font-weight: 600;
}

.br-loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-top-color: var(--eis-forest, #3d5070);
  border-radius: 50%;
  animation: br-spin 0.75s linear infinite;
  flex-shrink: 0;
}

.br.is-busy .br-card {
  opacity: 0.55;
  pointer-events: none;
}

@keyframes br-spin {
  to { transform: rotate(360deg); }
}

.br-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.br-footer .btn-primary,
.br-footer .btn-secondary {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* ==== Graph Filter (Set Date Range and Filter) ==== */
.gf {
  max-width: none;
  animation: rise-in 0.45s ease both;
}

.gf-hero {
  margin-bottom: 22px;
}

.gf-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.gf-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eis-sage, #2a3d63);
}

.gf-hero h1 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--eis-forest);
}

.gf-lead {
  margin: 8px 0 0;
  color: var(--eis-muted, #6b7280);
  font-size: 0.98rem;
  max-width: 34rem;
  line-height: 1.5;
}

.gf-badge {
  background: #f2f4f8;
  color: #334462;
  border: 1px solid #e2e6ed;
  border-radius: 14px;
  padding: 12px 16px;
  min-width: 200px;
  box-shadow: 0 8px 18px rgba(61, 80, 112, 0.06);
}

.gf-badge-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 4px;
}

.gf-badge strong {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.gf-panel {
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--eis-shadow-sm, 0 6px 18px rgba(61, 80, 112, 0.06));
}

.gf-panel-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eef1f6;
}

.gf-step {
  flex-shrink: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--eis-sage, #2a3d63);
  line-height: 1;
  padding-top: 2px;
}

.gf-panel-head h2 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--eis-forest-deep, #334462);
  letter-spacing: -0.02em;
}

.gf-panel-head p {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--eis-muted, #6b7280);
}

.gf-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gf-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #e6eaf0;
  border-radius: 14px;
  background: #f8f9fb;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.gf-option:hover {
  border-color: #c9d2e3;
  background: #f3f5f9;
}

.gf-option:has(input:checked) {
  border-color: var(--eis-sage, #2a3d63);
  background: #eef1f6;
  box-shadow: inset 3px 0 0 var(--eis-forest, #3d5070);
}

.gf-option input[type="radio"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--eis-forest, #3d5070);
  flex-shrink: 0;
}

.gf-option-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.gf-option-body strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--eis-ink, #3a4556);
}

.gf-option-body span {
  font-size: 0.84rem;
  color: var(--eis-muted, #6b7280);
  line-height: 1.4;
}

.gf-fiscal-callout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 2px 0 2px 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, #eef1f6, #f7f8fa);
  border: 1px dashed #c9d2e3;
}

.gf-fiscal-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
  margin-bottom: 2px;
}

.gf-fiscal-callout strong {
  font-size: 1rem;
  color: var(--eis-forest-deep, #334462);
}

.gf-edit-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--eis-sage, #2a3d63);
  text-decoration: none;
  background: #fff;
  border: 1px solid #d9dee6;
  border-radius: 999px;
  padding: 7px 12px;
}

.gf-edit-link:hover {
  background: #eef1f6;
  text-decoration: none;
}

.gf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 4px;
}

.gf-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

@media (max-width: 700px) {
  .gf-badge {
    width: 100%;
  }
}

/* ==== Google Calendar Setup ==== */
.gcal {
  max-width: none;
  animation: rise-in 0.45s ease both;
}

.gcal-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.gcal-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eis-sage, #2a3d63);
}

.gcal-hero h1 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--eis-forest);
}

.gcal-lead {
  margin: 8px 0 0;
  max-width: 36rem;
  color: var(--eis-muted, #6b7280);
  line-height: 1.5;
  font-size: 0.98rem;
}

.gcal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.gcal-panel,
.gcal-side {
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--eis-shadow-sm, 0 6px 18px rgba(61, 80, 112, 0.06));
}

.gcal-panel h2,
.gcal-side h3 {
  margin: 10px 0 8px;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.25rem;
  color: var(--eis-forest-deep, #334462);
}

.gcal-panel p {
  margin: 0 0 18px;
  color: var(--eis-muted, #6b7280);
  line-height: 1.5;
  font-size: 0.92rem;
}

.gcal-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 12px;
}

.gcal-status .gcal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.gcal-status.warn {
  background: #f6f0e3;
  color: #8a6b32;
}

.gcal-status.warn .gcal-dot {
  background: #c9b48a;
}

.gcal-status.ok {
  background: #eef1f6;
  color: #3d5070;
}

.gcal-status.ok .gcal-dot {
  background: #2a3d63;
}

.gcal-connect-box {
  background: linear-gradient(180deg, #f7f8fa, #eef1f6);
  border: 1px solid #d9dee6;
  border-radius: 14px;
  padding: 18px;
}

.gcal-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
  margin-bottom: 6px;
}

.gcal-input {
  width: 100%;
  max-width: 360px;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.95rem;
  padding: 11px 12px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 14px;
}

.gcal-input:focus {
  outline: none;
  border-color: var(--eis-sage, #2a3d63);
  box-shadow: 0 0 0 3px rgba(90, 109, 140, 0.18);
}

.gcal-google-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
  background: #1a73e8;
  border: 1px solid #1557b0;
  border-radius: 10px;
  padding: 11px 16px;
  box-shadow: 0 8px 18px rgba(26, 115, 232, 0.25);
}

.gcal-google-btn:hover {
  background: #1765cc;
  color: #fff;
  text-decoration: none;
}

.gcal-g {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #fff;
  color: #1a73e8;
  font-weight: 800;
  font-size: 0.85rem;
}

.gcal-hint {
  margin: 12px 0 0 !important;
  font-size: 0.84rem !important;
}

.gcal-connected-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 16px;
  background: #f5f6f9;
  border: 1px solid #d9dee6;
  border-radius: 12px;
}

.gcal-meta-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
  margin-bottom: 4px;
}

.gcal-side h3 {
  margin-top: 0;
}

.gcal-list {
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--eis-ink, #3a4556);
  font-size: 0.9rem;
  line-height: 1.55;
}

.gcal-list li {
  margin-bottom: 8px;
}

.gcal-note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eef1f6;
  border: 1px dashed #c9d2e3;
  color: var(--eis-muted, #6b7280);
  font-size: 0.86rem;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .gcal-layout,
  .gcal-connected-card {
    grid-template-columns: 1fr;
  }
}

/* —— Inspection Support Network setup —— */
.isn-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.isn-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--eis-forest, #3d5070);
}

.isn-hero h1 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  color: var(--eis-forest);
}

.isn-lead {
  margin: 8px 0 0;
  max-width: 42rem;
  color: var(--eis-muted, #6b7280);
  line-height: 1.45;
}

.isn-status {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

.isn-status.warn {
  background: #fff7e8;
  border: 1px solid #efd6a3;
  color: #7a5a12;
}

.isn-status.ok {
  background: #eef1f6;
  border: 1px solid #b7d9c6;
  color: #3d5070;
}

.isn-card {
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--eis-shadow-sm, 0 6px 18px rgba(61, 80, 112, 0.06));
  max-width: 520px;
}

.isn-fields {
  display: grid;
  gap: 14px;
}

.isn-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
  margin-bottom: 6px;
}

.isn-input {
  width: 100%;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.95rem;
  padding: 11px 12px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  background: #fff;
  color: var(--eis-ink, #3a4556);
}

.isn-input:focus {
  outline: none;
  border-color: var(--eis-forest, #3d5070);
  box-shadow: 0 0 0 3px rgba(31, 92, 69, 0.15);
}

.isn-hint {
  margin: 6px 0 0;
  font-size: 0.84rem;
  color: var(--eis-muted, #6b7280);
}

.isn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* —— Online payment processing —— */
.pay-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.pay-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--eis-forest, #3d5070);
}

.pay-hero h1 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  color: var(--eis-forest);
}

.pay-lead {
  margin: 8px 0 0;
  color: var(--eis-muted, #6b7280);
  line-height: 1.45;
}

.pay-layout {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(220px, 1fr);
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}

.pay-card {
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--eis-shadow-sm, 0 6px 18px rgba(61, 80, 112, 0.06));
}

.pay-fields {
  display: grid;
  gap: 14px;
}

.pay-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
  margin-bottom: 6px;
}

.pay-input {
  width: 100%;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.95rem;
  padding: 11px 12px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  background: #fff;
  color: var(--eis-ink, #3a4556);
}

.pay-input:focus {
  outline: none;
  border-color: var(--eis-forest, #3d5070);
  box-shadow: 0 0 0 3px rgba(31, 92, 69, 0.15);
}

.pay-hint {
  margin: 6px 0 0;
  font-size: 0.84rem;
  color: var(--eis-muted, #6b7280);
}

.pay-token-frame {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 10px;
  background: #fff;
}

.pay-totals {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  max-width: 22rem;
}

.pay-totals > div,
.pay-totals .pay-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
}

.pay-total {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed #dbe6e0;
  font-size: 1.05rem;
}

.pay-public .pay-card {
  max-width: 640px;
}

.pay-note {
  padding: 14px 16px;
  border-radius: 14px;
  background: #f5f6f9;
  border: 1px solid var(--eis-line, #d9dee6);
  color: var(--eis-muted, #6b7280);
  font-size: 0.9rem;
  line-height: 1.45;
}

.pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

@media (max-width: 860px) {
  .pay-layout {
    grid-template-columns: 1fr;
  }
}

/* —— Work order custom fields —— */
.wocf-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.wocf-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--eis-forest, #3d5070);
}

.wocf-hero h1 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  color: var(--eis-forest);
}

.wocf-lead {
  margin: 8px 0 10px;
  color: var(--eis-muted, #6b7280);
}

.wocf-bullets {
  margin: 0;
  padding-left: 1.1rem;
  columns: 2;
  gap: 24px;
  color: var(--eis-muted, #6b7280);
  font-size: 0.9rem;
  line-height: 1.55;
}

.wocf-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 18px 0 14px;
  padding: 10px 0;
  border-top: 1px solid var(--eis-line, #d9dee6);
  border-bottom: 1px solid var(--eis-line, #d9dee6);
}

.wocf-section {
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--eis-sage, #2a3d63) !important;
  text-decoration: none !important;
  background: transparent;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 8px;
}

.wocf-section:not(:last-child)::after {
  content: "|";
  margin-left: 10px;
  color: #c5d2cb;
  font-weight: 400;
}

.wocf-section.active {
  background: #e7f2ec;
  color: var(--eis-forest-deep, #334462) !important;
}

.wocf-card,
.wocf-edit-card {
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 16px;
  padding: 8px 0;
  margin-bottom: 16px;
  box-shadow: var(--eis-shadow-sm, 0 6px 18px rgba(61, 80, 112, 0.06));
  overflow: hidden;
}

.wocf-service-bar {
  padding: 16px 20px;
}

.wocf-service-bar .wocf-field {
  max-width: 420px;
  margin: 0;
}

.btn-primary.is-disabled,
a.btn-primary.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.wocf-edit {
  max-width: none;
}

.wocf-edit-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
}

.wocf-edit-top .wocf-edit-card {
  margin-bottom: 0;
  height: 100%;
}

.wocf-edit-card {
  padding: 20px 22px;
}

.wocf-edit-card-wide {
  width: 100%;
}

.wocf-block-title {
  margin: 0 0 14px;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.15rem;
  color: var(--eis-ink, #3a4556);
}

.wocf-grid {
  width: 100%;
  border-collapse: collapse;
}

.wocf-grid th,
.wocf-grid td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid #eef1f6;
  font-size: 0.9rem;
}

.wocf-grid th {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
  background: #f7f8fa;
}

.wocf-title {
  color: var(--eis-sage, #2a3d63);
  font-weight: 700;
  text-decoration: none;
}

.wocf-title:hover {
  text-decoration: underline;
}

.wocf-sort {
  white-space: nowrap;
}

.wocf-sort-btn {
  border: none;
  background: transparent;
  color: var(--eis-sage, #2a3d63);
  cursor: pointer;
  padding: 0 4px;
  font-size: 0.75rem;
}

.wocf-empty {
  padding: 22px 18px;
  color: var(--eis-muted, #6b7280);
}

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

.wocf-checks {
  display: grid;
  gap: 8px;
}

.wocf-check-row {
  padding: 10px 12px;
  border: 1px solid #e6eaf0;
  border-radius: 12px;
  background: #f8f9fb;
}

.wocf-check-row:hover {
  border-color: #c5d9ce;
  background: #f3f5f9;
}

.wocf-check {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.wocf-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
}

.wocf-check label {
  margin: 0 !important;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--eis-ink, #3a4556);
  cursor: pointer;
}

.wocf-sort-note {
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: var(--eis-muted, #6b7280);
}

.wocf-stack,
.wocf-display {
  display: grid;
  gap: 14px;
}

.wocf-display {
  grid-template-columns: 220px 1fr;
  margin-bottom: 18px;
}

.wocf-field {
  min-width: 0;
}

.wocf-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
  margin-bottom: 6px;
}

.wocf-input,
.wocf-textarea {
  width: 100%;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.98rem;
  padding: 11px 12px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  background: #fff;
  color: var(--eis-ink, #3a4556);
}

.wocf-input:focus,
.wocf-textarea:focus {
  outline: none;
  border-color: var(--eis-forest, #3d5070);
  box-shadow: 0 0 0 3px rgba(31, 92, 69, 0.15);
}

.wocf-textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.45;
}

.wocf-preview-box {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 20px;
  padding: 10px 12px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--eis-ink, #3a4556);
  box-sizing: border-box;
}

.wocf-colors {
  margin-top: 4px;
}

.wocf-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.wocf-swatch {
  display: inline-block;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 2px solid #c5d2cb;
  cursor: pointer;
  text-decoration: none !important;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.wocf-swatch:hover {
  transform: translateY(-1px);
}

.wocf-swatch.selected {
  border-color: var(--eis-forest, #3d5070);
  box-shadow: 0 0 0 3px rgba(31, 92, 69, 0.22);
}

.wocf-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.wocf-edit-main,
.wocf-edit-aside {
  display: grid;
  gap: 16px;
  align-content: start;
}

.wocf-edit-aside {
  position: sticky;
  top: 12px;
}

.wocf-edit-card-pad {
  padding: 20px 22px;
  margin-bottom: 0;
}

.wocf-edit-context {
  margin: 8px 0 0;
  font-size: 0.92rem;
  color: var(--eis-muted, #6b7280);
}

.wocf-hint {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--eis-muted, #6b7280);
  line-height: 1.4;
}

.wocf-height-select {
  max-width: 220px;
}

.wocf-preview-card {
  background: linear-gradient(180deg, #f8fafb 0%, #fff 42%);
}

.wocf-preview-shell {
  padding: 14px;
  border: 1px dashed #d9dee6;
  border-radius: 12px;
  background: #fff;
}

.wocf-preview-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.wocf-preview-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--eis-ink, #3a4556);
}

.wocf-preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.wocf-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wocf-badge.req {
  background: #fde8ea;
  color: #9b1c28;
}

.wocf-badge.ro {
  background: #eef1f6;
  color: #5c677a;
}

.wocf-badge.hidden {
  background: #fff3e0;
  color: #9a6b00;
}

.wocf-preview-hint {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--eis-muted, #6b7280);
  line-height: 1.35;
}

.wocf-preview-box {
  align-items: flex-start;
  font-weight: 500;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.wocf-toggle-grid {
  display: grid;
  gap: 8px;
}

.wocf-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e6eaf0;
  border-radius: 12px;
  background: #f8f9fb;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.wocf-toggle:hover {
  border-color: #c5d9ce;
  background: #f3f7f5;
}

.wocf-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex-shrink: 0;
  cursor: pointer;
}

.wocf-toggle-body {
  display: grid;
  gap: 2px;
}

.wocf-toggle-body strong {
  font-size: 0.92rem;
  color: var(--eis-ink, #3a4556);
}

.wocf-toggle-body small {
  font-size: 0.8rem;
  color: var(--eis-muted, #6b7280);
  line-height: 1.35;
}

.wocf-edit-actions {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--eis-line, #d9dee6);
}

.wocf-btn-danger {
  color: #9b1c28 !important;
  border-color: #e8b4ba !important;
}

.wocf-btn-danger:hover {
  background: #fde8ea !important;
}

.wocf-swatch {
  padding: 0;
  appearance: none;
}

@media (max-width: 860px) {
  .wocf-bullets {
    columns: 1;
  }

  .wocf-edit-top,
  .wocf-display,
  .wocf-edit-layout {
    grid-template-columns: 1fr;
  }

  .wocf-edit-aside {
    position: static;
  }
}

/* —— Work order duration / confirmation email —— */
.wod-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.wod-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--eis-forest, #3d5070);
}

.wod-hero h1 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  color: var(--eis-forest);
}

.wod-lead {
  margin: 8px 0 0;
  color: var(--eis-muted, #6b7280);
  line-height: 1.45;
  max-width: 36rem;
}

.wod-layout {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(220px, 1fr);
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}

.wod-card {
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--eis-shadow-sm, 0 6px 18px rgba(61, 80, 112, 0.06));
}

.wod-label {
  display: block;
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
}

.wod-select {
  width: 100%;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 12px 14px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 12px;
  background: #fff;
  color: var(--eis-ink, #3a4556);
}

.wod-select:focus {
  outline: none;
  border-color: var(--eis-forest, #3d5070);
  box-shadow: 0 0 0 3px rgba(31, 92, 69, 0.15);
}

.wod-hint {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--eis-muted, #6b7280);
  line-height: 1.4;
}

.wod-note {
  padding: 16px 18px;
  border-radius: 14px;
  background: #f5f6f9;
  border: 1px solid var(--eis-line, #d9dee6);
  color: var(--eis-muted, #6b7280);
  font-size: 0.95rem;
  line-height: 1.5;
}

.wod-options {
  display: grid;
  gap: 10px;
}

.wod-option {
  padding: 12px 14px;
  border: 1px solid #e6eaf0;
  border-radius: 12px;
  background: #f8f9fb;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--eis-ink, #3a4556);
}

.wod-option:hover {
  border-color: #c5d9ce;
  background: #f3f5f9;
}

.wod-check label {
  font-weight: 600;
  font-size: 1rem;
  margin-left: 8px;
  cursor: pointer;
}

.wod-check input {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

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

@media (max-width: 860px) {
  .wod-layout {
    grid-template-columns: 1fr;
  }
}

/* —— Inspection fees / invoice line items —— */
.fees-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.fees-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--eis-forest, #3d5070);
}

.fees-hero h1 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  color: var(--eis-forest);
}

.fees-lead {
  margin: 8px 0 0;
  color: var(--eis-muted, #6b7280);
}

.fees-card {
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--eis-shadow-sm, 0 6px 18px rgba(61, 80, 112, 0.06));
}

.fees-block-title {
  margin: 0 0 12px;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.15rem;
  color: var(--eis-ink, #3a4556);
}

.fees-grid {
  width: 100%;
  border-collapse: collapse;
}

.fees-grid th,
.fees-grid td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px dashed #dbe6e0;
  vertical-align: top;
  font-size: 0.95rem;
}

.fees-grid th {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
}

.fees-col-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none !important;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
}

a.fees-col-sort:hover,
.fees-col-sort:hover {
  color: var(--eis-forest-deep, #334462);
  text-decoration: none !important;
}

.fees-col-sort.is-active {
  color: var(--eis-navy, #0d3564);
}

.fees-grid tr:nth-child(even) td {
  background: #f7f8fa;
}

.fees-desc {
  max-width: 48rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.fees-cost {
  font-weight: 700;
  white-space: nowrap;
}

a.fees-edit,
button.fees-edit {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--eis-sage, #2a3d63);
  font: inherit;
  font-weight: 650;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
}

.fees-row-actions {
  white-space: nowrap;
}
.fees-row-actions .fees-edit + .fees-edit {
  margin-left: 14px;
}

button.fees-edit.rcover-delete {
  color: var(--eis-danger, #c0392b);
}

button.fees-edit.rcover-delete:hover,
button.fees-edit.rcover-delete:focus {
  color: #a93226;
}

a.fees-edit:hover,
a.fees-edit:focus,
button.fees-edit:hover,
button.fees-edit:focus {
  color: var(--eis-forest-deep, #334462);
  text-decoration: none !important;
}

.fees-sort {
  text-align: center;
  white-space: nowrap;
}

.fees-sort-btn {
  border: none;
  background: transparent;
  color: var(--eis-sage, #2a3d63);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 4px;
}

.fees-move {
  display: block;
  font-size: 0.7rem;
  color: var(--eis-muted, #6b7280);
}

.fees-empty {
  padding: 18px 4px;
  color: var(--eis-muted, #6b7280);
}

.fees-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.fees-hint {
  margin: 0 0 12px;
  color: var(--eis-muted, #6b7280);
  font-size: 0.92rem;
  line-height: 1.45;
}

.fees-travel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.fees-input {
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 1rem;
  padding: 11px 12px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  min-width: 140px;
}

.fees-cost-input {
  max-width: 180px;
}

.fees-options {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.tpl-options {
  display: grid;
  gap: 10px;
}

.tpl-options-inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.tpl-options-inline .tpl-option {
  min-width: 0;
}

@media (max-width: 720px) {
  .tpl-options-inline {
    grid-template-columns: 1fr;
  }
}

.tpl-option {
  padding: 12px 14px;
  border: 1px solid #e6eaf0;
  border-radius: 12px;
  background: #f8f9fb;
}

.tpl-option:hover {
  border-color: #c5d9ce;
  background: #f3f5f9;
}

.tpl-check {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: auto !important;
  justify-content: flex-start !important;
}

.tpl-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0 !important;
  flex-shrink: 0;
  vertical-align: middle;
}

.tpl-check label {
  margin: 0 !important;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--eis-ink, #3a4556);
  cursor: pointer;
  line-height: 1.35;
}

.tpl-option-hint {
  margin: 6px 0 0 28px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--eis-muted, #6b7280);
}

.fees-option {
  padding: 12px 14px;
  border: 1px solid #e6eaf0;
  border-radius: 12px;
  background: #f8f9fb;
}

.fees-check label {
  font-weight: 600;
  font-size: 0.95rem;
  margin-left: 8px;
  cursor: pointer;
  line-height: 1.4;
}

.fees-check input {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.fees-ajax-status {
  margin: 10px 0 0;
  min-height: 1.2em;
  font-size: 0.88rem;
  color: var(--eis-muted, #6b7280);
}

.fees-ajax-status.is-ok {
  color: var(--eis-sage, #2a3d63);
}

.fees-ajax-status.is-error {
  color: #a33;
}

.fees-edit-card {
  max-width: none;
}

.svc-edit .fees-edit-card {
  max-width: none;
}

.rea-edit .fees-edit-card,
.rea-import .fees-edit-card,
.fees.rea-edit,
.fees.rea,
.fees.svc,
.fees.svc-edit,
.fees.textopt,
.wod,
.isn,
.pay,
.insp {
  max-width: none;
  width: 100%;
}

.fees-field {
  margin-bottom: 16px;
}

.fees-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
  margin-bottom: 6px;
}

.fees-textarea {
  width: 100%;
  min-height: 120px;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 1rem;
  padding: 12px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  line-height: 1.45;
  resize: vertical;
}

.fees-required-note {
  margin: 0;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--eis-muted, #6b7280);
}

.fees-note {
  margin: 10px 0 0;
  color: var(--eis-muted, #6b7280);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 42rem;
}

.tax-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
}

.tax-card {
  margin-bottom: 0;
}

.tax-input {
  width: 100%;
  max-width: none;
}

.tax-rate-input {
  width: 140px;
}

@media (max-width: 860px) {
  .tax-grid {
    grid-template-columns: 1fr;
  }
}

/* Invoice discounts */
.disc-grid th:last-child,
.disc-grid td:last-child {
  width: 88px;
  text-align: left;
}

.disc-edit-btn {
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--eis-ink, #1a2a24);
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
}

.disc-edit-btn:hover {
  border-color: var(--eis-sage, #2a3d63);
  color: var(--eis-sage, #2a3d63);
}

.btn-danger {
  font-family: var(--font-body);
  font-weight: 700;
  border-radius: var(--eis-radius-sm);
  cursor: pointer;
  background: #c0392b;
  color: #fff;
  border: 1px solid #a93226;
  padding: 10px 16px;
  min-height: 42px;
}

.btn-danger:hover {
  background: #a93226;
}

body.disc-modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}

.disc-modal[hidden] {
  display: none !important;
}

.disc-modal {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  margin: 0 !important;
  z-index: 100000 !important;
  display: grid !important;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
  overscroll-behavior: contain;
}

.disc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(61, 80, 112, 0.55);
}

.disc-modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 14px;
  box-shadow: 0 24px 48px rgba(61, 80, 112, 0.22);
  padding: 22px 22px 0;
}

.disc-modal-panel h2 {
  margin: 0 0 14px;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--eis-ink, #1a2a24);
  border-bottom: 1px solid var(--eis-line, #d9dee6);
  padding-bottom: 10px;
}

.disc-modal-error {
  margin: 0 0 12px;
  color: #a33;
  font-size: 0.9rem;
}

.tpl-cover-ok {
  margin: 0 0 10px;
  color: #0d8a2e;
  font-size: 0.9rem;
  font-weight: 650;
}

/* Duplicate template modal — full-viewport scrim (escape .hz-shell 80% width) */
.tpl-dup-modal.co-modal {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 20px !important;
  z-index: 100000 !important;
  display: grid !important;
  place-items: center;
  box-sizing: border-box;
  overscroll-behavior: contain;
}
.tpl-dup-modal.co-modal[hidden] {
  display: none !important;
}
.tpl-dup-modal .co-modal-backdrop {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(16, 36, 30, 0.55);
}
.tpl-dup-dialog {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(90vh, 720px);
}
.tpl-dup-source {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #d9dee6;
  border-left: 4px solid var(--eis-forest-deep, #334462);
  border-radius: 10px;
  background: #f7f8fa;
}
.tpl-dup-source-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
}
.tpl-dup-source-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--eis-ink, #1a2a24);
  line-height: 1.3;
  word-break: break-word;
}
.tpl-dup-modal .co-modal-lead {
  margin-bottom: 16px;
}
.tpl-dup-modal .fees-hint {
  margin: 8px 0 0;
  line-height: 1.4;
}
.tpl-dup-modal .btn-primary.is-busy,
.tpl-dup-modal .btn-primary:disabled {
  opacity: 0.72;
  cursor: wait;
}

.tpl-appendix-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
}

.tpl-appendix-group-label {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
}

.tpl-appendix-group-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tpl-appendix-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.tpl-appendix-row:hover {
  border-color: #b8c4d0;
}

.tpl-appendix-row.is-selected {
  border-color: #9eb6d4;
  background: #f5f8fc;
  cursor: grab;
}

.tpl-appendix-row.is-dragging,
.tpl-appendix-row.is-selected:active {
  cursor: grabbing;
}

.tpl-appendix-sort {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 28px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #6b7280;
  user-select: none;
}

.tpl-appendix-sort-spacer {
  display: inline-block;
  width: 28px;
  flex: 0 0 auto;
}

.tpl-appendix-order {
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--eis-navy, #1e3a5f);
}

.tpl-appendix-check {
  margin-top: 3px;
  flex: 0 0 auto;
}

.tpl-appendix-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
  cursor: pointer;
}

.tpl-appendix-meta strong {
  font-size: 0.95rem;
  font-weight: 650;
  color: #1a2b3c;
}

.tpl-appendix-sub {
  font-size: 0.82rem;
  color: #5c6570;
}

.tpl-cover-modal .svc-sub-dialog-body .fees-textarea {
  min-height: 240px;
  height: 280px;
}

.disc-name-input {
  width: 100%;
  max-width: 360px;
}

.disc-pct-input {
  width: 120px;
}

.disc-modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px -22px 0;
  padding: 14px 22px;
  background: #f3f6f5;
  border-top: 1px solid var(--eis-line, #d9dee6);
  border-radius: 0 0 14px 14px;
}

.fees-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

/* Text options */
.textopt a,
.textopt button,
.textopt .btn-primary,
.textopt .btn-secondary,
.textopt .fees-edit,
.textopt .textopt-tab,
.textopt .textopt-link,
.textopt .insp-back {
  text-decoration: none !important;
}

.textopt a:hover,
.textopt a:focus,
.textopt button:hover,
.textopt button:focus {
  text-decoration: none !important;
}

.textopt-shell {
  margin-top: 4px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.textopt-shell[hidden] {
  display: none !important;
}

.textopt-service-bar {
  margin: 0 0 16px;
  padding: 16px 20px;
}

.textopt-service-bar .fees-field {
  max-width: 420px;
  margin: 0;
}

.textopt-service-bar .fees-hint {
  margin: 8px 0 0;
}

.textopt-sidebar {
  position: sticky;
  top: 12px;
}

.textopt-tabs {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 0;
  padding: 8px;
  background: linear-gradient(180deg, #eef1f6, #e6eaf0);
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 14px;
}

.textopt-tab {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--eis-muted, #6b7280);
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none !important;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.textopt-tab:hover {
  color: var(--eis-forest, #3d5070);
  background: rgba(255, 255, 255, 0.75);
}

.textopt-tab.is-active {
  color: var(--eis-forest-deep, #334462);
  background: #fff;
  border-color: rgba(61, 80, 112, 0.12);
  box-shadow: 0 3px 10px rgba(61, 80, 112, 0.1);
}

.textopt-main {
  min-width: 0;
}

.textopt-subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(61, 80, 112, 0.04);
}

@media (max-width: 860px) {
  .textopt-shell {
    grid-template-columns: 1fr;
  }

  .textopt-sidebar {
    position: static;
  }

  .textopt-tabs {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .textopt-tab {
    width: auto;
  }
}

.textopt-link {
  appearance: none;
  border: 1px solid transparent;
  background: #f7f8fa;
  color: var(--eis-forest, #3d5070);
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-weight: 650;
  font-size: 0.84rem;
  text-decoration: none !important;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.textopt-link:hover {
  background: #e7f0ec;
  border-color: #c9d9d1;
  text-decoration: none !important;
}

.textopt-link.is-active {
  background: var(--eis-forest, #3d5070);
  border-color: var(--eis-forest-deep, #334462);
  color: #fff;
  font-weight: 750;
  text-decoration: none !important;
}

.textopt-sep {
  display: none;
}

.textopt-empty-lists {
  color: var(--eis-muted, #6b7280);
  font-size: 0.88rem;
}

.textopt-panel {
  margin-top: 0;
  padding: 18px 20px 20px;
}

.textopt-service-bar {
  margin-bottom: 16px;
  padding: 16px 20px;
}

.textopt-service-bar .fees-field {
  max-width: 420px;
  margin: 0;
}

.textopt-panel-head {
  display: block;
  margin-bottom: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e7eeea;
}

.textopt-panel-head .fees-block-title {
  margin-bottom: 4px;
}

.textopt-panel-head .fees-hint {
  margin: 0;
}

.textopt-actions,
.textopt .fees-actions,
.textopt-edit .fees-edit-actions {
  justify-content: flex-start;
  text-align: left;
}

.textopt .fees-hero,
.textopt-edit .fees-hero {
  justify-content: flex-start;
}

.textopt-status {
  min-height: 1.2em;
  margin: 0 0 10px;
  font-size: 0.86rem;
  color: var(--eis-muted, #6b7280);
}

.textopt-status.is-ok {
  color: var(--eis-sage, #2a3d63);
}

.textopt-status.is-error {
  color: #a33;
}

#textoptTableWrap.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.textopt-grid {
  width: 100%;
}

.textopt-grid th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
}

.textopt-sort {
  white-space: nowrap;
}

.textopt-sort-num {
  display: inline-block;
  min-width: 1.2em;
  font-weight: 700;
  margin-right: 6px;
}

.textopt-body {
  max-width: 28rem;
  color: var(--eis-muted, #6b7280);
  line-height: 1.4;
}

.fees-sort-btn {
  appearance: none;
  border: 1px solid var(--eis-line, #d9dee6);
  background: #fff;
  color: var(--eis-sage, #2a3d63);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  margin-left: 2px;
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
  text-decoration: none !important;
}

.fees-sort-btn:hover {
  border-color: var(--eis-sage, #2a3d63);
  background: #f7f8fa;
}

/* Global: keep page action buttons on the left */
.page-hero,
.pf-hero,
.insp-hero,
.iedit-hero,
.co-hero,
.br-hero,
.gf-hero,
.gcal-hero,
.isn-hero,
.pay-hero,
.wocf-hero,
.wod-hero,
.fees-hero {
  justify-content: flex-start !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

.pf-actions,
.iedit-actions,
.insp-footer-actions,
.bottom-actions,
.fees-actions,
.fees-edit-actions,
.wocf-actions,
.wod-actions,
.isn-actions,
.pay-actions,
.co-actions,
.gf-actions,
.br-actions,
.br-footer,
.disc-modal-footer,
.textopt-actions {
  justify-content: flex-start !important;
  text-align: left !important;
}

.cell-actions,
.insp-end,
.disc-grid th:last-child,
.disc-grid td:last-child,
.fees-grid th:last-child,
.fees-grid td:last-child {
  text-align: left !important;
}

.rea-agents-block {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--eis-line, #d9dee6);
}
.rea-agents-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: #1f4f7a;
}
.rea-agent-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.rea-agent-links a,
.rea-agent-link-btn {
  color: #1f4f7a;
  text-decoration: underline;
  font-weight: 600;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.rea-agent-dialog {
  width: min(760px, 100%);
  max-height: min(92vh, 880px);
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.rea-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px 14px;
  border-bottom: 1px solid var(--eis-line, #d9dee6);
  flex: 0 0 auto;
}
.rea-dialog-head h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.35rem;
}
.rea-dialog-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: #eef1f5;
  color: #243044;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.rea-dialog-close:hover {
  background: #e2e7ee;
}
.rea-dialog-body {
  padding: 16px 22px 8px;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 12px;
}
.rea-dialog-body > *,
.rea-agent-modal .fees-field,
.rea-agent-modal .fees-input,
.rea-agent-modal .fees-textarea {
  min-width: 0;
  max-width: 100%;
}
.rea-agent-dialog .disc-modal-footer {
  margin: 0;
  flex: 0 0 auto;
  border-radius: 0 0 14px 14px;
}
.rea-notes {
  min-height: 84px;
  resize: vertical;
}
.rea-review-field {
  margin-top: 2px;
  padding: 12px 14px;
  background: #f7f8fa;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
}
.rea-review-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.rea-review-row .pf-badge-toggle {
  min-width: 56px;
  height: 30px;
  font-size: 0.78rem;
}
.rea-review-row .pf-badge-toggle.on {
  background: #2f9e44;
  border-color: #278a3a;
}
.rea-review-row .pf-badge-toggle.off {
  background: #c0392b;
  border-color: #a93226;
}
.pf-badge-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  line-height: 1;
}
.pf-badge-toggle.off {
  background: #c0392b;
  border-color: #a93226;
  color: #fff;
}
.pf-badge-toggle.on {
  background: var(--eis-sage, #2a3d63);
  border-color: #3d5070;
  color: #fff;
}
.rea-help-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #9aa8a1;
  background: #f7f8fa;
  color: #3d4f47;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  user-select: none;
}
.rea-help-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  width: min(280px, 70vw);
  padding: 8px 10px;
  border-radius: 6px;
  background: #1f2a26;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 5;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.rea-help-tip:hover::after,
.rea-help-tip:focus::after {
  opacity: 1;
}
.rea-agent-section {
  margin: 4px 0 12px;
  font-size: 1rem;
  color: #1f4f7a;
}
.rea-agent-modal .fees-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.rea-agent-modal .fees-field-row-3 {
  grid-template-columns: 1.4fr 0.7fr 1fr;
}
@media (max-width: 720px) {
  .rea-agent-modal .fees-field-row,
  .rea-agent-modal .fees-field-row-3 {
    grid-template-columns: 1fr;
  }
}
.rea-agents-empty,
.rea-agents-hint {
  margin: 0 0 14px;
  color: var(--eis-muted, #6b7280);
  font-size: .92rem;
}

.rea-search {
  padding: 16px 20px;
  margin-bottom: 16px;
}

.contacts-toolbar {
  margin-bottom: 16px;
}
.contacts-toolbar-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: center;
  width: 100%;
}
.contacts-toolbar-sort {
  margin-top: 12px;
  flex-wrap: wrap;
}
.contacts-sort-label {
  margin: 0;
  flex: 0 0 auto;
}
.contacts-sort-select {
  flex: 0 1 320px;
  min-width: 220px;
  max-width: 100%;
  width: auto;
}
.contacts-toolbar-review {
  display: inline-flex;
  align-items: center;
  gap: 8px 12px;
  margin-left: auto;
  flex-wrap: wrap;
}
.contacts-search-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
.contacts-type {
  display: inline-flex;
  gap: 6px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}
.contacts-type-btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #c9d4ce;
  background: #fff;
  color: #2a3a34;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}
.contacts-type-btn.is-active {
  background: var(--eis-sage, #2a3d63);
  border-color: #3d5070;
  color: #fff;
}
.contacts-agent-role {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d9dee6;
}
.contacts-agent-role[hidden] {
  display: none !important;
}
.contacts-agent-role-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
}
.contacts-type-sub .contacts-type-btn {
  font-size: 0.72rem;
  min-height: 26px;
  padding: 0 10px;
}
.contacts-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  width: 100%;
}
.contacts-list-card {
  width: 100%;
}
.contacts-list-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}
.contacts-muted {
  margin: 0;
  color: var(--eis-muted, #6b7280);
  font-size: 0.86rem;
}
.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(70vh, 720px);
  overflow: auto;
}
.contacts-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid #d9dee6;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.contacts-item:hover {
  border-color: #9eb5a8;
  background: #f7f8fa;
}
.contacts-item.is-selected {
  border-color: var(--eis-sage, #2a3d63);
  background: #eef6f1;
  box-shadow: inset 3px 0 0 var(--eis-sage, #2a3d63);
}
.contacts-item-kind {
  grid-row: 1 / span 2;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  background: #e7eee9;
  color: #2f4a3f;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.contacts-item.is-selected .contacts-item-kind {
  background: var(--eis-sage, #2a3d63);
  color: #fff;
}
.contacts-item-name {
  grid-column: 2;
  font-weight: 700;
  color: #1f2a26;
}
.contacts-item-meta {
  grid-column: 2;
  color: var(--eis-muted, #6b7280);
  font-size: 0.82rem;
}
.contacts-item-review {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  pointer-events: none;
  cursor: default;
  font-size: 0.7rem;
  padding: 3px 9px 3px 6px;
}
.contacts-item-review .wo-review-flag-icon {
  width: 14px;
  height: 14px;
}
.contacts-detail-empty {
  margin: 28px 8px;
  color: var(--eis-muted, #6b7280);
  font-size: 0.95rem;
}
.contacts-detail-modal .contacts-detail-dialog {
  width: min(960px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  padding: 20px 22px 22px;
}
.contacts-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.contacts-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}
.contacts-modal-close {
  flex: 0 0 auto;
}
.contacts-insp-grid .wo-review-flag {
  white-space: nowrap;
}
.contacts-kind {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--eis-sage, #2a3d63);
}
.contacts-detail-head h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  color: #1f2a26;
}
.contacts-meta {
  margin: 0;
  color: var(--eis-muted, #6b7280);
  font-size: 0.88rem;
}
.contacts-preferred-lang {
  margin: 6px 0 0;
  color: #24312c;
  font-size: 0.9rem;
  font-weight: 600;
}
.contacts-insp-title {
  margin: 14px 0 4px;
  font-size: 0.95rem;
  color: #24312c;
}
.contacts-insp-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--eis-line, #d7dde8);
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fafc 0%, #f3f6f9 100%);
}
.contacts-insp-summary[hidden] {
  display: none !important;
}
.contacts-insp-summary-count {
  font-size: 0.88rem;
  font-weight: 700;
  color: #314155;
}
.contacts-insp-summary-total {
  font-size: 0.88rem;
  color: var(--eis-muted, #6b7280);
  font-weight: 600;
  white-space: nowrap;
}
.contacts-insp-summary-total strong {
  margin-left: 6px;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--eis-navy, #1e3a5f);
}
.contacts-insp-wrap {
  overflow: auto;
  max-height: min(52vh, 480px);
}
.contacts-insp-grid {
  font-size: 0.82rem;
}
.contacts-insp-grid th {
  font-size: 0.7rem;
}
.contacts-insp-grid thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef2f6;
}
.contacts-insp-grid td,
.contacts-insp-grid th {
  white-space: nowrap;
  padding: 8px 10px;
}
.contacts-insp-grid td:nth-child(3) {
  white-space: normal;
  min-width: 160px;
}
.contacts-agents-cell {
  white-space: normal !important;
  min-width: 180px;
  line-height: 1.35;
  font-size: 0.8rem;
}
.contacts-agents-cell div + div {
  margin-top: 2px;
}
.contacts-insp-grid .contacts-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.contacts-insp-grid tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 1;
  border-top: 2px solid #c9d4ce;
  font-weight: 800;
  background: #eef3f0;
}
.contacts-total-label {
  text-align: right;
}
@media (max-width: 920px) {
  .contacts-list {
    max-height: 320px;
  }
  .contacts-detail-head {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .contacts-toolbar-row {
    flex-wrap: wrap;
  }
  .contacts-search-input,
  .contacts-type,
  .contacts-toolbar-review,
  .contacts-sort-select {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin-left: 0;
  }
  .contacts-type-btn {
    flex: 1 1 0;
    padding: 0 8px;
    text-align: center;
  }
  .contacts-type-sub .contacts-type-btn {
    white-space: normal;
    line-height: 1.2;
    min-height: 34px;
    padding: 6px 8px;
  }
  .contacts-item {
    grid-template-columns: 52px minmax(0, 1fr);
    row-gap: 4px;
  }
  .contacts-item-kind {
    font-size: 0.62rem;
    padding: 0 4px;
  }
  .contacts-item-name,
  .contacts-item-meta {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .contacts-item-review {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: start;
    max-width: 100%;
    white-space: normal;
  }
  .contacts-list {
    max-height: none;
  }
  .contacts-detail-modal .contacts-detail-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    padding: 16px 14px 18px;
  }
  .contacts-detail-actions {
    width: 100%;
    justify-content: space-between;
  }
  .contacts-detail-actions .wo-review-flag {
    white-space: normal;
  }
  .contacts-insp-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .contacts-insp-wrap {
    overflow: visible;
    max-height: none;
  }
  .contacts-insp-grid thead,
  .contacts-insp-grid tfoot {
    display: none;
  }
  .contacts-insp-grid,
  .contacts-insp-grid tbody {
    display: block;
    width: 100%;
  }
  .contacts-insp-grid tr {
    display: block;
    margin: 0 0 10px;
    padding: 4px 12px;
    border: 1px solid #d9dee6;
    border-radius: 10px;
    background: #fff;
  }
  .contacts-insp-grid td,
  .contacts-insp-grid td:nth-child(3),
  .contacts-agents-cell {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    width: auto;
    min-width: 0;
    padding: 7px 0;
    border: 0;
    white-space: normal;
    text-align: left;
    font-size: 0.88rem;
  }
  .contacts-insp-grid td::before {
    content: attr(data-label);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
    padding-top: 3px;
  }
  .contacts-insp-grid .contacts-num,
  .contacts-agents-cell {
    min-width: 0;
    text-align: left;
  }
}

.rea-search-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 560px;
}

.rea-search-controls .fees-input {
  flex: 1;
}

.rea-grid {
  table-layout: fixed;
}
.rea-grid th:nth-child(1),
.rea-grid td:nth-child(1) {
  width: 34%;
}
.rea-grid th:nth-child(2),
.rea-grid td:nth-child(2) {
  width: 46%;
}
.rea-grid th:nth-child(3),
.rea-grid td:nth-child(3) {
  width: 20%;
}
.rea-grid .fees-desc {
  max-width: none;
  white-space: normal;
}
.rea-grid td:nth-child(2),
.rea-phone {
  color: #4b5568;
}
.rea-phone {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.rea-blank {
  color: #b0b8c4;
}

.rea-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.rea-import-steps,
.rea-import-notes {
  margin: 0 0 14px;
  padding-left: 1.25rem;
  color: var(--eis-muted, #6b7280);
  line-height: 1.55;
}

.rea-import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 800px) {
  .rea-import-layout {
    grid-template-columns: 1fr;
  }
}

/* ==== Categories (horizon layout) ==== */
.cat {
  width: 100%;
  max-width: none;
  margin: 0;
  animation: rise-in 0.4s ease both;
  box-sizing: border-box;
}

.cat-horizon .fees-hero {
  align-items: flex-start;
}

.cat-hero-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.cat-hero-title-row h1 {
  margin: 0;
}

.cat-tab-bold-setting {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cat-tab-bold-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a7872;
}

.cat-horizon .fees-hero h1 {
  font-size: 1.75rem;
}

.cat-horizon .fees-lead {
  max-width: 40rem;
}

.cat-workspace {
  margin-top: 8px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 14px;
  overflow: visible;
  background: #fff;
  box-shadow: var(--eis-shadow-sm, 0 6px 18px rgba(20, 40, 30, 0.04));
}

.cat-nav-sticky {
  position: sticky;
  top: var(--cat-sticky-top, 76px);
  z-index: 40;
  background: #fff;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 8px 18px rgba(20, 40, 30, 0.1);
}

.cat-nav-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: stretch;
  background: #444c54;
  border-radius: 0;
}
.cat-nav-sticky > .cat-nav-row:first-child {
  border-radius: 14px 14px 0 0;
}

.cat-nav-arrow {
  width: 44px;
  min-width: 44px;
  border: 0;
  background: #2c333a;
  color: #fff;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.cat-nav-arrow:hover:not(:disabled) {
  background: #1f252b;
}

.cat-nav-arrow:disabled {
  opacity: 0.45;
  cursor: default;
}

.cat-nav-arrow[hidden] {
  display: none !important;
}

.cat-nav-track {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-behavior: auto;
  background: #444c54;
  min-width: 0;
}

.cat-nav-track::before,
.cat-nav-track::after {
  content: none;
  display: none;
}

.cat-nav-edge-spacer {
  flex: 0 0 auto;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  display: block;
  flex-shrink: 0;
  flex-grow: 0;
}

.cat-nav-track::-webkit-scrollbar {
  display: none;
}

.cat-nav-tab {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--cat-color, #4a5560);
  color: var(--cat-ink, #fff);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.cat-nav-tab:hover {
  filter: brightness(1.08);
  color: var(--cat-ink, #fff);
}

.cat-nav-tab.is-active {
  position: relative;
  z-index: 1;
  background: var(--cat-color, #4a5560);
  color: var(--cat-ink, #fff);
  box-shadow:
    inset 0 -4px 0 rgba(255, 255, 255, 0.95),
    0 0 0 2px rgba(255, 255, 255, 0.55);
  opacity: 1;
}

/* Master / Templates / Pre-Sets: unselected = light gray; selected = cadastro color (inline) */
.cat-nav-sticky.cat-nav-select-chrome .cat-nav-tab:not(.is-active):not(.is-inactive),
.cat-nav-sticky.cat-nav-select-chrome .cat-nav-tab-wrap:not(.is-active) .cat-nav-tab:not(.is-inactive) {
  background: linear-gradient(180deg, #f0f1f3 0%, #dde0e4 100%);
  color: #5a6570;
  border-right-color: #c8cdd4;
  filter: none;
  opacity: 1;
}

.cat-nav-sticky.cat-nav-select-chrome .cat-nav-tab:not(.is-active):not(.is-inactive):hover,
.cat-nav-sticky.cat-nav-select-chrome .cat-nav-tab-wrap:not(.is-active) .cat-nav-tab:not(.is-inactive):hover {
  background: linear-gradient(180deg, #e8eaed 0%, #d4d8de 100%);
  color: #4a5560;
  filter: none;
}

.cat-nav-tab.is-inactive {
  background: #c5ccd4 !important;
  color: #5a6570 !important;
  opacity: 0.92;
}

.cat-nav-tab.is-inactive:hover {
  filter: brightness(0.97);
  color: #4a5560 !important;
}

.cat-nav-tab.is-inactive.is-active {
  background: #b8c0c9 !important;
  color: #3a4556 !important;
  box-shadow: inset 0 -3px 0 rgba(90, 101, 112, 0.55);
  filter: none;
}

.cat-nav-tab.is-drag-over {
  box-shadow: inset 0 0 0 2px #fff;
}

.cat-nav-tab-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: stretch;
}

.cat-nav-tab-wrap .cat-nav-tab {
  padding-right: 28px;
}

.cat-nav-tab-x {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}

.cat-nav-tab-wrap:hover .cat-nav-tab-x,
.cat-nav-tab-wrap.is-active .cat-nav-tab-x {
  opacity: 1;
}

.cat-nav-tab-x:hover,
.cat-nav-tab-x:focus-visible {
  background: rgba(0, 0, 0, 0.55);
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.tpl-add-cat-btn {
  flex: 0 0 auto;
  min-height: 40px;
  white-space: nowrap;
}

.tpl-add-cat-modal.co-modal {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 20px !important;
  z-index: 100000 !important;
  display: grid !important;
  place-items: center;
  box-sizing: border-box;
  overscroll-behavior: contain;
}

.tpl-add-cat-modal.co-modal[hidden] {
  display: none !important;
}

.tpl-add-cat-modal .co-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(13, 53, 100, 0.48);
}

.tpl-add-cat-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(80vh, 720px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(13, 53, 100, 0.28);
  overflow: hidden;
}

.tpl-add-cat-modal .co-modal-head,
.tpl-add-cat-modal .co-modal-foot {
  flex: 0 0 auto;
}

.tpl-add-cat-modal .co-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 12px;
}

.tpl-add-cat-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.tpl-add-cat-modal .fees-field {
  width: 100%;
  max-width: none;
  flex: 0 0 auto;
}

.tpl-add-cat-modal .fees-field .fees-input,
.tpl-add-cat-modal #tplAddCatFilter {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.tpl-add-cat-modal .co-modal-lead,
.tpl-add-cat-modal #tplAddCatError,
.tpl-add-cat-modal #tplAddCatEmpty {
  flex: 0 0 auto;
}

.tpl-add-cat-list {
  flex: 1 1 auto;
  min-height: 160px;
  max-height: none;
  overflow: auto;
  border: 1px solid var(--eis-line, #e2e6ed);
  border-radius: 10px;
  padding: 6px;
  background: #f8fafc;
}

.tpl-add-cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  margin: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--eis-ink, #3a4556);
}

.tpl-add-cat-item:hover {
  background: rgba(13, 53, 100, 0.06);
}

.tpl-add-cat-item input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.tpl-add-cat-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex: 0 0 auto;
}

.tpl-add-cat-name {
  min-width: 0;
}

.cat-shell {
  --cat-color: #2a3d63;
  border-radius: 0 0 14px 14px;
  overflow: visible;
}

.cat-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid var(--eis-line, #d9dee6);
}

.cat-type-tab {
  flex: 1 1 0;
  min-width: 7.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid var(--eis-line, #d9dee6);
  background: #fff;
  color: #6a7872;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.cat-type-tab:last-child {
  border-right: 0;
}

.cat-type-tab:hover {
  color: var(--eis-ink, #3a4556);
  background: #f3f6f5;
}

.cat-type-tab.is-active {
  background: var(--cat-color, #2a3d63);
  color: var(--cat-ink, #fff);
}

.cat-type-tab-label {
  white-space: nowrap;
}

.cat-type-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 6px;
  border-radius: 999px;
  background: #e8eeeb;
  color: #3d4a45;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
}

.cat-type-tab.is-active .cat-type-count {
  background: color-mix(in srgb, var(--cat-ink, #fff) 18%, transparent);
  color: var(--cat-ink, #fff);
}

.cat-body {
  padding: 14px 16px 18px;
  background: #f7f8fa;
}

.cat-body-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cat-body-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

.cat-body-meta strong {
  display: inline;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.2rem;
  color: var(--eis-ink, #3a4556);
}

.cat-body-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.cat-sub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.cat-sub-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px 12px;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  border-left: 3px solid var(--cat-color, #9bb8a9);
}

.cat-sub-handle {
  color: #8a9a93;
  cursor: grab;
  user-select: none;
}

.cat-sub-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cat-sub-copy strong {
  color: var(--eis-ink, #3a4556);
  font-size: 0.95rem;
  font-weight: 650;
}

.cat-sub-desc:empty {
  display: none;
}

.cat-sub-copy .cat-sub-desc {
  color: var(--eis-muted, #6b7280);
  font-size: 0.84rem;
  line-height: 1.35;
}

.cat-sub-item > .cat-badge {
  margin-right: 0;
  justify-self: end;
}

.cat-sub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-self: end;
}

.cat-sub-empty {
  margin: 8px 0 0;
  color: var(--eis-muted, #6b7280);
  font-size: 0.9rem;
}

.cat-sub-empty[hidden] {
  display: none !important;
}

.cat-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--eis-sage, #2a3d63);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.cat-link:hover {
  text-decoration: underline;
}

.cat-danger {
  color: #9a3b3b !important;
}

.cat-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 8px;
  font-style: normal;
}

button.cat-badge.cat-status-toggle {
  margin: 0;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  transition: filter 0.12s ease, box-shadow 0.12s ease;
}

button.cat-badge.cat-status-toggle:hover:not(:disabled) {
  filter: brightness(0.96);
  box-shadow: 0 0 0 2px rgba(61, 80, 112, 0.18);
}

button.cat-badge.cat-status-toggle:disabled {
  opacity: 0.65;
  cursor: wait;
}

.cat-badge.is-on {
  background: #e5f3ec;
  color: #3d5070;
}

.cat-badge.is-off {
  background: #f1f1f1;
  color: #6b6b6b;
}

.cat-sub-item.is-inactive {
  opacity: 0.78;
  border-left-color: #c5ccd4;
}

.cat-sort-item.is-inactive {
  opacity: 0.85;
}

.cat-sort-separator {
  list-style: none;
  margin: 10px 0 6px;
  padding: 6px 4px;
  color: #7a8494;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cat-drag-handle.is-disabled {
  opacity: 0.35;
  cursor: default;
}

.cat-sort-inactive-label {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6b7280;
  margin-left: 6px;
}

.cat-count {
  font-size: 0.82rem;
  color: var(--eis-muted, #6b7280);
}

.cat-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  color: #8a9a93;
  letter-spacing: -1px;
  cursor: grab;
  user-select: none;
}

.cat-sub-item.is-dragging {
  opacity: 0.55;
}

.cat-sub-item.is-drag-over {
  outline: 2px dashed var(--cat-color, #2a3d63);
}

.cat-modal.disc-modal {
  z-index: 100000 !important;
  padding: 24px;
  place-items: center;
  overflow: auto;
}

.cat-modal .cat-dialog {
  width: min(580px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  box-sizing: border-box;
  padding: 18px 22px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  top: auto !important;
  left: auto !important;
  margin: auto;
}

.cat-modal .cat-dialog h2 {
  font-size: 1.25rem;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--eis-line, #d9dee6);
  flex: 0 0 auto;
}

.cat-modal .cat-dialog-body {
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
  padding-bottom: 4px;
}

.cat-modal .cat-dialog-body .fees-field {
  margin-bottom: 12px;
}

.cat-radio-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-bottom: 12px;
}

.cat-radio-pair > .fees-field {
  margin-bottom: 0;
}

@media (max-width: 560px) {
  .cat-radio-pair {
    grid-template-columns: 1fr;
  }
}

.cat-modal .disc-modal-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px -22px 0;
  padding: 12px 22px 16px;
  background: #f3f6f5;
  border-top: 1px solid var(--eis-line, #d9dee6);
  border-radius: 0 0 14px 14px;
}

.cat-form-parent {
  margin: 0 0 14px;
  color: var(--eis-muted, #6b7280);
  font-size: 0.92rem;
}

body.cat-overlay-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

.cat-modal .fees-input,
.cat-modal .fees-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--eis-line, #d9dee6);
  box-shadow: none;
}

.cat-modal .fees-input:focus,
.cat-modal .fees-textarea:focus {
  outline: none;
  border-color: #2a3d63;
  box-shadow: 0 0 0 3px rgba(90, 109, 140, 0.15);
}

.cat-dialog-textarea {
  min-height: 72px;
  resize: vertical;
}

.cat-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cat-color-row .fees-input {
  flex: 1;
  min-width: 0;
}

.cat-font-color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  min-height: 42px;
}

.cat-overview-field .cat-active-check {
  min-height: 42px;
}

.cat-font-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--eis-ink, #1f252b);
  cursor: pointer;
  user-select: none;
}

.cat-font-radio input {
  width: 16px;
  height: 16px;
  accent-color: var(--eis-navy, #0d3564);
  cursor: pointer;
}

.cat-color-picker {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.cat-active-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--eis-ink, #3a4556);
  cursor: pointer;
}

.cat-active-check input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.cat-dialog-footer {
  justify-content: flex-end;
}

.cat-sort-modal.disc-modal {
  z-index: 100000 !important;
  padding: 24px;
  place-items: center;
  overflow: auto;
}

.cat-sort-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  padding: 18px 20px 0;
  overflow: hidden;
  box-sizing: border-box;
}

.cat-sort-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  margin: 0 0 6px;
}

.cat-sort-dialog h2 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--eis-ink, #1a2a24);
}

.cat-sort-lead {
  margin: 0 0 12px;
  color: var(--eis-muted, #6b7280);
  font-size: 0.92rem;
  line-height: 1.45;
  flex: 0 0 auto;
}

.cat-sort-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.cat-sort-item {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  border-left: 4px solid var(--cat-color, #9bb8a9);
  cursor: grab;
  user-select: none;
}

.cat-sort-item.is-dragging {
  opacity: 0.55;
}

.cat-sort-item.is-drag-over {
  outline: 2px dashed var(--cat-color, #2a3d63);
}

.cat-sort-handle {
  color: #8a9a93;
  letter-spacing: -2px;
  line-height: 1;
}

.cat-sort-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--cat-color, #9bb8a9);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.cat-sort-name {
  font-weight: 650;
  color: var(--eis-ink, #3a4556);
  font-size: 0.95rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-sort-index {
  color: var(--eis-muted, #6b7280);
  font-size: 0.82rem;
  font-weight: 600;
  min-width: 1.5em;
  text-align: right;
}

.cat-sort-footer {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin: 14px -20px 0;
  padding: 12px 20px 16px;
}

@media (max-width: 900px) {
  .hz-shell {
    width: 90%;
    max-width: 90%;
  }
}

@media (max-width: 720px) {
  .cat-body-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .cat-sub-item {
    grid-template-columns: auto 1fr;
  }

  .cat-sub-item > .cat-badge,
  .cat-sub-actions {
    grid-column: 2;
    justify-self: start;
  }

  .cat-type-tab {
    flex: 1 1 calc(50% - 1px);
    min-width: 0;
  }
}

/* ==== Template board (comments) ==== */
.tpl-nav-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.tpl-nav-shell[hidden] {
  display: none !important;
}

.tpl-nav-shell [data-tpl-panel][hidden] {
  display: none !important;
}

.tpl-nav-side {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tpl-nav-cover-preview {
  padding: 10px;
  background: linear-gradient(180deg, #eef1f6, #e6eaf0);
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 14px;
}

.tpl-nav-cover-preview .fees-label {
  margin-bottom: 8px;
}

.tpl-nav-cover-frame {
  padding: 8px;
  margin: 0;
}

.tpl-nav-cover-preview .rcover-preview {
  max-width: 100%;
  max-height: 280px;
}

.tpl-nav-cover-hint {
  margin: 8px 0 0;
  text-align: center;
}

.tpl-nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: linear-gradient(180deg, #eef1f6, #e6eaf0);
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 14px;
}

.tpl-nav-tab {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--eis-muted, #6b7280);
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.9rem;
  font-weight: 700;
  background: transparent;
  cursor: pointer;
}

.tpl-nav-tab:hover {
  color: var(--eis-forest, #3d5070);
  background: rgba(255, 255, 255, 0.75);
}

.tpl-nav-tab.is-active {
  color: var(--eis-forest-deep, #334462);
  background: #fff;
  border-color: rgba(61, 80, 112, 0.12);
  box-shadow: 0 3px 10px rgba(61, 80, 112, 0.1);
}

.tpl-nav-main {
  min-width: 0;
}

.tpl-nav-panel .textopt-subnav {
  margin-bottom: 14px;
}

@media (max-width: 860px) {
  .tpl-nav-shell {
    grid-template-columns: 1fr;
  }
  .tpl-nav-side {
    position: static;
  }
  .tpl-nav-tabs {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .tpl-nav-tab {
    width: auto;
  }
}

.rcover-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr) auto;
  gap: 24px;
  align-items: start;
}

.rcover-instructions {
  padding: 18px 20px;
  background: linear-gradient(180deg, #f7f9fc, #eef1f6);
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 14px;
  font-size: 0.92rem;
  color: var(--eis-ink, #3a4556);
}

.rcover-instructions-title {
  margin: 0 0 10px;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.15rem;
  color: var(--eis-forest-deep, #334462);
}

.rcover-instructions-note {
  margin: 0 0 10px;
  color: var(--eis-muted, #6b7280);
}

.rcover-instructions ul {
  margin: 8px 0 12px;
  padding-left: 1.2rem;
}

.rcover-instructions-spec {
  margin: 12px 0 6px;
}

.rcover-file {
  padding: 8px 10px;
}

.rcover-preview-wrap {
  padding: 10px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 12px;
  background: #fff;
  text-align: center;
  align-self: start;
}

.rcover-preview-upload-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}

.rcover-upload-field {
  margin: 0;
}

.rcover-preview {
  display: block;
  max-width: 180px;
  max-height: 280px;
  margin: 0 auto;
  object-fit: contain;
}

.rcover-remove-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--eis-danger, #c0392b);
  cursor: pointer;
  text-decoration: underline;
}

.tptag-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.tptag-instructions {
  margin: 0 0 16px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #f7f9fc, #eef1f6);
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 14px;
  font-size: 0.92rem;
  color: var(--eis-ink, #3a4556);
}

.tptag-textarea {
  min-height: 160px;
}

.tptag-preview-wrap {
  padding: 10px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 12px;
  background: #fff;
}

.tptag-preview {
  display: block;
  max-width: 220px;
  max-height: 320px;
  margin: 0 auto;
  object-fit: contain;
}

.rfooter-input {
  max-width: 100%;
}

.rfooter-check {
  margin-top: 16px;
}

.rfooter-check label {
  font-size: 0.95rem;
  color: var(--eis-ink, #3a4556);
}

.sumdef-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.sumdef-note {
  padding: 16px 18px;
  background: linear-gradient(180deg, #f7f9fc, #eef1f6);
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 14px;
  font-size: 0.92rem;
  color: var(--eis-ink, #3a4556);
}

.sumdef-note p {
  margin: 0;
}

.classtitles-sort {
  width: 120px;
  white-space: nowrap;
}

.classtitles-order {
  display: inline-block;
  min-width: 1.2rem;
  margin-right: 6px;
  font-weight: 600;
}

.eis-drag-handle,
.looklists-drag {
  display: inline-block;
  margin-right: 6px;
  color: #8a9892;
  letter-spacing: -2px;
  cursor: grab;
  user-select: none;
  font-size: 0.95rem;
  line-height: 1;
  vertical-align: middle;
}

.is-draggable {
  cursor: grab;
}

.is-draggable.is-dragging {
  opacity: 0.55;
  background: #eef1f6;
}

.is-draggable.is-drag-over {
  box-shadow: inset 0 2px 0 #2a3d63;
}

.classtitles-input {
  width: 100%;
  min-width: 120px;
}

.classtitles-short {
  max-width: 80px;
}

.classtitles-action {
  width: 70px;
  text-align: right;
}

.classtitles-link {
  border: 0;
  background: none;
  padding: 0;
  color: #2563eb;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.classtitles-link.sp-delete {
  color: #b42318;
}

.sp-row-actions {
  width: auto;
  white-space: nowrap;
}

.sp-row-actions .classtitles-link + .classtitles-link {
  margin-left: 12px;
}

.sp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.sp-card-head .fees-hint {
  margin: 0;
  flex: 1;
}

.sp-card-head .btn-primary {
  flex: 0 0 auto;
}

.sp-modal .disc-modal-panel {
  width: min(920px, 100%);
}

.sp-modal .cke {
  max-width: 100%;
}

.sp-modal .sp-heading {
  width: 100%;
  min-height: 88px;
  resize: vertical;
}

.sp-modal .fees-field + .fees-field {
  margin-top: 12px;
}

.classtitles .looklists-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

@media (max-width: 860px) {
  .tptag-grid {
    grid-template-columns: 1fr;
  }

  .sumdef-grid {
    grid-template-columns: 1fr;
  }

  .rcover-edit-grid {
    grid-template-columns: 1fr;
  }
}

.tpl-edit .fees-edit-card {
  margin-bottom: 16px;
}

.tpl-cover-field {
  min-height: 280px;
  resize: vertical;
}

#tplPublishPanel .cke {
  max-width: 100%;
}

#tplPublishPanel .tpl-report-lang-row .fees-field {
  min-width: 0;
}

#tplPublishPanel .tpl-report-lang-row .cke {
  width: 100% !important;
  box-sizing: border-box;
}

#tplSumItemModal .tpl-sum-dialog {
  width: 640px !important;
  max-width: calc(100vw - 32px);
}

#tplSumItemModal .svc-sub-dialog-body {
  overflow-y: auto;
  max-height: min(70vh, 540px);
}

#tplSumItemModal .tpl-sum-body {
  min-height: 180px !important;
  height: 200px !important;
}

.tpl-editing-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 14px;
  box-shadow: var(--eis-shadow-sm, 0 6px 18px rgba(61, 80, 112, 0.06));
}

.tpl-editing-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}

.tpl-editing-kicker {
  margin: 0 0 4px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
}

.tpl-editing-banner strong {
  display: block;
  font-size: 1.15rem;
  color: var(--eis-ink, #3a4556);
}

.tpl-editing-note {
  margin: 6px 0 0;
  color: var(--eis-muted, #6b7280);
  font-size: 0.9rem;
}

#tplBtnSetTemplate:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tpl-board {
  margin-top: 8px;
}

.tpl-board-body {
  min-height: 220px;
}

.tpl-sub-blocks {
  display: grid;
  gap: 14px;
}

.tpl-sub-block {
  position: relative;
  z-index: 0;
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  overflow: visible;
}

.tpl-sub-block:has(.mcl-vis-help.is-open),
.tpl-sub-block:has(.mcl-vis-help:hover),
.tpl-sub-block:has(.mcl-vis-help:focus-within) {
  z-index: 6;
}

.tpl-sub-head {
  background: var(--cat-color, #2a3d63);
  color: var(--cat-ink, #fff);
  padding: 8px 12px 8px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-radius: 10px 10px 0 0;
}

.tpl-sub-head-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.tpl-sub-seq {
  flex-shrink: 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--cat-ink, #fff);
  opacity: 0.95;
}

.tpl-sub-head-title {
  border-bottom: 1px dashed color-mix(in srgb, var(--cat-ink, #fff) 55%, transparent);
  padding-bottom: 1px;
  min-width: 0;
}

.tpl-sub-remove {
  flex: 0 0 auto;
  margin: 0;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--cat-ink, #fff) 50%, transparent);
  border-radius: 6px;
  background: transparent;
  color: var(--cat-ink, #fff);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.tpl-sub-remove:hover {
  background: color-mix(in srgb, var(--cat-ink, #fff) 16%, transparent);
}

#tplAddSubModal .tpl-add-sub-empty-note {
  margin: 0;
  padding: 14px 12px;
  color: #5b6775;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  white-space: normal;
}

.tpl-sub-cmt-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cat-ink, #fff) 22%, transparent);
  color: var(--cat-ink, #fff);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  flex-shrink: 0;
}

.tpl-sub-head-opts {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.tpl-head-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  color: var(--cat-ink, #fff);
}

.tpl-head-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.tpl-head-check-box {
  width: 16px;
  height: 16px;
  border: 2px solid color-mix(in srgb, var(--cat-ink, #fff) 95%, transparent);
  border-radius: 3px;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  position: relative;
  flex: 0 0 auto;
}

.tpl-head-check.is-checked .tpl-head-check-box,
.tpl-head-check input:checked + .tpl-head-check-box {
  background: var(--cat-ink, #fff);
  border-color: var(--cat-ink, #fff);
}

.tpl-head-check.is-checked .tpl-head-check-box::after,
.tpl-head-check input:checked + .tpl-head-check-box::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid var(--cat-color, #2a3d63);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.tpl-head-check-label {
  white-space: nowrap;
}

.tpl-cmt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  min-height: 48px;
}

.tpl-cmt-tags.is-sorting {
  outline: 2px dashed var(--cat-color, #2a3d63);
  outline-offset: -2px;
}

.tpl-cmt-tags.is-sorting .tpl-cmt-tag {
  cursor: grab;
}

.tpl-cmt-tags.is-sorting .tpl-cmt-tag.is-dragging {
  cursor: grabbing;
  opacity: 0.75;
}

.tpl-cmt-tag {
  position: relative;
  margin: 0;
  padding: 8px 32px 8px 10px;
  border: 1px solid #cfd8d4;
  border-radius: 6px;
  background: #fff;
  color: var(--eis-ink, #3a4556);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  max-width: 100%;
  text-align: left;
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
}

.tpl-cmt-tag.is-selected {
  border: 1px solid #3b82f6;
  background: #fff;
  box-shadow: none;
  color: #0f172a;
}

.tpl-cmt-tag.is-hidden-template {
  opacity: 1;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #94a3b8;
}

.tpl-cmt-hidden-badge {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.tpl-cmt-edit {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tpl-cmt-edit:hover {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.tpl-cmt-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-right: 4px;
}

.tpl-cmt-label {
  line-height: 1.25;
  font-weight: 500;
}

/* ShortName starting with * → bold in ML / Templates / Pre-Sets (UI only). */
.tpl-cmt-label .tpl-cmt-critical,
.tpl-cmt-critical {
  font-weight: 800 !important;
  color: #0f172a;
}

.tpl-cmt-used {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
}

.tpl-cmt-tag:hover {
  border-color: var(--cat-color, #2a3d63);
}

.tpl-cmt-tag.is-dragging {
  opacity: 0.55;
}

.tpl-cmt-empty {
  color: var(--eis-muted, #6b7280);
  font-size: 0.88rem;
}

.tpl-sub-actions {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: flex-start;
  padding: 12px 14px 0;
}

.tpl-order-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1 1 220px;
  min-width: 0;
}

.tpl-order-toolbar-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  width: 100%;
}

.tpl-order-heading {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1.2;
}

.mcl-vis-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  z-index: 5;
}

.mcl-vis-help-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1e3a5f;
  white-space: nowrap;
}

.mcl-vis-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1.5px solid #3b82f6;
  border-radius: 999px;
  background: #fff;
  color: #2563eb;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.72rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  cursor: help;
}

.mcl-vis-help-btn:hover,
.mcl-vis-help-btn:focus-visible {
  background: #eff6ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.mcl-vis-help-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 80;
  width: min(280px, 82vw);
  max-height: none;
  overflow: visible;
  padding: 12px 14px 10px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #fff;
  color: #1e3a5f;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

/* Caret pointing up at the ⓘ */
.mcl-vis-help-panel::before,
.mcl-vis-help-panel::after {
  content: '';
  position: absolute;
  right: 8px;
  width: 0;
  height: 0;
  border-style: solid;
}

.mcl-vis-help-panel::before {
  top: -8px;
  border-width: 0 8px 8px 8px;
  border-color: transparent transparent #d0d7de transparent;
}

.mcl-vis-help-panel::after {
  top: -7px;
  border-width: 0 7px 7px 7px;
  border-color: transparent transparent #fff transparent;
}

.mcl-vis-help-title {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e3a5f;
}

.mcl-vis-help-panel p {
  margin: 0 0 6px;
  color: #1e3a5f;
}

.mcl-vis-help-panel p:last-child {
  margin-bottom: 0;
}

.mcl-vis-help-list {
  margin: 0 0 8px;
  padding-left: 0;
  list-style: none;
}

.mcl-vis-help-list li {
  margin: 0 0 4px;
}

.mcl-vis-help-note {
  margin: 8px 0 0 !important;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  color: #64748b !important;
  font-size: 0.78rem;
}

.mcl-vis-help:hover .mcl-vis-help-panel,
.mcl-vis-help:focus-within .mcl-vis-help-panel,
.mcl-vis-help.is-open .mcl-vis-help-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tpl-order-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tpl-order-hint {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.3;
}

.tpl-order-modes {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tpl-order-btn,
.tpl-order-select,
.tpl-btn-save-order,
.tpl-btn-edit-order {
  min-height: 40px;
  height: 40px;
  box-sizing: border-box;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 650;
  padding: 0 14px;
  line-height: 1.1;
}

.tpl-btn-edit-order[hidden],
.tpl-btn-save-order[hidden] {
  display: none !important;
}

.tpl-order-btn {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  cursor: pointer;
}

.tpl-order-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.tpl-order-btn.is-active {
  border-color: var(--cat-color, #2a3d63);
  background: var(--cat-color, #2a3d63);
  color: var(--cat-ink, #fff);
  font-weight: 700;
}

.tpl-order-btn.is-loading,
.tpl-order-btn:disabled,
.tpl-btn-save-order:disabled {
  opacity: 0.85;
  cursor: wait;
  pointer-events: none;
}

.tpl-order-select-wrap {
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: min(100%, 220px);
}

.tpl-order-select-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
}

.tpl-order-select {
  width: 100%;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
}

.tpl-cmt-drag {
  display: none;
  margin-right: 6px;
  color: #94a3b8;
  cursor: grab;
  font-size: 0.85rem;
  letter-spacing: -1px;
  user-select: none;
}

.tpl-cmt-tags.is-sorting .tpl-cmt-drag {
  display: inline-block;
}

.tpl-sort-spinner {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-right: 0.35em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.1em;
  animation: tpl-sort-spin 0.7s linear infinite;
}

@keyframes tpl-sort-spin {
  to { transform: rotate(360deg); }
}

.tpl-sub-block.is-sorting-name {
  position: relative;
  pointer-events: none;
}

.tpl-sub-block.is-sorting-name::after {
  content: "Updating order…";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  color: var(--cat-color, #2a3d63);
  font-weight: 700;
  font-size: 0.95rem;
  z-index: 2;
  border-radius: 8px;
}

@media (max-width: 720px) {
  .tpl-order-modes {
    display: none;
  }
  .tpl-order-select-wrap {
    display: flex;
    flex: 1 1 160px;
  }
  .tpl-order-toolbar {
    flex: 1 1 100%;
  }
  .tpl-btn-save-order,
  .tpl-btn-edit-order {
    flex: 0 0 auto;
  }
  .tpl-sub-actions .tpl-btn-create,
  .tpl-sub-actions .btn-primary.tpl-btn-create {
    margin-left: auto;
  }
}

.tpl-sub-actions .tpl-btn-create,
.tpl-sub-actions .btn-primary.tpl-btn-create {
  background: var(--cat-color, #2a3d63);
  border-color: var(--cat-color, #2a3d63);
  color: var(--cat-ink, #fff);
  min-height: 40px;
  height: 40px;
  box-sizing: border-box;
  flex: 0 0 auto;
  align-self: center;
  margin-top: 1.1rem;
}

.tpl-sub-actions .tpl-btn-create:hover,
.tpl-sub-actions .btn-primary.tpl-btn-create:hover {
  filter: brightness(0.92);
  background: var(--cat-color, #2a3d63);
  border-color: var(--cat-color, #2a3d63);
  color: var(--cat-ink, #fff);
}

.cmt-modal.disc-modal {
  z-index: 200;
  padding: 12px;
  align-items: center;
  justify-items: center;
  overflow: hidden;
}
.cmt-pick-modal.cmt-modal.disc-modal {
  overflow: auto;
  padding: 20px 16px;
  align-items: start;
}
.cmt-pick-modal .cmt-pick-dialog.cat-dialog {
  width: min(780px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  padding: 20px 22px 0;
  overflow: hidden;
  box-sizing: border-box;
  margin: auto;
}
.cmt-pick-modal .cmt-pick-dialog .disc-modal-footer {
  margin: 16px -22px 0;
  padding: 14px 22px 16px;
  background: #fff;
  border-radius: 0 0 14px 14px;
  flex: 0 0 auto;
}

.tpl-sub-modal.disc-modal {
  z-index: 100000 !important;
  padding: 16px;
  place-items: center;
  overflow: auto;
}

.tpl-sub-modal .tpl-sub-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
  padding: 18px 22px 0;
  overflow: hidden;
  position: relative;
  top: auto !important;
  left: auto !important;
  margin: auto;
  box-sizing: border-box;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(61, 80, 112, 0.18);
}

.tpl-sub-modal .cmt-dialog-head {
  margin: 0 0 4px;
}

.tpl-sub-modal .tpl-sub-dialog h2 {
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  font-family: "Manrope", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
  border-bottom: 0;
  line-height: 1.25;
}

.tpl-sub-parent {
  margin: 0 0 14px;
  color: #6b7280;
  font-size: 0.9rem;
}

.tpl-sub-parent strong {
  color: #111827;
  font-weight: 700;
}

.tpl-sub-dialog-body {
  display: grid;
  gap: 14px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 2px 8px;
}

.tpl-sub-dialog-body .fees-field {
  margin-bottom: 0;
}

.tpl-sub-dialog-body .fees-label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #374151;
}

.tpl-sub-dialog-body .fees-input,
.tpl-sub-dialog-body .fees-textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.tpl-sub-dialog-body .fees-textarea {
  min-height: 88px;
  resize: vertical;
}

.tpl-sub-modal .disc-modal-footer {
  flex: 0 0 auto;
  margin: 8px -22px 0;
  padding: 14px 22px;
  background: #fff;
  justify-content: flex-start;
}

.tpl-sub-modal .disc-modal-footer .btn-primary {
  margin-left: auto;
  background: #1e3a5f;
  border-color: #1e3a5f;
}

.tpl-sub-modal .disc-modal-footer .btn-primary:hover {
  filter: brightness(0.92);
  background: #1e3a5f;
  border-color: #1e3a5f;
}

.cmt-modal:not(.cmt-pick-modal) .cmt-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
  padding: 18px 22px 0;
  overflow: hidden;
  position: relative;
  top: auto !important;
  left: auto !important;
  margin: auto;
  box-sizing: border-box;
  border-radius: 12px;
}

.cmt-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  margin: 0 0 12px;
}

.cmt-modal:not(.cmt-pick-modal) .cmt-dialog h2 {
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  font-family: "Manrope", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
  border-bottom: 0;
  line-height: 1.25;
}

.cmt-dialog-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin: -4px -6px 0 0;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}

.cmt-dialog-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.cmt-modal:not(.cmt-pick-modal) .cmt-dialog-body {
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 2px 8px;
}

.cmt-section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.cmt-section-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9aa3b2;
}

.cmt-section-hint {
  margin: -4px 0 0;
  font-size: 0.86rem;
  color: #6b7280;
}

.cmt-extra-fields {
  display: grid;
  gap: 10px;
}

.cmt-extra-fields[hidden] {
  display: none !important;
}

.cmt-priority-field[hidden] {
  display: none !important;
}

.cmt-modal .cmt-priority-field select.fees-input {
  width: 100%;
  background: #fff;
  cursor: pointer;
}

.cmt-illust-field {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.cmt-modal:not(.cmt-pick-modal) .cmt-dialog-body .fees-field {
  margin-bottom: 0;
}

.cmt-modal:not(.cmt-pick-modal) .cmt-dialog-body .fees-label {
  margin-bottom: 6px;
  font-size: 0.84rem;
  font-weight: 650;
  color: #374151;
}

.cmt-modal:not(.cmt-pick-modal) .cmt-dialog-body .fees-input,
.cmt-modal:not(.cmt-pick-modal) .cmt-dialog-body .fees-textarea {
  padding: 10px 12px;
  font-size: 0.92rem;
  border-radius: 8px;
}

.cmt-field-main .fees-textarea {
  min-height: 74px;
  max-height: 120px;
  resize: vertical;
  line-height: 1.45;
}

.cmt-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: #374151;
  cursor: pointer;
}

.cmt-check[hidden] {
  display: none !important;
}

.cmt-master-note {
  margin: 2px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #eef3f8;
  color: #334155;
  font-size: 0.86rem;
  line-height: 1.4;
}

.cmt-master-note .cmt-master-note-alert {
  font-weight: 700;
}

.cmt-master-note[hidden] {
  display: none !important;
}

.cmt-modal .fees-input.is-readonly,
.cmt-modal .fees-textarea.is-readonly,
.cmt-modal .fees-input:read-only,
.cmt-modal .fees-textarea:read-only {
  background: #f1f5f9;
  color: #475569;
  cursor: default;
}

.cmt-check input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.illust-multi {
  display: grid;
  gap: 12px;
}

.illust-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.illust-selected-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 72px;
  max-height: 220px;
  overflow: auto;
}

.illust-chips-empty {
  margin: 0;
  padding: 18px 10px;
  color: #9aa3b2;
  font-size: 0.86rem;
  border: 1px dashed #d5dbe3;
  border-radius: 10px;
  text-align: center;
}

.illust-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}

.illust-card.is-active {
  border-color: #c7d2e5;
  background: #f8fafc;
}

.illust-card-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.illust-card-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 72px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  background: #f3f4f6;
}

.illust-card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.illust-card-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.illust-card-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-top: 2px;
}

.illust-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.illust-card-id {
  font-size: 0.75rem;
  color: #9aa3b2;
}

.illust-card-x {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6b7280;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.illust-card-x:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.illust-preview-pane {
  min-width: 0;
}

.illust-preview-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}

.illust-preview-frame img {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
}

.illust-preview-empty {
  margin: 0;
  color: #9aa3b2;
  font-size: 0.82rem;
  text-align: center;
}

.illust-preview-caption {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: #9aa3b2;
}

.illust-suggest {
  position: relative;
  z-index: 2;
}

.illust-suggest-list {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 196px;
  overflow: auto;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.12);
}

.illust-suggest-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #eef1f5;
  background: #fff;
  padding: 7px 8px;
  font: inherit;
  cursor: pointer;
}

.illust-suggest-item:last-child {
  border-bottom: 0;
}

.illust-suggest-item:hover,
.illust-suggest-item.is-active {
  background: #eef3fb;
}

.illust-suggest-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 auto;
  background: #f4f6f8;
  border-radius: 4px;
}
.mcl-illust-hover {
  position: fixed;
  z-index: 110000 !important;
  width: min(280px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 3px solid #fff;
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .35), 0 0 0 1px rgba(15, 23, 42, .12);
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
}
.mcl-illust-hover.is-open {
  opacity: 1;
  visibility: visible;
}
.mcl-illust-hover-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111827;
  padding: 8px;
  min-height: 160px;
}
.mcl-illust-hover-img img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.mcl-illust-hover-cap {
  margin: 0;
  padding: 8px 10px;
  background: #f3f4f6;
  border-top: 1px solid #e5e7eb;
  color: #374151;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.35;
}
@media (hover: none) {
  .mcl-illust-hover { display: none !important; }
}

.illust-suggest-item span {
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.3;
  color: #1f2937;
}

.illust-suggest-empty {
  margin: 0;
  padding: 10px;
  font-size: 0.82rem;
  color: #667085;
}

.cmt-illust-upload {
  display: grid;
  gap: 8px;
  align-content: start;
}

.cmt-illust-preview {
  width: 100%;
  max-width: 220px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 8px;
  background: #f7f8fa;
  overflow: hidden;
}

.cmt-illust-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 140px;
  object-fit: contain;
  background: #fff;
}

.cmt-illust-file-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 8px;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2c333a;
  cursor: pointer;
}

.cmt-illust-file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.cmt-illust-remove {
  width: fit-content;
  border: 0;
  background: transparent;
  color: #9b2c2c;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.cmt-illust-name {
  font-size: 0.8rem;
  color: #667085;
  word-break: break-all;
}

.illust-source-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 6px;
}
.illust-source-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.illust-source-card.is-active {
  border-color: #2a3d63;
  box-shadow: 0 0 0 1px #2a3d63;
  background: #f5f7fb;
}
.illust-source-title {
  font-weight: 650;
  font-size: 0.92rem;
  color: #1f2937;
}
.illust-source-desc {
  font-size: 0.78rem;
  color: #667085;
  line-height: 1.35;
}
.illust-picker-panel {
  margin-bottom: 10px;
}
.illust-picker-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 8px;
  margin-top: 6px;
  align-items: stretch;
}
.illust-picker-list {
  max-height: 128px;
  overflow: auto;
  border: 1px solid #d9dee6;
  border-radius: 8px;
  background: #fff;
}
.illust-picker-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #eef1f5;
  background: transparent;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #1f2937;
  cursor: pointer;
}
.illust-picker-item:hover,
.illust-picker-item.is-selected {
  background: #eef3fb;
}
.illust-picker-hover {
  border: 1px dashed #c5ccd6;
  border-radius: 8px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  min-height: 128px;
  opacity: 0.55;
}
.illust-picker-hover.is-visible {
  opacity: 1;
}
.illust-picker-hover img {
  max-width: 100%;
  max-height: 130px;
  object-fit: contain;
}
.illust-picker-hover-label {
  margin: 8px 0 0;
  font-size: 0.72rem;
  color: #667085;
  text-align: center;
  line-height: 1.3;
  max-height: 3.2em;
  overflow: hidden;
}
.illust-selected-preview {
  margin-top: 10px;
}
.illust-catalog .illust-table-wrap {
  overflow: auto;
}
.illust-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.illust-toolbar .btn-primary {
  margin-bottom: 2px;
}
.illust-dialog .illust-footer-btn[hidden],
.illust-dialog .illust-restore-link[hidden] {
  display: none !important;
}
.illust-table {
  width: 100%;
  border-collapse: collapse;
}
.illust-table th,
.illust-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e8ecf1;
  vertical-align: middle;
  text-align: left;
}
.illust-td-thumb img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #f5f7fa;
  border-radius: 6px;
}
.illust-name {
  font-weight: 650;
  color: #1f2937;
}
.illust-aliases {
  font-size: 0.82rem;
  color: #667085;
  margin-top: 2px;
  line-height: 1.35;
}
.illust-ovr-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 999px;
  padding: 2px 8px;
}
.illust-count {
  font-weight: 500;
  color: #667085;
  font-size: 0.9rem;
}
.illust-dialog {
  max-width: 560px;
}
.illust-edit-preview-wrap {
  border: 1px dashed #c5ccd6;
  border-radius: 10px;
  background: #f8fafc;
  padding: 16px 12px;
  text-align: center;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.illust-edit-preview-wrap:hover,
.illust-edit-preview-wrap:focus {
  border-color: #1f5c45;
  outline: none;
}
.illust-edit-preview-wrap.is-drag {
  border-color: #1f5c45;
  background: #eef6f2;
}
.illust-drop-hint {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: #667085;
}
.illust-edit-preview-wrap.has-image .illust-drop-hint {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef6f2;
  color: #1f5c45;
  font-weight: 700;
}
.illust-edit-preview {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
}
.illust-edit-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.illust-restore-link {
  font-size: 0.9rem;
  color: #1d4ed8;
  text-decoration: underline;
}
@media (max-width: 720px) {
  .illust-stage {
    grid-template-columns: 1fr;
  }
}

.cmt-modal:not(.cmt-pick-modal) .disc-modal-footer {
  flex: 0 0 auto;
  margin: 8px -22px 0;
  padding: 14px 22px;
  position: relative;
  z-index: 1;
  background: #fff;
  justify-content: flex-start;
}

.cmt-modal:not(.cmt-pick-modal) .disc-modal-footer .btn-primary {
  margin-left: auto;
  background: #1e3a5f;
  border-color: #1e3a5f;
}

.cmt-modal:not(.cmt-pick-modal) .disc-modal-footer .btn-primary:hover {
  filter: brightness(0.92);
  background: #1e3a5f;
  border-color: #1e3a5f;
}

/* ==== Lookup lists (Location/Action/Priority/Cost & Property Description) ==== */
.looklists-shell {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.looklists-nav {
  display: grid;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--eis-shadow-sm, 0 6px 18px rgba(61, 80, 112, 0.06));
}

.looklists-group-title {
  margin: 0 0 6px;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--eis-muted, #6b7280);
}

.looklists-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 2px;
}

.looklists-sep {
  color: #8a9892;
  margin: 0 4px;
  font-weight: 600;
}

.looklists-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: #1f6f8b;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.looklists-link:hover {
  background: #eef5f7;
}

.looklists-link.is-active {
  background: #e4ebef;
  color: #163a48;
}

.looklists-panel-head {
  margin-bottom: 10px;
}

.looklists-status {
  min-height: 1.2em;
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--eis-muted, #6b7280);
}

.looklists-status.is-ok {
  color: #2a3d63;
}

.looklists-status.is-error {
  color: #a33b2b;
}

.looklists-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
}

.looklists-table th,
.looklists-table td {
  padding: 10px 8px;
  border-bottom: 1px dashed #d9dee6;
  text-align: left;
  vertical-align: middle;
}

.looklists-table th {
  font-size: 0.84rem;
  color: var(--eis-muted, #6b7280);
  font-weight: 600;
}

.looklists-max {
  font-weight: 400;
  color: #8a9892;
}

.looklists-sort {
  width: 110px;
  white-space: nowrap;
}

.looklists-drag {
  display: inline-block;
  margin-right: 6px;
  color: #8a9892;
  letter-spacing: -2px;
  cursor: grab;
  user-select: none;
  font-size: 0.95rem;
  line-height: 1;
  vertical-align: middle;
}

.looklists-row.is-draggable {
  cursor: grab;
}

.looklists-row.is-dragging {
  opacity: 0.55;
  background: #eef1f6;
}

.looklists-row.is-drag-over {
  box-shadow: inset 0 2px 0 #2a3d63;
}

.looklists-ord {
  display: inline-block;
  min-width: 1.4em;
  font-weight: 600;
}

.looklists-order {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 4px 0 16px;
}

.looklists-order[hidden] {
  display: none !important;
}

.looklists-order-btn {
  appearance: none;
  background: #fff;
  border: 1.5px solid #c5ced8;
  color: #1e3a5f;
  border-radius: 10px;
  padding: 8px 16px;
  font: inherit;
  font-weight: 650;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
}

.looklists-order-btn.is-active {
  background: #c6a04a;
  border-color: #c6a04a;
  color: #fff;
}

.looklists-order-btn.is-on {
  border-color: #1e3a5f;
  color: #1e3a5f;
}

.looklists-order-hint {
  flex-basis: 100%;
  margin: 0;
  color: #5c6b7a;
  font-size: 0.84rem;
}

.looklists-used {
  display: inline-block;
  margin-left: 10px;
  color: #5c6b7a;
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
}

.looklists-move {
  appearance: none;
  border: 0;
  background: transparent;
  color: #2a3d63;
  font-size: 0.78rem;
  line-height: 1;
  padding: 2px 3px;
  cursor: pointer;
}

.looklists-move:disabled {
  opacity: 0.35;
  cursor: default;
}

.looklists-ops {
  width: 150px;
  white-space: nowrap;
  text-align: right;
}

.looklists-action {
  appearance: none;
  border: 0;
  background: transparent;
  color: #1f6f8b;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 2px 6px;
  cursor: pointer;
}

.looklists-action.is-danger {
  color: #a33b2b;
}

.looklists-row.is-editing {
  background: #f4f7f6;
}

.looklists-input {
  width: 100%;
  max-width: 420px;
}

.looklists-image {
  width: 18rem;
  min-width: 16rem;
  vertical-align: middle;
}

.looklists-online-cell {
  width: 88px;
  white-space: nowrap;
}

.looklists-thumb {
  width: 72px;
  height: 48px;
  flex: 0 0 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #d9dee6;
  background: #f7f8fa;
  display: block;
}

.looklists-thumb.is-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef4ff;
  border-color: #c8daf8;
  box-shadow: none;
}

.looklists-house {
  width: 28px;
  height: 28px;
  display: block;
}

.looklists-image-edit {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.looklists-image-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.looklists-file-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border: 1px solid #c9d2e3;
  border-radius: 6px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--eis-forest-deep, #334462);
  cursor: pointer;
  white-space: nowrap;
}

.looklists-file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.looklists-file-name {
  font-size: 0.78rem;
  color: var(--eis-muted, #6b7280);
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.looklists-actions {
  margin-top: 4px;
}

@media (max-width: 720px) {
  .looklists-sort {
    width: 88px;
  }
  .looklists-ops {
    width: auto;
  }
}

/* ==== Scheduler ==== */
/* Page layout/styles: Content/scheduler.css (loaded by Scheduler.aspx) */

#inspDetailsModal.disc-modal {
  z-index: 320;
  padding: 12px;
  place-items: center;
}
.sched-insp-details {
  width: min(360px, calc(100vw - 24px));
  padding: 0;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid #b8c2bd;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.sched-insp-details-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #f4f4f4 0%, #e8e8e8 100%);
  border-bottom: 1px solid #cfd5d1;
}
.sched-insp-details-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #3a4556;
  font-family: inherit;
}
.sched-insp-details-body {
  padding: 14px 16px 18px;
  background: #fff;
}
.sched-insp-details-body p {
  margin: 0 0 8px;
  font-size: .95rem;
  color: #3a4556;
}
.sched-insp-details-body p:last-child { margin-bottom: 0; }
#apptModal.disc-modal {
  z-index: 300;
  width: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  padding: max(8px, env(safe-area-inset-top, 0px))
    max(8px, env(safe-area-inset-right, 0px))
    max(8px, env(safe-area-inset-bottom, 0px))
    max(8px, env(safe-area-inset-left, 0px));
  place-items: center;
  align-content: center;
  overflow: hidden !important;
  box-sizing: border-box;
}
.sched-appt-panel {
  width: min(560px, 100%);
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  padding: 0;
  overflow: hidden;
  margin: 0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-sizing: border-box;
}
.sched-appt-panel .disc-modal-error {
  margin: 8px 12px 0;
  font-size: .82rem;
}
.sched-appt-panel .fees-field { margin-bottom: 8px; }
.sched-appt-panel .fees-label {
  font-size: .75rem;
  margin-bottom: 3px;
  letter-spacing: .02em;
}
.sched-appt-panel .fees-textarea {
  min-height: 52px;
  max-height: 72px;
  font-size: .88rem;
  resize: vertical;
  padding: 6px 8px;
}
.sched-appt-panel .fees-hint {
  margin: 0;
  font-size: .75rem;
  display: inline;
}
.sched-appt-panel .fees-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  margin: 0 0 6px;
}
.sched-appt-panel .disc-modal-footer {
  margin: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  border-top: 1px solid #e5e9ef;
  background: #fff;
}
.sched-appt-panel .disc-modal-footer .btn-primary,
.sched-appt-panel .disc-modal-footer .btn-secondary {
  min-height: 40px;
}
.sched-appt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #eceff1;
  border-bottom: 1px solid #d9dee6;
  flex: 0 0 auto;
}
.sched-appt-head h2 {
  margin: 0;
  font-size: .95rem;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-weight: 700;
}
.sched-appt-x {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}
.sched-appt-body {
  padding: 10px 12px 8px;
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.sched-appt-grid {
  display: grid;
  grid-template-columns: 178px 1fr;
  gap: 12px;
  align-items: start;
  padding: 0;
}
.sched-appt-cal {
  max-width: none;
  width: 100%;
}
.sched-appt-cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
  font-size: .78rem;
  gap: 4px;
}
.sched-appt-cal-nav strong {
  font-size: .78rem;
  font-weight: 700;
}
.sched-appt-cal-nav button {
  appearance: none;
  border: 0;
  background: #eef2f1;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  line-height: 1;
  flex: 0 0 auto;
}
.sched-appt-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}
.sched-appt-cal-dow {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--eis-muted, #6b7280);
  text-align: center;
  padding: 2px 0 4px;
  line-height: 1;
}
.sched-appt-day {
  appearance: none;
  border: 0;
  background: transparent;
  min-height: 22px;
  border-radius: 3px;
  cursor: pointer;
  font-size: .72rem;
  padding: 0;
}
.sched-appt-day:hover { background: #eef1f6; }
.sched-appt-day.is-active { outline: 2px solid #c0392b; background: #fff5f4; }
.sched-time-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.sched-time-row .fees-input {
  width: auto;
  min-width: 52px;
  padding: 5px 6px;
  font-size: .88rem;
}
.sched-ampm {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 2px;
  font-size: .8rem;
}
.sched-appt-fields input[type="range"] {
  width: 100%;
  margin: 2px 0 8px;
  height: 22px;
}
.sched-appt-repeat {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 8px;
  align-items: end;
  padding: 8px 0 4px;
}
.sched-appt-repeat .fees-field { margin-bottom: 0; }
.sched-appt-repeat .fees-input { padding: 5px 6px; font-size: .88rem; }
.sched-appt-recur-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sched-appt-recur-row .fees-input {
  width: 72px;
  min-width: 72px;
}
.book-radio-list { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.book-radio-list label { margin-right: 8px; }

/* ==== Book Inspection ==== */
.book {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 2px 0 36px;
  animation: rise-in 0.45s ease both;
}

.book-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(232, 242, 238, 0.88)),
    radial-gradient(80% 120% at 100% 0%, rgba(90, 109, 140, 0.12), transparent 60%);
  border: 1px solid rgba(185, 207, 197, 0.85);
  box-shadow: 0 10px 28px rgba(61, 80, 112, 0.05);
}

.book-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eis-sage, #2a3d63);
}

.book-hero h1 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: clamp(1.85rem, 2.6vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--eis-forest);
  line-height: 1.1;
}

.book-hero-copy p:last-child {
  margin: 8px 0 0;
  color: var(--eis-muted, #6b7280);
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 34rem;
}

.book-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
}

.book-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--eis-line, #d9dee6);
  color: var(--eis-muted, #6b7280);
  font-size: 0.82rem;
  font-weight: 700;
}

.book-steps li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e6eaf0;
  color: var(--eis-forest, #3d5070);
  font-size: 0.72rem;
  font-weight: 800;
}

.book-steps li.is-current {
  background: #fff;
  border-color: #c9d2e3;
  color: var(--eis-forest-deep, #334462);
  box-shadow: 0 6px 16px rgba(61, 80, 112, 0.06);
}

.book-steps li.is-current span {
  background: var(--eis-forest, #3d5070);
  color: #fff;
}

.book-slot-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff8e8;
  border: 1px solid #ebd7a8;
  color: #6a5320;
  font-size: 0.9rem;
}

.book-slot-hint strong {
  color: #4d3c14;
}

.book-slot-note {
  width: 100%;
  font-size: 0.8rem;
  color: #8a7038;
}

.book-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.book-panel {
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 16px;
  padding: 20px 22px 22px;
  box-shadow: 0 8px 24px rgba(61, 80, 112, 0.045);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.book-panel:hover {
  box-shadow: 0 12px 28px rgba(61, 80, 112, 0.07);
}

.book-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e6eaf0;
}

.book-step-num {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--eis-sage, #2a3d63);
}

.book-panel-head h2 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--eis-forest-deep, #334462);
}

.book-panel-head p {
  margin: 5px 0 0;
  font-size: 0.88rem;
  color: var(--eis-muted, #6b7280);
  line-height: 1.4;
}
.book-subhead {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--eis-navy, #0f2c5c);
}
.book-section-lead {
  margin: 18px 0 14px;
  font-size: 0.88rem;
  color: var(--eis-muted, #6b7280);
  line-height: 1.4;
}

.book-grid {
  display: grid;
  gap: 14px 16px;
}

.book-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.book-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.book-grid-loc {
  grid-template-columns: 0.7fr 1.3fr 0.8fr 1.1fr 1.1fr;
}

.book-span-2 { grid-column: span 2; }

.book-field {
  margin-bottom: 12px;
  min-width: 0;
}

.book-grid .book-field {
  margin-bottom: 0;
}

.book-field-full {
  margin-bottom: 16px;
}

.book-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a7a74;
  margin-bottom: 7px;
}

.book-input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #cfdad4;
  border-radius: 11px;
  background: #fcfdfc;
  color: var(--eis-ink, #3a4556);
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.book-input-lg {
  min-height: 48px;
  font-size: 1rem;
}

.book-input:hover {
  background: #fff;
  border-color: #b7c8bf;
}

.book-lang-hint {
  margin: 6px 0 0;
  font-size: .78rem;
  line-height: 1.35;
  color: #7a8494;
}
.book-lang-status {
  margin: 4px 0 0;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.35;
}
.book-lang-field.is-required .book-lang-select {
  background: #FFFAF0;
  border-color: #D99A1F;
  color: #704800;
}
.book-lang-field.is-required .book-lang-hint,
.book-lang-field.is-required .book-lang-status {
  color: #704800;
}
.book-lang-field.is-selected .book-lang-status {
  color: #1f7a3a;
}
.book-lang-field.is-selected .book-lang-status::before {
  content: "\2713";
  display: inline-block;
  margin-right: 5px;
  font-weight: 800;
}
.book-steps .book-step-lang-hint {
  display: block;
  margin-top: 2px;
  font-size: .68rem;
  font-weight: 700;
  color: #704800;
}
.book-steps li.is-client-incomplete {
  color: #704800;
}
.book-input:focus {
  outline: none;
  background: #fff;
  border-color: #6f9a86;
  box-shadow: 0 0 0 3px rgba(90, 109, 140, 0.14);
}

.book-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 13px 15px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7f8fa, #eef1f6);
  border: 1px solid #d9dee6;
  font-size: 0.9rem;
  color: var(--eis-ink, #3a4556);
  cursor: pointer;
}

.book-check input {
  margin-top: 2px;
  accent-color: var(--eis-forest, #3d5070);
}

.book-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

/* ASP.NET RadioButtonList (Flow): <input><label>…</label> */
.book-choices input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

.book-choices label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 !important;
  padding: 9px 14px;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid #d0ddd6;
  background: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--eis-forest, #3d5070);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.15s ease, box-shadow 0.15s ease;
}

.book-choices label:hover {
  background: var(--eis-mint, #eef1f6);
  border-color: #c9d2e3;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(61, 80, 112, 0.06);
}

.book-choices input[type="radio"]:focus-visible + label {
  outline: 2px solid #6f9a86;
  outline-offset: 2px;
}

.book-choices input[type="radio"]:checked + label,
.book-choices label:has(input[type="radio"]:checked) {
  background: var(--eis-forest, #3d5070);
  border-color: var(--eis-forest-deep, #334462);
  color: #fff;
  box-shadow: 0 6px 14px rgba(61, 80, 112, 0.22);
  transform: none;
}

.book-choices input[type="radio"]:checked + label:hover,
.book-choices label:has(input[type="radio"]:checked):hover {
  background: var(--eis-sage, #2a3d63);
  border-color: var(--eis-forest, #3d5070);
  color: #fff;
}

.book-grid-schedule {
  grid-template-columns: minmax(0, 1.2fr) minmax(160px, 0.85fr) minmax(240px, 1.15fr);
  align-items: start;
}

.book-label-dt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.book-label-dt svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.book-time-dual {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(92px, 0.7fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #cfdad4;
  border-radius: 11px;
  background: #fcfdfc;
  min-height: 48px;
}

.book-time-dual:hover {
  background: #fff;
  border-color: #b7c8bf;
}

.book-time-dual:focus-within {
  background: #fff;
  border-color: #6f9a86;
  box-shadow: 0 0 0 3px rgba(90, 109, 140, 0.14);
}

.book-time-dual select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.book-time-dual select:hover,
.book-time-dual select:focus {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.book-time-dual select + select {
  border-left: 1px solid #cfdad4;
}

.book-dt-hint {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--eis-muted, #6b7280);
}

.book-client-search-box {
  position: relative;
}

.book-suggest {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  border: 1px solid #cfdad4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(36, 52, 46, 0.12);
}

.book-suggest-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--eis-ink, #3a4556);
  font-family: inherit;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
}

.book-suggest-item strong {
  font-weight: 700;
}

.book-suggest-item span {
  font-size: 0.8rem;
  color: var(--eis-muted, #6b7280);
}

.book-suggest-item:hover,
.book-suggest-item.is-active {
  background: #f3f7f5;
}

.book-steps li.is-complete {
  cursor: pointer;
}

.book-steps li.is-complete span {
  background: #c9d6cc;
  color: var(--eis-forest-deep, #334462);
}

.pac-container {
  z-index: 12000 !important;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  border-radius: 10px;
  border: 1px solid var(--eis-line, #d9dee6);
  box-shadow: 0 12px 28px rgba(61, 80, 112, 0.16);
  margin-top: 4px;
}

@media (max-width: 720px) {
  .book-grid-schedule {
    grid-template-columns: 1fr;
  }
}

.book-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
  width: 100%;
  padding: 16px 0 0;
  border-top: 1px solid var(--eis-line, #d9dee6);
  background: transparent;
}

.book-footer-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--eis-muted, #6b7280);
}

.book-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.book-next {
  min-width: 120px;
  font-weight: 800;
}

@media (max-width: 860px) {
  .book-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-grid-loc {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .book-grid-2,
  .book-grid-3,
  .book-grid-loc {
    grid-template-columns: 1fr;
  }

  .book-span-2 {
    grid-column: auto;
  }

  .book-footer-actions {
    width: 100%;
  }

  .book-footer-actions .btn-primary,
  .book-footer-actions .btn-secondary {
    flex: 1;
    justify-content: center;
    text-align: center;
  }
}

/* ==== Work Order (workflow from Horizon, visuals from Speed Write tokens) ==== */
.wo { max-width: 1180px; margin: 0 auto; padding: 0 4px 36px; }
.wo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 6px 2px 10px;
  margin-bottom: 10px;
}
.wo-tool-btn,
.wo-tool-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: var(--eis-navy-mid, #2a3d63);
  text-decoration: none;
  padding: 6px 10px;
  min-height: 36px;
  border-radius: 6px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.wo-status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 18px;
  margin: 0 0 14px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--eis-line, #e2e6ed);
  border-radius: 10px;
  box-shadow: var(--eis-shadow-sm);
  font-size: 0.9rem;
  color: var(--eis-muted, #7a8494);
  line-height: 1.35;
}

.wo-status strong {
  color: var(--eis-navy-deep, #243044);
  font-weight: 700;
}
.wo-tool-btn.is-active,
.wo-tool-link.is-active {
  background: #fff;
  border: 1px solid var(--eis-line, #e2e6ed);
  box-shadow: var(--eis-shadow-sm);
}
.wo-tool-btn[hidden] { display: none !important; }
.wo-tool-link.is-disabled {
  color: #9aa3b2;
  pointer-events: none;
}

.wo-context {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--eis-line, #e2e6ed);
  border-radius: 12px;
  box-shadow: var(--eis-shadow-sm);
}
.wo-context-main { min-width: min(280px, 100%); flex: 1 1 320px; }
.wo-context-kicker {
  margin: 0 0 6px;
  font-size: .78rem;
  font-weight: 650;
  color: var(--eis-muted, #7a8494);
}
.wo-context-kicker strong { color: var(--eis-navy-deep, #243044); }
.wo-context-job { margin-left: 10px; }
.wo-context-address {
  margin: 0 0 6px;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--eis-navy, #1e3a5f);
  line-height: 1.25;
}
.wo-context-meta {
  margin: 0;
  font-size: .88rem;
  color: var(--eis-muted, #7a8494);
}
.wo-context-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.wo-context-side-chips {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.wo-more-insp-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: auto;
  max-width: none;
}
.wo-more-insp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid #c5d0c9;
  border-radius: 8px;
  background: #fff;
  color: var(--eis-navy, #1e3a5f);
  font: inherit;
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(30, 58, 95, .06);
  white-space: nowrap;
}
.wo-more-insp-btn:hover {
  border-color: #6f9a86;
  background: #f4faf7;
  color: #1a4d3a;
}
.wo-more-insp-btn[hidden] {
  display: none !important;
}
.wo-more-insp-actions[hidden] {
  display: none !important;
}
.wo-context-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 0 auto;
  min-width: 112px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--eis-mist, #f8f9fb);
  border: 1px solid var(--eis-line, #e2e6ed);
}
.wo-context-chip-label {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--eis-muted, #7a8494);
  white-space: nowrap;
}
.wo-context-chip strong {
  font-size: .92rem;
  color: var(--eis-navy-deep, #243044);
  font-weight: 700;
  white-space: nowrap;
}
.wo-context-chip-note {
  font-size: .72rem;
  line-height: 1.3;
  color: var(--eis-muted, #7a8494);
  max-width: 180px;
}

.wo-cancelled-banner {
  margin: -8px 0 16px;
  padding: 8px 10px;
  background: #ececec;
  color: #3a3a3a;
  font-size: .92rem;
  line-height: 1.45;
}
.wo-cancelled-banner[hidden] { display: none !important; }
.wo-cancelled-banner a {
  color: #1a4f9c;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.wo.is-cancelled .wo-main { pointer-events: none; opacity: .72; }
.wo.is-cancelled .wo-toolbar { display: none; }

.wo-body {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.wo-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--eis-line, #e2e6ed);
  border-radius: 12px;
  box-shadow: var(--eis-shadow-sm);
  position: sticky;
  top: 12px;
}
.wo-nav-progress { margin: 0 0 10px; }
.wo-nav-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.wo-nav-progress-title {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--eis-muted, #7a8494);
}
.wo-nav-progress-count {
  font-size: .78rem;
  font-weight: 700;
  color: var(--eis-navy-deep, #243044);
}
.wo-nav-progress-track {
  height: 6px;
  border-radius: 999px;
  background: #e8edf4;
  overflow: hidden;
}
.wo-nav-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f9e44, var(--eis-success, #1f7a3f));
  transition: width .2s ease;
}
.wo-nav-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  text-decoration: none !important;
  color: inherit !important;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 10px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.wo-nav-item:hover { background: var(--eis-mist, #f8f9fb); }
.wo-nav-item.is-active {
  background: #eef3fb;
  border-color: #d5e0f0;
}
.wo-nav-item.is-attention:not(.is-active) {
  background: var(--eis-warn-soft, #fff6d6);
  border-color: var(--eis-warn-line, #e6d27a);
}
.wo-nav-status {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid #c5cedb;
  background: #fff;
  box-sizing: border-box;
  position: relative;
}
.wo-nav-item.is-active .wo-nav-status {
  border-color: var(--eis-navy-mid, #2a3d63);
  background: var(--eis-navy-mid, #2a3d63);
  box-shadow: 0 0 0 4px rgba(42, 61, 99, .12);
}
.wo-nav-item.is-complete .wo-nav-status {
  border-color: var(--eis-success, #1f7a3f);
  background: var(--eis-success, #1f7a3f);
}
.wo-nav-item.is-complete .wo-nav-status::before {
  content: "";
  position: absolute;
  top: 45%;
  left: 50%;
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translate(-50%, -60%) rotate(45deg);
}
.wo-nav-item.is-attention .wo-nav-status {
  border-color: #d4a017;
  background: #f5c518;
}
.wo-nav-item.is-attention .wo-nav-status::before {
  content: "!";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 900;
  color: #5a4700;
  line-height: 18px;
  text-align: center;
}
.wo-nav-item.is-active.is-attention .wo-nav-status::before { content: none; }
.wo-nav-copy { min-width: 0; flex: 1; }
.wo-nav-copy strong {
  display: block;
  font-size: .88rem;
  color: var(--eis-navy-deep, #243044);
  margin-bottom: 2px;
  font-weight: 750;
}
.wo-nav-item.is-active .wo-nav-copy strong { color: var(--eis-navy, #1e3a5f); }
.wo-nav-sum {
  display: block;
  font-size: .75rem;
  line-height: 1.35;
  color: var(--eis-muted, #7a8494);
}
.wo-nav-hint {
  margin: 10px 2px 0;
  font-size: .72rem;
  line-height: 1.4;
  color: var(--eis-muted, #7a8494);
}
.wo-warn {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 6px;
  background: var(--eis-warn-soft, #fff6d6);
  color: var(--eis-warn, #8a6d1b);
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid var(--eis-warn-line, #e6d27a);
}
.wo-alert { color: var(--eis-danger, #b45a4e); font-weight: 800; }

.wo-main {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--eis-line, #e2e6ed);
  border-radius: 12px;
  padding: 20px 22px 22px;
  box-shadow: var(--eis-shadow-sm);
}
.wo-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
}
.wo-panel-head-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}
.wo-callback-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px 6px 8px;
  border: 1px solid #c5ccd6;
  border-radius: 8px;
  background: #e8ebf0;
  color: #6b7280;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}
.wo-callback-btn .wo-callback-doc {
  width: 16px;
  height: 18px;
  border-radius: 2px;
  background:
    linear-gradient(currentColor, currentColor) 4px 5px / 8px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) 4px 9px / 8px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) 4px 13px / 5px 1.5px no-repeat,
    #fff;
  border: 1.5px solid currentColor;
  box-sizing: border-box;
  flex: 0 0 auto;
  opacity: .9;
}
.wo-callback-btn.is-empty {
  background: #e8ebf0;
  border-color: #c5ccd6;
  color: #6b7280;
}
.wo-callback-btn.is-filled {
  background: #f08a24;
  border-color: #d97716;
  color: #fff;
}
.wo-callback-btn.is-filled .wo-callback-doc {
  background:
    linear-gradient(#fff, #fff) 4px 5px / 8px 1.5px no-repeat,
    linear-gradient(#fff, #fff) 4px 9px / 8px 1.5px no-repeat,
    linear-gradient(#fff, #fff) 4px 13px / 5px 1.5px no-repeat,
    rgba(255, 255, 255, .18);
  border-color: #fff;
}
.wo-callback-btn:hover {
  filter: brightness(.97);
}
.wo-callback-btn:disabled {
  opacity: .45;
  cursor: default;
}
.wo-panel-title {
  margin: 0 0 4px;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.45rem;
  color: var(--eis-navy, #1e3a5f);
  letter-spacing: -.02em;
}
.wo-panel-lead {
  margin: 0;
  max-width: 42rem;
  font-size: .9rem;
  color: var(--eis-muted, #7a8494);
  line-height: 1.45;
}
.wo-section-label {
  display: block;
  margin: 0 0 8px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--eis-muted, #7a8494);
}
.wo-optional {
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  color: #9aa3b2;
  font-size: .75rem;
}
.wo-prefs-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 0 18px;
  padding: 16px 16px 14px;
  border: 1px solid var(--eis-line, #e2e6ed);
  border-radius: 12px;
  background: var(--eis-mist, #f8f9fb);
}
.wo-prefs-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}
.wo-attendees {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.wo-attendees-note { margin: 8px 0 0; font-size: .78rem; }
.wo-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.wo-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  opacity: 0;
}
.wo-toggle-ui {
  flex: 0 0 44px;
  width: 44px;
  height: 26px;
  margin-top: 2px;
  border-radius: 999px;
  background: #cfd6df;
  position: relative;
  transition: background .15s ease;
}
.wo-toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  transition: transform .15s ease;
}
.wo-toggle input:checked + .wo-toggle-ui { background: var(--eis-navy-mid, #2a3d63); }
.wo-toggle input:checked + .wo-toggle-ui::after { transform: translateX(18px); }
.wo-toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wo-toggle-copy strong {
  font-size: .9rem;
  color: var(--eis-navy-deep, #243044);
}
.wo-toggle-copy span {
  font-size: .78rem;
  color: var(--eis-muted, #7a8494);
  line-height: 1.35;
}
.wo-contract-status { min-width: 0; }
.wo-segment {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}
.wo-segment-opt {
  position: relative;
  margin: 0;
  cursor: pointer;
}
.wo-segment-opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.wo-segment-opt span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #d5dbe3;
  background: #fff;
  box-shadow: none;
  font-size: .84rem;
  font-weight: 700;
  color: #6b7280;
  white-space: nowrap;
}
.wo-status-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: block;
}
.wo-status-bubble {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.wo-status-glyph {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wo-segment-opt input:focus-visible + span {
  outline: 3px solid #406d99;
  outline-offset: 2px;
}
.wo-segment-opt input[value="pending"]:checked + span {
  background: #FFF4D8;
  border-color: #D99A1F;
  color: #704800;
}
.wo-segment-opt input[value="accepted"]:checked + span {
  background: #E9F7EF;
  border-color: #2D955C;
  color: #155C35;
  box-shadow: 0 0 0 3px #d8f3e4;
}
.wo-segment-opt input[value="accepted"]:checked + span .wo-status-bubble {
  fill: #2D955C;
  stroke: none;
}
.wo-segment-opt input[value="accepted"]:checked + span .wo-status-glyph {
  stroke: #fff;
}
.wo-segment-opt input[value="rejected"]:checked + span {
  background: #FDECEA;
  border-color: #D64C44;
  color: #8C251F;
}
.wo-segment-opt input[value="rejected"]:checked + span .wo-status-bubble {
  fill: #D64C44;
  stroke: none;
}
.wo-segment-opt input[value="rejected"]:checked + span .wo-status-glyph {
  stroke: #fff;
}
.wo-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.wo-agent-grid {
  gap: 16px;
}
.wo-agent-grid + .wo-agent-grid {
  margin-top: 16px;
}
.wo-agent-col {
  min-width: 0;
  padding: 14px 16px 16px;
  border: 1px solid #c5d0dc;
  border-radius: 12px;
  background: #f7f9fb;
}
.wo-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
}
.wo-span-2 { grid-column: span 2; }
.wo-field { min-width: 0; }
.wo-time12 {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wo-time12-hour,
.wo-time12-minute { width: 72px; }
.wo-time12-period { width: 88px; }
.wo-time12-colon {
  font-weight: 800;
  color: #103354;
}
.wo-label {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--eis-navy-deep, #243044);
  margin: 0 0 6px;
}
.wo-input,
.wo-select,
.wo textarea.wo-input {
  width: 100%;
  min-height: var(--eis-control-h, 40px);
  padding: 0 12px;
  border: 1px solid var(--eis-field-border, #cfd6df);
  border-radius: var(--eis-field-radius, 8px);
  background: #fff;
  font: inherit;
  font-size: .92rem;
  color: var(--eis-navy-deep, #243044);
  box-sizing: border-box;
}
.wo textarea.wo-input { padding: 10px 12px; min-height: 96px; resize: vertical; }
.wo-input:focus,
.wo-select:focus,
.wo textarea.wo-input:focus {
  outline: none;
  border-color: var(--eis-navy-mid, #2a3d63);
  box-shadow: 0 0 0 3px rgba(42, 61, 99, .14);
}
.wo-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .88rem;
  font-weight: 650;
  color: var(--eis-navy-deep, #243044);
  cursor: pointer;
}
.wo-check input { accent-color: var(--eis-navy-mid, #2a3d63); }
.wo-client-block {
  margin-top: 0;
  padding: 16px 16px 18px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--eis-line, #e2e6ed);
}
.wo-client-block + .wo-client-block { margin-top: 14px; }
.wo-client-block-title {
  margin: 0;
  padding-bottom: 0;
  border-bottom: 0;
  font-size: 1rem;
  font-weight: 750;
  color: var(--eis-navy-deep, #243044);
}
.wo-client-block-head,
.wo-agent-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--eis-line, #e2e6ed);
}
.wo-agent-col-head { border-bottom-color: #d5dde6; }
.wo-agent-col-head h3 { margin: 0; }
.wo-client2-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.wo-client2-bar .wo-same-addr { display: inline-flex; margin-top: 6px; }
.wo-client2-toggle {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--eis-line, #e2e6ed);
  background: var(--eis-mist, #f8f9fb);
  color: var(--eis-navy-mid, #2a3d63);
  font: inherit;
  font-size: .8rem;
  font-weight: 750;
  cursor: pointer;
}
.wo-client2-panel { margin-top: 14px; }
.wo-client2-panel[hidden] { display: none !important; }
.wo-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.wo-textarea {
  display: block;
  width: 100%;
  min-height: 180px;
  padding: 10px 12px;
  border: 1px solid var(--eis-field-border, #cfd6df);
  border-radius: var(--eis-field-radius, 8px);
  background: #fff;
  font: inherit;
  font-size: .94rem;
  color: var(--eis-navy-deep, #243044);
  resize: vertical;
  box-sizing: border-box;
}
.wo-custom-fields {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--eis-line, #e2e6ed);
  display: grid;
  gap: 14px;
}
.wo-custom-fields[hidden] {
  display: none !important;
}
.wo-custom-field .wo-textarea {
  min-height: 20px;
}
.wo-custom-hint {
  margin: -2px 0 6px;
  font-size: .82rem;
  color: var(--eis-muted, #7a8494);
  line-height: 1.35;
}
.wo-custom-req {
  color: #c0392b;
}
.wo-notes-quick-wrap {
  margin-top: 12px;
  padding-top: 4px;
  display: none;
}
.wo-notes-quick-wrap.is-open {
  display: block;
}
.wo-notes-quick {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  max-width: 32rem;
}
.wo-notes-quick:empty {
  display: none;
}
.wo-notes-quick-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 2px;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  color: #3a4556;
  cursor: pointer;
  border-radius: 4px;
}
.wo-notes-quick-item:hover,
.wo-notes-quick-item:focus-visible {
  background: #eef1f6;
  color: var(--eis-forest-deep, #334462);
  outline: none;
}
.wo-textarea:focus {
  outline: none;
  border-color: var(--eis-navy-mid, #2a3d63);
  box-shadow: 0 0 0 3px rgba(42, 61, 99, .14);
}
.wo-contract-view {
  display: block;
  width: 100%;
  min-height: 180px;
  max-height: 480px;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid var(--eis-field-border, #cfd6df);
  border-radius: var(--eis-field-radius, 8px);
  background: #f8fafc;
  font-size: .94rem;
  color: var(--eis-navy-deep, #243044);
  box-sizing: border-box;
  line-height: 1.45;
}
.wo-contract-view p { margin: 0 0 .7em; }
.wo-contract-view p:last-child { margin-bottom: 0; }
#woContract[hidden] { display: none !important; }
.wo-textarea.is-readonly,
.wo-textarea[readonly] {
  background: #eef1f5;
  color: #4a5564;
  cursor: default;
  border-color: #cfd6df;
  resize: vertical;
}
.wo-review-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 12px 5px 8px;
  border: 1px solid var(--eis-success-line, #9fceb0);
  border-radius: 999px;
  background: var(--eis-success-soft, #e8f6ec);
  color: var(--eis-success, #1f7a3f);
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  vertical-align: middle;
}
.wo-review-flag-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2f9e44;
  color: #fff;
  flex: 0 0 auto;
}
.wo-review-flag-icon::before {
  content: '';
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  box-sizing: border-box;
}
.wo-review-flag.is-off {
  border-color: #E08A1E;
  background: #FFF4E5;
  color: #C05600;
}
.wo-review-flag.is-off .wo-review-flag-icon {
  background: #E08A1E;
}
.wo-review-flag.is-off .wo-review-flag-icon::before {
  width: 8px;
  height: 8px;
  border: 0;
  background:
    linear-gradient(#fff, #fff) center / 8px 2px no-repeat,
    linear-gradient(#fff, #fff) center / 2px 8px no-repeat;
  transform: rotate(45deg);
}
.wo-review-flag:hover {
  filter: brightness(.97);
}
.wo-review-flag:disabled {
  opacity: .45;
  cursor: default;
}
.wo-nav-sum .wo-review-flag {
  margin-top: 4px;
  font-size: .7rem;
  padding: 3px 9px 3px 6px;
}
.wo-nav-sum .wo-review-flag-icon {
  width: 14px;
  height: 14px;
}
.wo-same-addr {
  margin: 0 0 12px;
  font-weight: 600;
}
.wo-client2-panel.is-readonly .wo-c2-field,
.wo-input.wo-c2-field.is-readonly,
.wo-input.wo-c2-field[readonly] {
  background: #e8ecea;
  color: #4a5852;
  cursor: default;
  border-color: #c5d0cb;
}
.wo-client-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px 12px;
}
.wo-gc-name { grid-column: span 4; }
.wo-gc-co { grid-column: span 3; }
.wo-gc-email { grid-column: span 5; }
.wo-gc-addr { grid-column: span 5; }
.wo-gc-suite { grid-column: span 2; }
.wo-gc-city { grid-column: span 3; }
.wo-gc-zip { grid-column: span 2; }
.wo-gc-country,
.wo-gc-state,
.wo-gc-phone { grid-column: span 3; }
.wo-gc-lang { grid-column: span 4; }
.wo-lang-hint {
  margin: 6px 0 0;
  font-size: .78rem;
  line-height: 1.35;
  color: var(--eis-muted, #7a8494);
}
.wo-lang-status {
  margin: 4px 0 0;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.35;
}
.wo-lang-field.is-required .wo-lang-select {
  background: #FFFAF0;
  border-color: #D99A1F;
  color: #704800;
}
.wo-lang-field.is-required .wo-lang-hint,
.wo-lang-field.is-required .wo-lang-status {
  color: #704800;
}
.wo-lang-field.is-selected .wo-lang-status {
  color: #1f7a3a;
}
.wo-lang-field.is-selected .wo-lang-status::before {
  content: "\2713";
  display: inline-block;
  margin-right: 5px;
  font-weight: 800;
}
.wo-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 1100px) {
  .wo-client-grid { grid-template-columns: 1fr !important; }
  .wo-client-grid > .wo-field {
    grid-column: 1 / -1 !important;
    min-width: 0;
    width: 100%;
  }
  .wo-gc-phone .wo-input {
    display: block;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
  }
  .wo-label { white-space: normal; overflow-wrap: anywhere; }
  .wo-segment { flex-wrap: wrap; }
  .wo-segment-opt span { white-space: normal; }
}
@media (max-width: 800px) {
  .wo-main { padding: 14px 12px 16px; }
  .wo-client-block,
  .wo-prefs-card { padding: 12px; }
  .wo-client-grid { grid-template-columns: 1fr !important; }
  .wo-client-grid > .wo-field {
    grid-column: 1 / -1 !important;
    min-width: 0;
  }
  .wo-label { white-space: normal; overflow-wrap: anywhere; }
  .wo-client2-bar { flex-wrap: wrap; }
  .wo-segment {
    flex-direction: column;
    align-items: stretch;
  }
  .wo-segment-opt span {
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
  }
  .wo-dnc { white-space: normal; }
}
.wo-prop-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.wo-prop-simple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 52rem;
}
.wo-schedule-conflict {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #f0c2b6;
  background: #fff5f2;
  color: #7a2e22;
  font-size: .9rem;
  line-height: 1.4;
}
.wo-schedule-conflict.is-error {
  border-color: #f0c2b6;
  background: #fff5f2;
  color: #7a2e22;
}
.wo-schedule-conflict-title {
  margin: 0 0 4px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: .78rem;
}
.wo-schedule-conflict p {
  margin: 0 0 6px;
}
.wo-schedule-conflict ul {
  margin: 0;
  padding-left: 1.1rem;
}
.wo-schedule-conflict li {
  margin: 2px 0;
}
.wo-prop-meta {
  padding: 12px;
  background: #eef1f6;
  border-radius: 8px;
}
.wo-fee-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
}
.wo-fee-list {
  min-height: 220px;
  border: 1px solid #d9dee6;
  border-radius: 8px;
  padding: 8px;
  background: #f8f9fb;
  color: var(--eis-muted, #6b7280);
}
.fee-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 10px;
  border-bottom: 1px solid var(--eis-line, #d9dee6);
  margin-bottom: 6px;
}
.fee-toolbar span {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--eis-muted, #6b7280);
}
.fee-clear-btn {
  border: 0;
  background: transparent;
  color: var(--eis-forest, #3d5070);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.fee-clear-btn:hover {
  background: var(--eis-mist, #eef1f6);
}
.wo-fee-empty {
  margin: 12px 8px;
  font-size: .9rem;
}
.wo-fee-svc {
  border: 1px solid transparent;
  border-radius: 8px;
  margin-bottom: 4px;
  overflow: hidden;
}
.wo-fee-svc.is-on {
  border-color: #c5d6ce;
  background: #fff;
}
.wo-fee-svc-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}
.wo-fee-duration {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .68rem;
  font-weight: 500;
  color: #9aa3af;
}
.wo-fee-duration-unit {
  margin-right: 2px;
  font-weight: 500;
}
.wo-fee-duration-input {
  width: 54px;
  height: 26px;
  box-sizing: border-box;
  border: 1px solid #e1e6ec;
  border-radius: 6px;
  padding: 0 2px 0 7px;
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  color: #2c3848;
  background: #fff;
  cursor: pointer;
}
.wo-fee-duration-input:hover {
  border-color: #d7dee6;
  background: #fff;
}
.wo-fee-duration-input:focus {
  outline: none;
  border-color: #c9d3de;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(90, 109, 140, 0.08);
}
.wo-fee-duration-input:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.wo-fee-svc-main {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  user-select: none;
  min-width: 0;
}
.wo-fee-svc-main:hover .wo-fee-svc-name {
  color: var(--eis-forest, #3d5070);
}
.wo-fee-svc-name {
  font-weight: 800;
  font-size: .95rem;
  color: var(--eis-forest-deep, #334462);
}
.wo-fee-svc-meta {
  display: block;
  margin-top: 2px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--eis-muted, #6b7280);
}
.wo-fee-price {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 92px;
  justify-content: flex-end;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--eis-ink, #3a4556);
  font-size: .92rem;
}
.wo-fee-price.is-disabled {
  opacity: .55;
}
.wo-fee-price-prefix {
  color: var(--eis-muted, #6b7280);
  font-weight: 700;
}
.wo-fee-price-input {
  width: 76px;
  border: 1px solid #c9d6d0;
  border-radius: 6px;
  background: #fff;
  padding: 4px 6px;
  text-align: right;
  font: inherit;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: inherit;
}
.wo-fee-price-input:focus {
  outline: 2px solid rgba(61, 80, 112, .25);
  border-color: var(--eis-forest, #3d5070);
}
.wo-fee-price-input:disabled {
  background: #f3f6f5;
  color: var(--eis-muted, #6b7280);
  cursor: not-allowed;
}
.wo-fee-lines {
  display: none;
  padding: 0 8px 10px 34px;
  border-top: 1px dashed #dbe5e0;
}
.wo-fee-svc.is-on .wo-fee-lines {
  display: block;
}
.wo-fee-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 6px;
  border-bottom: 1px solid #eef1f6;
}
.wo-fee-line:last-child {
  border-bottom: 0;
}
.wo-fee-line.is-off {
  opacity: .55;
}
.wo-fee-line-main {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  min-width: 0;
}
.wo-fee-line-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--eis-ink, #3a4556);
}
.wo-fee-line-desc {
  display: block;
  font-size: .72rem;
  font-weight: 500;
  color: var(--eis-muted, #6b7280);
  margin-top: 1px;
}
.wo-fee-line .wo-fee-price {
  font-size: .86rem;
}
.wo-fee-line .wo-fee-price-input {
  width: 72px;
  font-weight: 700;
}
.wo-fee-list input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--eis-forest, #3d5070);
  cursor: pointer;
}
.wo-invoice {
  border: 1px solid #d9dee6;
  border-radius: 8px;
  padding: 14px;
  background: #f7f8fa;
  align-self: start;
}
.wo-invoice h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--eis-forest-deep, #334462);
}
.wo-inv-lines {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.wo-inv-lines li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  font-size: .84rem;
  padding: 7px 0;
  border-bottom: 1px solid #e6eaf0;
}
.wo-inv-line-main {
  min-width: 0;
}
.wo-inv-label {
  display: block;
  color: var(--eis-ink, #3a4556);
  font-weight: 600;
}
.wo-inv-line.is-discount .wo-inv-label {
  padding-left: 12px;
  font-weight: 500;
  color: var(--eis-muted, #6b7280);
}
.wo-inv-amt {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wo-inv-amt.is-neg {
  color: #8a3b2b;
}
.wo-inv-acts {
  display: block;
  margin-top: 2px;
  font-size: .75rem;
  font-weight: 600;
}
.wo-inv-act {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: var(--eis-forest, #3d5070);
  font: inherit;
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.wo-inv-act:hover {
  color: var(--eis-forest-deep, #334462);
}
.wo-inv-sep {
  color: #9aaba4;
  text-decoration: none;
}
.wo-inv-extras {
  margin: -4px 0 10px;
}
.wo-inv-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--eis-forest, #3d5070);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.wo-inv-link[hidden],
.wo-inv-link.is-hidden {
  display: none !important;
}
.wo-inv-lines .is-empty {
  color: var(--eis-muted, #6b7280);
  border: 0;
  display: block;
  padding: 4px 0 8px;
}
.wo-modal[hidden] {
  display: none !important;
}
.wo-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}
.wo-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(61, 80, 112, .35);
  pointer-events: auto;
  cursor: pointer;
}
.wo-modal-card {
  position: relative;
  z-index: 2;
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid #d9dee6;
  border-radius: 10px;
  padding: 16px 16px 12px;
  box-shadow: 0 12px 40px rgba(61, 80, 112, .18);
  pointer-events: auto;
}
.wo-modal-card h3 {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e6eaf0;
  font-size: 1.05rem;
  color: var(--eis-forest-deep, #334462);
}
.wo-discount-select {
  width: 100%;
  min-height: 220px;
  border: 1px solid #c9d6d0;
  border-radius: 6px;
  padding: 4px;
  font: inherit;
  font-size: .86rem;
}
.wo-travel-rate {
  margin: 0 0 4px;
  font-size: .92rem;
  font-weight: 700;
  color: var(--eis-ink, #3a4556);
}
.wo-travel-hint {
  margin: 0 0 12px;
  font-size: .78rem;
  color: var(--eis-muted, #6b7280);
}
.wo-travel-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.wo-travel-input {
  width: 100px;
  background: #fff8dc;
}
.wo-discount-amount-prefix {
  font-weight: 700;
  color: var(--eis-ink, #3a4556);
}
.wo-modal-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #eef1f6;
  background: #f7f8fa;
  margin: 0 -16px -12px;
  padding: 10px 16px 12px;
  border-radius: 0 0 10px 10px;
}
.wo-more-insp-modal[hidden] {
  display: none !important;
}
.wo-more-insp-modal {
  position: fixed;
  inset: 0;
  z-index: 120000 !important;
  display: grid;
  place-items: center;
  padding: 18px;
}
.wo-more-insp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(61, 80, 112, .52);
}
.wo-more-insp-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #d9dee6;
  border-radius: 12px;
  box-shadow: 0 28px 64px rgba(61, 80, 112, .28);
  overflow: hidden;
}
.wo-more-insp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 12px;
  background: linear-gradient(180deg, #3d5070 0%, #334462 100%);
  color: #fff;
}
.wo-more-insp-head h3 {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.28rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.wo-more-insp-sub {
  margin: 6px 0 0;
  color: rgba(255,255,255,.82);
  font-size: .92rem;
}
.wo-more-insp-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.wo-more-insp-close:hover {
  background: rgba(255,255,255,.22);
}
.wo-more-insp-meta {
  padding: 8px 18px;
  background: #f7f8fa;
  border-bottom: 1px solid #dce7e2;
  color: #4a635b;
  font-size: .8rem;
  font-weight: 700;
}
.wo-more-insp-table-wrap {
  overflow: auto;
  flex: 1 1 auto;
}
.wo-more-insp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.wo-more-insp-table th,
.wo-more-insp-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e8ecf1;
  vertical-align: middle;
}
.wo-more-insp-table th {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #7a8494;
  background: #fafbfc;
  position: sticky;
  top: 0;
}
.wo-more-insp-table td:last-child {
  width: 1%;
  white-space: nowrap;
}
.wo-more-insp-empty {
  text-align: center;
  color: #7a8494;
  padding: 28px 16px !important;
}
.wo-more-insp-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 7px;
  border: 1px solid #6f9a86;
  background: #1f7a3a;
  color: #fff;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.wo-more-insp-link:hover {
  background: #196532;
  color: #fff;
}
.wo-more-insp-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid #e2e6ed;
  background: #f7f8fa;
}
body.wo-more-insp-modal-open {
  overflow: hidden;
}

.wo-log-modal[hidden] {
  display: none !important;
}
.wo-log-modal {
  position: fixed;
  inset: 0;
  z-index: 120000 !important;
  display: grid;
  place-items: center;
  padding: 18px;
}
.wo-log-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(61, 80, 112, .52);
}
.wo-log-panel {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  height: min(86vh, 820px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #d9dee6;
  border-radius: 12px;
  box-shadow: 0 28px 64px rgba(61, 80, 112, .28);
  overflow: hidden;
}
.wo-log-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 12px;
  background: linear-gradient(180deg, #3d5070 0%, #334462 100%);
  color: #fff;
}
.wo-log-head h3 {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.28rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.wo-log-address {
  margin: 6px 0 0;
  color: rgba(255,255,255,.82);
  font-size: .92rem;
}
.wo-log-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.wo-log-close:hover {
  background: rgba(255,255,255,.22);
}
.wo-log-meta {
  padding: 8px 18px;
  background: #f7f8fa;
  border-bottom: 1px solid #dce7e2;
  color: #4a635b;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.wo-log-table-wrap {
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  background: #fff;
}
.wo-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.wo-log-table th,
.wo-log-table td {
  padding: 11px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e6eeea;
}
.wo-log-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef1f6;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #3d5070;
}
.wo-log-col-date,
.wo-log-table td:first-child {
  width: 190px;
  white-space: nowrap;
  color: #35574c;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.wo-log-table tbody tr:nth-child(even) {
  background: #f8fbf9;
}
.wo-log-table tbody tr:hover {
  background: #eef1f6;
}
.wo-log-msg {
  white-space: pre-wrap;
  word-break: break-word;
  color: #1a2a24;
  line-height: 1.45;
}
.wo-log-msg.is-collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}
.wo-log-more {
  margin-top: 8px;
  border: 0;
  background: none;
  padding: 0;
  color: #3d5070;
  font: inherit;
  font-size: .8rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.wo-log-schedule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.wo-log-schedule-link,
.wo-conf-schedule-link {
  color: #1d4ed8;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.wo-log-schedule-link.is-danger,
.wo-conf-schedule-link.is-danger {
  color: #b42318;
}
.wo-conf-log-actions .wo-conf-schedule-link {
  white-space: nowrap;
  padding: 2px 0;
}
.wo-log-empty {
  color: var(--eis-muted, #6b7280);
  text-align: center;
  padding: 48px 16px !important;
}
.wo-log-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  background: #f7f8fa;
  border-top: 1px solid #dce7e2;
}
body.wo-log-open,
body.wo-cancel-open {
  overflow: hidden;
}
.wo-cancel-modal[hidden] {
  display: none !important;
}
.wo-cancel-modal {
  position: fixed;
  inset: 0;
  z-index: 130000 !important;
  display: grid;
  place-items: center;
  padding: 18px;
}
.wo-cancel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(61, 80, 112, .52);
}
.wo-cancel-panel {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 24px));
  max-height: min(92vh, 860px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #d9dee6;
  border-radius: 12px;
  box-shadow: 0 28px 64px rgba(61, 80, 112, .28);
  overflow: hidden;
}
.wo-cancel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 16px;
  background: linear-gradient(180deg, #3d5070 0%, #334462 100%);
  color: #fff;
}
.wo-cancel-head h3 {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 1.28rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.wo-cancel-sub {
  margin: 6px 0 0;
  color: rgba(255,255,255,.82);
  font-size: .9rem;
}
.wo-cancel-x {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.wo-cancel-x:hover {
  background: rgba(255,255,255,.22);
}
.wo-cancel-body {
  padding: 16px 24px 10px;
  overflow: auto;
  background: #f7f8fa;
}
.wo-cancel-error {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fdecec;
  color: #7a2424;
  font-size: .88rem;
  font-weight: 650;
}
.wo-cancel-question {
  margin: 0 0 8px;
  font-size: .95rem;
  font-weight: 800;
  color: #334462;
}
.wo-cancel-reasons {
  display: grid;
  gap: 1px;
  margin-bottom: 12px;
}
.wo-cancel-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  color: #1a2a24;
  font-size: .88rem;
  line-height: 1.25;
  white-space: nowrap;
}
.wo-cancel-option:hover,
.wo-cancel-option:has(input:checked) {
  border-color: #d9dee6;
  background: #eef1f6;
}
.wo-cancel-option input {
  margin: 0;
  flex: 0 0 auto;
  accent-color: #3d5070;
}
.wo-cancel-detail-label {
  display: block;
  margin: 0 0 8px;
  color: #35574c;
  font-size: .88rem;
  font-weight: 650;
}
.wo-cancel-details {
  box-sizing: border-box;
  width: 100%;
  min-height: 88px;
  resize: vertical;
  padding: 8px 10px;
  border: 1px solid #d9dee6;
  border-radius: 8px;
  background: #fff;
  color: #1a2a24;
  font: inherit;
  line-height: 1.4;
}
.wo-cancel-details:focus {
  outline: 2px solid #3d5070;
  outline-offset: 1px;
}
.wo-cancel-foot {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  padding: 16px 24px 18px;
  background: #fff;
  border-top: 1px solid #dce7e2;
}
.wo-cancel-submit,
.wo-cancel-close {
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 8px;
  font: inherit;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}
.wo-cancel-submit {
  background: #7a2e2e;
  color: #fff;
  border: 1px solid #5c2222;
}
.wo-cancel-submit:hover {
  background: #8f3838;
}
.wo-cancel-submit:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.wo-cancel-close {
  background: #fff;
  color: #3d5070;
  border: 1px solid #d9dee6;
}
.wo-cancel-close:hover {
  background: #eef1f6;
}
.wo-inv-totals {
  display: grid;
  gap: 6px;
  font-size: .9rem;
  padding-top: 4px;
}
.wo-inv-tax-heading {
  margin: 8px 0 2px;
  padding-top: 8px;
  border-top: 1px solid var(--eis-line, #d9dee6);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--eis-forest-deep, #334462);
}
.wo-inv-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.wo-inv-row[hidden] {
  display: none !important;
}
.wo-inv-row.is-total {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--eis-line, #d9dee6);
  font-weight: 800;
  color: var(--eis-forest-deep, #334462);
}
.wo-inv-row.wo-inv-due-row {
  font-weight: 700;
  color: var(--eis-forest-deep, #334462);
}
.wo-inv-confirm-extra {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d7e3f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5fc 100%);
}
.wo-inv-confirm-extra-note {
  margin: 0 0 10px;
  font-family: var(--font-body);
  font-size: .84rem;
  line-height: 1.4;
  color: var(--eis-muted, #5b6575);
}
.wo-inv-confirm-extra-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 11px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--eis-navy, #0d3564);
  color: #fff;
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
}
.wo-inv-confirm-extra-btn:hover {
  background: var(--eis-navy-mid, #1a4a7a);
}
.wo-inv-confirm-extra-btn:disabled {
  opacity: .65;
  cursor: wait;
}
.wo-inv-status {
  margin-top: 12px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--eis-muted, #6b7280);
}
.wo-inv-paid {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e6eaf0;
}
.wo-payment-url {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #12375f;
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
}
.wo-payment-url:hover,
.wo-payment-url:focus,
.wo-payment-url:focus-visible,
.wo-payment-url:active {
  color: #fff;
  -webkit-text-fill-color: #fff;
  text-decoration: none;
}
.wo-payment-url:hover {
  background: #0c2948;
}
.wo-payment-url:focus-visible {
  outline: 3px solid #406d99;
  outline-offset: 2px;
}
.wo-paid-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d9dee6;
  border-radius: 10px;
  background: linear-gradient(180deg, #f7f8fa 0%, #eef1f6 100%);
  cursor: pointer;
  user-select: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.wo-paid-check:hover {
  border-color: #b7cfc4;
  box-shadow: 0 4px 12px rgba(20, 56, 46, .06);
}
.wo-paid-label {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--eis-ink, #3a4556);
}
.wo-paid-control {
  position: relative;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
}
.wo-paid-control input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.wo-paid-box {
  position: absolute;
  inset: 0;
  border: 2px solid #7f978c;
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(61, 80, 112, .08);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.wo-paid-box::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 7px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .12s ease;
}
.wo-paid-control input:focus-visible + .wo-paid-box {
  outline: 2px solid rgba(61, 80, 112, .35);
  outline-offset: 2px;
}
.wo-paid-check.is-paid,
.wo-paid-check:has(input:checked) {
  border-color: #9fc0b2;
  background: linear-gradient(180deg, #e7f4ee 0%, #d7ebe2 100%);
  box-shadow: 0 4px 14px rgba(61, 80, 112, .1);
}
.wo-paid-check.is-paid .wo-paid-label,
.wo-paid-check:has(input:checked) .wo-paid-label {
  color: var(--eis-forest-deep, #334462);
}
.wo-paid-check.is-paid .wo-paid-box,
.wo-paid-check:has(input:checked) .wo-paid-box {
  background: var(--eis-forest, #3d5070);
  border-color: var(--eis-forest-deep, #334462);
  box-shadow: 0 4px 10px rgba(61, 80, 112, .22);
  transform: scale(1.02);
}
.wo-paid-check.is-paid .wo-paid-box::after,
.wo-paid-check:has(input:checked) .wo-paid-box::after {
  transform: rotate(45deg) scale(1);
}

.wo-paid-receipt[hidden] {
  display: none !important;
}

/* Full-screen customer receipt modal (not Invoice download) */
.wo-receipt-modal[hidden] {
  display: none !important;
}

body.wo-receipt-open {
  overflow: hidden !important;
}

.wo-receipt-modal,
.wo-receipt-modal:not([hidden]) {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  margin: 0 !important;
  z-index: 100000 !important;
  display: grid !important;
  place-items: center;
  padding: 20px;
  box-sizing: border-box;
  overscroll-behavior: contain;
}

.wo-receipt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, .72);
}

.wo-receipt-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 32px));
  max-height: min(92vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: woReceiptIn .28s cubic-bezier(.22, 1, .36, 1) both;
}

.wo-receipt-paper {
  background: #fff;
  border: 1px solid var(--eis-line, #e2e6ed);
  border-radius: 12px;
  padding: 20px 22px 18px;
  color: var(--eis-ink, #3a4556);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: 0 16px 40px rgba(44, 54, 70, .18);
  overflow: auto;
  max-height: min(92vh, 820px);
}

.wo-receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--eis-line, #e2e6ed);
}

.wo-receipt-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.wo-receipt-logo {
  display: block;
  height: 42px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  flex: none;
}

.wo-receipt-heading {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--eis-ink, #3a4556);
  line-height: 1.1;
}

.wo-receipt-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.wo-receipt-print {
  font-family: var(--font-body);
  font-size: .76rem;
  font-weight: 600;
  color: var(--eis-muted, #7a8494);
  text-decoration: none;
  white-space: nowrap;
}

.wo-receipt-print:hover {
  text-decoration: underline;
  color: var(--eis-ink, #3a4556);
}

.wo-receipt-modal-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--eis-line, #e2e6ed);
  border-radius: 8px;
  background: #fff;
  color: var(--eis-ink, #3a4556);
  font-family: var(--font-body);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.wo-receipt-modal-close:hover {
  background: var(--eis-mist, #f8f9fb);
}

.wo-receipt-meta {
  margin-bottom: 2px;
}

.wo-receipt-meta p {
  margin: 0 0 5px;
  color: var(--eis-ink, #3a4556);
}

.wo-receipt-meta p span {
  font-weight: 700;
  color: var(--eis-ink, #3a4556);
}

.wo-receipt-inspect {
  margin-top: 8px !important;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  font-size: .84rem;
  color: var(--eis-muted, #7a8494);
  line-height: 1.4;
}

.wo-receipt-items {
  list-style: none;
  margin: 12px 0 4px;
  padding: 0;
}

.wo-receipt-items li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--eis-line, #e2e6ed);
}

.wo-receipt-item-name {
  flex: 1;
  min-width: 0;
  color: var(--eis-ink, #3a4556);
}

.wo-receipt-item-amt {
  flex: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--eis-ink, #3a4556);
}

.wo-receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0;
}

.wo-receipt-grand {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--eis-line, #e2e6ed);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  color: var(--eis-ink, #3a4556);
}

.wo-receipt-grand span:last-child {
  color: var(--eis-ink, #3a4556);
  font-variant-numeric: tabular-nums;
}

.wo-receipt-status {
  margin: 14px 0 12px;
  padding: 10px 12px;
  text-align: center;
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #1f7a3f;
  background: #e8f6ec;
  border: 1px solid #9fceb0;
  border-radius: 8px;
}

.wo-receipt-company {
  text-align: right;
  font-size: .8rem;
  line-height: 1.45;
  color: var(--eis-muted, #7a8494);
  margin: 22px 0 14px;
}

.wo-receipt-sign-line {
  width: 148px;
  max-width: 55%;
  height: 1px;
  margin: 0 0 10px auto;
  background: var(--eis-line, #d8dee7);
}

.wo-receipt-company strong {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 700;
  color: var(--eis-ink, #3a4556);
}

.wo-receipt-modal-actions {
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--eis-line, #e2e6ed);
  text-align: center;
}

.wo-receipt-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 700;
  color: #fff;
  background: var(--eis-navy, #0d3564);
  padding: 11px 16px;
  border-radius: 8px;
  text-decoration: none;
}

.wo-receipt-download:hover {
  background: var(--eis-navy-mid, #1a4a7a);
}

.wo-paid-receipt {
  margin-top: 12px;
  padding: 14px;
  border-radius: 10px;
  background: var(--eis-mist, #f8f9fb);
  border: 1px solid var(--eis-line, #e2e6ed);
}

.wo-paid-receipt-title {
  margin: 0 0 6px;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--eis-ink, #3a4556);
}

.wo-paid-receipt-note {
  margin: 0 0 12px;
  font-family: var(--font-body);
  font-size: .84rem;
  line-height: 1.45;
  color: var(--eis-muted, #7a8494);
  font-weight: 500;
}

.wo-paid-receipt-note.is-manual {
  color: #1f8f47;
  font-weight: 700;
}

.wo-paid-receipt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--eis-navy, #0d3564);
  color: #fff;
  font-family: var(--font-body);
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
}

.wo-paid-receipt-btn:hover {
  background: var(--eis-navy-mid, #1a4a7a);
}

@keyframes woReceiptIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@media print {
  body.wo-receipt-open .wo,
  body.wo-receipt-open .hz-shell > *:not(.main-wrap),
  body.wo-receipt-open .wo-receipt-modal-backdrop,
  body.wo-receipt-open .wo-receipt-modal-close,
  body.wo-receipt-open .wo-receipt-modal-actions,
  body.wo-receipt-open .wo-receipt-print,
  body.wo-receipt-open .wo-receipt-head-actions {
    display: none !important;
  }
  body.wo-receipt-open .wo-receipt-modal {
    position: static !important;
    padding: 0 !important;
    height: auto !important;
    width: auto !important;
  }
  body.wo-receipt-open .wo-receipt-paper {
    box-shadow: none;
    border-radius: 0;
    max-height: none;
    overflow: visible;
  }
}
.wo-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.wo-agent-col h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #1f4f7a;
}
.wo-agent-search-wrap {
  position: relative;
}
.wo-agent-suggest {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: 220px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20, 40, 30, .12);
}
.wo-agent-suggest-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.wo-agent-suggest-item:hover,
.wo-agent-suggest-item:focus {
  background: #eef6f1;
}
.wo-agent-suggest-item span {
  font-size: .82rem;
  color: var(--eis-muted, #6b7280);
}
.wo-agent-suggest-empty {
  padding: 10px 12px;
  color: var(--eis-muted, #6b7280);
  font-size: .9rem;
}
.wo-mapping {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #d9dee6;
}
.wo-mapping-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a2e28;
}
.wo-mapping-grid {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 12px 14px;
  align-items: end;
}
.wo-mapping-daily {
  padding-bottom: 8px;
}
.wo-mapping-link,
.wo-mapping-show {
  color: #1f4f7a;
  font-weight: 600;
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.wo-mapping-show-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-top: 12px;
}
.wo-mapping-frame {
  margin-top: 14px;
  border: 1px solid #c5d0cb;
  border-radius: 8px;
  overflow: hidden;
  background: #eef1f6;
  min-height: 320px;
}
.wo-mapping-frame iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
}
@media (max-width: 860px) {
  .wo-mapping-grid {
    grid-template-columns: 1fr;
  }
}
.wo-email-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
}
.wo-email-combo {
  position: relative;
  display: flex;
  align-items: stretch;
}
.wo-email-combo .wo-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  padding-right: 10px;
}
.wo-email-combo-btn {
  flex: 0 0 40px;
  border: 1px solid #cfd9d4;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #f7f8fa;
  color: #355048;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}
.wo-email-combo-btn:hover {
  background: #e6eaf0;
}
.wo-email-combo-list {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 4px;
  list-style: none;
  max-height: 240px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(20, 40, 30, .14);
}
.wo-email-combo-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.wo-email-combo-item strong {
  font-weight: 650;
  color: #1a2e28;
}
.wo-email-combo-item span {
  font-size: .82rem;
  color: var(--eis-muted, #6b7280);
}
.wo-email-combo-item:hover,
.wo-email-combo-item.is-active {
  background: #eef1f6;
}
.wo-email-combo-empty {
  padding: 10px 12px;
  color: var(--eis-muted, #6b7280);
  font-size: .9rem;
}
.wo-email-hint {
  margin: 6px 0 0;
  font-size: .82rem;
}
.wo-email-subject {
  appearance: auto;
}
.wo-input.is-readonly,
.wo-input[readonly] {
  background: #e8ecea;
  color: #4a5852;
  cursor: default;
}
.wo-agent-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}
.wo-agent-link {
  border: 0;
  background: none;
  padding: 0;
  color: #1f4f7a;
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
  text-decoration: underline;
}
.wo-agent-selected {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dotted #c5d2cc;
  font-size: .92rem;
  line-height: 1.45;
  color: #31443c;
}
.wo-agent-selected-title {
  margin-bottom: 4px;
}
.wo-agent-selected-meta,
.wo-agent-selected-phone {
  color: var(--eis-muted, #6b7280);
}
.wo-agent-notes {
  margin: 10px 0 8px;
  padding-top: 8px;
  border-top: 1px dotted #d9dee6;
}
.wo-agent-notes-title {
  font-weight: 700;
  margin-bottom: 4px;
  color: #31443c;
}
.wo-agent-notes-body,
.wo-agent-notes-recent {
  color: var(--eis-muted, #6b7280);
  font-size: .88rem;
  line-height: 1.4;
}
.wo-agent-notes-recent {
  margin-top: 6px;
}
.wo-agent-sum-line {
  margin-top: 4px;
  line-height: 1.35;
}
.wo-agent-sum-block {
  margin-top: 8px;
  line-height: 1.4;
}
.wo-agent-sum-block:first-child {
  margin-top: 4px;
}
.wo-agent-sum-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-weight: 700;
  color: var(--eis-forest-deep, #334462);
}
.wo-nav-sum .wo-agent-sum-block + .wo-agent-sum-block {
  margin-top: 10px;
}
.wo-agent-form {
  display: grid;
  gap: 10px;
}
.wo-agent-modal-card {
  max-width: 420px;
}
.wo-agent-company-hint {
  margin: 6px 0 0;
  font-size: .8rem;
  color: var(--eis-muted, #6b7280);
}
.wo-agent-modal-error {
  margin: 8px 0 0;
  color: #a12622;
  font-size: .9rem;
}
.wo-muted {
  margin: 0 0 10px;
  font-size: .84rem;
  color: var(--eis-muted, #6b7280);
}
.wo-footer {
  display: none;
}
.wo-email-complete {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  max-width: 920px;
  margin: 0;
  padding: 16px 16px 18px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  background: #f7f8fa;
  box-sizing: border-box;
}
.wo-email-complete .fees-check {
  margin: 0;
}
.wo-email-complete .wo-confirm-info {
  display: inline-flex;
  flex: 0 0 auto;
}
.wo-complete-status {
  margin: 0;
  width: 100%;
  max-width: none;
  color: #2f4a3a;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.45;
}
.wo-conf-logs {
  margin-top: 22px;
  max-width: 920px;
}
.wo-conf-logs-title {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #243554;
}
.wo-conf-logs-wrap {
  overflow: auto;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  background: #fff;
}
.wo-conf-logs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.wo-conf-logs-table th,
.wo-conf-logs-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e8ecf2;
  text-align: left;
  vertical-align: middle;
}
.wo-conf-logs-table th {
  background: #f7f8fa;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5b6b84;
}
.wo-conf-logs-table tr:last-child td {
  border-bottom: 0;
}
.wo-conf-logs-empty {
  color: #6b7280;
  text-align: center;
}
.wo-conf-logs-when {
  font-weight: 600;
  color: #111827;
}
.wo-conf-logs-eta {
  margin-top: 2px;
  font-size: 0.82rem;
  font-weight: 650;
  color: #0f5c45;
}
.wo-conf-logs-col-view {
  width: 88px;
}
.wo-conf-log-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wo-conf-view,
.wo-conf-resend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #d5dbe6;
  border-radius: 8px;
  background: #fff;
  color: #334462;
  cursor: pointer;
}
.wo-conf-view:hover,
.wo-conf-resend:hover {
  background: #eef2f8;
}
.wo-conf-resend.is-loading,
.wo-conf-view:disabled,
.wo-conf-resend:disabled {
  opacity: 0.55;
  cursor: wait;
}
.wo-confirm-email-dialog .btn-primary.is-sending {
  min-width: 7.5rem;
}
.wo-conf-log-dialog {
  width: min(860px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
}
.wo-conf-log-dialog .fees-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.wo-conf-log-dialog .fees-input,
.wo-conf-log-dialog .fees-textarea {
  width: 100%;
  box-sizing: border-box;
}
textarea.fees-textarea.eml-copy-field {
  min-height: 0;
  height: calc(2.9rem + 24px);
}
.wo-conf-log-subject-field {
  width: 100%;
}
.wo-conf-log-subject {
  display: block;
  width: 100%;
  max-width: none;
  white-space: nowrap;
  overflow-x: auto;
}
.wo-conf-log-frame {
  display: block;
  width: 100%;
  min-height: 280px;
  height: min(42vh, 420px);
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 10px;
  background: #fff;
}
.wo-report-settings {
  display: grid;
  gap: 16px;
  max-width: 860px;
}
.wo-report-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.wo-report-toolbar strong {
  display: block;
  color: var(--eis-forest-deep, #334462);
  font-size: 1rem;
}
.wo-report-index {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.wo-report-index a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 8px;
  background: #f7f8fa;
  text-decoration: none !important;
  color: inherit !important;
}
.wo-report-index a:hover {
  background: #eef4f0;
}
.wo-report-index span {
  font-size: .82rem;
  color: var(--eis-muted, #6b7280);
}
.wo-report-empty {
  padding: 16px 18px;
  border: 1px dashed #cfd9d4;
  border-radius: 10px;
  background: #f7f8fa;
  color: var(--eis-muted, #6b7280);
}
.wo-report-group {
  margin-top: 14px;
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 14px;
  background: #f4f6f8;
  overflow: hidden;
}
.wo-report-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid #e4e9ef;
  background: linear-gradient(180deg, #fbfcfd 0%, #f1f4f7 100%);
}
.wo-report-group-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: #243041;
}
.wo-report-group-meta {
  margin: 0;
  font-size: 0.82rem;
}
.wo-report-group-cards {
  display: grid;
  gap: 10px;
  padding: 12px;
}
.wo-report-group-cards .wo-report-card {
  margin: 0;
}
.wo-report-card-actions .btn-primary[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}
.wo-report-card {
  border: 1px solid var(--eis-line, #d9dee6);
  border-radius: 12px;
  background: #fff;
  padding: 0;
  overflow: hidden;
  display: block;
  box-shadow: 0 1px 2px rgba(20, 40, 34, 0.04);
}
.wo-report-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 14px 16px 12px;
  background: #f7f8fa;
  border-bottom: 1px solid #e8edf3;
}
.wo-report-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 16px;
  padding: 12px 16px;
  background: #fbfcfd;
  border-bottom: 1px solid #eef2f6;
}
.wo-report-summary-label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8b93a1;
  margin-bottom: 2px;
}
.wo-report-summary strong {
  font-size: .92rem;
  color: var(--eis-forest-deep, #334462);
  font-weight: 650;
}
.wo-report-details {
  padding: 14px 16px 16px;
  display: grid;
  gap: 6px;
}
.wo-report-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--eis-forest-deep, #334462);
}
.wo-report-preview {
  margin: 4px 0 0;
  font-size: .84rem;
  color: var(--eis-muted, #6b7280);
}
.wo-report-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wo-report-remove {
  color: #8a2b22;
}
.wo-report-prefix,
.wo-report-inspector {
  max-width: 280px;
}
.wo-report-details .wo-label[for^="woReportPrefix"],
.wo-report-details .wo-label[for^="woReportInspector"] {
  margin-top: 6px;
}
.wo-report-hint {
  margin: 4px 0 0;
}
.wo-report-includes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 12px;
  border: 1px solid #e6eaef;
  border-radius: 8px;
  background: #f7f8fa;
}
.wo-report-includes.is-readonly {
  opacity: .85;
}
.wo-report-includes.is-readonly .wo-report-include {
  cursor: default;
  color: #5a6a7e;
}
.wo-report-include {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: .9rem;
  font-weight: 650;
  color: var(--eis-forest-deep, #334462);
  cursor: pointer;
}
.wo-report-include input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.wo-report-includes.is-readonly .wo-report-include input:disabled {
  cursor: default;
  opacity: 1;
}
.wo-ready-sync-check {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: auto;
  margin: 0;
  padding: 8px 10px;
  min-height: 44px;
  border: 1px solid #d9dee6;
  border-radius: 8px;
  background: linear-gradient(180deg, #f7f8fa 0%, #eef1f6 100%);
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}
.wo-ready-sync-check:hover {
  border-color: #b7c0cf;
  box-shadow: 0 4px 12px rgba(42, 61, 99, .08);
}
.wo-ready-sync-label {
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--eis-ink, #3a4556);
  white-space: nowrap;
}
.wo-ready-sync-check input {
  width: 22px;
  height: 22px;
  margin: 0;
  flex: 0 0 22px;
  accent-color: var(--eis-navy-mid, #1a4a7a);
  cursor: pointer;
}
.wo-ready-sync-check input:disabled {
  cursor: default;
}
.wo-ready-sync-check.is-locked {
  cursor: default;
}
.wo-ready-sync-check.is-locked input {
  pointer-events: none;
}
.wo-ready-sync-check.is-ready {
  border-color: #8fa0bf;
  background: linear-gradient(180deg, #f3f6fb 0%, #e6ecf6 100%);
}
.wo-ready-sync-check.is-ready .wo-ready-sync-label {
  color: var(--eis-navy-deep, #243044);
}
.wo-report-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
}
.wo-report-table th,
.wo-report-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid #e6eaef;
  vertical-align: middle;
}
.wo-report-table th {
  font-size: .78rem;
  color: var(--eis-muted, #6b7280);
  font-weight: 700;
}
.wo-report-svc-name {
  font-weight: 700;
  color: var(--eis-forest-deep, #334462);
}
.wo-report-svc-kind {
  font-size: .75rem;
  color: var(--eis-muted, #6b7280);
}
.wo-report-template {
  min-height: 38px;
}
.wo-confirm-email-dialog {
  width: min(460px, 100%);
}
.wo-confirm-email-dialog .disc-modal-footer {
  margin-top: 16px;
}
#woScheduleEmailModal.disc-modal,
.wo-schedule-email-modal.disc-modal {
  z-index: 2147482000 !important;
}
.wo-schedule-email-dialog #woScheduleEmailConfirm.is-danger,
.wo-schedule-email-dialog .btn-primary.is-danger {
  background: #b42318;
  border-color: #b42318;
  color: #fff;
}
.wo-schedule-email-dialog #woScheduleEmailConfirm.is-danger:hover,
.wo-schedule-email-dialog .btn-primary.is-danger:hover {
  filter: brightness(1.05);
}
.wo-schedule-email-dialog.is-danger h2 {
  color: #7a1c14;
}
@media (max-width: 980px) {
  .wo-body,
  .wo-fee-layout,
  .wo-prop-grid { grid-template-columns: 1fr; }
  .wo-prop-simple { grid-template-columns: 1fr; }
  .wo-nav { position: static; }
  .wo-prefs-row { grid-template-columns: 1fr; }
  .wo-context-side { width: 100%; align-items: stretch; }
  .wo-context-side-chips { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .wo-grid-2,
  .wo-grid-3 { grid-template-columns: 1fr; }
  .wo-span-2 { grid-column: auto; }
  .wo-more-insp-actions {
    flex-direction: column;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
  }
  .wo-more-insp-btn { width: 100%; }
}

@media (max-width: 900px) {
  .sched-topbar { grid-template-columns: 1fr; }
  .sched-hero h1,
  .sched-stats { white-space: normal; }
  .sched-mini { justify-content: flex-start; }
  .sched-board-head,
  .sched-row { grid-template-columns: 1fr; }
  .sched-insp { padding-top: 0; }
  .sched-appt-grid,
  .sched-appt-repeat { grid-template-columns: 1fr; }
  .sched-appt-panel { width: min(480px, calc(100vw - 16px)); }
}

@media (max-width: 768px) {
  #apptModal.disc-modal {
    padding: max(6px, env(safe-area-inset-top, 0px))
      max(6px, env(safe-area-inset-right, 0px))
      max(6px, env(safe-area-inset-bottom, 0px))
      max(6px, env(safe-area-inset-left, 0px));
    place-items: stretch center;
    align-items: center;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
  }
  .sched-appt-panel {
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 12px;
  }
  .sched-appt-body {
    padding: 12px 12px 10px;
  }
  .sched-appt-cal {
    max-width: 320px;
    margin: 0 auto;
  }
  .sched-appt-cal-dow {
    font-size: 0.7rem;
    padding: 4px 0 6px;
  }
  .sched-appt-day {
    min-height: 36px;
    font-size: 0.88rem;
    border-radius: 8px;
  }
  .sched-appt-cal-nav button {
    width: 32px;
    height: 32px;
  }
  .sched-appt-cal-nav strong {
    font-size: 0.9rem;
  }
  .sched-time-row {
    gap: 8px;
  }
  .sched-time-row .fees-input {
    min-width: 64px;
    min-height: 40px;
    font-size: 16px; /* avoid iOS zoom */
  }
  .sched-appt-panel .fees-input,
  .sched-appt-panel .fees-textarea,
  .sched-appt-panel select {
    font-size: 16px;
    min-height: 40px;
  }
  .sched-appt-panel .fees-textarea {
    min-height: 64px;
    max-height: none;
  }
  .sched-ampm {
    min-height: 40px;
    padding: 0 4px;
    font-size: 0.9rem;
  }
  .sched-appt-fields input[type="range"] {
    height: 28px;
    margin: 6px 0 12px;
  }
  .sched-appt-repeat {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .sched-appt-recur-row .fees-input {
    width: 88px;
    min-width: 88px;
    min-height: 40px;
  }
  .sched-appt-panel .disc-modal-footer {
    padding: 12px;
    gap: 10px;
  }
  .sched-appt-panel .disc-modal-footer .btn-primary,
  .sched-appt-panel .disc-modal-footer .btn-secondary {
    flex: 1 1 auto;
    min-width: 0;
  }
}

@media (max-width: 480px) and (max-height: 720px) {
  #apptModal.disc-modal {
    place-items: end center;
    align-items: stretch;
  }
  .sched-appt-panel {
    max-height: min(calc(100vh - 8px), calc(100dvh - 8px));
    border-radius: 12px 12px 0 0;
  }
}

/* Public online contract (unauthenticated client) */
.oc-body {
  background: #fff;
}

.oc-page {
  max-width: 760px;
  margin: 28px auto 72px;
  padding: 0 20px;
  color: #111;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  line-height: 1.45;
}

.oc-error {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #d9b4ae;
  background: #fdecea;
  color: #7a3a32;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.92rem;
}

.oc-doc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.oc-doc-head h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.oc-report {
  font-size: 13px;
  color: #444;
}

.oc-meta {
  margin: 6px 0 12px;
  font-size: 13px;
  color: #555;
}

.oc-frame {
  border: 1px solid #111;
  padding: 18px 20px 28px;
  min-height: 420px;
}

.oc-frame h2 {
  margin: 0 0 16px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
}

.oc-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 16px;
}

.oc-company-name {
  font-weight: 700;
  margin-top: 4px;
}

.oc-client-names {
  margin-top: 4px;
  line-height: 1.35;
}

.oc-sign-lines {
  margin-top: 14px;
}

.oc-sign-line {
  margin: 0 0 10px;
}

.oc-sign-line:last-child {
  margin-bottom: 0;
}

.oc-intro,
.oc-sign-note,
.oc-body-text p {
  margin: 0 0 12px;
}

.oc-accept {
  margin-top: 28px;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.95rem;
}

.oc-name-label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
}

.oc-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 420px;
}

.oc-name-input {
  flex: 1;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid #888;
  background: #fff;
  font-size: 1rem;
}

.oc-required {
  color: #111;
  font-weight: 700;
}

.oc-check {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #d5dbe3;
  border-radius: 10px;
  background: #f7f8fb;
  cursor: pointer;
}

.oc-check:hover {
  border-color: #3d5070;
  background: #eef2f7;
}

.oc-check-box {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.oc-check input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0;
  flex: 0 0 22px;
  accent-color: #2f7a4a;
  cursor: pointer;
}

.oc-check-accept span {
  font-weight: 800;
  color: #0d8a2e;
}

.oc-check-accept input[type="checkbox"] {
  accent-color: #0d8a2e;
}

.oc-check-reject span {
  font-weight: 800;
  color: #d10b0b;
}

.oc-check-reject input[type="checkbox"] {
  accent-color: #d10b0b;
}

.oc-print-note {
  margin: 16px 0;
}

.oc-print-note a,
.oc-pay-link {
  color: #1a5fd0;
  text-decoration: underline;
}

.oc-submit {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 8px;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: #2f7a4a;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.oc-submit:hover {
  background: #25633c;
}

.oc-confirm {
  text-align: center;
  padding-top: 40px;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
}

.oc-confirm-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 36px 32px 28px;
  background: #fff;
  border: 1px solid #e2e6ed;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(61, 80, 112, 0.08);
}

.oc-confirm-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 14px;
}

.oc-confirm-company {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #3d5070;
}

.oc-confirm-badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #e8f6ee;
  color: #0d8a2e;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.oc-confirm-badge-reject {
  background: #fde8e8;
  color: #d10b0b;
}

.oc-confirm-lead {
  margin: 0 0 22px;
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.5;
}

.oc-confirm-meta {
  display: grid;
  gap: 10px;
  margin: 0 auto 22px;
  text-align: left;
  max-width: 360px;
}

.oc-confirm-meta > div {
  display: grid;
  gap: 2px;
}

.oc-confirm-meta span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a8494;
}

.oc-confirm-meta strong {
  font-size: 0.95rem;
  color: #3a4556;
}

.oc-pay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 10px;
  background-color: #123B66;
  color: #FFFFFF;
  -webkit-text-fill-color: #FFFFFF;
  text-decoration: none;
  font-weight: 700;
}

.oc-pay-btn:hover,
.oc-pay-btn:focus,
.oc-pay-btn:focus-visible,
.oc-pay-btn:active {
  color: #FFFFFF;
  -webkit-text-fill-color: #FFFFFF;
  text-decoration: none;
}

.oc-pay-btn:hover {
  background-color: #1a4d80;
}

.oc-pay-btn:focus-visible {
  background-color: #123B66;
  outline: 2px solid #FFFFFF;
  outline-offset: 3px;
}

.oc-pay-btn:active {
  background-color: #0e3054;
}

.oc-confirm-foot {
  margin: 18px 0 0;
  font-size: 0.82rem;
  color: #7a8494;
}

@media print {
  .oc-accept,
  .oc-error,
  .oc-submit {
    display: none !important;
  }
  .oc-page {
    margin: 0;
    padding: 0;
    max-width: none;
  }
}

/* —— Home workspace (Today’s Route + next actions) —— */
.home-workspace {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--eis-ink);
}
.home-workspace .page-title {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--eis-navy);
}
.home-workspace .page-sub {
  font-size: 14px;
  color: var(--eis-muted);
}
.home-hero {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 16px;
  width: 100%;
  margin-bottom: 18px;
}
.home-hero > div {
  min-width: 0;
  flex: 1 1 auto;
}
.home-new-btn {
  text-decoration: none;
  white-space: nowrap;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: auto;
}
@media (max-width: 640px) {
  .home-hero {
    flex-wrap: wrap !important;
    align-items: flex-start !important;
  }
  .home-new-btn {
    margin-left: 0;
  }
}

.home-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  align-items: stretch;
}
.home-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--eis-paper);
  border: 1px solid var(--eis-line);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.05);
  padding: 10px 14px;
  min-height: 0;
  border-left: 4px solid transparent;
}
.home-metric--gold { border-left-color: #c9a227; }
.home-metric--green { border-left-color: #1f7a3f; }
.home-metric--navy { border-left-color: #1e3a5f; }
.home-metric--amber { border-left-color: #d97706; }
.home-metric--blue { border-left-color: #2563eb; }
.home-metric--red { border-left-color: #d92d20; }
.home-metric-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--eis-muted);
  line-height: 1.2;
}
.home-metric-value {
  margin: 4px 0 2px;
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--eis-navy);
  line-height: 1.1;
}
.home-metric-route-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 4px 0 2px;
  min-width: 0;
}
.home-metric-route-row .home-metric-value {
  margin: 0;
  flex: 0 0 auto;
  font-size: 26px;
}
.home-metric-route-detail {
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--eis-navy);
  line-height: 1.25;
  white-space: normal;
  word-break: normal;
  overflow: visible;
  max-width: 100%;
}
.home-metric-hint {
  margin: 0;
  font-size: 12px;
  color: var(--eis-muted);
  line-height: 1.25;
}

.home-route {
  background: var(--eis-paper);
  border: 1px solid var(--eis-line);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(30, 58, 95, 0.06);
  margin-bottom: 16px;
  overflow: hidden;
}
.home-route-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--eis-line);
}
.home-route.is-collapsed .home-route-head {
  border-bottom: 0;
}
.home-route.is-empty.is-collapsed {
  box-shadow: none;
  border-radius: 10px;
}
.home-route.is-empty.is-collapsed .home-route-head {
  padding: 10px 14px;
  min-height: 0;
}
.home-route-head-main {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.home-route-title-block {
  min-width: 0;
}
.home-route-date-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  position: relative;
}
.home-route-day-btn,
.home-route-date-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}
.home-route-day-btn {
  border: 1px solid #d5dee8;
  background: #e7eef6;
  color: #243044;
}
.home-route-day-btn:hover {
  background: #dce6f2;
}
.home-route-date-btn {
  border: 1px solid #c5ced8;
  background: #fff;
  color: #243044;
}
.home-route-date-btn:hover {
  background: #f8fafc;
}
.home-route-cal-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: #5c6b7a;
}
.home-route-date-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.home-route-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1 1 auto;
}
.home-route-summary {
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--eis-line);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--eis-navy);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.home-route.is-route-loading .home-route-summary {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}
.home-route.is-route-loading .home-route-summary::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid #c5d0dc;
  border-top-color: #243044;
  border-radius: 50%;
  animation: home-route-spin 0.7s linear infinite;
  flex: 0 0 auto;
}
.home-route.is-route-loading .home-route-day-btn,
.home-route.is-route-loading .home-route-date-btn {
  opacity: 0.6;
  pointer-events: none;
}
.home-route.is-route-loading .home-route-body {
  position: relative;
}
.home-route.is-route-loading .home-route-body::after {
  content: "Loading route…";
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  color: #243044;
  font-size: 15px;
  font-weight: 700;
}
@keyframes home-route-spin {
  to { transform: rotate(360deg); }
}
.home-route-summary[hidden],
.home-route.is-empty .home-route-summary {
  display: none !important;
}
.home-route.is-route-loading .home-route-summary {
  display: inline-flex !important;
}
.home-route-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 700;
  color: var(--eis-navy);
}
.home-route-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--eis-muted);
}
.home-route-empty-msg {
  display: none;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--eis-muted);
}
.home-route.is-empty .home-route-title,
.home-route.is-empty .home-route-sub {
  display: none;
}
.home-route.is-empty .home-route-empty-msg {
  display: block;
}
.home-route-agenda-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--eis-forest);
  text-decoration: none;
  white-space: nowrap;
}
.home-route-agenda-link:hover {
  text-decoration: underline;
}
.home-route-agenda-link[hidden] {
  display: none !important;
}
.home-route.is-empty:not(.is-collapsed) .home-route-title,
.home-route.is-empty:not(.is-collapsed) .home-route-sub {
  display: block;
}
.home-route.is-empty:not(.is-collapsed) .home-route-empty-msg {
  display: none;
}
.home-route-body {
  display: grid;
  grid-template-columns: minmax(0, 35%) minmax(0, 65%);
  gap: 0;
  min-height: 340px;
}
.home-route.is-collapsed .home-route-body,
.home-route-body[hidden] {
  display: none !important;
  min-height: 0;
}
.home-agenda {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 420px;
  overflow: auto;
  border-right: 1px solid var(--eis-line);
  background: #fff;
}
.home-agenda-empty {
  padding: 24px 18px;
  color: var(--eis-muted);
  font-size: 14px;
}
.home-agenda-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-bottom: 1px solid #eef1f5;
}
.home-agenda-item:last-child { border-bottom: 0; }
.home-agenda-pin {
  width: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.home-agenda-pin-bubble {
  width: 24px;
  height: 24px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--pin-color, var(--eis-navy));
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  display: grid;
  place-items: center;
}
.home-agenda-pin-bubble span {
  transform: rotate(45deg);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.home-agenda-pin--dest .home-agenda-pin-bubble {
  width: 26px;
  height: 26px;
}
.home-agenda-pin--dest .home-agenda-pin-bubble span {
  font-size: 12px;
}
.home-agenda-pin-point {
  width: 0;
  height: 0;
  margin-top: -1px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--pin-color, var(--eis-navy));
}
.home-agenda-pin-mini {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--pin-color, var(--eis-navy));
  border: 1px solid #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
  flex: 0 0 10px;
}
.home-agenda-main {
  min-width: 0;
}
.home-agenda-time {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--eis-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.home-agenda-insp-line {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--eis-navy);
  display: flex;
  align-items: center;
  gap: 6px;
}
.home-agenda-title {
  margin: 4px 0 2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--eis-ink);
}
.home-agenda-title a {
  color: inherit;
  text-decoration: none;
}
.home-agenda-title a:hover { text-decoration: underline; }
.home-agenda-addr {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--eis-muted);
  line-height: 1.35;
}
.home-agenda-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
  box-sizing: border-box;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.home-btn-secondary {
  background: #fff;
  border: 1px solid #cfd6de;
  color: var(--eis-navy);
}
.home-btn-secondary:hover {
  background: #f5f7fa;
  border-color: #b8c0cb;
}
.home-btn-primary,
.home-next-start,
.home-next-continue,
.home-next-draft,
.home-next-view {
  background: var(--eis-navy) !important;
  border: 1px solid var(--eis-navy) !important;
  color: #fff !important;
}
.home-next-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}
.home-btn-primary:hover,
.home-next-start:hover,
.home-next-continue:hover,
.home-next-draft:hover,
.home-next-view:hover {
  filter: brightness(1.06);
}
.home-next-write {
  background: #c9a227 !important;
  border: 1px solid #b8911f !important;
  color: #1f252b !important;
}

.home-map-panel {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  background: #eef2f6;
}
.home-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 10px 12px;
  justify-content: flex-end;
  align-items: center;
}
.home-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-right: auto;
}
.home-map-legend[hidden] {
  display: none !important;
}
.home-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--eis-muted);
}
.home-map-legend-item i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.home-map-legend-pin {
  display: inline-block;
  width: 10px;
  height: 14px;
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  position: relative;
}
.home-map-legend-pin::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}
.home-map-tab {
  border: 1px solid var(--eis-line);
  background: #fff;
  color: var(--eis-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.home-map-tab.is-on {
  background: var(--eis-navy);
  border-color: var(--eis-navy);
  color: #fff;
}
.home-map-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 280px;
  margin: 0 12px 12px;
  border-radius: 12px;
  overflow: hidden;
  background: #dfe6ee;
  border: 1px solid #d0d7e0;
}
.home-map-canvas,
.home-map-iframe {
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: 0;
  display: block;
}
.home-map-canvas[hidden],
.home-map-iframe[hidden],
.home-map-empty[hidden] {
  display: none !important;
}
.home-map-empty {
  margin: 0;
  padding: 48px 16px;
  text-align: center;
  color: var(--eis-muted);
  font-size: 14px;
}

.home-filters-bar.home-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--eis-line);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(30, 58, 95, 0.05);
}
.home-filters-bar .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
.home-filters-bar .home-filter-search {
  flex: 1 1 220px;
  min-width: 200px;
}
.home-filters-bar .field-label {
  font-size: 12px;
}
.home-filters-bar .filter-input,
.home-filters-bar .filter-select {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  background: #fff;
  font-size: 14px;
}
.home-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.home-filter-reset,
.home-filter-go {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
}
.home-filters-bar .btn-primary {
  margin-left: 0;
}

.home-table-shell { margin-top: 4px; }
.home-table-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 10px;
}
.home-table-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 700;
  color: var(--eis-navy);
}
.home-table-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--eis-muted);
}
.home-table-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.home-views {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.home-view {
  appearance: none;
  border: 1px solid var(--eis-line);
  background: #fff;
  color: #243044;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}
.home-view.is-on {
  background: var(--eis-navy, #143d59);
  border-color: var(--eis-navy, #143d59);
  color: #fff;
}
.home-party {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: #3d4a5c;
}
.home-today-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e7eef6;
  color: #143d59;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}
.cell-when {
  white-space: nowrap;
}
.home-route-toggle:disabled,
.home-route-toggle.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.home-workspace .cell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

@media (max-width: 980px) {
  .home-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-route-head-main { flex-wrap: wrap; }
  .home-route-body { grid-template-columns: 1fr; }
  .home-agenda { border-right: 0; border-bottom: 1px solid var(--eis-line); max-height: none; }
  .home-filter-actions { margin-left: 0; width: 100%; }
  .home-filter-go { flex: 1 1 auto; }
}
@media (max-width: 640px) {
  .home-metrics { grid-template-columns: 1fr; }
  .home-filter-actions { flex-direction: column; align-items: stretch; }
  .home-filter-reset,
  .home-filter-go { width: 100%; }
}

/* Global save / postback busy overlay (all cadastros) */
body.eis-busy-open {
  overflow: hidden !important;
}
.eis-busy-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 2147483000 !important;
  display: grid !important;
  place-items: center;
  padding: 18px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.72);
  pointer-events: auto !important;
  touch-action: none;
}
.eis-busy-overlay[hidden] {
  display: none !important;
}
.eis-busy-card {
  width: min(400px, 100%);
  padding: 28px 24px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
  text-align: center;
  pointer-events: none;
}
.eis-busy-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  border: 3px solid #c9d7ea;
  border-top-color: #1e3a5f;
  border-radius: 50%;
  animation: eis-busy-spin 0.7s linear infinite;
}
.eis-busy-card strong {
  display: block;
  font-size: 1.05rem;
  color: #111827;
}
.eis-busy-card p {
  margin: 8px 0 0;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.4;
}
@keyframes eis-busy-spin {
  to { transform: rotate(360deg); }
}


