:root {
  --ink: #142033;
  --muted: #697386;
  --line: #e3e8ef;
  --canvas: #f7f8fb;
  --warm: #fffbf4;
  --surface: #ffffff;
  --nav: #1f1f21;
  --blue: #2563eb;
  --green: #059669;
  --amber: #d97706;
  --teal: #0f766e;
  --purple: #9b4d8d;
  --coral: #e11d48;
  --shadow: 0 18px 40px rgba(20, 32, 51, .12);
  --soft-shadow: 0 12px 32px rgba(20, 32, 51, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
}

.alpha-environment-banner {
  position: sticky;
  top: 0;
  z-index: 10000;
  padding: 8px 14px;
  background: #7c2d12;
  color: #fff7ed;
  border-bottom: 2px solid #fb923c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: center;
}

.alpha-disabled-card {
  border-color: #fdba74;
  background: #fff7ed;
}

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

button, input, select, textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 6px;
  min-height: 38px;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

button.good {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(20, 32, 51, .10);
}

button:focus-visible {
  outline: 0;
  border-color: rgba(37, 99, 235, .62);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

button.danger {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

button.icon {
  width: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  min-height: 38px;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(16, 135, 245, .55);
  box-shadow: 0 0 0 3px rgba(16, 135, 245, .12);
  outline: 0;
}

/* Keep Web Office select menus anchored below their controls. Chromium's
   native picker can use stale page-scroll coordinates inside fixed modals. */
@supports (appearance: base-select) {
  select,
  ::picker(select) {
    appearance: base-select;
  }

  select {
    align-items: center;
  }

  ::picker(select) {
    position-area: block-end span-inline-end;
    position-try-fallbacks: none;
    min-width: anchor-size(width);
    max-height: min(320px, 50vh);
    margin-top: 4px;
    padding: 4px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow);
  }

  select option {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 6px;
  }

  select option:hover,
  select option:focus,
  select option:checked {
    background: #eff6ff;
    color: var(--ink);
  }
}

.marketing-body {
  background: #f4f6fa;
}

.site {
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 8%, rgba(16, 135, 245, .12), transparent 28%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 44%, #ffffff 100%);
}

.site-nav {
  width: min(1180px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-brand img {
  display: block;
  width: auto;
  max-width: min(340px, 52vw);
  height: 58px;
  object-fit: contain;
}

.site-nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #475569;
  font-weight: 700;
  font-size: 14px;
}

.site-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: #fff;
  color: #142033;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(20, 32, 51, .07);
}

.site-button.primary {
  background: #1087f5;
  border-color: #1087f5;
  color: #fff;
}

.site-button.ghost {
  background: rgba(255, 255, 255, .72);
}

.site-button.login-link {
  background: #142033;
  border-color: #142033;
  color: #fff;
}

.hero {
  width: min(1180px, calc(100% - 32px));
  min-height: min(760px, calc(100vh - 118px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(360px, 1.05fr);
  gap: 44px;
  align-items: center;
  padding: 18px 0 34px;
}

.hero-copy {
  padding-bottom: 26px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #1087f5;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(52px, 8vw, 96px);
  line-height: .9;
  letter-spacing: 0;
}

.hero-text {
  max-width: 660px;
  margin: 22px 0 0;
  color: #475569;
  font-size: 21px;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 28px 0 0;
}

.hero-points {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero-points span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 11px;
}

.hero-media {
  min-width: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, .9);
  box-shadow: 0 26px 60px rgba(20, 32, 51, .18);
}

.hero-media img {
  display: block;
  width: 100%;
  height: auto;
}

.platform-admin-site {
  background: #f4f6fa;
}

.platform-admin-hero,
.platform-admin-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.platform-admin-hero {
  padding: 26px 0 18px;
}

.platform-admin-hero h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1;
}

.platform-admin-hero p:not(.eyebrow) {
  max-width: 680px;
  color: #475569;
  font-size: 17px;
  line-height: 1.45;
}

.platform-admin-content {
  padding: 10px 0 44px;
}

.platform-admin-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.platform-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr);
  gap: 18px;
  align-items: start;
}

.platform-admin-accordion-list {
  display: grid;
  gap: 12px;
}

.platform-admin-accordion {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.platform-admin-accordion > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 14px 18px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.platform-admin-accordion > summary::-webkit-details-marker {
  display: none;
}

.platform-admin-accordion > summary:hover,
.platform-admin-accordion > summary:focus-visible {
  background: #f8fafc;
}

.platform-admin-accordion > summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .25);
  outline-offset: -3px;
}

.platform-admin-accordion-chevron {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-right: 2px solid #2563eb;
  border-bottom: 2px solid #2563eb;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .18s ease;
}

.platform-admin-accordion[open] > summary {
  border-bottom: 1px solid var(--line);
  color: #1d4ed8;
}

.platform-admin-accordion[open] > summary .platform-admin-accordion-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.platform-admin-accordion-panel {
  padding: 18px;
}

.platform-admin-accordion-panel .platform-admin-form,
.platform-admin-accordion-panel .platform-company-list,
.platform-admin-accordion-panel .platform-master-bugs {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.platform-admin-form,
.platform-company-list,
.platform-invite-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
}

.platform-admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.platform-admin-form h2,
.platform-admin-form .wide,
.platform-admin-form .error,
.platform-admin-form button[type="submit"] {
  grid-column: 1 / -1;
}

.platform-admin-form h2,
.platform-company-list h2,
.platform-invite-card h3 {
  margin: 0;
}

.platform-admin-form textarea {
  min-height: 86px;
}

.app-update-form {
  grid-template-columns: minmax(0, 1fr);
}

.app-update-form .wide,
.app-update-form h2,
.app-update-form button[type="submit"] {
  grid-column: 1 / -1;
}

.app-update-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.app-update-toolbar button {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 12px;
}

.app-update-toolbar small {
  color: var(--muted);
  margin-left: auto;
}

.app-update-targets {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.app-update-target-list {
  display: grid;
}

.app-update-target {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.app-update-target:last-child {
  border-bottom: 0;
}

.app-update-target input {
  width: auto;
  min-height: 0;
  margin-top: 3px;
}

.app-update-target span {
  display: grid;
  gap: 2px;
}

.app-update-target small {
  color: var(--muted);
  line-height: 1.35;
}

.app-update-target.disabled {
  opacity: .55;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.check-row input {
  width: auto;
  min-height: 0;
}

.platform-result {
  margin-top: 14px;
}

.platform-invite-card {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.platform-company-list {
  padding: 18px;
}

.platform-side-stack {
  display: grid;
  gap: 18px;
}
+
.platform-main-stack {
  display: grid;
  gap: 18px;
}

.platform-master-bugs {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.platform-master-bug-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.platform-master-bug-head h2,
.platform-master-bug-head p {
  margin: 0;
}

.platform-master-bug-head img,
.pathfinder-copy-preview img {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  object-fit: cover;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .18);
}

.platform-master-bug-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(130px, 1fr));
  gap: 8px;
}

.platform-master-bug-toolbar input,
.platform-master-bug-toolbar select {
  min-width: 0;
}

.pathfinder-voice-form {
  margin: 0;
}

.pathfinder-copy-preview {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  background: #f0f9ff;
}

.pathfinder-copy-preview > div {
  display: grid;
  gap: 3px;
}

.pathfinder-copy-preview span,
.pathfinder-copy-preview small {
  color: var(--muted);
}

.platform-form-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .platform-master-bug-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-master-bug-toolbar input {
    grid-column: 1 / -1;
  }
}


.smtp-form {
  box-shadow: var(--soft-shadow);
}

.smtp-test-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.platform-company-stack {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.platform-company-row {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.platform-company-row.disabled {
  border-color: rgba(225, 29, 72, .24);
  background: #fff7f8;
}

.platform-company-row span,
.platform-company-row small {
  color: var(--muted);
}

.platform-company-warning {
  color: var(--coral) !important;
  font-weight: 800;
}

.platform-company-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.platform-company-actions button {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 12px;
}

.site-band,
.site-section,
.site-cta {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #142033;
  color: #fff;
  border-radius: 8px;
  padding: 22px;
}

.site-band .site-button {
  min-width: 124px;
}

.site-band strong {
  display: block;
  font-size: 20px;
}

.site-band p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, .74);
}

.site-section {
  padding: 78px 0 0;
}

.section-heading {
  max-width: 700px;
  margin-bottom: 22px;
}

.section-heading h2,
.split-section h2,
.site-cta h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: 0;
}

.feature-grid,
.price-grid,
.market-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature-card,
.price-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--soft-shadow);
}

.market-section {
  padding-top: 54px;
}

.market-grid .feature-card {
  background: #f8fafc;
}

.feature-card h3,
.price-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.feature-card p,
.price-card p,
.split-section p,
.site-cta p {
  color: #5b6575;
  line-height: 1.55;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, .76fr) minmax(420px, 1.24fr);
  gap: 30px;
  align-items: center;
}

.office-flow {
  display: grid;
  gap: 12px;
}

.flow-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--soft-shadow);
}

.flow-step span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #142033;
  color: #33e083;
  font-weight: 900;
}

.flow-step h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.flow-step p {
  margin: 0;
}

.price-card strong {
  display: block;
  color: #1087f5;
  font-size: 24px;
}

.price-card ul {
  margin: 16px 0 0;
  padding-left: 18px;
  color: #475569;
  line-height: 1.8;
}

.site-cta {
  margin-top: 76px;
  margin-bottom: 40px;
  background: #142033;
  color: #fff;
  border-radius: 8px;
  padding: 36px;
  text-align: center;
}

.site-cta p {
  color: rgba(255, 255, 255, .76);
}

.contact-site {
  min-height: 100vh;
}

.contact-hero {
  width: min(1080px, calc(100% - 32px));
  min-height: calc(100vh - 74px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(360px, .7fr);
  gap: 34px;
  align-items: center;
  padding: 44px 0;
}

.contact-hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: .96;
  letter-spacing: 0;
}

.contact-hero p {
  max-width: 620px;
  color: #475569;
  font-size: 19px;
  line-height: 1.55;
}

.contact-form {
  display: grid;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.contact-form .wide {
  grid-column: auto;
}

.contact-form p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.manual-site {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #f8fafc 0%, #eef3f8 34%, #ffffff 100%);
  color: var(--ink);
}

.manual-nav {
  width: min(1180px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.manual-brand img {
  display: block;
  width: auto;
  max-width: min(320px, 52vw);
  height: 54px;
  object-fit: contain;
}

.manual-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #475569;
  font-weight: 800;
  font-size: 14px;
}

.manual-nav-actions a {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 9px 12px;
}

.manual-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 32px;
  align-items: center;
  padding: 28px 0 36px;
}

.manual-hero h1 {
  margin: 0;
  max-width: 720px;
  font-size: 58px;
  line-height: .96;
  letter-spacing: 0;
}

.manual-hero p {
  max-width: 650px;
  color: #475569;
  font-size: 18px;
  line-height: 1.55;
}

.manual-search-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.manual-search-panel input {
  min-height: 48px;
  font-size: 15px;
}

.manual-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.manual-chips button {
  min-width: 44px;
  min-height: 44px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.manual-chips button.active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.manual-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.manual-fast-path {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.manual-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 4px;
}

.manual-metric strong {
  color: var(--blue);
  font-size: 30px;
  line-height: 1;
}

.manual-metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.manual-results {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 56px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.manual-index {
  position: sticky;
  top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  padding: 14px;
  display: grid;
  gap: 6px;
}

.manual-index strong {
  margin-bottom: 4px;
}

.manual-index a {
  display: flex;
  align-items: center;
  min-height: 44px;
  box-sizing: border-box;
  border-radius: 6px;
  color: #475569;
  padding: 8px 9px;
  font-size: 13px;
  font-weight: 800;
}

.manual-index a:hover {
  background: #eef6ff;
  color: var(--blue);
}

.manual-topic-list {
  display: grid;
  gap: 14px;
}

.manual-topic,
.manual-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  padding: 20px;
  scroll-margin-top: 18px;
}

.manual-topic-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.manual-topic-head span {
  border-radius: 999px;
  background: #eef6ff;
  color: #1e40af;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
}

.manual-topic-head a {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
}

.manual-summary {
  margin: 10px 0 14px;
  color: #475569;
  line-height: 1.55;
}

.manual-topic ol {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
  color: #263244;
  line-height: 1.5;
}

.manual-tip {
  margin-top: 16px;
  border-left: 4px solid var(--green);
  background: #f0fdf4;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.manual-tip p {
  margin: 0;
  color: #31523f;
  line-height: 1.45;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.settings-logo-row {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 16px;
  align-items: end;
  margin: 10px 0 16px;
}

.settings-logo-preview {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.settings-logo-preview img {
  max-width: 100%;
  max-height: 76px;
  object-fit: contain;
}

.settings-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.settings-nav {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  box-shadow: var(--soft-shadow);
}

.settings-nav button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 10px;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
}

.settings-nav button:hover,
.settings-nav button:focus,
.settings-nav button.active {
  background: #f1f5f9;
  color: var(--blue);
}

.settings-body {
  display: grid;
  gap: 14px;
}

.settings-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--soft-shadow);
  scroll-margin-top: 16px;
}

.settings-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.settings-card-heading h2 {
  margin: 0;
  font-size: 16px;
}

.settings-inline-action {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.payment-connection-status {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.payment-connection-status.good-text {
  border-color: #9dd9c8;
  background: #edfdf7;
}

.payment-connection-status.error {
  border-color: #fecdd3;
  background: #fff1f2;
}

.payment-security-note {
  margin: 4px 0 12px;
  padding: 12px 14px;
  border-left: 4px solid #0b6b55;
  border-radius: 6px;
  background: #edfdf7;
}

.payment-security-note p {
  margin: 4px 0 0;
  color: var(--muted);
}

.sms-notification-recipients {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
  margin: 12px 0;
}

.sms-notification-recipients .settings-card-heading {
  align-items: flex-start;
}

.sms-notification-recipients h3,
.sms-notification-recipients p {
  margin: 0;
}

.sms-notification-recipients p {
  margin-top: 4px;
}

.sms-notification-recipient-list {
  display: grid;
  gap: 8px;
}

.sms-notification-recipient-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.sms-notification-recipient-row select {
  width: 100%;
}

.call-receivers-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
  margin: 12px 0;
}

.call-receivers-editor h3,
.call-receivers-editor p {
  margin: 0;
}

.call-receiver-list {
  display: grid;
  gap: 9px;
  margin: 12px 0;
}

.call-receiver-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(170px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.voice-greeting-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.settings-save-bar {
  display: flex;
  justify-content: flex-end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.settings-account-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
  display: grid;
  gap: 6px;
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
}

.settings-account-panel strong {
  color: #059669;
  font-size: 15px;
}

.settings-account-panel .ghost {
  margin-top: 8px;
  justify-self: start;
}

.settings-account-panel .manual-link {
  margin-top: 8px;
  justify-self: start;
}

.settings-permission-roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.settings-permission-role-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  overflow: hidden;
}

.settings-permission-role-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.settings-permission-role-head h3 {
  margin: 0;
  font-size: 15px;
}

.settings-permission-role-head span {
  color: var(--muted);
  font-size: 12px;
}

.settings-permission-role-body {
  display: grid;
}

.settings-permission-module {
  display: grid;
  grid-template-columns: minmax(126px, .8fr) minmax(0, 1.4fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.settings-permission-module:last-child {
  border-bottom: 0;
}

.settings-permission-module strong {
  font-size: 13px;
  line-height: 1.25;
}

.settings-permission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.settings-permission-toggle {
  cursor: pointer;
}

.settings-permission-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-permission-toggle span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  min-width: 58px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.settings-permission-toggle input:checked + span {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.settings-permission-toggle input:focus-visible + span {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 2px;
}

.settings-permission-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 10px 12px;
  margin-top: 10px;
}

.settings-permission-note span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.settings-permission-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.notification-panel {
  display: grid;
  gap: 12px;
}

.notification-panel.has-unread {
  border-color: rgba(225, 29, 72, .24);
  box-shadow: 0 16px 38px rgba(225, 29, 72, .09);
}

.notification-panel-head,
.notification-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-panel-head h2 {
  margin: 0;
}

.notification-panel-head p {
  margin: 4px 0 0;
}

.notification-actions,
.notification-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.dashboard-notification-list {
  max-height: 480px;
  overflow: auto;
  padding-right: 2px;
}

.notification-list.full {
  gap: 10px;
}

.notification-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px;
  cursor: pointer;
}

.notification-row.unread {
  border-color: rgba(225, 29, 72, .28);
  background: #fff7f8;
}

.notification-decision-status {
  color: var(--blue, #2563eb);
  font-weight: 800;
}

.zero-charge-approval-recipient-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.notification-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #142033;
  color: #fff;
}

.notification-mark svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.notification-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.notification-main p {
  margin: 4px 0;
  color: var(--muted);
  line-height: 1.35;
}

.notification-main small {
  color: var(--subtle);
  font-weight: 700;
}

.notification-detail {
  display: grid;
  gap: 10px;
}

.dashboard-notification-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  cursor: pointer;
}

.dashboard-notification-row.unread {
  border-color: rgba(225, 29, 72, .28);
  background: #fff7f8;
}

.dashboard-notification-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #142033;
  color: #fff;
}

.dashboard-notification-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-notification-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-notification-main strong,
.dashboard-notification-main span,
.dashboard-notification-main small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-notification-main strong {
  font-size: 13px;
  line-height: 1.25;
}

.dashboard-notification-main span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}

.dashboard-notification-main small {
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-notification-actions {
  display: flex;
  gap: 6px;
}

.dashboard-notification-actions button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.compact-textarea textarea {
  min-height: 54px;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px 1fr;
  background: var(--canvas);
}

.app.nav-top {
  grid-template-columns: 1fr;
}

.sidebar {
  background: linear-gradient(180deg, #17181b 0%, #222326 100%);
  color: #fff;
  padding: 16px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.brand {
  display: grid;
  gap: 10px;
  padding: 0 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,.14);
  margin-bottom: 12px;
}

.brand img {
  display: block;
  width: 178px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.20));
}

.brand span {
  color: rgba(255,255,255,.68);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 4px;
}

.top-module-menu {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 10px 24px;
  position: sticky;
  top: 79px;
  z-index: 2;
}

.nav-horizontal {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.nav button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  border-color: transparent;
  background: transparent;
  color: rgba(255,255,255,.82);
  min-height: 44px;
}

.nav button.active {
  background: rgba(255,255,255,.16);
  color: #fff;
  border-color: rgba(255,255,255,.12);
}

.nav .glyph {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255,255,255,.12);
  flex: 0 0 auto;
}

.nav-horizontal button {
  width: auto;
  flex: 0 0 auto;
  background: #f8fafc;
  color: var(--ink);
  border-color: var(--line);
  min-height: 42px;
}

.nav-horizontal button.active {
  background: #10223d;
  color: #fff;
  border-color: #10223d;
}

.nav-horizontal .glyph {
  background: rgba(16,34,61,.08);
}

.nav-horizontal button.active .glyph {
  background: rgba(255,255,255,.14);
}

.glyph svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.topbar {
  background: rgba(255,255,255,.90);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 3;
}

.top-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.top-title img {
  width: 126px;
  max-width: 24vw;
  height: auto;
  flex: 0 0 auto;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.topbar p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.auto-sync-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  min-width: 118px;
  text-align: center;
  white-space: nowrap;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.menu-toggle .glyph {
  width: 22px;
  height: 22px;
}

.menu-toggle svg {
  width: 16px;
  height: 16px;
}

.content {
  padding: 20px 24px 34px;
  min-width: 0;
  flex: 1 1 auto;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 75% 12%, rgba(16, 135, 245, .13), transparent 28%),
    linear-gradient(180deg, #f7fafc 0%, #edf4f2 100%);
}

.login-panel {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.login-panel::before {
  content: "";
  display: block;
  width: 210px;
  height: 48px;
  margin-bottom: 14px;
  background: url("./assets/ZENFieldOps_LOGO_new.png") left center / contain no-repeat;
}

.login-panel h1 {
  margin: 0 0 4px;
  font-size: 26px;
}

.login-panel p {
  margin: 0 0 18px;
  color: var(--muted);
}

.create-company-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.create-company-form h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 16px 0;
  padding: 4px;
  border-radius: 10px;
  background: var(--canvas);
}

.login-tabs button {
  border: 0;
  background: transparent;
}

.login-tabs button.active {
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  text-align: left;
  padding-inline: 0;
}

.password-reset-form,
.guided-empty {
  display: grid;
  gap: 12px;
}

.guided-empty {
  justify-items: center;
}

.guided-empty p {
  margin: 0;
  max-width: 620px;
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

.phone-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.phone-input-row input {
  width: 100%;
}

.phone-field-call {
  min-height: 42px;
  padding-inline: 14px;
}

.contact-select-stack {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.contact-select-stack select {
  width: 100%;
}

.relationship-picker {
  position: relative;
  min-width: 0;
}

.relationship-native {
  position: absolute;
  width: 1px !important;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.relationship-search {
  width: 100%;
}

.relationship-results {
  position: absolute;
  z-index: 30;
  inset: calc(100% + 4px) 0 auto;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.relationship-results button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  text-align: left;
}

.relationship-results button:hover,
.relationship-results button:focus {
  background: var(--canvas);
}

.contact-select-view {
  justify-self: start;
  min-height: 34px;
  padding: 6px 12px;
}

.form-actions-wide {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 4px;
}

.form-actions-wide .contact-location-view {
  flex: 1 1 100%;
}

.form-section-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(37, 99, 235, .2);
  background: linear-gradient(90deg, rgba(37, 99, 235, .13), rgba(37, 99, 235, .035));
}

.form-section-title:first-child {
  margin-top: 0;
}

.form-section-title span {
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .055em;
}

.form-section-title::before {
  content: "";
  width: 5px;
  height: 22px;
  flex: 0 0 5px;
  border-radius: 999px;
  background: var(--blue);
}

.form-section-card {
  overflow: hidden;
  margin: 2px 0 8px;
  border: 1px solid rgba(37, 99, 235, .26);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .07);
}

.form-section-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.form-section-fields > .wide {
  grid-column: 1 / -1;
}

.invoices-section-card .form-section-title::before {
  background: var(--green);
}

.invoices-section-card .form-section-title {
  border-bottom-color: rgba(5, 150, 105, .2);
  background: linear-gradient(90deg, rgba(5, 150, 105, .14), rgba(5, 150, 105, .035));
}

.invoices-section-card .form-section-title span {
  color: #065f46;
}

.estimates-section-card .form-section-title::before {
  background: var(--purple);
}

.estimates-section-card .form-section-title {
  border-bottom-color: rgba(113, 75, 103, .22);
  background: linear-gradient(90deg, rgba(113, 75, 103, .15), rgba(113, 75, 103, .035));
}

.estimates-section-card .form-section-title span {
  color: #5b3653;
}

input[readonly] {
  background: #f1f5f9;
  color: #475569;
  cursor: default;
}

.date-time-field {
  position: relative;
  gap: 8px;
}

.date-time-field .date-time-display {
  grid-column: 2;
}

.date-time-display {
  width: 100%;
  min-height: 42px;
  justify-content: flex-start;
  text-align: left;
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.date-time-picker {
  grid-column: 1 / -1;
  width: 100%;
  min-width: min(620px, 100%);
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.date-picker-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(86px, 1fr));
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.date-picker-days button,
.date-time-options button {
  min-height: 52px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  background: #f8fafc;
}

.date-picker-days button.active,
.date-time-options button.active {
  border-color: rgba(37, 99, 235, .48);
  background: #eff6ff;
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .18);
}

.date-picker-days span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.date-picker-days strong {
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
}

.date-time-window,
.date-time-actions {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.date-time-window strong {
  text-align: center;
  color: var(--ink);
}

.date-time-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.date-time-actions {
  grid-template-columns: 1fr 1fr;
}

.address-suggestions {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.address-suggestions button {
  display: grid;
  min-height: 52px;
  justify-items: start;
  align-content: center;
  gap: 2px;
  text-align: left;
  white-space: normal;
  background: #f8fafc;
}

.address-suggestions strong {
  font-size: 13px;
}

.address-suggestions span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.products-builder {
  display: grid;
  gap: 16px;
  min-width: 0;
  container-type: inline-size;
}

.products-builder-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 0;
}

.products-builder-heading strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.products-builder-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.product-catalog-picker {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #d8e3ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.product-catalog-title,
.product-selected-heading,
.product-custom-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.product-catalog-title > div,
.product-custom-heading {
  min-width: 0;
}

.product-catalog-title strong,
.product-selected-heading strong,
.product-custom-heading strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.product-catalog-title span:not(.product-catalog-status),
.product-custom-heading > span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.product-catalog-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.product-catalog-head button {
  min-width: 142px;
  min-height: 40px;
}

.product-catalog-status {
  flex: 0 0 auto;
  border: 1px solid #dbe6f2;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.product-multi-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding: 3px 6px 3px 3px;
  scrollbar-gutter: stable;
}

.product-multi-option {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: center !important;
  min-width: 0;
  min-height: 56px;
  padding: 10px 12px !important;
  border: 1px solid #dbe4ee;
  border-radius: 9px;
  background: #fbfdff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.product-multi-option:hover,
.product-multi-option:focus-within {
  border-color: #7fb1e8;
  background: #f2f8ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .09);
}

.product-multi-option.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: inset 3px 0 0 #2563eb;
}

.product-multi-option input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  margin: 0;
}

.product-multi-option span,
.product-multi-option strong,
.product-multi-option small {
  display: block;
  min-width: 0;
}

.product-multi-option small {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
}

.product-catalog-empty,
.product-lines-empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 22px 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  text-align: center;
}

.product-catalog-empty strong,
.product-lines-empty strong {
  color: var(--ink);
  font-size: 13px;
}

.product-catalog-empty span,
.product-lines-empty span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.product-selected-panel,
.product-custom-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #d8e3ef;
  border-radius: 12px;
  background: #fff;
}

.product-selected-panel {
  border-top: 3px solid #2563eb;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}

.product-selected-heading > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.product-selected-count {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.product-selected-summary {
  display: grid;
  justify-items: end;
  gap: 1px;
  flex: 0 0 auto;
}

.product-selected-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.product-selected-total {
  color: #0f172a;
  font-size: 16px;
}

.product-custom-panel {
  background: #f8fafc;
}

.product-custom-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 86px 110px auto;
  gap: 10px;
  align-items: end;
}

.product-custom-field {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 5px !important;
  min-width: 0;
  padding: 0 !important;
}

.product-custom-field > span {
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}

.product-custom-field input {
  width: 100%;
  min-width: 0;
}

.product-custom-row button {
  min-height: 40px;
  white-space: nowrap;
}

.product-custom-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.product-builder-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(160px, 1fr) 92px 110px auto;
  gap: 8px;
  align-items: end;
}

.product-builder-row button {
  min-height: 38px;
}

.product-lines {
  display: grid;
  gap: 10px;
}

.product-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 108px) minmax(92px, auto) auto;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding: 11px 12px 11px 14px;
  border: 1px solid #dbe4ee;
  border-left: 3px solid #60a5fa;
  border-radius: 10px;
  background: #fff;
}

.product-line strong,
.product-line span {
  display: block;
}

.product-line span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.product-line b {
  color: #0f172a;
  font-size: 15px;
}

.product-line-main {
  min-width: 0;
}

.product-line-main > strong {
  overflow-wrap: anywhere;
}

.product-line-quantity {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 3px !important;
  min-width: 0;
  padding: 0 !important;
}

.product-line-quantity span {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
}

.product-line-quantity input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
}

.product-line-total {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 92px;
}

.product-line-total span {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.product-line .product-line-remove {
  min-height: 32px;
  border-color: #fecaca;
  background: #fff;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
}

.product-line .product-line-remove:hover,
.product-line .product-line-remove:focus-visible {
  border-color: #ef4444;
  background: #fef2f2;
}

.detail-lines .product-line {
  grid-template-columns: minmax(0, 1fr) auto;
}

@container (max-width: 700px) {
  .product-multi-results {
    grid-template-columns: 1fr;
  }

  .product-custom-row {
    grid-template-columns: minmax(0, 1fr) 96px 128px;
  }

  .product-custom-row > .product-custom-actions {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .product-custom-actions button {
    min-width: 160px;
  }
}

@container (max-width: 520px) {
  .product-catalog-title,
  .product-selected-heading,
  .product-custom-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .product-catalog-status {
    justify-self: start;
  }

  .product-catalog-head,
  .product-custom-row,
  .product-line {
    grid-template-columns: 1fr;
  }

  .product-catalog-head button,
  .product-custom-row > .product-custom-actions {
    grid-column: 1;
    justify-self: stretch;
    width: 100%;
  }

  .product-custom-actions {
    flex-direction: column;
  }

  .product-custom-actions button {
    width: 100%;
  }

  .product-selected-summary,
  .product-line-total {
    justify-items: start;
  }
}

.wo-products-summary {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #e8edf4;
  border-radius: 8px;
  background: #fbfdff;
}

.wo-products-summary.compact {
  gap: 2px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.wo-products-summary strong {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ink);
}

.wo-products-summary span,
.wo-products-summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.wo-products-summary.compact span,
.wo-products-summary.compact small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.management-host:empty {
  display: none;
}

.management-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.select-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  min-height: 32px;
  margin: 0;
  color: var(--ink);
  font-weight: 900;
}

.select-all input,
.row-select {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.select-col {
  width: 42px;
  text-align: center;
}

.card-select {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
}

.record-card,
.wo-list-card {
  position: relative;
}

.record-card .card-select + .record-card-head,
.wo-list-card .card-select + .wo-list-main {
  padding-left: 30px;
}

.management-panel {
  display: grid;
  gap: 12px;
}

.management-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.import-form {
  display: grid;
  gap: 12px;
}

.migration-card {
  display: grid;
  gap: 16px;
}

.migration-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.migration-heading h2 {
  margin-bottom: 6px;
}

.migration-heading p {
  margin: 0;
  max-width: 760px;
}

.migration-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.migration-steps article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}

.migration-steps strong {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
}

.migration-steps b,
.migration-steps span {
  display: block;
}

.migration-steps span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.migration-center {
  display: grid;
  gap: 14px;
}

.migration-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.migration-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.migration-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.migration-check input {
  width: auto;
}

.migration-intro {
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

.migration-intro h3,
.migration-mapping h3,
.migration-preview h3 {
  margin: 0 0 6px;
}

.migration-intro p,
.migration-mapping p {
  margin: 0;
}

.migration-source-note {
  margin-top: 8px !important;
  font-size: 12px;
  font-weight: 700;
}

.migration-status {
  min-height: 20px;
}

.migration-mapping,
.migration-preview,
.migration-failure-report,
.migration-checklist {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.migration-failure-report[hidden] {
  display: none;
}

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

.migration-failure-head h3,
.migration-failure-head p {
  margin: 0;
}

.migration-failure-table pre {
  margin: 0;
  max-width: 420px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.migration-export-guide[hidden] {
  display: none;
}

.migration-api-transfer[hidden] {
  display: none;
}

.migration-api-panel {
  border: 1px solid #b7d7ff;
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.migration-api-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.migration-api-head h3,
.migration-api-head p {
  margin: 0;
}

.migration-api-head p {
  color: var(--muted);
  margin-top: 4px;
}

.migration-api-head span {
  border: 1px solid #b7d7ff;
  border-radius: 999px;
  color: #075985;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.migration-api-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

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

.migration-api-sample {
  min-width: 0;
}

.migration-odoo-guide {
  border: 1px solid #b7d7ff;
  border-radius: 8px;
  background: #f4f9ff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.migration-odoo-guide-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.migration-odoo-guide-head h3,
.migration-odoo-guide-head p {
  margin: 0;
}

.migration-odoo-guide-head p {
  color: var(--muted);
  margin-top: 4px;
}

.migration-odoo-guide-head span {
  border: 1px solid #b7d7ff;
  border-radius: 999px;
  color: #075985;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.migration-odoo-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.migration-odoo-fields article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.migration-odoo-fields strong {
  display: block;
  margin-bottom: 8px;
}

.migration-odoo-fields ul {
  margin: 0;
  padding-left: 18px;
  columns: 2;
}

.migration-odoo-fields li {
  break-inside: avoid;
  margin-bottom: 4px;
}

.migration-odoo-tip {
  margin: 0;
  color: #075985;
  font-weight: 700;
}

.migration-map-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.migration-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 12px;
}

.migration-summary-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.migration-summary-grid strong {
  display: block;
  color: var(--blue);
  font-size: 24px;
}

.migration-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.migration-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.migration-table {
  min-width: 840px;
  width: 100%;
  border-collapse: collapse;
}

.migration-table th,
.migration-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.migration-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.migration-table tr.ready td:first-child {
  border-left: 4px solid var(--green);
}

.migration-table tr.warn td:first-child {
  border-left: 4px solid var(--amber);
}

.migration-table tr.blocked td:first-child {
  border-left: 4px solid var(--coral);
}

.migration-checklist {
  display: grid;
  gap: 8px;
}

.migration-checklist ol {
  margin: 0;
  padding-left: 22px;
  columns: 2;
}

.locked-notice,
.locked-invoice {
  border-color: rgba(217, 119, 6, .28);
  background: #fff7ed;
}

.locked-notice {
  display: grid;
  gap: 6px;
}

.invoice-customer-panel,
.invoice-actions {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.invoice-customer-panel.compact {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
}

.invoice-customer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invoice-customer-chips > span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 6px 8px;
}

.invoice-customer-chips small {
  color: var(--muted);
  font-weight: 800;
}

.invoice-customer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.invoice-phone-action {
  display: flex;
  justify-content: flex-start;
}

.invoice-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invoice-photo-panel,
.invoice-photo-choices,
.invoice-document-preview,
.invoice-preview-photos {
  display: grid;
  gap: 10px;
}

.invoice-photo-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.invoice-photo-choices {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.invoice-photo-choice {
  display: grid;
  grid-template-columns: auto 64px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  cursor: pointer;
}

.invoice-photo-choice img {
  width: 64px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  background: #f1f5f9;
}

.invoice-photo-choice span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.invoice-photo-choice b,
.invoice-photo-choice small {
  overflow-wrap: anywhere;
}

.invoice-photo-choice small {
  color: var(--muted);
}

.invoice-preview-text {
  max-height: 70vh;
  overflow: auto;
  white-space: pre-wrap;
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.wo-flow {
  display: grid;
  gap: 8px;
}

.wo-quick-status {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.wo-quick-status button {
  min-height: 30px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}

.wo-created-at-quick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin-left: auto;
  padding: 0 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.wo-created-at-quick strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.wo-status-optic {
  display: inline-grid;
  grid-template-columns: 12px auto;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 1px solid #d8e0eb;
  border-radius: 999px;
  padding: 4px 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.wo-status-light {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #64748b;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, .12);
}

.wo-status-optic.yellow .wo-status-light {
  background: #facc15;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, .18);
}

.wo-status-optic.green .wo-status-light {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .16);
}

.wo-status-optic.blue .wo-status-light {
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.wo-status-optic.red .wo-status-light {
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .14);
}

.wo-pause-reason {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(220, 38, 38, .28);
  border-radius: 999px;
  padding: 4px 10px;
  background: #fff1f2;
  color: #9f1239;
  font-size: 12px;
  font-weight: 900;
}

.pause-work-order-inline,
.pause-work-order-form {
  display: grid;
  gap: 10px;
}

.pause-work-order-inline {
  border: 1px solid rgba(220, 38, 38, .22);
  border-radius: 8px;
  padding: 12px;
  background: #fff7f7;
}

.pause-work-order-inline[hidden],
.unknown-issue-field[hidden] {
  display: none;
}

.pause-work-order-inline textarea,
.pause-work-order-form textarea {
  min-height: 90px;
}

.wo-flow-card {
  display: grid;
  gap: 12px;
  padding: 0;
}

.wo-flow-card label {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

.wo-flow-card input,
.wo-flow-card select,
.wo-flow-card textarea,
.wo-flow-card .date-time-display {
  min-height: 30px;
  border-width: 0 0 1px;
  border-radius: 0;
  padding: 5px 8px;
  box-shadow: none;
}

.wo-flow-card input[readonly] {
  background: #fff;
  color: #0f172a;
  font-weight: 900;
}

.wo-title-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) minmax(160px, 220px);
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.wo-title-row label {
  grid-template-columns: 1fr;
  gap: 3px;
  font-size: 11px;
  color: #8a95a8;
}

.wo-source-stack {
  display: grid;
  align-content: start;
  gap: 8px;
}

.wo-title-row input[name="number"] {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  font-size: 24px;
}

.wo-title-row input[name="title"] {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #64748b;
}

.wo-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.wo-flow-card fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px 14px 14px;
  border: 1.5px solid rgba(245, 158, 11, .32);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(15, 23, 42, .06);
}

.wo-flow-card legend {
  margin-left: -2px;
  padding: 5px 10px;
  border: 1px solid rgba(245, 158, 11, .28);
  border-radius: 999px;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.wo-address-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, .32fr);
  gap: 10px 16px;
}

.wo-address-grid label:first-child,
.wo-address-grid label:nth-child(3),
.wo-address-grid label:nth-child(5) {
  grid-column: 1;
}

.wo-address-grid label:nth-child(2),
.wo-address-grid label:nth-child(4) {
  grid-column: 2;
}

.wo-invoice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 8px 16px;
}

.wo-invoice-grid input[readonly] {
  background: #f5f8fc;
  color: #142033;
  font-weight: 700;
}

.wo-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid #cfd7e3;
  padding: 8px 8px 0;
}

.wo-tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  border-radius: 6px 6px 0 0;
  border-bottom: 0;
  background: #fff;
  color: #6d5e9c;
  font-size: 12px;
}

.wo-tabs button.active {
  border-color: #cfd7e3;
  color: #142033;
  box-shadow: none;
}

.wo-tab-panel {
  min-height: 138px;
  border: 0;
  background: #fff;
}

.wo-sms-tab,
.wo-calls-tab,
.wo-call-history {
  display: grid;
  gap: 10px;
}

.wo-calls-tab > button {
  justify-self: start;
}

.wo-call-row {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.wo-call-row span {
  color: var(--muted);
  font-size: 12px;
}

.wo-activity-tabs-shell {
  overflow: hidden;
  padding: 0;
}

.wo-activity-tabs-shell .wo-tab-panel {
  padding: 14px;
}

.wo-internal-notes {
  display: grid;
  gap: 8px;
}

.wo-internal-notes h3,
.wo-internal-notes p {
  margin: 0;
}

.wo-detail-section {
  overflow: hidden;
  border: 1.5px solid rgba(245, 158, 11, .3);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(15, 23, 42, .06);
}

.wo-photos-panel,
.wo-photo-group {
  display: grid;
  gap: 10px;
}

.wo-photo-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px;
}

.wo-photo-upload.dragging {
  border: 2px dashed var(--blue);
  border-radius: 8px;
  background: #eff6ff;
}

.wo-photo-batch {
  display: grid;
  gap: 14px;
}

.wo-photo-batch > p {
  margin: 0;
}

.wo-photo-batch-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wo-photo-batch-fields label {
  display: grid;
  gap: 6px;
}

.wo-photo-batch-fields .wide {
  grid-column: 1 / -1;
}

.wo-photo-dictation {
  display: flex;
  justify-content: flex-start;
}

.wo-photo-batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.wo-photo-batch-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.wo-photo-batch-card > img,
.wo-photo-batch-card > video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f1f5f9;
}

.wo-photo-batch-card > div {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.wo-photo-batch-card textarea {
  min-height: 68px;
}

.wo-photo-batch-card progress {
  width: 100%;
}

.wo-photo-upload-state {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wo-photo-upload-state.saved {
  color: #047857;
}

.wo-photo-upload-state.failed {
  color: #b91c1c;
}

.wo-photo-batch-status {
  margin: 0;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
  color: var(--ink);
  font-weight: 700;
}

.button-like {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.button-like.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.button-like input[type="file"] {
  display: none;
}

.wo-photo-group {
  padding: 0 10px 10px;
}

.wo-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 10px;
}

.wo-photo-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.wo-photo-card:hover,
.wo-photo-card:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
  outline: none;
}

.wo-photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f1f5f9;
}

.wo-photo-card div {
  display: grid;
  gap: 3px;
  padding: 8px;
}

.wo-photo-card b,
.wo-photo-card span {
  overflow-wrap: anywhere;
}

.wo-photo-card span {
  color: var(--muted);
  font-size: 12px;
}

.photo-viewer {
  display: grid;
  gap: 12px;
}

.photo-modal-backdrop {
  z-index: 35;
}

.photo-modal {
  width: min(1120px, 100%);
}

.photo-viewer-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.photo-viewer-stage {
  overflow: auto;
  max-width: min(86vw, 980px);
  max-height: 72vh;
  border-radius: 8px;
  background: #020617;
  text-align: center;
}

.photo-viewer-stage img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  margin: auto;
  object-fit: contain;
  transform-origin: center center;
}

.photo-viewer-meta {
  display: grid;
  gap: 4px;
}

.photo-zoom-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.photo-zoom-actions button {
  min-height: 32px;
  padding: 6px 10px;
}

.photo-zoom-actions span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.photo-viewer-meta span {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 640px) {
  .wo-photo-batch-fields {
    grid-template-columns: 1fr;
  }

  .wo-photo-batch-fields .wide {
    grid-column: auto;
  }
}

.wo-tab-panel label {
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 10px;
}

.wo-tab-table .products-builder {
  padding: 0;
}

.wo-tab-table .products-builder > div {
  border-radius: 0;
}

.wo-tab-table .product-lines {
  border-top: 1px solid #e8edf4;
}

.wo-tab-table .product-line {
  border-width: 0 0 1px;
  border-radius: 0;
  background: #f8fafc;
}

.signature-field {
  padding: 10px;
}

.signature-shell {
  display: grid;
  gap: 8px;
}

.signature-pad {
  width: 100%;
  height: 180px;
  border: 1px solid #e4e9f1;
  background: #fff;
  touch-action: none;
}

.signature-actions {
  display: flex;
  justify-content: flex-end;
}

.signature-preview {
  display: grid;
  gap: 8px;
  justify-items: start;
  width: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.signature-preview img {
  display: block;
  width: min(100%, 360px);
  max-height: 140px;
  object-fit: contain;
  border: 1px solid #e4e9f1;
  border-radius: 6px;
  background: #fff;
}

.signature-viewer img {
  display: block;
  max-width: min(86vw, 980px);
  max-height: 72vh;
  object-fit: contain;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  background: #fff;
}

.contact-location-view {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.contact-location-view h3 {
  margin: 0;
  font-size: 16px;
}

.contact-location-search {
  width: 100%;
}

.contact-location-list {
  display: grid;
  gap: 8px;
}

.contact-location-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.contact-location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.contact-tabs-shell {
  min-width: 0;
  margin-top: 4px;
}

.contact-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid #cfd7e3;
  scrollbar-width: thin;
}

.contact-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  border-radius: 6px 6px 0 0;
  border-bottom: 0;
  color: #6d5e9c;
  font-size: 12px;
}

.contact-tabs button.active {
  border-color: #cfd7e3;
  color: var(--ink);
  box-shadow: none;
}

.contact-tab-panels {
  min-height: 180px;
  border: 1px solid #d9e1ec;
  border-top: 0;
  background: #fff;
}

.contact-tab-panel {
  padding: 14px;
}

.contact-tab-panel > .contact-location-view {
  margin-top: 12px;
}

.contact-tab-actions {
  display: flex;
  justify-content: flex-end;
}

.contact-invoice-list {
  display: grid;
  gap: 8px;
}

.contact-invoice-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  height: auto;
  min-height: 58px;
  padding: 10px 12px;
  text-align: left;
  white-space: normal;
}

.contact-invoice-row > span {
  display: grid;
  gap: 3px;
}

.contact-invoice-row > span:last-child {
  text-align: right;
}

.contact-invoice-row small {
  color: var(--muted);
}

.sms-inbox {
  display: grid;
  gap: 10px;
}

.voice-call-list {
  display: grid;
  gap: 10px;
}

.voice-call-row {
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.voice-call-row-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.voice-call-row-main > div {
  display: grid;
  gap: 4px;
}

.voice-call-row small {
  color: var(--muted);
}

.call-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.voice-call-popup-stack {
  position: fixed;
  top: 84px;
  right: 24px;
  z-index: 10050;
  width: min(340px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid #5b21b6;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(31, 41, 55, 0.28);
}

.voice-call-popup-handle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  color: #fff;
  background: #6d28d9;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.voice-call-popup-handle:active { cursor: grabbing; }
.voice-call-popup-handle span { font-size: 11px; opacity: 0.82; }

.voice-call-popup {
  display: grid;
  gap: 7px;
  padding: 13px;
  border-top: 1px solid var(--line);
}

.voice-call-popup > span {
  color: var(--muted);
  font-size: 13px;
}

.sms-inbox-row {
  display: grid;
  gap: 5px;
  width: 100%;
  height: auto;
  min-height: 86px;
  padding: 12px 14px;
  text-align: left;
  white-space: normal;
  background: #fff;
}

.sms-inbox-row.unread {
  border-color: var(--blue);
  background: #eff6ff;
}

.sms-inbox-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.sms-inbox-row small,
.sms-bubble small {
  color: var(--muted);
}

.sms-thread-shell {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.sms-thread-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.sms-thread-heading h2,
.sms-thread-heading p {
  margin: 0;
}

.sms-unknown-contact-actions {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--amber);
  border-radius: 12px;
  background: rgba(245, 158, 11, .10);
}

.sms-thread-messages {
  display: grid;
  gap: 10px;
  align-content: start;
  height: clamp(280px, 50vh, 520px);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.sms-bubble-row {
  display: flex;
}

.sms-bubble-row.outbound {
  justify-content: flex-end;
}

.sms-bubble-row.inbound {
  justify-content: flex-start;
}

.sms-bubble {
  display: grid;
  gap: 7px;
  max-width: min(78%, 680px);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f3f4f6;
}

.sms-bubble.outbound {
  border-color: var(--blue);
  background: #dbeafe;
}

.sms-bubble-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.sms-media-button {
  width: auto;
  justify-self: start;
}

.sms-media-thumbnail {
  display: block;
  width: min(260px, 100%);
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #e5e7eb;
  object-fit: cover;
  cursor: zoom-in;
}

.sms-media-thumbnail:hover,
.sms-media-thumbnail:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}

.sms-media-viewer,
.sms-location-picker,
.sms-location-results {
  display: grid;
  gap: 10px;
}

.sms-media-viewer .photo-viewer-stage {
  margin: 0 auto;
}

.sms-media-viewer-actions,
.sms-location-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.sms-location-save-panel:empty {
  display: none;
}

.sms-location-result {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 52px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.sms-location-result:hover,
.sms-location-result:focus-visible {
  border-color: var(--blue);
  background: #eff6ff;
}

.sms-location-result small {
  color: var(--muted);
}

.sms-composer {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.sms-composer textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
}

.sms-file-input {
  display: none;
}

.sms-composer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sms-new-message {
  min-width: min(440px, 78vw);
}

@media (max-width: 640px) {
  .sms-thread-heading,
  .sms-inbox-row-head {
    align-items: stretch;
    flex-direction: column;
  }

  .sms-bubble {
    max-width: 90%;
  }

  .sms-media-thumbnail {
    height: 150px;
  }
}

.field-locations-content {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 188px);
}

.field-location-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  flex: 1 1 auto;
}

.field-location-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
}

.field-location-map-host {
  display: grid;
  min-width: 0;
  min-height: 0;
}

.field-location-sidebar .subtoolbar {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.field-location-sidebar .subtoolbar .search {
  width: 100%;
}

.field-location-rosters {
  display: grid;
  grid-template-rows: minmax(170px, .9fr) minmax(230px, 1.1fr);
  gap: 10px;
  min-height: 0;
}

.field-location-roster {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.field-location-roster.empty {
  display: grid;
  grid-template-rows: none;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 100%;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.field-location-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.field-location-section-title span {
  min-width: 24px;
  border-radius: 999px;
  padding: 2px 7px;
  background: #e2e8f0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.field-location-card {
  display: grid;
  gap: 8px;
  align-items: stretch;
}

.field-location-list {
  display: grid;
  align-content: start;
  min-height: 0;
  overflow: auto;
}

.field-location-card {
  cursor: pointer;
  min-height: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: left;
}

.field-location-card:hover,
.field-location-card.selected {
  background: #f0fdfa;
}

.field-location-card.selected {
  box-shadow: inset 4px 0 0 var(--teal);
}

.field-work-order-card {
  border-left: 4px solid var(--tech-color);
  background: var(--tech-bg);
}

.field-work-order-card:hover,
.field-work-order-card.selected {
  background: #fff;
  box-shadow: inset 4px 0 0 var(--tech-color);
}

.field-work-order-map-status {
  font-weight: 700;
}

.field-work-order-map-status.located {
  color: #047857;
}

.field-location-card:last-child {
  border-bottom: 0;
}

.field-location-person {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.field-location-person strong,
.field-location-person span,
.field-location-coordinates {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-location-card > span,
.field-location-coordinates {
  color: var(--muted);
  font-size: 12px;
}

.field-location-actions {
  display: flex;
  justify-content: stretch;
}

.field-location-actions button {
  width: 100%;
}

.field-work-order-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.field-location-map {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #dbeafe;
  box-shadow: var(--soft-shadow);
}

.field-location-map-toolbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(20, 32, 51, .16);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
}

.field-location-map-toolbar span {
  color: var(--muted);
  font-size: 12px;
}

.field-location-map-summary {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.field-location-map-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.field-location-map-actions button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.field-location-map-canvas {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #dbeafe;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.field-location-map-canvas.google-map-canvas {
  cursor: default;
  touch-action: auto;
  user-select: auto;
}

.google-map-info {
  display: grid;
  gap: 4px;
  max-width: 260px;
  color: #142033;
  line-height: 1.35;
}

.google-map-info strong,
.google-map-info span {
  display: block;
}

.google-map-info span {
  color: #526174;
  font-size: 12px;
}

.zen-map-label {
  max-width: 220px;
  overflow: hidden;
  transform: translate(14px, -22px);
  border: 1px solid rgba(20, 32, 51, .24);
  border-radius: 999px;
  padding: 4px 8px !important;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 3px 10px rgba(20, 32, 51, .24);
  color: #142033 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zen-map-label.work-order {
  border-color: var(--tech-color, rgba(217, 119, 6, .55));
}

.google-map-work-order-info dl {
  display: grid;
  gap: 4px;
  margin: 2px 0 4px;
}

.google-map-work-order-info dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
}

.google-map-work-order-info dt {
  color: #526174;
  font-size: 12px;
  font-weight: 700;
}

.google-map-work-order-info dd {
  margin: 0;
  color: #142033;
  font-size: 12px;
}

.google-map-work-order-info a {
  color: #075985;
  font-size: 12px;
  font-weight: 800;
}

.field-location-map-canvas.dragging {
  cursor: grabbing;
}

.field-location-map-canvas.dragging .field-location-map-tiles,
.field-location-map-canvas.dragging .field-location-map-pins {
  transition: none;
}

.field-location-map-tiles,
.field-location-map-pins {
  position: absolute;
  inset: 0;
}

.field-location-map-tile {
  position: absolute;
  width: 256px;
  height: 256px;
  user-select: none;
  pointer-events: none;
}

.field-location-map-controls {
  position: absolute;
  top: 70px;
  left: 10px;
  z-index: 4;
  display: grid;
  gap: 6px;
  width: max-content;
  max-width: calc(100% - 20px);
}

.field-location-map-controls button {
  min-height: 34px;
  padding: 6px 10px;
  border-color: rgba(20, 32, 51, .22);
  background: rgba(255,255,255,.96);
  box-shadow: 0 4px 12px rgba(20, 32, 51, .18);
  font-size: 11px;
}

.field-location-map-controls .map-zoom {
  width: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.field-location-map:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
}

.field-location-map:fullscreen .field-location-map-canvas {
  min-height: 0;
}

.field-location-map-pin {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  transform: translate(-50%, -100%);
  width: 0;
  height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.field-location-map-pin::before {
  content: "";
  position: absolute;
  left: calc(var(--accuracy) / -2);
  top: calc(var(--accuracy) / -2);
  width: var(--accuracy);
  height: var(--accuracy);
  border-radius: 999px;
  background: rgba(15, 118, 110, .14);
  border: 1px solid rgba(15, 118, 110, .25);
  transform: translate(0, -10px);
}

.field-location-map-pin.work-order::before {
  display: none;
}

.field-location-pin-leader {
  position: absolute;
  z-index: -1;
  left: 0;
  top: -10px;
  width: var(--leader-length, 0);
  height: 2px;
  border-radius: 2px;
  background: rgba(20, 32, 51, .45);
  transform: rotate(var(--leader-angle, 0deg));
  transform-origin: 0 50%;
  pointer-events: none;
}

.field-location-pin-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid #fff;
  border-radius: 999px 999px 999px 2px;
  background: var(--teal);
  box-shadow: 0 8px 20px rgba(20, 32, 51, .28);
  transform: rotate(-45deg);
}

.field-location-map-pin.selected .field-location-pin-dot {
  width: 24px;
  height: 24px;
  background: var(--amber);
}

.field-location-map-pin.work-order .field-location-pin-dot {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--tech-color);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  line-height: 20px;
  transform: none;
}

.field-location-map-pin.work-order.selected .field-location-pin-dot {
  width: 30px;
  height: 30px;
  background: var(--tech-color);
  box-shadow: 0 0 0 4px var(--tech-line), 0 8px 20px rgba(20, 32, 51, .28);
}

.field-location-map-pin.work-order .field-location-pin-label {
  top: 15px;
  border-left: 4px solid var(--tech-color);
}

.field-location-pin-label {
  position: absolute;
  top: 12px;
  left: 14px;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(20, 32, 51, .14);
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 18px rgba(20, 32, 51, .18);
  font-size: 12px;
  font-weight: 800;
  transition: transform .16s ease;
}

.field-location-map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.field-location-map-attribution {
  position: absolute;
  right: 8px;
  bottom: 6px;
  z-index: 3;
  border-radius: 4px;
  padding: 3px 6px;
  background: rgba(255,255,255,.86);
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 860px) {
  .field-locations-content {
    min-height: calc(100vh - 156px);
  }

  .field-location-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(380px, 52vh) minmax(260px, 1fr);
  }

  .field-location-sidebar {
    order: 2;
  }

  .field-location-rosters {
    grid-template-rows: minmax(180px, auto) minmax(220px, auto);
  }

  .field-location-map {
    order: 1;
  }

  .field-location-map-canvas {
    min-height: 0;
  }

  .field-location-map-toolbar {
    align-items: flex-start;
  }

  .field-location-map-actions button {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 11px;
  }

  .field-location-map-controls {
    top: 82px;
  }

  .field-location-pin-label {
    max-width: 140px;
  }
}

.wo-notes-tab {
  display: grid;
  gap: 8px;
}

.toolbar, .subtoolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.subtoolbar {
  align-items: stretch;
}

.search {
  max-width: 360px;
  min-height: 42px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23697386' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") 12px center / 18px no-repeat;
  padding-left: 40px;
}

.employee-searchbar {
  justify-content: flex-start;
}

.employee-searchbar .search {
  flex: 1;
  max-width: 520px;
}

.view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e8edf4;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
}

.view-tabs button {
  min-height: 32px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.view-tabs button.active {
  background: #fff;
  border-color: var(--line);
  color: var(--blue);
}

.view-default-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.view-default-check input {
  width: 17px;
  min-height: 0;
  height: 17px;
}

.scoped-filter-host {
  min-height: 0;
}

.scoped-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(37,99,235,.22);
  border-radius: 8px;
  background: rgba(37,99,235,.07);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.scoped-filter button {
  min-height: 28px;
  padding: 4px 9px;
  border-color: rgba(37,99,235,.25);
  background: #fff;
  color: var(--blue);
  box-shadow: none;
  font-size: 12px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.dashboard-work-stack,
.dashboard-side-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.dashboard-work-stack {
  gap: 0;
}

.dashboard-work-stack > .dashboard-panel,
.dashboard-side-stack > .dashboard-panel,
.dashboard-side-stack > .notification-panel {
  margin-bottom: 0;
}

.dashboard-panel {
  min-width: 0;
  margin-bottom: 0;
}

.dashboard-work-stack .dashboard-panel-attention {
  border-radius: 8px 8px 0 0;
}

.dashboard-panel-today {
  border-color: rgba(37, 99, 235, .18);
}

.dashboard-work-stack .dashboard-panel-today {
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.dashboard-list {
  display: grid;
  gap: 8px;
}

.dashboard-work-item {
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(120px, .42fr) minmax(0, 1fr) minmax(140px, .55fr);
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  padding: 9px 11px;
}

.dashboard-work-item:hover,
.dashboard-work-item:focus {
  border-color: rgba(37, 99, 235, .28);
  background: #f8fbff;
}

.dashboard-work-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-work-item strong,
.dashboard-work-item small,
.dashboard-work-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-work-item strong {
  font-size: 14px;
  line-height: 1.25;
}

.dashboard-work-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.dashboard-work-meta,
.dashboard-work-time {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.dashboard-work-time {
  font-weight: 800;
  color: var(--blue);
}

.dashboard-work-meta {
  justify-self: end;
  max-width: 100%;
}

.inventory-toolbar {
  align-items: flex-start;
}

.inventory-toolbar strong {
  display: block;
  font-size: 18px;
}

.inventory-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

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

.inventory-panel {
  min-width: 0;
}

.inventory-panel.wide {
  grid-column: 1 / -1;
}

.inventory-table-wrap {
  max-height: 420px;
  overflow: auto;
}

.inventory-table-wrap table {
  min-width: 760px;
}

.inventory-table-wrap td,
.inventory-table-wrap th {
  white-space: nowrap;
}

.clock-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: var(--soft-shadow);
}

.clock-panel.clocked-in {
  border-color: rgba(5, 150, 105, .36);
  background: #ecfdf5;
}

.clock-panel strong {
  display: block;
  font-size: 18px;
}

.clock-panel span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.launcher-panel {
  background: var(--warm);
  border: 1px solid #f3eadc;
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--soft-shadow);
}

.launcher-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.launcher-heading strong {
  font-size: 17px;
}

.launcher-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 9px;
}

.app-tile {
  height: 104px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  padding: 10px 8px;
  background: #fff;
  border-color: rgba(226, 232, 240, .76);
  box-shadow: var(--soft-shadow);
  white-space: normal;
  text-align: center;
}

.app-tile strong {
  color: var(--blue);
  font-size: 13px;
  line-height: 1.15;
}

.app-tile small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.tile-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 -12px 22px rgba(0,0,0,.12);
}

.tile-icon.small {
  width: 42px;
  height: 42px;
  font-size: 15px;
  flex: 0 0 auto;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  min-height: 86px;
  box-shadow: var(--soft-shadow);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stat strong {
  display: block;
  margin-top: 7px;
  font-size: 27px;
}

.stat-link {
  width: 100%;
  appearance: none;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.stat-link:hover,
.stat-link:focus-visible {
  background: #f8fbff;
  border-color: rgba(37, 99, 235, .38);
  box-shadow: 0 14px 28px rgba(37, 99, 235, .12);
  transform: translateY(-1px);
}

.stat-link:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .2);
  outline-offset: 2px;
}

.board {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--soft-shadow);
}

.record-cards {
  display: none;
}

.record-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--soft-shadow);
}

.record-card + .record-card {
  margin-top: 10px;
}

.record-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.record-card-head strong {
  display: block;
  line-height: 1.2;
}

.record-card-head small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.record-card-fields {
  display: grid;
  gap: 7px;
}

.record-card-fields > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 6px;
}

.record-card-fields span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.record-card-fields strong {
  min-width: 0;
  text-align: right;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.record-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.employee-cards {
  display: grid;
  gap: 10px;
}

.employee-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  cursor: pointer;
}

.employee-card:hover {
  border-color: #b9c7d8;
}

.employee-initials {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #142033;
  color: #fff;
  font-weight: 900;
}

.employee-card-main {
  min-width: 0;
}

.employee-card-main strong,
.employee-card-main small {
  display: block;
  overflow-wrap: anywhere;
}

.employee-card-main small {
  margin-top: 4px;
  color: var(--muted);
}

.employee-chevron {
  color: var(--muted);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  align-items: start;
}

.kanban-column {
  min-height: 180px;
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.kanban-column header,
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kanban-column header {
  margin-bottom: 10px;
  color: #475569;
}

.kanban-column header span {
  min-width: 26px;
  min-height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 900;
}

.kanban-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--soft-shadow);
  cursor: pointer;
}

.kanban-card + .kanban-card {
  margin-top: 8px;
}

.kanban-title {
  font-weight: 900;
  line-height: 1.25;
}

.kanban-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.kanban-title-row .photo-count-badge {
  flex: 0 0 auto;
  margin-top: 0;
}

.kanban-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.kanban-work-order-number {
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.kanban-work-order-details {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}

.kanban-work-order-details span {
  overflow-wrap: anywhere;
}

.kanban-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.kanban-actions button {
  min-height: 30px;
  font-size: 12px;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: var(--soft-shadow);
}

.calendar-toolbar button {
  min-height: 34px;
}

.calendar-toolbar strong {
  font-size: 18px;
}

.calendar-navigation,
.calendar-view-switch {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-navigation button,
.calendar-view-switch button {
  background: #fff;
  border-color: #dbe3ef;
}

.calendar-navigation .calendar-arrow {
  width: 36px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.calendar-heading {
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
}

.calendar-view-switch {
  padding: 3px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #eef3f9;
}

.calendar-view-switch button {
  min-height: 32px;
  border: 0;
  box-shadow: none;
}

.calendar-view-switch button.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 5px 12px rgba(37, 99, 235, .22);
}

.day-time-picker {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.day-strip button {
  min-height: 78px;
  display: grid;
  gap: 3px;
  align-content: center;
  justify-items: center;
  background: #fff;
  border-color: var(--line);
  box-shadow: var(--soft-shadow);
}

.day-strip button.active {
  border-color: rgba(37, 99, 235, .42);
  background: #eff6ff;
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .22), var(--soft-shadow);
}

.day-strip span,
.day-strip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.day-strip strong {
  font-size: 24px;
}

.time-strip {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--soft-shadow);
}

.time-strip > div:first-child {
  display: grid;
  align-content: center;
  gap: 4px;
  padding-right: 8px;
  border-right: 1px solid var(--line);
}

.time-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}

.time-buttons button {
  min-height: 54px;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 2px;
  background: #f8fafc;
  border-color: #dbeafe;
  text-align: left;
}

.time-buttons button.busy {
  background: #fff7ed;
  border-color: rgba(217,119,6,.24);
  color: #92400e;
}

.time-buttons strong {
  font-size: 14px;
}

.time-buttons span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.scheduler-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
  isolation: isolate;
}

.scheduler-sidebar {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 92px;
  align-self: start;
}

.scheduler-board {
  min-width: 920px;
  max-height: min(72vh, 860px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--soft-shadow);
  overflow: auto;
  overscroll-behavior: contain;
}

.scheduler-head {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 76px repeat(var(--calendar-days, 7), minmax(116px, 1fr));
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.scheduler-head > div {
  min-height: 66px;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--line);
}

.scheduler-head .time-gutter {
  border-left: 0;
}

.scheduler-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.scheduler-head strong {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 20px;
}

.scheduler-head .today strong {
  background: var(--coral);
  color: #fff;
}

.scheduler-grid {
  display: grid;
  grid-template-columns: 76px repeat(var(--calendar-days, 7), minmax(116px, 1fr));
}

.scheduler-timeline {
  position: relative;
  display: grid;
  grid-template-columns: 76px repeat(var(--calendar-days, 7), minmax(116px, 1fr));
  min-height: var(--timeline-height);
  background: #fff;
}

.scheduler-time-axis,
.scheduler-day-lane {
  position: relative;
  min-height: var(--timeline-height);
}

.scheduler-time-axis {
  z-index: 1;
  background: #f8fafc;
}

.scheduler-day-lane {
  border-left: 1px solid var(--line);
  background: #fff;
}

.scheduler-day-lane.today {
  background: #fffdf7;
}

.scheduler-time-axis .time-label,
.calendar-lane-slot {
  position: absolute;
  inset-inline: 0;
  box-sizing: border-box;
}

.scheduler-time-axis .time-label {
  min-height: 0;
}

.calendar-lane-slot {
  width: 100%;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.calendar-lane-slot.half {
  border-top-color: #edf1f6;
}

.calendar-lane-slot:hover {
  transform: none;
  background: rgba(37, 99, 235, .035);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .10);
}

.calendar-lane-slot.drag-over {
  background: #eff6ff;
  box-shadow: inset 0 0 0 2px var(--blue);
}

.calendar-lane-slot .slot-plus {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
}

.calendar-lane-slot:hover .slot-plus {
  opacity: 1;
}

.calendar-now-line {
  position: absolute;
  z-index: 12;
  left: 0;
  right: 0;
  height: 2px;
  pointer-events: none;
  background: #ef4444;
  box-shadow: 0 0 0 1px rgba(255,255,255,.7);
}

.calendar-now-line::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ef4444;
}

.calendar-now-line span {
  position: absolute;
  top: -11px;
  right: 4px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
}

.calendar-event-card {
  position: absolute;
  z-index: 5;
  top: var(--event-top);
  left: calc(var(--event-left) + 2px);
  width: calc(var(--event-width) - 4px);
  height: max(38px, calc(var(--event-height) - 2px));
  min-width: 0;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 6px 8px 10px;
  border: 1px solid var(--tech-line, #bfdbfe);
  border-left: 4px solid var(--tech-color, var(--blue));
  border-radius: 7px;
  background: var(--tech-bg, #eff6ff);
  color: #172033;
  box-shadow: 0 3px 9px rgba(15, 23, 42, .12);
  cursor: pointer;
  text-align: left;
  transition: box-shadow .16s ease, transform .16s ease;
}

.calendar-event-card:hover {
  z-index: 13;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
}

.calendar-event-card[draggable="true"] { cursor: grab; }
.calendar-event-card[draggable="true"]:active { cursor: grabbing; }

.calendar-drag-handle {
  justify-self: end;
  color: var(--tech-color, var(--blue));
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .03em;
}

.calendar-work-order-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.calendar-status-chip,
.calendar-payment-chip {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.calendar-status-chip.green,
.calendar-payment-chip.paid { background: #dcfce7; color: #166534; }
.calendar-status-chip.yellow { background: #fef3c7; color: #92400e; }
.calendar-status-chip.blue { background: #dbeafe; color: #1d4ed8; }
.calendar-status-chip.red,
.calendar-payment-chip.unpaid { background: #fee2e2; color: #991b1b; }
.calendar-status-chip.gray,
.calendar-payment-chip.not-invoiced { background: #e5e7eb; color: #374151; }

.calendar-event-card.drop-target {
  z-index: 45;
  outline: 3px solid var(--blue);
  outline-offset: -3px;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, .18), 0 12px 28px rgba(15, 23, 42, .24);
}

.calendar-event-card.expanded {
  z-index: 30;
  width: clamp(280px, 32vw, 360px);
  max-width: calc(100vw - 48px);
  height: fit-content;
  min-height: max(150px, var(--event-height));
  max-height: none;
  overflow: hidden;
  padding: 10px 12px 14px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .28);
}

.calendar-event-card.expanded .calendar-event-title,
.calendar-event-card.expanded .calendar-event-meta > span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.calendar-event-card.resizing {
  z-index: 40;
  opacity: .92;
  transition: none;
}

.calendar-event-time {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.calendar-event-time time {
  overflow: hidden;
  color: var(--tech-color, var(--blue));
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-title {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-meta {
  overflow: hidden;
  display: grid;
  gap: 1px;
  color: #526072;
  font-size: 10px;
  line-height: 1.2;
}

.calendar-event-meta > span {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.technician-legend {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.technician-legend-title {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

.technician-legend-title .muted {
  font-size: 11px;
}

.technician-legend-list {
  display: grid;
  gap: 6px;
}

.technician-legend-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.technician-legend-row input[type="color"] {
  width: 28px;
  height: 28px;
  padding: 2px;
  border-radius: 7px;
  cursor: pointer;
}

.technician-legend-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-photo-count {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: #1d4ed8;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.calendar-event-details {
  display: none;
  gap: 7px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(37, 99, 235, .18);
  color: #334155;
  font-size: 11px;
  line-height: 1.35;
}

.calendar-event-card.expanded .calendar-event-details {
  display: grid;
}

.calendar-event-card.expanded .calendar-event-details > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.calendar-event-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.calendar-event-actions button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}

.calendar-resize-handle {
  position: absolute;
  z-index: 4;
  left: 5px;
  right: 5px;
  bottom: 0;
  height: 13px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: ns-resize;
}

.calendar-resize-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 30px;
  height: 3px;
  border-radius: 999px;
  background: var(--tech-color, var(--blue));
  opacity: .7;
  transform: translateX(-50%);
}

.calendar-event-card:hover .calendar-resize-handle::after,
.calendar-event-card.expanded .calendar-resize-handle::after,
.calendar-event-card.resizing .calendar-resize-handle::after {
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(255,255,255,.72);
}

.scheduler-board.is-day {
  min-width: 620px;
}

.scheduler-board.is-day .scheduler-head,
.scheduler-board.is-day .scheduler-grid,
.scheduler-board.is-day .scheduler-timeline {
  grid-template-columns: 76px minmax(480px, 1fr);
}

.time-label {
  min-height: 42px;
  padding: 8px 10px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
  background: #f8fafc;
}

.time-label.half {
  border-top-color: #eef2f7;
}

.schedule-slot {
  width: 100%;
  min-height: 42px;
  height: auto;
  padding: 4px;
  border: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  white-space: normal;
  box-shadow: none;
  display: grid;
  gap: 4px;
  align-content: start;
}

.schedule-slot:hover {
  transform: none;
  background: #f8fbff;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .10);
}

.schedule-slot.drag-over {
  background: #eff6ff;
  box-shadow: inset 0 0 0 2px var(--blue);
}

.schedule-slot.has-items {
  background: #fbfcff;
}

.schedule-slot.current-time-slot {
  border-top: 2px solid #ef4444;
}

.time-label.calendar-scroll-target {
  color: #dc2626;
  border-top: 2px solid #ef4444;
  background: #fff7f7;
}

.slot-plus {
  opacity: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  justify-self: center;
  align-self: center;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 900;
}

.schedule-slot:hover .slot-plus {
  opacity: 1;
}

.schedule-item {
  display: grid;
  gap: 4px;
  min-height: calc(32px * var(--event-rows, 1));
  border: 1px solid var(--tech-line, #dbeafe);
  border-left: 5px solid var(--tech-color, var(--blue));
  border-radius: 8px;
  background: var(--tech-bg, #eaf2ff);
  padding: 7px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.schedule-item time {
  color: var(--tech-color, var(--blue));
  font-size: 12px;
  font-weight: 900;
}

.schedule-item strong {
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.schedule-item span:not(.badge) {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.schedule-item span.schedule-technician {
  justify-self: start;
  padding: 2px 7px;
  border: 1px solid var(--tech-line, #bfdbfe);
  border-radius: 999px;
  background: var(--tech-bg, #eff6ff);
  color: var(--tech-color, var(--blue));
  font-weight: 900;
}

.schedule-item .schedule-created-at {
  color: #334155;
  font-weight: 800;
}

.schedule-item .badge {
  justify-self: start;
}

.schedule-item[draggable="true"] {
  cursor: grab;
}

.schedule-item[draggable="true"]:active {
  cursor: grabbing;
}

.unscheduled-tray {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
}

.unscheduled-tray[draggable="true"] {
  cursor: grab;
}

.unscheduled-tray[draggable="true"]:active {
  cursor: grabbing;
}

.unscheduled-tray-heading {
  display: grid;
  align-content: center;
  gap: 4px;
  padding-right: 10px;
  border-right: 1px solid var(--line);
}

.unscheduled-panel-drag-handle {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.unscheduled-panel-move {
  justify-self: start;
  margin-top: 4px;
}

.unscheduled-drop-zone {
  display: none;
  margin: 6px 0 12px;
  border: 2px dashed #93c5fd;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.unscheduled-drop-zone.drag-over,
body.dragging-unscheduled-panel .unscheduled-drop-zone:not(.is-current) {
  display: block;
}

.unscheduled-drop-zone.drag-over {
  background: #dbeafe;
  border-color: #2563eb;
}

.unscheduled-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.unscheduled-item {
  min-height: 0;
}

.mini-month {
  position: static;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--soft-shadow);
}

.mini-month-title {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.mini-month-weekdays,
.mini-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.mini-month-weekdays span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.mini-month-grid button {
  position: relative;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
}

.mini-month-grid button.today {
  background: var(--coral);
  color: #fff;
}

.mini-month-grid button.selected {
  box-shadow: inset 0 0 0 2px var(--blue);
}

.mini-month-grid button.outside {
  color: #94a3b8;
}

.mini-month-grid i {
  position: absolute;
  right: 2px;
  bottom: 0;
  min-width: 15px;
  min-height: 15px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--blue);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.calendar-month {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.calendar-month-weekdays,
.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-month-weekdays {
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.calendar-month-weekdays span {
  padding: 12px 8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.calendar-month-day {
  min-height: 132px;
  padding: 8px;
  border-right: 1px solid #edf1f6;
  border-bottom: 1px solid #edf1f6;
  background: #fff;
}

.calendar-month-day:nth-child(7n) {
  border-right: 0;
}

.calendar-month-day.outside {
  background: #f8fafc;
  color: #94a3b8;
}

.calendar-month-day.today {
  background: #fffaf0;
  box-shadow: inset 0 0 0 2px rgba(217, 119, 6, .22);
}

.calendar-month-day header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.calendar-month-day header > span {
  min-width: 22px;
  min-height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
}

.calendar-month-date {
  width: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  font-weight: 900;
}

.calendar-month-day.today .calendar-month-date {
  background: var(--coral);
  color: #fff;
}

.calendar-month-events {
  display: grid;
  gap: 5px;
}

.calendar-month-event {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
  padding: 5px 7px;
  border: 1px solid var(--tech-line, #dbeafe);
  border-left: 4px solid var(--tech-color, var(--blue));
  border-radius: 6px;
  background: var(--tech-bg, #eff6ff);
  cursor: pointer;
}

.calendar-month-event time {
  color: var(--tech-color, var(--blue));
  font-size: 10px;
  font-weight: 900;
}

.calendar-month-event strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-month-event[draggable="true"] { cursor: grab; }
.calendar-month-event .calendar-work-order-indicators { grid-column: 1 / -1; }

.calendar-more {
  justify-self: start;
  min-height: 24px;
  padding: 2px 6px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 11px;
  box-shadow: none;
}

.schedule-item strong {
  line-height: 1.25;
}

.schedule-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th, td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table-sort-header {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  text-align: left;
  box-shadow: none;
}

.table-sort-header:hover,
.table-sort-header:focus-visible,
.table-sort-header.active {
  transform: none;
  background: transparent;
  color: var(--blue);
  box-shadow: none;
}

.module-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

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

tbody tr {
  cursor: default;
}

tbody tr:hover {
  background: #f8fbff;
}

td.actions {
  white-space: nowrap;
  width: 1%;
}

.empty {
  padding: 34px 18px;
  text-align: center;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
}

.badge.green { color: var(--green); border-color: rgba(5,150,105,.25); background: rgba(5,150,105,.08); }
.badge.amber { color: var(--amber); border-color: rgba(217,119,6,.25); background: rgba(217,119,6,.08); }
.badge.blue { color: var(--blue); border-color: rgba(37,99,235,.25); background: rgba(37,99,235,.08); }
.badge.purple { color: var(--purple); border-color: rgba(113,75,103,.25); background: rgba(113,75,103,.08); }
.badge.red { color: var(--coral); border-color: rgba(225,29,72,.25); background: rgba(225,29,72,.08); }

.photo-count-badge {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: fit-content;
  min-height: 22px;
  margin-top: 4px;
  padding: 2px 7px;
  border: 1px solid rgba(37, 99, 235, .24);
  border-radius: 999px;
  background: rgba(37, 99, 235, .08);
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 14px;
}

.work-order-detail {
  display: grid;
  gap: 14px;
}

.wo-compact-list {
  display: grid;
  gap: 8px;
}

.list-column-picker {
  display: grid;
  gap: 8px;
  max-height: min(62vh, 620px);
  overflow: auto;
}

.list-column-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.list-column-option span {
  display: grid;
  gap: 2px;
}

.wo-list-header,
.wo-list-card {
  display: grid;
  grid-template-columns: 42px minmax(92px, .65fr) minmax(180px, 1.35fr) minmax(148px, .9fr) minmax(160px, 1fr) minmax(98px, .72fr) minmax(126px, .8fr) minmax(150px, .95fr) minmax(190px, 1.15fr) minmax(132px, .75fr) 86px;
  gap: 0;
  align-items: stretch;
}

.estimates-compact-list .wo-list-header,
.estimates-compact-list .wo-list-card {
  grid-template-columns: 42px minmax(110px, .85fr) minmax(180px, 1.2fr) minmax(160px, 1fr) minmax(100px, .72fr) minmax(200px, 1.35fr) minmax(132px, .75fr) 86px;
}

.wo-list-header {
  position: sticky;
  top: 0;
  z-index: 2;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.wo-list-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 6px solid var(--amber);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  cursor: pointer;
}

.wo-list-card.status-complete {
  border-left-color: var(--green);
}

.wo-list-card.status-accepted,
.wo-list-card.status-converted {
  border-left-color: var(--green);
}

.wo-list-card.status-in-progress,
.wo-list-card.status-in-route,
.wo-list-card.status-on-site {
  border-left-color: var(--blue);
}

.wo-list-card.status-paused {
  border-left-color: #dc2626;
}

.wo-list-card.status-cancelled {
  border-left-color: var(--coral);
}

.wo-list-card.status-declined,
.wo-list-card.status-void {
  border-left-color: var(--coral);
}

.wo-list-card.status-draft {
  border-left-color: #64748b;
}

.wo-list-cell {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 54px;
  padding: 8px 10px;
  border-left: 1px solid #eef2f7;
  color: #334155;
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.wo-list-cell:first-child {
  border-left: 0;
}

.wo-sort-header {
  justify-content: start;
  min-height: 38px;
  border: 0;
  border-left: 1px solid #e8edf4;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
  box-shadow: none;
}

.wo-sort-header:hover,
.wo-sort-header.active {
  transform: none;
  background: #eef5ff;
  color: var(--blue);
  box-shadow: none;
}

.wo-select-cell {
  justify-items: center;
}

.wo-title-cell {
  gap: 3px;
}

.wo-title-cell strong {
  color: var(--ink);
  font-size: 14px;
}

.wo-title-cell small,
.wo-site-cell small,
.wo-money-cell small {
  color: var(--muted);
  font-size: 11px;
}

.wo-status-cell {
  justify-items: start;
}

.wo-money-cell {
  justify-items: end;
  text-align: right;
}

.wo-money-cell strong {
  color: var(--ink);
  font-size: 15px;
}

.wo-action-cell {
  justify-items: end;
}

.wo-action-cell button {
  min-height: 32px;
  padding-inline: 13px;
}

.wo-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid rgba(217, 119, 6, .26);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 68%);
  box-shadow: var(--soft-shadow);
}

.wo-number {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(217, 119, 6, .10);
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
}

.wo-hero h2 {
  margin: 9px 0 6px;
  font-size: 26px;
  line-height: 1.15;
}

.wo-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.wo-status-stack {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.wo-status-stack strong {
  font-size: 24px;
}

.wo-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wo-card {
  margin: 0;
  border: 1.5px solid rgba(217, 119, 6, 0.42);
  box-shadow: 0 8px 20px rgba(120, 53, 15, 0.08);
}

.wo-card .kv {
  grid-template-columns: 116px 1fr;
}

.wo-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.wo-timeline {
  display: grid;
  gap: 10px;
}

.wo-timeline-event {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf2f7;
}

.wo-timeline-event:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.wo-timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 5px;
}

.wo-timeline-event p {
  margin: 3px 0 0;
  line-height: 1.45;
}

.field-note-form textarea {
  min-height: 150px;
}

.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: var(--soft-shadow);
}

.section h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #edf2f7;
}

.kv:last-child {
  border-bottom: 0;
}

.kv span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.phone-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.phone-link:hover,
.phone-link:focus-visible {
  color: #1d4ed8;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.42);
  display: grid;
  place-items: start center;
  padding: 5vh 16px;
  overflow: auto;
  z-index: 55;
}

.modal {
  width: min(1040px, 100%);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  overflow: hidden;
}

.modal header, .modal footer {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.modal header h2 {
  margin: 0;
  font-size: 18px;
}

.modal-body {
  padding: 14px;
}

.pdf-viewer-backdrop {
  padding: 12px;
  place-items: stretch center;
}

.pdf-viewer-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1400px, 100%);
  height: calc(100dvh - 24px);
}

.pdf-viewer-modal .modal-body {
  display: grid;
  min-height: 0;
  padding: 0;
}

.pdf-viewer-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  background: #343a40;
}

.pdf-viewer-status {
  margin: 0;
  padding: 7px 14px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pdf-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.pdf-viewer-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdf-viewer-toolbar button {
  min-height: 36px;
  padding: 7px 12px;
}

.pdf-viewer-page-label {
  min-width: 112px;
  text-align: center;
  font-size: 13px;
}

.pdf-viewer-canvas-viewport {
  min-width: 0;
  min-height: 0;
  padding: 16px;
  overflow: auto;
  overscroll-behavior: contain;
  background: #343a40;
}

.pdf-viewer-canvas {
  display: block;
  max-width: none;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
}

.pdf-viewer-canvas[hidden] {
  display: none;
}

.pdf-print-frame {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.pdf-viewer-canvas-viewport:empty {
  min-height: 420px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #111827;
  color: #fff;
  padding: 10px 12px;
  border-radius: 6px;
  box-shadow: var(--shadow);
  z-index: 80;
  max-width: min(420px, calc(100vw - 36px));
}

.toast.with-feedback {
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 72px);
}

.beta-feedback-button {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 60;
  width: 58px;
  height: 58px;
  min-height: 58px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .28);
}

.beta-feedback-button > img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.beta-feedback-button .pathfinder-bug-icon {
  position: absolute;
  inset: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 23, 42, .18);
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .2);
  pointer-events: none;
}

.beta-feedback-button .pathfinder-bug-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.beta-feedback-button .bug-progress-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .3);
}

.beta-feedback-button .bug-progress-badge[hidden] {
  display: none;
}

.bug-feedback-backdrop {
  z-index: 70;
  background: rgba(15, 23, 42, .48);
}

.bug-feedback-modal {
  box-shadow: 0 28px 90px rgba(15, 23, 42, .36);
}

.bug-reporter-menu {
  display: grid;
  gap: 12px;
}

.bug-reporter-menu > p {
  margin: 0 0 2px;
  color: var(--muted);
  line-height: 1.5;
}

.bug-report-choice {
  min-height: 72px;
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 13px 15px;
  border-color: rgba(37, 99, 235, .24);
  background: #eff6ff;
  text-align: left;
  white-space: normal;
}

.bug-report-choice.secondary {
  border-color: var(--line);
  background: #f8fafc;
}

.bug-report-choice span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.bug-microphone-choice,
.bug-blocking-choice {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bug-microphone-choice {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.bug-microphone-choice input,
.bug-blocking-choice input {
  width: auto;
  min-height: 0;
}

.bug-microphone-choice span {
  display: grid;
  gap: 2px;
}

.bug-microphone-choice small {
  color: var(--muted);
}

.bug-recording-control {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: #111827;
  color: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .34);
}

.bug-recording-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, .18);
  animation: bug-recording-pulse 1.2s infinite;
}

@keyframes bug-recording-pulse {
  50% { opacity: .55; }
}

.bug-recording-control button {
  border: 0;
}

.bug-click-indicator {
  position: fixed;
  z-index: 49;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  pointer-events: none;
  border: 4px solid #ef4444;
  border-radius: 50%;
  background: rgba(239, 68, 68, .18);
  animation: bug-click-ripple .65s ease-out forwards;
}

@keyframes bug-click-ripple {
  from { transform: scale(.35); opacity: 1; }
  to { transform: scale(1.7); opacity: 0; }
}

.bug-report-form {
  display: grid;
  gap: 13px;
}

.bug-report-form > label:not(.bug-blocking-choice) {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.bug-report-form textarea {
  min-height: 112px;
  font-weight: 400;
}

.bug-privacy-note {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
}

.bug-screenshot-editor,
.bug-video-preview {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
}

.bug-annotation-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bug-annotation-toolbar button {
  min-height: 34px;
}

.bug-annotation-toolbar button.active {
  border-color: #60a5fa;
  background: #2563eb;
  color: #fff;
}

.bug-annotation-canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 56vh;
  object-fit: contain;
  border-radius: 6px;
  background: #020617;
  cursor: crosshair;
  touch-action: none;
}

.bug-video-preview video,
.bug-own-media img,
.bug-own-media video {
  display: block;
  width: 100%;
  max-height: 58vh;
  object-fit: contain;
  border-radius: 6px;
  background: #020617;
}

.my-bug-reports {
  display: grid;
  gap: 10px;
}

.my-bug-report-row {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.my-bug-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.my-bug-report-row > small {
  color: var(--muted);
}

.bug-status {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
}

.bug-status.status-fixed {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.bug-reporter-reply {
  padding: 10px;
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  background: #fff;
}

.bug-reporter-reply p {
  margin: 5px 0 0;
  white-space: pre-wrap;
}

.bug-queued-note {
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 700;
}

.bug-own-media {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #0f172a;
}

.error {
  color: var(--coral);
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.small-text {
  font-size: 12px;
  margin-top: 3px;
}

.payroll-weekly-list tbody tr {
  cursor: pointer;
}

.payroll-period-view {
  display: grid;
  gap: 12px;
}

.payroll-period-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
}

.payroll-period-title {
  display: grid;
  gap: 3px;
  min-width: 220px;
}

.payroll-period-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.payroll-day-list {
  display: grid;
  gap: 14px;
}

.payroll-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.payroll-day header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.payroll-day header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.right {
  text-align: right;
}

.mobile-nav {
  display: none;
}

@media (max-width: 920px) {
  .payroll-period-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .payroll-period-actions {
    justify-content: flex-start;
  }

  .site-nav {
    min-height: 64px;
  }

  .site-nav-actions a:not(.site-button) {
    display: none;
  }

  .hero,
  .split-section,
  .contact-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero h1 {
    font-size: 58px;
  }

  .feature-grid,
  .price-grid,
  .market-grid {
    grid-template-columns: 1fr 1fr;
  }

  .manual-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .manual-results {
    grid-template-columns: 1fr;
  }

  .manual-index {
    position: static;
  }

  .migration-heading,
  .migration-intro,
  .migration-controls {
    grid-template-columns: 1fr;
  }

  .migration-steps,
  .migration-map-grid,
  .migration-odoo-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .mobile-nav {
    display: block;
    min-width: 180px;
  }

  .nav-top .mobile-nav {
    display: none;
  }

  .top-module-menu {
    top: 74px;
    padding: 8px 14px;
  }

  .nav-horizontal button {
    min-height: 40px;
  }

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

  .dashboard-stats,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-work-item,
  .dashboard-notification-row {
    grid-template-columns: 1fr;
  }

  .dashboard-work-meta {
    justify-self: start;
  }

  .dashboard-notification-icon {
    display: none;
  }

  .dashboard-notification-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .notification-panel-head,
  .notification-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .notification-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .notification-row-actions {
    grid-column: 2;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .scheduler-shell {
    grid-template-columns: 1fr;
  }

  .scheduler-board {
    min-width: 760px;
  }

  .mini-month {
    position: static;
  }

  .scheduler-sidebar {
    position: static;
  }

  .wo-compact-list {
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .wo-list-header,
  .wo-list-card {
    min-width: 1280px;
  }

  .estimates-compact-list .wo-list-header,
  .estimates-compact-list .wo-list-card {
    min-width: 980px;
  }
}

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

  .settings-shell {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-save-bar {
    position: static;
    justify-content: stretch;
  }

  .settings-save-bar .primary {
    width: 100%;
  }

  .site-nav {
    width: calc(100% - 24px);
  }

  .site-brand img {
    max-width: 190px;
    height: 48px;
  }

  .manual-nav {
    width: calc(100% - 24px);
  }

  .manual-brand img {
    max-width: 190px;
    height: 48px;
  }

  .manual-nav-actions a:first-child {
    display: none;
  }

  .site-nav-actions .ghost {
    display: none;
  }

  .hero,
  .site-band,
  .site-section,
  .site-cta,
  .contact-hero {
    width: calc(100% - 24px);
  }

  .manual-hero,
  .manual-fast-path,
  .manual-results {
    width: calc(100% - 24px);
  }

  .hero {
    gap: 24px;
    padding: 24px 0 36px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .manual-hero h1 {
    font-size: 42px;
  }

  .manual-fast-path {
    grid-template-columns: 1fr;
  }

  .manual-topic-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .migration-steps,
  .migration-map-grid,
  .migration-summary-grid,
  .migration-odoo-fields {
    grid-template-columns: 1fr;
  }

  .migration-odoo-guide-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .migration-odoo-fields ul {
    columns: 1;
  }

  .migration-checklist ol {
    columns: 1;
  }

  .hero-text {
    font-size: 18px;
  }

  .hero-media {
    max-height: 230px;
  }

  .feature-grid,
  .price-grid,
  .market-grid {
    grid-template-columns: 1fr;
  }

  .site-cta {
    padding: 26px 18px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 13px 14px;
  }

  .top-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .top-title img {
    width: 182px;
    max-width: 70vw;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .top-actions {
    justify-content: stretch;
  }

  .top-actions > * {
    flex: 1 1 auto;
  }

  .top-module-menu {
    top: 151px;
    padding: 8px 12px;
  }

  .nav-horizontal button {
    justify-content: center;
    min-width: 74px;
  }

  .nav-horizontal button span:last-child {
    font-size: 12px;
  }

  .content {
    padding: 12px 12px 22px;
  }

  .stats, .form-grid, .form-section-fields {
    grid-template-columns: 1fr;
  }

  .inventory-grid {
    grid-template-columns: 1fr;
  }

  .inventory-actions {
    justify-content: stretch;
  }

  .inventory-actions button {
    flex: 1 1 140px;
  }

  .date-picker-days,
  .date-time-options {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .date-time-field .date-time-display {
    grid-column: 1;
  }

  .date-time-window {
    grid-template-columns: 1fr 1fr;
  }

  .date-time-window strong {
    grid-column: 1 / -1;
    order: -1;
  }

  .product-builder-row {
    grid-template-columns: 1fr;
  }

  .product-catalog-head,
  .product-multi-results,
  .product-custom-row {
    grid-template-columns: 1fr;
  }

  .product-catalog-head button {
    width: 100%;
  }

  .product-line {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .wo-two-column,
  .wo-title-row,
  .wo-address-grid,
  .wo-invoice-grid {
    grid-template-columns: 1fr;
  }

  .wo-address-grid label:first-child,
  .wo-address-grid label:nth-child(2),
  .wo-address-grid label:nth-child(3),
  .wo-address-grid label:nth-child(4),
  .wo-address-grid label:nth-child(5) {
    grid-column: 1;
  }

  .wo-flow-card label {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 5px;
  }

  .toolbar, .subtoolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search {
    max-width: none;
  }

  .view-tabs {
    width: 100%;
  }

  .view-tabs button {
    flex: 1 1 0;
  }

  .scheduler-shell {
    overflow-x: auto;
  }

  .scheduler-board {
    min-width: 920px;
  }

  .unscheduled-tray {
    grid-template-columns: 1fr;
  }

  .unscheduled-tray-heading {
    padding-right: 0;
    padding-bottom: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .unscheduled-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .unscheduled-list .schedule-item {
    min-width: 240px;
  }

  .day-strip {
    display: flex;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .day-strip button {
    min-width: 82px;
  }

  .time-strip {
    grid-template-columns: 1fr;
  }

  .time-strip > div:first-child {
    padding-right: 0;
    padding-bottom: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .time-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calendar-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    flex-wrap: wrap;
  }

  .calendar-navigation,
  .calendar-view-switch {
    justify-content: center;
  }

  .calendar-month {
    overflow-x: auto;
  }

  .calendar-month-weekdays,
  .calendar-month-grid {
    min-width: 760px;
  }

  .wo-hero {
    flex-direction: column;
  }

  .wo-status-stack {
    justify-items: start;
  }

  .wo-layout {
    grid-template-columns: 1fr;
  }

  .wo-list-card {
    padding: 0;
  }

  .kv {
    grid-template-columns: 1fr;
  }

  .table-wrap.board {
    display: none;
  }

  .record-cards {
    display: block;
  }

  .modal-backdrop {
    padding: 0;
    place-items: stretch;
  }

  .modal {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
  }

  .modal header,
  .modal footer {
    position: sticky;
    background: #fff;
    z-index: 2;
  }

  .modal header {
    top: 0;
  }

  .modal footer {
    bottom: 0;
  }

  .modal footer button {
    flex: 1 1 0;
  }

  .pdf-viewer-backdrop {
    padding: 0;
  }

  .pdf-viewer-modal {
    height: 100dvh;
  }

  .pdf-viewer-toolbar {
    flex-wrap: wrap;
    padding: 7px 9px;
  }

  .pdf-viewer-toolbar-group {
    flex: 1 1 100%;
  }

  .pdf-viewer-toolbar-group button {
    flex: 1 1 0;
  }

  .pdf-viewer-page-label {
    min-width: 96px;
  }

  .pdf-viewer-canvas-viewport {
    padding: 10px;
  }

  .app-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .app-tile {
    height: 126px;
  }

  .tile-icon {
    width: 52px;
    height: 52px;
    font-size: 18px;
  }
}
.source-options-editor {
  display: grid;
  gap: 14px;
}

.source-options-list {
  display: grid;
  gap: 8px;
}

.source-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line, #d9e2ec);
  border-radius: 10px;
  background: #fff;
}

.source-option-row > span {
  font-weight: 600;
}

.source-option-actions,
.source-option-add {
  display: flex;
  gap: 8px;
  align-items: center;
}

.source-option-actions button {
  min-height: 38px;
  padding: 7px 11px;
}

.source-option-add input {
  flex: 1;
  min-width: 0;
}

@media (max-width: 640px) {
  .sms-notification-recipient-row {
    grid-template-columns: 1fr;
  }

  .call-receiver-row {
    grid-template-columns: 1fr;
  }

  .voice-call-popup-stack {
    top: 72px;
    right: 12px;
    width: calc(100vw - 24px);
  }

  .sms-notification-recipients .settings-card-heading {
    display: grid;
  }

  .source-option-row,
  .source-option-add {
    align-items: stretch;
    flex-direction: column;
  }

  .source-option-actions {
    flex-wrap: wrap;
  }
}

.payment-public-body {
  margin: 0;
  background: #f4f6f8;
  color: #142033;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.payment-public-body.payment-modal-open { overflow: hidden; }

.payment-public-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
}

.payment-public-card {
  width: min(100%, 560px);
  box-sizing: border-box;
  padding: 30px;
  border: 1px solid #dce3eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 55px #14203322;
}

.payment-public-logo {
  display: block;
  width: min(230px, 70%);
  height: auto;
  margin: 0 auto 24px;
}

.payment-invoice-portal { min-height: 100vh; }

.payment-public-topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid #dce3eb;
  background: #fff;
  box-shadow: 0 2px 10px #1420330d;
}

.payment-public-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.payment-public-brand .payment-company-logo {
  width: auto;
  max-width: 150px;
  height: 42px;
  object-fit: contain;
}

.payment-public-brand strong {
  overflow: hidden;
  color: #172033;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-company-name {
  color: #172033;
  font-size: 1.12rem;
  font-weight: 850;
}

.payment-secure-badge {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid #dce3eb;
  border-radius: 999px;
  background: #f8fafc;
  color: #526071;
  font-size: .82rem;
  font-weight: 700;
}

.payment-invoice-layout {
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto 48px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 26px;
}

.payment-invoice-sidebar {
  position: sticky;
  top: 22px;
  min-width: 0;
  display: grid;
  gap: 16px;
}

.payment-balance-card,
.payment-contact-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #dce3eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px #1420330b;
  overflow-wrap: anywhere;
}

.payment-balance-card > span {
  display: block;
  color: #637083;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.payment-balance-card > strong {
  display: block;
  margin: 6px 0 8px;
  color: #172033;
  font-size: clamp(2rem, 4vw, 2.65rem);
  line-height: 1;
}

.payment-due-state { margin: 0 0 18px; font-size: .86rem; font-weight: 750; }
.payment-due-state.overdue { color: #b42318; }
.payment-due-state.due { color: #8a4b00; }
.payment-due-state.paid { color: #067647; }

.payment-public-button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  background: #2563eb;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.payment-public-button:hover { background: #1d4ed8; }
.payment-public-button:disabled { background: #94a3b8; cursor: default; }

.payment-retry-button {
  width: 100%;
  margin-top: 10px;
  border: 1px solid #2563eb;
  border-radius: 8px;
  padding: 11px 13px;
  background: #fff;
  color: #1d4ed8;
  font: inherit;
  font-size: .88rem;
  font-weight: 750;
  cursor: pointer;
}

.payment-retry-button:hover { background: #eff6ff; }
.payment-retry-button:disabled { border-color: #cbd5e1; color: #64748b; cursor: default; }

.payment-download-button {
  display: block;
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #334155;
  font-size: .88rem;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}

.payment-download-button:hover { border-color: #2563eb; color: #1d4ed8; }
.payment-contact-card h2 { margin: 0 0 10px; font-size: .9rem; }

.payment-contact-card strong,
.payment-contact-card a {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
  color: #526071;
  font-size: .82rem;
  text-decoration: none;
}

.payment-contact-card strong { color: #172033; }

.payment-invoice-document {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce3eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 45px #14203317;
}

.payment-invoice-document > .payment-public-notice { margin: 22px 28px 0; }

.payment-invoice-masthead {
  min-height: 170px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 34px 38px;
  background: linear-gradient(135deg, #f2f6f8 0%, #e8eef3 62%, #f7f9fb 100%);
  border-bottom: 5px solid #2d7b9a;
}

.payment-invoice-masthead .payment-company-logo {
  display: block;
  width: auto;
  max-width: 220px;
  height: 70px;
  object-fit: contain;
  object-position: left center;
}

.payment-invoice-masthead .payment-company-name { max-width: 420px; font-size: 1.55rem; }

.payment-invoice-address {
  margin: 10px 0 0;
  color: #526071;
  font-size: .88rem;
  line-height: 1.55;
  white-space: pre-line;
}

.payment-invoice-identity {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 5px;
  text-align: right;
}

.payment-invoice-identity span { color: #526071; font-size: .75rem; font-weight: 850; letter-spacing: .16em; }
.payment-invoice-identity strong { color: #172033; font-size: 1.18rem; }

.payment-invoice-parties {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(190px, .85fr);
  gap: 24px;
  padding: 30px 38px 20px;
}

.payment-invoice-parties section,
.payment-invoice-meta { min-width: 0; margin: 0; }

.payment-invoice-parties section > span,
.payment-invoice-meta dt {
  display: block;
  margin-bottom: 7px;
  color: #708093;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.payment-invoice-parties section > strong { display: block; overflow-wrap: anywhere; font-size: .92rem; }
.payment-invoice-parties section > p:not(.payment-invoice-address) { margin: 4px 0 0; color: #526071; font-size: .86rem; }
.payment-invoice-meta { display: grid; gap: 12px; }
.payment-invoice-meta div { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.payment-invoice-meta dt { margin: 0; }
.payment-invoice-meta dd { margin: 0; font-size: .84rem; font-weight: 750; text-align: right; }
.payment-invoice-title { margin: 12px 38px 16px; color: #244b61; font-size: 1.35rem; }
.payment-invoice-table-wrap { margin: 0 38px; overflow-x: auto; }

.payment-invoice-table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; }
.payment-invoice-table th,
.payment-invoice-table td { padding: 13px 12px; border-bottom: 1px solid #dce3eb; text-align: left; vertical-align: top; }
.payment-invoice-table th { background: #eef2f5; color: #526071; font-size: .72rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.payment-invoice-table th:first-child { width: 55%; }
.payment-invoice-table th:not(:first-child),
.payment-invoice-table td:not(:first-child) { text-align: right; }
.payment-invoice-table td { font-size: .87rem; }
.payment-invoice-table td strong,
.payment-invoice-table td small { display: block; overflow-wrap: anywhere; }
.payment-invoice-table td small { margin-top: 4px; color: #708093; line-height: 1.4; }
.payment-invoice-empty { color: #708093; text-align: center !important; }

.payment-invoice-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 34px;
  padding: 24px 38px 36px;
}

.payment-invoice-notes { min-width: 0; color: #526071; font-size: .84rem; }
.payment-invoice-notes p { margin: 7px 0 12px; overflow-wrap: anywhere; white-space: pre-line; }
.payment-invoice-notes a { color: #1d4ed8; font-weight: 700; }
.payment-invoice-totals { margin: 0; }
.payment-invoice-totals div { display: flex; justify-content: space-between; gap: 22px; padding: 8px 12px; color: #526071; font-size: .88rem; }
.payment-invoice-totals dt,
.payment-invoice-totals dd { margin: 0; }
.payment-invoice-totals dd { color: #172033; font-weight: 750; }
.payment-invoice-totals .total { border-top: 1px solid #cbd5e1; background: #f8fafc; color: #172033; font-weight: 800; }
.payment-invoice-totals .balance { margin-top: 4px; border-top: 3px solid #2d7b9a; background: #eaf4f8; color: #174a61; font-size: 1rem; font-weight: 850; }

.payment-invoice-footer {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 38px;
  background: #eef2f5;
  color: #637083;
  font-size: .75rem;
}

.payment-public-notice { margin: 16px 0; padding: 12px 14px; border-radius: 10px; background: #f1f5f9; color: #334155; }
.payment-public-notice.good { background: #dcfce7; color: #166534; }
.payment-public-notice.error { background: #fee2e2; color: #991b1b; }
.payment-public-test { margin: 12px 0 0; text-align: center; color: #92400e; font-size: .75rem; font-weight: 700; }

.payment-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #111827a8;
  backdrop-filter: blur(2px);
}

.payment-modal {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 26px 80px #0006;
}

.payment-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid #dce3eb;
  background: #fff;
}

.payment-modal-head h2 { margin: 0; font-size: 1.3rem; }
.payment-modal-head p { margin: 3px 0 0; color: #637083; font-size: .8rem; }

.payment-modal-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #637083;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.payment-modal-close:hover { background: #eef2f5; color: #172033; }

.payment-modal-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 18px 22px 0;
  border: 1px solid #dce3eb;
  border-radius: 9px;
  background: #f8fafc;
}

.payment-modal-summary div { padding: 13px 16px; }
.payment-modal-summary div + div { border-left: 1px solid #dce3eb; }
.payment-modal-summary span { display: block; color: #708093; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.payment-modal-summary strong { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.payment-zip-form { display: grid; gap: 10px; margin: 18px 22px 4px; }
.payment-zip-form label { display: grid; gap: 7px; color: #334155; font-weight: 800; }
.payment-zip-form label span { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.payment-zip-form input { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #b8c4d1; border-radius: 9px; background: #fff; color: #172033; font: inherit; font-size: 1rem; }
.payment-zip-form input:focus { border-color: #2563eb; outline: 3px solid rgba(37, 99, 235, .16); }
.payment-zip-help { margin: 0; color: #637083; font-size: .82rem; }
.payment-zip-error { min-height: 1.1em; margin: 0; color: #b42318; font-size: .82rem; font-weight: 700; }
.payment-zip-form .payment-public-button { margin: 2px 0 0; }
.payment-hosted-loading { margin: 20px 22px; color: #637083; text-align: center; }

.payment-hosted-frame {
  display: block;
  width: calc(100% - 32px);
  height: 620px;
  margin: 16px;
  border: 0;
  background: #fff;
}

.payment-modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px 18px; color: #637083; font-size: .76rem; }
.payment-modal-foot form { margin: 0; }
.payment-open-fallback { border: 0; background: transparent; color: #1d4ed8; font: inherit; font-weight: 750; cursor: pointer; }

@media (max-width: 640px) {
  .payment-public-shell { padding: 14px; }
  .payment-public-card { padding: 22px; }
  .payment-public-topbar { min-height: 58px; padding: 9px 14px; }
  .payment-public-brand .payment-company-logo { max-width: 108px; height: 36px; }
  .payment-public-brand strong { display: none; }
  .payment-secure-badge { padding: 7px 9px; font-size: .7rem; }
  .payment-invoice-layout { width: min(100% - 20px, 720px); margin: 14px auto 28px; grid-template-columns: 1fr; gap: 14px; }
  .payment-invoice-sidebar { position: static; grid-template-columns: 1fr; }
  .payment-contact-card { display: none; }
  .payment-balance-card { padding: 16px; }
  .payment-balance-card > strong { font-size: 2.1rem; }
  .payment-invoice-masthead { min-height: 132px; padding: 24px 20px; }
  .payment-invoice-masthead .payment-company-logo { max-width: 145px; height: 52px; }
  .payment-invoice-masthead .payment-company-name { font-size: 1.2rem; }
  .payment-invoice-identity strong { max-width: 130px; overflow-wrap: anywhere; font-size: .92rem; }
  .payment-invoice-address { font-size: .78rem; }
  .payment-invoice-parties { grid-template-columns: 1fr 1fr; gap: 20px 14px; padding: 22px 20px 16px; }
  .payment-invoice-meta { grid-column: 1 / -1; }
  .payment-invoice-title { margin: 8px 20px 14px; font-size: 1.15rem; }
  .payment-invoice-table-wrap { margin: 0 20px; overflow: visible; }
  .payment-invoice-table thead { display: none; }
  .payment-invoice-table,
  .payment-invoice-table tbody,
  .payment-invoice-table tr,
  .payment-invoice-table td { display: block; width: 100%; }
  .payment-invoice-table tr { padding: 11px 0; border-bottom: 1px solid #dce3eb; }
  .payment-invoice-table td { display: flex; justify-content: space-between; gap: 18px; padding: 4px 0; border: 0; text-align: right !important; }
  .payment-invoice-table td::before { content: attr(data-label); color: #708093; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
  .payment-invoice-table td:first-child { display: block; text-align: left !important; }
  .payment-invoice-table td:first-child::before,
  .payment-invoice-empty::before { display: none; }
  .payment-invoice-empty { display: block !important; padding: 12px 0 !important; }
  .payment-invoice-lower { grid-template-columns: 1fr; gap: 18px; padding: 20px 20px 26px; }
  .payment-invoice-totals { order: -1; }
  .payment-invoice-footer { display: grid; gap: 8px; padding: 20px; }
  .payment-modal-backdrop { padding: 8px; place-items: end center; }
  .payment-modal { width: 100%; max-height: calc(100vh - 16px); border-radius: 14px 14px 8px 8px; }
  .payment-modal-summary { margin: 14px 14px 0; }
  .payment-zip-form { margin: 14px 14px 4px; }
  .payment-hosted-frame { width: calc(100% - 12px); height: 500px; margin: 6px; }
  .payment-modal-foot { align-items: flex-start; padding: 10px 14px 16px; }
}

@media print {
  .payment-public-topbar,
  .payment-invoice-sidebar,
  .payment-modal-backdrop { display: none !important; }
  .payment-public-body { background: #fff; }
  .payment-invoice-layout { width: 100%; margin: 0; display: block; }
  .payment-invoice-document { border: 0; border-radius: 0; box-shadow: none; }
}
.estimate-workspace,
.estimate-workspace-card {
  border: 1px solid var(--line, #d8e0ea);
  border-radius: 14px;
  background: #fff;
  padding: 18px;
  margin-top: 12px;
}
.estimate-workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.estimate-workspace-heading h3, .estimate-workspace-heading h4 { margin: 0; }
.estimate-workspace-heading p { margin: 4px 0 0; }
.floor-scan-heading { align-items: flex-start; }
.floor-scan-count { display: inline-flex; align-items: center; min-height: 28px; border: 1px solid #cbd5e1; border-radius: 999px; padding: 4px 10px; background: #f8fafc; color: #475569; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.floor-scan-list { display: grid; gap: 10px; margin-top: 14px; }
.floor-scan-list > p { margin: 0; }
.floor-scan-card { display: grid; gap: 10px; min-width: 0; border: 1px solid #d8e0ea; border-radius: 12px; padding: 12px 14px; background: #fbfdff; }
.floor-scan-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; min-width: 0; }
.floor-scan-card-title { min-width: 0; }
.floor-scan-card-title h4 { margin: 0; color: #172033; font-size: .95rem; line-height: 1.3; }
.floor-scan-meta { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 4px; color: #64748b; font-size: .76rem; line-height: 1.35; }
.floor-scan-meta span { display: inline-flex; align-items: center; }
.floor-scan-meta span:not(:last-child)::after { content: "•"; margin: 0 7px; color: #94a3b8; }
.floor-scan-status { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 25px; border-radius: 999px; padding: 3px 9px; background: #eef2f7; color: #475569; font-size: .7rem; font-weight: 850; white-space: nowrap; }
.floor-scan-status.ready { background: #dcfce7; color: #166534; }
.floor-scan-status.active { background: #dbeafe; color: #1d4ed8; }
.floor-scan-status.attention { background: #fee2e2; color: #991b1b; }
.floor-scan-card > .error,
.floor-scan-context { margin: 0; }
.floor-scan-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 0; }
.floor-scan-actions button { min-height: 34px; padding: 6px 10px; }
.floor-scan-actions .floor-scan-delete { margin-left: auto; border-color: #fecaca; background: #fff; color: #b91c1c; }
.floor-scan-actions .floor-scan-delete:hover,
.floor-scan-actions .floor-scan-delete:focus-visible { border-color: #dc2626; background: #fef2f2; }
.floor-scan-disclaimer { border-radius: 9px; padding: 9px 11px; background: #f1f5f9; color: #64748b; font-size: .76rem; line-height: 1.45; }
@media (max-width: 640px) {
  .floor-scan-card-head { display: grid; gap: 8px; }
  .floor-scan-status { justify-self: start; }
  .floor-scan-actions .floor-scan-delete { margin-left: 0; }
}
.estimate-workspace-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; border-bottom: 1px solid #d8e0ea; padding-bottom: 8px; }
.estimate-workspace-tabs button { border: 0; background: #eef2f7; color: #334155; }
.estimate-workspace-tabs button.active { background: #9b4d8d; color: #fff; }
.estimate-workspace-panel { min-height: 160px; }
.estimate-workspace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.estimate-workspace-grid > .wide { grid-column: 1 / -1; }
.estimate-scope-list { display: grid; gap: 10px; margin: 10px 0 18px; }
.estimate-scope-row, .estimate-line-row { display: grid; gap: 8px; align-items: center; border: 1px solid #d8e0ea; border-radius: 10px; background: #f8fafc; padding: 10px; }
.estimate-scope-row { grid-template-columns: 36px minmax(0, 1fr); align-items: start; padding: 14px; }
.estimate-scope-content { display: grid; gap: 12px; min-width: 0; }
.estimate-scope-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; min-width: 0; }
.estimate-scope-description { grid-column: 1 / -1; }
.estimate-scope-details, .estimate-scope-ownership { display: grid; gap: 8px; min-width: 0; margin-top: 0; border: 1px solid #d8e0ea; border-radius: 8px; background: #fff; padding: 12px; }
.estimate-scope-details .estimate-workspace-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.estimate-concrete-workflow { display: grid; gap: 12px; }
.estimate-concrete-group { display: grid; gap: 10px; min-width: 0; border: 1px solid #d8e0ea; border-radius: 10px; background: #f8fafc; padding: 12px; }
.estimate-concrete-group-heading { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid #e2e8f0; }
.estimate-concrete-group-heading > strong { color: #172033; font-size: .92rem; }
.estimate-concrete-group-heading > small { line-height: 1.35; }
.estimate-concrete-group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; align-items: start; min-width: 0; }
.estimate-scope-ownership > button { justify-self: start; }
.estimate-line-row { grid-template-columns: repeat(4, minmax(140px, 1fr)); align-items: end; }
.estimate-restoration-section { margin-top: 18px; }
.estimate-restoration-list { display: grid; gap: 10px; margin: 10px 0 18px; }
.estimate-restoration-row { display: grid; grid-template-columns: 2fr 1fr 1.2fr 1fr auto; gap: 8px; align-items: end; border: 1px solid #d8e0ea; border-radius: 10px; background: #f8fafc; padding: 10px; }
.estimate-scope-row-number { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #9b4d8d; font-weight: 800; }
.estimate-workspace-field { display: grid; gap: 5px; min-width: 0; color: #475569; font-size: .75rem; font-weight: 750; }
.estimate-workspace-field input, .estimate-workspace-field select, .estimate-workspace-field textarea { width: 100%; color: #172033; font-size: .92rem; font-weight: 500; }
.estimate-option-control { display: grid; gap: 6px; min-width: 0; }
.estimate-option-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.estimate-option-add .ghost { white-space: nowrap; min-height: 36px; }
.estimate-workspace-field output { min-height: 42px; display: flex; align-items: center; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; color: #172033; font-size: .92rem; font-weight: 700; }
.estimate-row-actions { display: grid; gap: 8px; }
.estimate-scope-row .estimate-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.estimate-section-photo-tools { grid-column: 1 / -1; display: grid; gap: 8px; border-top: 1px solid #d8e0ea; padding-top: 10px; }
.estimate-section-photo-tools .button-like { justify-self: start; }
.estimate-section-photo-tools .button-like.disabled { opacity: .55; cursor: not-allowed; }
.estimate-section-photos { display: flex; gap: 8px; align-items: center; min-height: 58px; overflow-x: auto; }
.estimate-section-photos img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid #cbd5e1; flex: 0 0 auto; }
.estimate-section-photo-card { display: grid; grid-template-columns: 72px minmax(110px, 220px); align-items: center; gap: 8px; flex: 0 0 auto; padding: 5px; text-align: left; background: #fff; color: #172033; border: 1px solid #cbd5e1; border-radius: 9px; }
.estimate-section-photo-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.estimate-taxable-field { display: flex; align-items: center; gap: 8px; min-height: 42px; color: #334155; font-weight: 700; }
.estimate-taxable-field input { width: 20px; height: 20px; }
.estimate-line-totals { display: grid; gap: 3px; align-self: center; }
.estimate-line-totals span { color: #64748b; font-size: .78rem; }
.estimate-pricing-summary { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 8px; padding: 12px; border: 1px solid #d8e0ea; border-radius: 10px; background: #f8fafc; }
.estimate-pricing-summary div { display: grid; gap: 3px; }
.estimate-pricing-summary span { color: #64748b; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.estimate-workspace-footer { display: flex; justify-content: flex-end; margin-top: 18px; padding-top: 14px; border-top: 1px solid #d8e0ea; }
.estimate-checklist { display: grid; gap: 8px; margin-bottom: 10px; }
.estimate-check-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.estimate-check-row input[type="checkbox"] { width: 20px; height: 20px; }
.estimate-version-list { display: grid; gap: 10px; margin-top: 14px; }
.estimate-version-card { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; border: 1px solid #d8e0ea; border-radius: 10px; padding: 12px; }
.estimate-version-card small { grid-column: 1 / -1; color: #64748b; }
@media (max-width: 900px) {
  .estimate-workspace-grid { grid-template-columns: 1fr; }
  .estimate-scope-row, .estimate-line-row, .estimate-restoration-row, .estimate-version-card, .estimate-pricing-summary { grid-template-columns: 1fr; }
  .estimate-scope-fields, .estimate-scope-details .estimate-workspace-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .estimate-scope-row-number { display: none; }
}
@media (max-width: 640px) {
  .estimate-scope-fields, .estimate-scope-details .estimate-workspace-grid, .estimate-concrete-group-grid { grid-template-columns: 1fr; }
  .estimate-scope-row .estimate-row-actions { justify-content: stretch; }
  .estimate-scope-row .estimate-row-actions button { flex: 1 1 140px; }
}
.ai-assistant-panel { border-color: #bfdbfe; background: linear-gradient(145deg, #eff6ff, #ffffff 62%); }
.ai-panel-heading, .ai-usage-row, .ai-result-actions, .ai-record-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ai-panel-heading { justify-content: space-between; }
.ai-panel-heading h2 { margin: 0; }
.ai-panel-heading small, .ai-usage-row span { color: #64748b; }
.ai-dashboard-body, .ai-nudge-list, .ai-action-shell, .ai-result-host { display: grid; gap: 10px; }
.ai-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; }
.ai-command-button { min-height: 46px; border: 2px solid #2563eb; border-radius: 9px; background: #fff; color: #1d4ed8; font-weight: 800; box-shadow: 0 2px 5px rgba(37, 99, 235, .12); }
.ai-command-button:hover { background: #eff6ff; transform: translateY(-1px); }
.ai-command-button.ai-command-primary { background: #2563eb; color: #fff; }
.ai-voice-inline { justify-self: start; margin-top: 8px; border: 2px solid #2563eb; background: #eff6ff; color: #1d4ed8; font-weight: 800; }
.ai-nudge { display: grid; gap: 2px; width: 100%; text-align: left; border-left: 4px solid #2563eb; }
.ai-nudge.ai-priority-high { border-left-color: #dc2626; }
.ai-action-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ai-work-unit-source { display: grid; gap: 9px; border: 1px solid #bfdbfe; border-radius: 12px; background: #eff6ff; padding: 13px; min-width: 0; }
.ai-work-unit-source > p { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
.ai-work-unit-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ai-work-unit-facts > span { display: grid; gap: 3px; min-width: 0; border: 1px solid #dbeafe; border-radius: 9px; background: #fff; padding: 9px 10px; }
.ai-work-unit-facts small { color: #64748b; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.ai-work-unit-facts strong { overflow-wrap: anywhere; }
.ai-action-shell textarea { width: 100%; min-height: 160px; }
@media (max-width: 640px) { .ai-work-unit-facts { grid-template-columns: 1fr; } }
.ai-result-card { display: grid; gap: 0; border: 1px solid #dbeafe; border-radius: 14px; background: #fff; padding: 0 16px 14px; overflow: hidden; box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }
.ai-review-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 -16px; padding: 14px 16px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.ai-review-header > div { display: grid; gap: 2px; }
.ai-review-header small { color: #64748b; }
.ai-conversation-history { display: grid; gap: 8px; margin: 12px 0 0; padding: 12px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; }
.ai-conversation-history ol { display: grid; gap: 8px; margin: 0; padding-left: 22px; }
.ai-conversation-history li span { color: #1d4ed8; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.ai-conversation-history li p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-result-badge { color: #1d4ed8; font-weight: 800; }
.ai-review-status { flex: 0 0 auto; border-radius: 999px; background: #fff7ed; color: #9a3412; padding: 5px 9px; font-size: .78rem; font-weight: 800; }
.ai-review-status-ready { background: #ecfdf5; color: #166534; }
.ai-approval-impact { margin: 0 -16px; border-bottom: 1px solid #dbeafe; background: #eff6ff; padding: 11px 16px; color: #1e3a5f; line-height: 1.4; }
.ai-approval-review { display: grid; gap: 0; overflow: visible; }
.ai-approval-section { display: grid; gap: 7px; border: 0; border-bottom: 1px solid #e2e8f0; background: transparent; padding: 13px 0; }
.ai-command-summary h4 { color: #1d4ed8; }
.ai-approval-section h4, .ai-approval-section p, .ai-approval-section ul { margin: 0; }
.ai-approval-section p, .ai-approval-section li { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.ai-approval-section ul { padding-left: 22px; }
.ai-approval-details { display: grid; grid-template-columns: minmax(120px, 0.6fr) minmax(0, 1.4fr); gap: 7px 14px; margin: 0; }
.ai-approval-details dt { color: #475569; font-weight: 700; }
.ai-approval-details dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-approval-attention { margin: 10px 0 0; border: 1px solid #fed7aa; border-radius: 10px; background: #fff7ed; padding: 11px 12px; }
.ai-review-attention { display: grid; gap: 9px; margin: 12px 0 0; border: 1px solid #fdba74; border-radius: 10px; background: #fff7ed; padding: 12px; }
.ai-review-attention-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ai-review-attention-heading strong { color: #9a3412; }
.ai-review-attention-heading span { color: #9a3412; font-size: .78rem; font-weight: 800; }
.ai-review-match-block { display: grid; gap: 9px; border-top: 1px solid #fed7aa; padding-top: 9px; }
.ai-review-choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #fed7aa; padding-top: 9px; }
.ai-review-choice button { flex: 0 0 auto; }
.ai-revision-controls { margin-top: 12px; border-top: 1px solid #e2e8f0; padding: 12px 0 4px; }
.ai-revision-controls summary { width: fit-content; cursor: pointer; color: #1d4ed8; font-weight: 800; }
.ai-revision-controls > strong { color: #1d4ed8; font-weight: 800; }
.ai-revision-body { display: grid; gap: 8px; padding-top: 10px; }
.ai-revision-controls p { margin: 0; }
.ai-revision-controls textarea { width: 100%; min-height: 84px; }
.ai-revision-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ai-revision-actions .ai-voice-inline { margin-top: 0; }
.ai-result-actions { position: sticky; bottom: -14px; z-index: 2; margin: 12px -16px -14px; padding: 12px 16px 14px; border-top: 1px solid #e2e8f0; background: #fff; box-shadow: 0 -6px 16px rgba(15, 23, 42, .06); justify-content: flex-end; }
.ai-result-actions .ai-copy-action { margin-right: auto; }
.ai-error { color: #b91c1c; border: 1px solid #fecaca; background: #fff1f2; border-radius: 8px; padding: 10px; }
.ai-proof-banner { display: grid; gap: 10px; border: 2px solid #16a34a; border-radius: 12px; background: #f0fdf4; padding: 14px; box-shadow: 0 4px 14px rgba(22, 163, 74, .16); }
.ai-proof-title { display: grid; gap: 3px; }
.ai-proof-title strong { color: #15803d; font-size: 1.05rem; }
.ai-proof-fields { display: grid; grid-template-columns: minmax(120px, .6fr) minmax(0, 1.4fr); gap: 6px 12px; margin: 0; }
.ai-proof-fields dt { font-weight: 800; color: #166534; }
.ai-proof-fields dd { margin: 0; }
.ai-proof-followup { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.ai-proof-dismiss { justify-self: start; }
.ai-record-actions { border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; padding: 10px; }
.ai-activity-list { display: grid; gap: 10px; max-height: 65vh; overflow: auto; }
.ai-activity-row { display: grid; gap: 6px; border: 1px solid #dbeafe; border-radius: 10px; background: #f8fbff; padding: 12px; }
.ai-activity-row p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-activity-row small { color: #64748b; }
@media (max-width: 700px) { .ai-action-options, .ai-approval-details, .ai-proof-fields, .ai-proof-followup { grid-template-columns: 1fr; } .ai-approval-details dd { margin-bottom: 4px; } .ai-review-header, .ai-review-choice { align-items: flex-start; } .ai-review-choice { flex-direction: column; } .ai-review-choice button { width: 100%; } .ai-result-actions .ai-copy-action { margin-right: 0; } }

.scan-view-mode-controls { margin: 0 0 10px; }
.scan-view-mode-controls button.active,
.scan-view-mode-controls button[aria-pressed="true"] {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.scan-measurement-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
}
.scan-measurement-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.scan-measurement-heading p { margin: 3px 0 0; }
.scan-measurement-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow: auto;
}
.scan-measurement-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #334155;
  padding: 8px 10px;
  text-align: left;
}
.scan-measurement-row strong { color: #dc2626; }
.scan-measurement-row.selected {
  border-color: #dc2626;
  background: #fff1f2;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .13);
}
@media (max-width: 700px) {
  .scan-measurement-heading { align-items: stretch; flex-direction: column; }
  .scan-measurement-list { grid-template-columns: 1fr; }
}
.estimate-scope-grade-summary {
  display: grid;
  gap: .35rem;
  margin-top: .75rem;
  padding: .75rem;
  border: 1px solid #a7d8c4;
  border-radius: .65rem;
  background: #f1fbf7;
}
.scan-grade-summary {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
}
.scan-grade-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.scan-grade-heading p,
.scan-grade-disclaimer { margin: 3px 0 0; }
.scan-grade-warning {
  border-radius: 999px;
  padding: 4px 9px;
  background: #fff7ed;
  color: #c2410c;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}
.scan-grade-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}
.scan-grade-facts > span {
  display: grid;
  gap: 2px;
  padding: 9px;
  border: 1px solid #dbeafe;
  border-radius: 9px;
  background: rgba(255, 255, 255, .82);
}
.scan-grade-facts small { color: #64748b; font-size: .68rem; font-weight: 700; }
.scan-grade-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: .8rem; }
.scan-grade-legend > span:not(.muted)::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: -1px;
}
.scan-grade-legend .fill::before { background: rgb(37, 99, 235); }
.scan-grade-legend .grade::before { background: rgb(22, 163, 74); }
.scan-grade-legend .cut::before { background: rgb(234, 88, 12); }
@media (max-width: 600px) {
  .estimate-option-add { grid-template-columns: 1fr; }
  .scan-grade-heading { align-items: stretch; flex-direction: column; }
  .scan-grade-warning { width: fit-content; }
}

.work-order-settings-editor,
.settings-subsection,
.settings-template-list,
.wo-guided-checklist,
.wo-checklist-tab { display: grid; gap: 12px; }
.settings-subsection {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: var(--surface);
}
.settings-template-card,
.wo-checklist-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-2, #f8fafc);
}
.guided-checklist-creator {
  display: grid;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.guided-checklist-list-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
}
.guided-checklist-list-heading h4 { margin: 0; }
.guided-checklist-item {
  position: relative;
  padding-left: 48px;
  transition: opacity .15s ease, border-color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.guided-checklist-drag-active .guided-checklist-item:not(.dragging):not(.drop-before):not(.drop-after) { opacity: .55; }
.guided-checklist-item.dragging {
  opacity: .65;
  border: 2px dashed var(--blue);
  background: #eff6ff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, .18);
  transform: scale(.985);
}
.guided-checklist-item.drop-before,
.guided-checklist-item.drop-after {
  z-index: 2;
  opacity: 1;
  border-color: var(--blue);
  background: #eff6ff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .22), 0 10px 24px rgba(37, 99, 235, .16);
}
.guided-checklist-item.drop-before::before,
.guided-checklist-item.drop-after::after {
  position: absolute;
  left: 48px;
  z-index: 3;
  padding: 4px 10px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(20, 32, 51, .25);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.2;
  pointer-events: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.guided-checklist-item.drop-before::before {
  top: 0;
  content: "↑ Drop above this item";
  transform: translateY(-50%);
}
.guided-checklist-item.drop-after::after {
  bottom: 0;
  content: "↓ Drop below this item";
  transform: translateY(50%);
}
.guided-checklist-drag-preview {
  position: fixed;
  z-index: 10000;
  display: grid;
  max-width: min(360px, calc(100vw - 24px));
  gap: 2px;
  padding: 10px 14px;
  border: 2px solid #ffffff;
  border-radius: 12px;
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(20, 32, 51, .3);
  pointer-events: none;
}
.guided-checklist-drag-preview span {
  color: #bfdbfe;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.guided-checklist-drag-preview strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.guided-checklist-drag-active,
.guided-checklist-drag-active * { cursor: grabbing !important; user-select: none !important; }
.guided-checklist-drag-handle {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  min-width: 28px;
  min-height: 32px;
  padding: 4px;
  cursor: grab;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  touch-action: none;
}
.guided-checklist-drag-handle:hover,
.guided-checklist-drag-handle:focus-visible {
  color: var(--ink);
  border-color: var(--line);
}
.guided-checklist-drag-handle:active { cursor: grabbing; }
.guided-checklist-empty { margin: 0; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; }
.settings-template-actions,
.guided-checklist-editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-self: start;
}
.settings-template-actions button,
.guided-checklist-editor-actions button {
  width: auto;
  min-height: 32px;
  padding: 5px 10px;
}
.guided-checklist-proof-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
.guided-checklist-proof-label input[type="checkbox"] {
  width: 19px;
  height: 19px;
  min-height: 19px;
  margin: 0;
  padding: 0;
  flex: 0 0 19px;
}
.guided-checklist-product-picker {
  display: grid;
  gap: 8px;
  align-content: start;
}
.guided-checklist-product-picker-label,
.guided-checklist-catalog-search {
  font-weight: 600;
}
.guided-checklist-catalog-search {
  display: grid;
  gap: 6px;
}
.guided-checklist-selected-products {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
}
.guided-checklist-selected-products-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
}
.guided-checklist-selected-products-head > span { font-size: 12px; }
.guided-checklist-selected-products-list {
  display: grid;
  gap: 6px;
}
.guided-checklist-selected-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #ffffff;
}
.guided-checklist-selected-product-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.guided-checklist-selected-product-copy strong,
.guided-checklist-selected-product-copy small {
  overflow-wrap: anywhere;
}
.guided-checklist-selected-product button {
  width: auto;
  min-height: 32px;
  padding: 5px 10px;
}
.guided-checklist-selected-products-empty { margin: 0; }
.guided-checklist-product-picker small {
  min-height: 1.1em;
  font-weight: 600;
}
.wo-checklist-answers,
.wo-message-template-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wo-checklist-answers button.active { box-shadow: 0 0 0 3px rgba(37, 99, 235, .2); }
.wo-checklist-context {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 2fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
}
.wo-checklist-product { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(110px, 160px); gap: 8px; align-items: end; }
.wo-checklist-product label { display: grid; gap: 4px; }
.wo-checklist-product label span { font-size: 12px; color: var(--muted); font-weight: 700; }
.wo-checklist-proof-gallery { display: grid; gap: 7px; }
.wo-checklist-proof-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 9px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
}
.wo-checklist-proof-card > span:last-child { display: grid; gap: 2px; }
.wo-checklist-proof-card small { color: var(--muted); }
.wo-checklist-proof-icon { font-size: 20px; text-align: center; color: var(--brand); }
.wo-checklist-review-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.checklist-result { border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 800; background: #e5e7eb; }
.checklist-result.good { color: #065f46; background: #d1fae5; }
.checklist-result.danger { color: #991b1b; background: #fee2e2; }
.wo-checklist-review-summary { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.wo-checklist-review-summary p { margin: 0; white-space: pre-wrap; }
.checklist-proof-viewer img,
.checklist-proof-viewer video { display: block; max-width: min(92vw, 1100px); max-height: 78vh; margin: auto; }
.wo-message-template-bar select { flex: 1 1 240px; }
@media (max-width: 680px) {
  .wo-checklist-context,
  .wo-checklist-product { grid-template-columns: 1fr; }
}
