:root {
  color-scheme: light;
  --bg: #f7fafc;
  --surface: #ffffff;
  --surface-soft: #f8fbfc;
  --surface-tint: #eefafa;
  --ink: #111827;
  --text: var(--ink);
  --muted: #64748b;
  --line: #d8e6ea;
  --navy: #07113c;
  --teal: #0c8f88;
  --teal-2: #087974;
  --teal-soft: #accbd2;
  --amber: #c9852b;
  --red: #9f2f24;
  --green: #246b4a;
  --blue: #39486c;
  --border: var(--line);
  --brand: var(--teal);
  --shadow: 0 16px 38px rgba(7, 17, 60, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  font-family: Arial, Helvetica, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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

button {
  cursor: pointer;
}

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

.login-sales-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid #d9e2e0; background: #fbfaf7; color: #001849; }
.login-sales-header-inner { max-width: 1536px; margin: auto; min-height: 84px; padding: 8px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.login-sales-logo img { display: block; width: 224px; max-width: 100%; height: auto; }
.login-sales-desktop ul, .login-sales-mobile ul { list-style: none; padding: 0; margin: 0; }
.login-sales-desktop ul { display: flex; justify-content: center; flex-wrap: wrap; }
.login-sales-desktop a { display: block; padding: 14px 10px; font-size: 14px; font-weight: 700; color: #40516a; }
.login-sales-actions { display: flex; align-items: center; gap: 8px; }
.login-sales-login, .login-sales-trial { padding: 14px 18px; border: 1px solid #c9d6d4; border-radius: 8px; font-size: 14px; font-weight: 700; }
.login-sales-trial { background: #008e82; border-color: #008e82; color: white; }
.login-sales-header a:focus-visible, .login-sales-header summary:focus-visible { outline: 2px solid #008e82; outline-offset: 3px; }
.login-sales-mobile { display: none; position: relative; }
.login-sales-mobile summary { cursor: pointer; list-style: none; border: 1px solid #c9d6d4; border-radius: 8px; padding: 10px 14px; }
.login-sales-mobile nav { position: absolute; right: 0; top: 52px; width: min(336px, calc(100vw - 32px)); background: white; border: 1px solid #d7e1df; border-radius: 12px; padding: 12px; box-shadow: 0 22px 54px rgba(0,24,73,.18); }
.login-sales-mobile a { display: block; padding: 12px; font-size: 14px; font-weight: 700; }
.login-sales-header + .login-shell { min-height: calc(100vh - 84px); }
@media (min-width: 1024px) and (max-width: 1535px) { .login-sales-desktop { order: 3; width: 100%; } }
@media (max-width: 1023px) { .login-sales-desktop, .login-sales-trial { display: none; } .login-sales-mobile { display: block; } .login-sales-logo img { width: 188px; } .login-sales-header-inner { padding-inline: 12px; } }
@media (max-width: 419px) { .login-sales-login { display: none; } }

.login-shell {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: clamp(24px, 4vw, 72px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #f7f7f0;
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
}

.login-shell::before {
  background:
    radial-gradient(circle at 10% 82%, rgba(0, 142, 130, 0.08), transparent 31%),
    radial-gradient(circle at 90% 10%, rgba(0, 24, 73, 0.05), transparent 30%),
    linear-gradient(180deg, #fbfaf5 0%, #f3f4eb 100%);
  animation: none;
}

.login-shell::after {
  background: linear-gradient(112deg, transparent 24%, rgba(0, 142, 130, 0.035) 49%, transparent 50%, rgba(0, 24, 73, 0.025) 73%, transparent 74%);
  transform: rotate(-8deg) scale(1.18);
  animation: none;
}

.login-panel {
  width: min(1240px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.brand-block {
  background: transparent;
  color: #001849;
  border-radius: 0;
  padding: clamp(20px, 3vw, 56px);
  box-shadow: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--navy);
  background: var(--teal-soft);
  font-weight: 900;
  margin-bottom: 18px;
}

.brand-block h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.brand-block p {
  margin: 0;
  max-width: 54rem;
  color: rgba(255, 255, 255, 0.82);
}

.login-card,
.panel,
.metric-card,
.list-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-card {
  align-self: center;
  padding: clamp(28px, 3vw, 48px);
  border-radius: 16px;
  border-color: #d8e4e0;
  box-shadow: 0 22px 50px rgba(0, 24, 73, 0.12);
}

.login-card h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.12;
  text-align: center;
}

.login-card h2,
.login-card > .muted,
.login-card .signup-prompt { text-align: center !important; }

.login-card .btn.primary {
  display: block;
  margin-inline: auto;
}

.trial-property-card {
  max-width: 560px;
}

.trial-resume-shell .login-branding {
  min-height: 360px;
}

.trial-resume-shell .login-story {
  display: none;
}

.trial-property-card form {
  margin-top: 28px;
}

.trial-property-note {
  margin: 4px 0 22px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: center;
}

.signup-prompt { margin: 4px 0 16px; text-align: center; color: var(--muted); }
.signup-prompt a { color: var(--teal-2); font-weight: 800; text-decoration: underline; }

.login-brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
}

.login-brand-lockup img { width: min(310px, 100%); height: auto; display: block; }

.login-brand-lockup .brand-mark {
  margin: 0;
}

.login-story {
  position: relative;
  min-height: 260px;
  margin-top: clamp(46px, 8vh, 110px);
}

.login-story-slide {
  position: absolute;
  inset: 0;
  max-width: 620px;
  opacity: 0;
  transform: translateY(14px);
  animation: login-story 30s ease-in-out infinite;
}

.login-story-slide:nth-child(2) { animation-delay: 10s; }
.login-story-slide:nth-child(3) { animation-delay: 20s; }

.login-story-slide h1 {
  margin: 0;
  max-width: 27ch;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.login-story-slide p {
  margin-top: 22px;
  max-width: 42rem;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  line-height: 1.55;
}

.login-story-slide h1 { color: #001849; }

.login-story-slide p {
  color: #52697c;
}

.login-customer-rail {
  margin-top: clamp(16px, 7vh, 72px);
  min-height: 48px;
  display: flex;
  align-items: end;
  border-top: 1px solid rgba(0, 24, 73, 0.18);
  color: #52697c;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes login-story {
  0%, 29% { opacity: 1; transform: translateY(0); }
  33%, 100% { opacity: 0; transform: translateY(-12px); }
}

@keyframes login-atmosphere {
  0%, 100% { transform: scale(1) translate3d(0, 0, 0); filter: hue-rotate(0deg); }
  33% { transform: scale(1.06) translate3d(-2%, 1%, 0); filter: hue-rotate(10deg); }
  66% { transform: scale(1.04) translate3d(2%, -1%, 0); filter: hue-rotate(-14deg); }
}

@keyframes login-beams {
  0%, 100% { opacity: 0.48; transform: rotate(-8deg) scale(1.18) translateX(0); }
  33% { opacity: 0.9; transform: rotate(-5deg) scale(1.22) translateX(-3%); }
  66% { opacity: 0.66; transform: rotate(-11deg) scale(1.2) translateX(3%); }
}

@media (prefers-reduced-motion: reduce) {
  .login-shell::before,
  .login-shell::after,
  .login-story-slide { animation: none; }
  .login-story-slide:first-child { opacity: 1; transform: none; }
}

.shell {
  min-height: 100vh;
  display: grid;
  align-items: start;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "topbar topbar"
    "sidebar main";
}

.shell.sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

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

.topbar-left,
.topbar-right,
.nav-row,
.inline-row,
.chip-row,
.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-left {
  min-width: 0;
}

.app-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-weight: 900;
}

.app-title {
  min-width: 0;
}

.app-title strong,
.app-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-title span {
  color: var(--muted);
  font-size: 0.82rem;
}

.property-context {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.property-context span {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.property-context strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-context-topbar {
  min-width: 168px;
  max-width: 280px;
}

.property-context-topbar span {
  color: var(--muted);
}

.property-context-sidebar {
  margin: 0 0 14px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fbfc;
  border: 1px solid #dde8ec;
}

.property-context-sidebar span,
.property-context-sidebar strong {
  color: var(--ink);
}

.property-context-sidebar span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  opacity: 1;
  text-transform: none;
}

.property-picker {
  position: relative;
  width: 100%;
}

.property-picker-trigger {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  padding: 8px 34px 8px 10px;
  text-overflow: ellipsis;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.property-picker-trigger::-webkit-details-marker { display: none; }

.property-picker-trigger::after {
  content: "⌄";
  position: absolute;
  right: 11px;
  color: var(--muted);
}

.property-picker[open] .property-picker-trigger::after { transform: rotate(180deg); }

.property-picker-trigger:hover,
.property-picker-trigger:focus {
  border-color: var(--teal);
  color: var(--ink);
  background: #ffffff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(12, 143, 136, 0.16);
}

.property-picker-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  width: min(360px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(7, 17, 60, 0.18);
}

.property-picker-search-label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.property-picker-search {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.property-picker-options {
  max-height: min(300px, 45vh);
  overflow-y: auto;
  margin-top: 8px;
}

.property-picker-option {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 8px;
  color: var(--ink);
  text-align: left;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.property-picker-option:hover,
.property-picker-option:focus { background: #edf8f7; outline: none; }
.property-picker-option.is-active { color: var(--teal-deep); background: #e3f5f2; font-weight: 700; }
.property-picker-option small { color: var(--muted); font-weight: 700; }
.property-picker-empty { margin: 10px 8px 4px; }

.property-context-sidebar .property-picker-trigger {
  border-color: #ccdbe1;
  color: var(--ink);
  background: #ffffff;
  font-size: 0.86rem;
}

.app-sidebar {
  grid-area: sidebar;
  align-self: stretch;
  position: sticky;
  top: 63px;
  height: calc(100vh - 63px);
  overflow-y: auto;
  padding: 12px 10px;
  background: #ffffff;
  color: var(--ink);
  border-right: 1px solid #dfe8ee;
  box-shadow: 8px 0 22px rgba(7, 17, 60, 0.05);
}

.sidebar-header,
.sidebar-group-toggle,
.sidebar-link {
  display: flex;
  align-items: center;
}

.sidebar-header {
  gap: 9px;
  padding: 2px 4px 12px;
}

.sidebar-brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
}

.sidebar-title {
  min-width: 0;
  flex: 1 1 auto;
}

.sidebar-title strong,
.sidebar-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-title strong {
  color: var(--navy);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.15;
}

.sidebar-title span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
}

.sidebar-collapse-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
}

.sidebar-collapse-btn:hover,
.sidebar-collapse-btn:focus-visible {
  background: #f1f6f8;
  border-color: #d7e3e8;
  color: var(--navy);
}

.sidebar-collapse-icon,
.sidebar-chevron-icon,
.sidebar-icon-svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.sidebar-group {
  display: grid;
  gap: 3px;
}

.sidebar-group-toggle {
  width: 100%;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 6px 8px;
  text-align: left;
  background: transparent;
  color: #526173;
}

.sidebar-group-toggle:hover,
.sidebar-group-toggle:focus-visible {
  background: #f5f8fa;
  color: var(--navy);
  outline: none;
}

.sidebar-group-toggle:focus-visible,
.sidebar-link:focus-visible,
.sidebar-collapse-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(12, 143, 136, 0.18);
}

.sidebar-group-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #526173;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.sidebar-group-caret {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  color: #748294;
  transition: transform 0.16s ease;
}

.sidebar-group.open .sidebar-group-caret {
  transform: rotate(180deg);
}

.sidebar-group-count {
  display: none;
}

.sidebar-group-items {
  display: none;
  gap: 2px;
  padding: 1px 0 4px;
}

.sidebar-group.open .sidebar-group-items,
.shell.sidebar-collapsed .sidebar-group-items {
  display: grid;
}

.sidebar-link {
  position: relative;
  gap: 10px;
  min-height: 40px;
  padding: 8px 9px;
  border-radius: 8px;
  color: #415066;
  font-size: 0.9rem;
  font-weight: 600;
}

.sidebar-link:hover {
  background: #f4f8fa;
  color: var(--navy);
}

.sidebar-link.active {
  background: #eefafa;
  color: var(--navy);
  font-weight: 700;
}

.sidebar-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: var(--teal);
}

.sidebar-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  color: #64748b;
}

.sidebar-link:hover .sidebar-icon,
.sidebar-link.active .sidebar-icon {
  color: var(--teal);
}

.sidebar-link-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell.sidebar-collapsed .app-sidebar {
  padding: 12px 9px;
}

.shell.sidebar-collapsed .sidebar-header {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.shell.sidebar-collapsed .sidebar-title,
.shell.sidebar-collapsed .property-context-sidebar,
.shell.sidebar-collapsed .sidebar-group-toggle,
.shell.sidebar-collapsed .sidebar-link-label {
  display: none;
}

.shell.sidebar-collapsed .sidebar-nav {
  gap: 4px;
}

.shell.sidebar-collapsed .sidebar-group {
  gap: 1px;
}

.shell.sidebar-collapsed .sidebar-link {
  width: 42px;
  height: 40px;
  justify-content: center;
  padding: 8px;
}

.shell.sidebar-collapsed .sidebar-link.active::before {
  top: 9px;
  bottom: 9px;
}

.shell.sidebar-collapsed .sidebar-icon {
  margin: 0;
}

.nav-wrap {
  grid-area: nav;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.nav-row {
  min-width: max-content;
  padding: 8px 12px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

.nav-link.active {
  background: var(--surface-tint);
  color: var(--teal);
}

.content {
  grid-area: main;
  width: min(1280px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: 16px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 16px;
}

.page-header h2,
.panel h3,
.list-card h3 {
  margin: 0;
  letter-spacing: 0;
}

.page-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-width: 0;
}

.grid > *,
.split > *,
.scheduler-dispatch-layout > * {
  min-width: 0;
}

.split .grid.two {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.split .field,
.split .input,
.split .select {
  min-width: 0;
  width: 100%;
}

.grid.two,
.grid.three,
.grid.four {
  grid-template-columns: 1fr;
}

.panel {
  padding: 16px;
  min-width: 0;
}

.user-create-panel {
  margin-bottom: 16px;
}

.user-create-panel .user-form {
  margin-top: 12px;
}

.metric-card {
  padding: 14px;
  min-height: 96px;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
  letter-spacing: 0;
}

.metric-card.action-card {
  display: block;
  color: var(--ink);
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease;
}

.metric-card.action-card:hover {
  transform: translateY(-2px);
  border-color: var(--teal-soft);
}

.metric-card small {
  display: inline-block;
  margin-top: 8px;
  color: var(--teal);
  font-weight: 800;
}

.list-card {
  padding: 14px;
}

.uniform-grid .list-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
}

.uniform-grid .list-card h3 {
  margin-top: 10px;
}

.card-footer {
  margin-top: auto;
}

.clamp-line {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-filters {
  margin-bottom: 12px;
}

.filter-pills {
  margin-bottom: 12px;
}

.check-row,
.module-toggle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 38px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.module-toggle-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
}

.module-toggle small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.module-toggle.disabled {
  opacity: 0.62;
  background: #eef5f7;
}

.source-context {
  margin-bottom: 12px;
  border-left: 4px solid var(--accent);
}

.asset-work-order-form .field button {
  width: fit-content;
}

.list-card + .list-card {
  margin-top: 10px;
}

.list-card h3 {
  font-size: 1rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.84rem;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field label,
.field-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--teal);
  outline: 2px solid rgba(12, 143, 136, 0.18);
  outline-offset: 1px;
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 0;
}

.checkbox-line input {
  margin-top: 3px;
}

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.btn:hover {
  border-color: var(--teal-soft);
}

.btn.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.btn.primary:hover {
  border-color: var(--teal-2);
  background: var(--teal-2);
}

.btn.accent {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--navy);
}

.btn.danger {
  border-color: var(--red);
  color: var(--red);
}

.btn.ghost {
  background: transparent;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.link-button {
  display: inline;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--teal);
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.link-button:hover {
  color: var(--teal-2);
  text-decoration: underline;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.chip.status-assigned,
.chip.status-scheduled {
  background: #f8fbfc;
  color: var(--blue);
  border-color: #d7e5e9;
}

.chip.status-in-progress,
.chip.status-syncing {
  background: #eefafa;
  color: var(--teal);
  border-color: #b9dfe0;
}

.chip.status-waiting,
.chip.status-pending {
  background: #fff8ed;
  color: #8b5a18;
  border-color: #ead5b8;
}

.chip.status-completed,
.chip.status-synced,
.chip.status-online {
  background: #e9f7f1;
  color: var(--green);
  border-color: #bfdfcc;
}

.chip.status-closed {
  background: #eef5f7;
  color: var(--muted);
}

.chip.status-urgent,
.chip.status-conflict,
.chip.status-offline {
  background: #fff1f1;
  color: var(--red);
  border-color: #e6c4c0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.detail-line {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.detail-line span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-line strong {
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  padding: 12px 14px;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.photo-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.photo-preview img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.attachment-section {
  margin-top: 16px;
}

.attachment-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.attachment-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.attachment-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #eef5f7;
}

.attachment-icon {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #eef5f7;
  color: var(--muted);
  font-weight: 800;
}

.inventory-workspace {
  align-items: start;
}

.inventory-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 14px;
}

.inventory-table {
  min-width: 1120px;
}

.inventory-table .selected-row {
  background: #f4fbfb;
}

.inventory-thumb {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef5f7;
  color: var(--muted);
  font-weight: 900;
  text-decoration: none;
}

.inventory-thumb img,
.inventory-primary-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.inventory-primary-photo {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 220px;
  overflow: hidden;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef5f7;
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 900;
}

.inventory-gallery .attachment-card .button-row {
  margin-top: 8px;
}

.inventory-edit-panel {
  margin: 14px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.inventory-edit-panel > summary {
  width: max-content;
  cursor: pointer;
}

.inventory-transactions {
  margin-top: 14px;
}

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

.transaction-card {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto minmax(140px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.insights-panel {
  margin-top: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.insights-panel > summary {
  width: max-content;
  cursor: pointer;
}

.insights-copy {
  margin: 12px 0;
}

.vendor-portal-detail {
  align-items: start;
}

.vendor-work-panel,
.vendor-review-sidecar {
  min-width: 0;
}

.vendor-actions-section,
.vendor-evidence-summary,
.vendor-review-package {
  margin-top: 14px;
}

.vendor-action-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.vendor-action-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 12px;
}

.vendor-action-card h4,
.vendor-review-package h4,
.vendor-review-package h5 {
  margin: 0 0 6px;
}

.vendor-action-card .textarea {
  min-height: 76px;
}

.vendor-update-form,
.vendor-upload-form {
  margin-top: 12px;
}

.vendor-review-package {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfb 100%);
  border: 1px solid #b9ddda;
  border-radius: 8px;
  padding: 14px;
}

.vendor-review-columns {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 12px;
}

.vendor-review-columns .detail-line {
  margin-bottom: 8px;
}

.attachment-upload {
  margin-top: 12px;
}

.qr-panel {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.qr-preview,
.qr-placeholder {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}

.qr-preview img,
.qr-label img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-placeholder {
  color: var(--muted);
  font-weight: 900;
  letter-spacing: 0;
}

.asset-scan-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.asset-scan-layout details {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.asset-scan-layout summary {
  cursor: pointer;
  font-weight: 800;
}

.qr-label-sheet {
  display: grid;
  justify-content: start;
  padding: 24px;
  background: #fff;
  border: 1px dashed var(--line);
}

.qr-label {
  width: 3.5in;
  min-height: 1.6in;
  display: grid;
  grid-template-columns: 1.25in 1fr;
  gap: 0.14in;
  align-items: center;
  padding: 0.16in;
  border: 1px solid #111;
  color: #111;
  background: #fff;
}

.qr-label img,
.qr-label .qr-placeholder {
  width: 1.16in;
  height: 1.16in;
  border-radius: 0;
}

.qr-label strong,
.qr-label span,
.qr-label small {
  display: block;
}

.qr-label strong {
  font-size: 0.14in;
  line-height: 1.15;
}

.qr-label span,
.qr-label small {
  margin-top: 0.04in;
  font-size: 0.1in;
  line-height: 1.2;
}

.signature-panel {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

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

.signature-card {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.signature-card img {
  width: 100%;
  min-height: 70px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(15 23 42 / 48%);
}

.modal-card {
  width: min(720px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.signature-modal {
  touch-action: none;
}

.vendor-dispatch-review-modal {
  width: min(760px, 100%);
}

.vendor-dispatch-review-summary {
  margin: 14px 0;
}

.vendor-dispatch-message-preview {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.vendor-dispatch-message-preview pre {
  max-height: 240px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  line-height: 1.45;
  white-space: pre-wrap;
}

.vendor-dispatch-confirmation-note {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #a8c7d0;
  border-radius: 8px;
  background: #eef7f8;
}

.vendor-dispatch-confirmation-note.live {
  border-color: #86b79a;
  background: #eef8f1;
}

.vendor-dispatch-review-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

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

.inline-control .select,
.inline-control .input {
  flex: 1 1 auto;
  min-width: 0;
}

.advanced-fields {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.advanced-fields summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 900;
}

.platform-property-list {
  display: grid;
  gap: 10px;
}

.platform-property-card {
  padding: 0;
  overflow: hidden;
}

.platform-property-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 16px;
  cursor: pointer;
}

.platform-property-summary:hover {
  background: var(--surface-soft);
}

.platform-property-summary::marker,
.platform-property-summary::-webkit-details-marker {
  display: none;
}

.platform-property-summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 900;
}

.platform-property-card[open] .platform-property-summary {
  border-bottom: 1px solid var(--line);
}

.platform-property-card[open] .platform-property-summary::after {
  content: "−";
}

.platform-property-summary h3,
.platform-property-summary p {
  margin: 0;
}

.platform-property-summary-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.platform-property-settings {
  padding: 16px;
}

.platform-property-search {
  width: min(320px, 100%);
}

.platform-property-no-results {
  margin: 12px 0;
}

@media (max-width: 680px) {
  .platform-property-summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .platform-property-summary-meta {
    justify-content: flex-start;
    margin-left: 0;
  }
}

.location-picker-modal {
  width: min(860px, 100%);
}

.location-picker-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.location-picker-search-row .field {
  margin: 0;
}

.location-picker-provider-note {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.86rem;
}

.location-picker-results {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  margin-top: 10px;
}

.location-picker-result {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.location-picker-result:hover,
.location-picker-result:focus-visible,
.location-picker-result.selected {
  border-color: var(--teal);
  outline: 2px solid rgba(47, 154, 143, 0.2);
}

.location-picker-result span {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.location-picker-map {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf6f7;
}

.location-picker-map[data-picker-mode="internal"] {
  background:
    linear-gradient(90deg, rgba(57, 72, 108, 0.13) 1px, transparent 1px),
    linear-gradient(rgba(57, 72, 108, 0.13) 1px, transparent 1px),
    #edf6f7;
  background-size: 42px 42px;
  touch-action: none;
}

.location-picker-map[data-picker-mode="google"] {
  touch-action: pan-x pan-y;
}

.location-picker-grid {
  position: absolute;
  inset: 10%;
  border: 2px dashed rgba(47, 154, 143, 0.28);
  border-radius: 8px;
  pointer-events: none;
}

.location-picker-pin {
  position: absolute;
  width: 46px;
  height: 46px;
  border: 3px solid #fff;
  border-radius: 999px 999px 999px 0;
  background: var(--teal);
  box-shadow: var(--shadow);
  transform: translate(-50%, -84%) rotate(-45deg);
  cursor: grab;
  touch-action: none;
}

.location-picker-pin::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 999px;
  background: #fff;
}

.location-picker-pin:active {
  cursor: grabbing;
}

.location-picker-hint {
  margin: -6px 0 12px;
}

.location-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .location-picker-modal {
    padding: 14px;
  }

  .location-picker-search-row {
    grid-template-columns: 1fr;
  }

  .location-picker-search-row .btn,
  .location-picker-footer .button-row,
  .location-picker-footer .btn {
    width: 100%;
  }

  .location-picker-map {
    min-height: min(48vh, 360px);
  }

  .location-picker-result {
    flex-direction: column;
    gap: 3px;
  }

  .location-picker-result span {
    white-space: normal;
  }
}

.signature-pad-wrap {
  width: 100%;
  margin: 12px 0;
  padding: 8px;
  border: 1px dashed var(--teal-soft);
  border-radius: 8px;
  background: var(--surface-soft);
}

.signature-pad {
  display: block;
  width: 100%;
  height: 220px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  touch-action: none;
}

.branded-panel {
  border-top: 5px solid var(--brand-primary, var(--teal));
}

.brand-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-primary, var(--teal)) 8%, #fff);
}

.brand-chip {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  border-radius: 8px;
  background: var(--brand-primary, var(--teal));
  color: #fff;
  font-weight: 900;
}

.field-task-list {
  display: grid;
  gap: 14px;
}

.field-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.field-card h3 {
  margin: 10px 0 6px;
  font-size: 1.25rem;
}

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

.field-actions .btn {
  min-height: 52px;
  white-space: normal;
}

.tap-checklist {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.tap-check {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 800;
}

.tap-check.done {
  background: #e8f5ee;
  border-color: #bfdfcc;
  color: var(--green);
}

.quick-panel {
  margin-top: 12px;
}

.setup-diagram {
  min-height: 120px;
  margin: 12px 0;
  padding: 14px;
  border: 1px dashed var(--teal-soft);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--teal);
  font-weight: 700;
}

.map-canvas {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(57, 72, 108, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(57, 72, 108, 0.12) 1px, transparent 1px),
    #f8fbfc;
  background-size: 42px 42px;
  touch-action: none;
}

.map-provider-panel {
  margin-bottom: 12px;
}

.map-provider-canvas {
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef5f7;
}

.map-provider-empty {
  max-width: 420px;
  padding: 16px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.warning-text,
.warning-list {
  color: #7b5517;
}

.map-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.map-controls .btn {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}

.map-toolbar {
  margin-bottom: 12px;
}

.map-layout {
  align-items: stretch;
}

.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-zone-shape {
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.map-zone-label {
  fill: var(--navy);
  font-size: 3px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 0.7;
}

.map-legend,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.map-legend {
  justify-content: flex-start;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--amber);
  display: inline-block;
}

.legend-dot.urgent {
  background: var(--red);
}

.legend-dot.sensitive {
  background: var(--navy);
}

.legend-dot.person {
  background: var(--blue);
}

.legend-dot.work-order {
  background: var(--teal);
}

.map-zone {
  position: absolute;
  min-width: 130px;
  min-height: 78px;
  display: grid;
  place-items: center;
  border: 2px solid var(--teal-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--teal);
  font-weight: 900;
  text-align: center;
  padding: 8px;
}

.map-dot,
.map-person,
.map-work-order-pin {
  position: absolute;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--amber);
  color: #2c210c;
  box-shadow: var(--shadow);
  font-weight: 900;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.map-dot .pin-core {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: currentColor;
}

.map-dot::after {
  content: attr(data-preview);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 230px;
  transform: translateX(-50%);
  display: none;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
  white-space: normal;
}

.map-dot:hover::after,
.map-dot:focus-visible::after,
.map-work-order-pin:hover::after,
.map-work-order-pin:focus-visible::after {
  display: block;
}

.map-dot.sensitive {
  background: var(--red);
  color: #fff;
}

.map-dot.cluster {
  width: 48px;
  height: 48px;
  background: var(--blue);
  color: #fff;
  border-width: 3px;
}

.map-dot.cat-water-shutoff,
.map-dot.cat-backflow,
.map-dot.cat-fire-life-safety,
.map-dot.cat-electrical-room,
.map-dot.cat-mechanical-room {
  background: var(--red);
  color: #fff;
}

.map-dot.cat-pool,
.map-dot.cat-fountain,
.map-dot.cat-pond-lake {
  background: var(--blue);
  color: #fff;
}

.map-dot.cat-irrigation-controller,
.map-dot.cat-landscaping-zone,
.map-dot.cat-playground,
.map-dot.cat-dog-park {
  background: var(--green);
  color: #fff;
}

.map-dot.urgent {
  outline: 4px solid rgba(185, 67, 67, 0.2);
}

.map-dot.selected {
  box-shadow: 0 0 0 5px rgba(47, 154, 143, 0.24), var(--shadow);
}

.map-work-order-pin {
  width: 34px;
  height: 34px;
  z-index: 4;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  font-size: 0.7rem;
}

.map-work-order-pin.urgent {
  background: var(--red);
  outline: 4px solid rgba(185, 67, 67, 0.2);
}

.map-work-order-pin::after {
  content: attr(data-preview);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 230px;
  transform: translateX(-50%);
  display: none;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
  white-space: normal;
}

.map-person {
  background: var(--blue);
  color: #fff;
  width: 34px;
  height: 34px;
  z-index: 3;
}

.map-list-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.map-list-item.selected {
  border-color: var(--teal);
  background: #eefafa;
}

.map-list-item strong,
.map-list-item small {
  display: block;
}

.map-list-item small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}

.map-point-linked-grid {
  align-items: start;
}

.map-point-linked-section,
.map-point-linked-section .list-card,
.map-point-linked-section .list-card > * {
  min-width: 0;
  max-width: 100%;
}

.map-point-linked-section .list-card {
  display: block;
}

.map-point-linked-section .chip-row {
  flex-wrap: wrap;
  align-items: flex-start;
}

.map-point-linked-section :is(h3, strong, p, a, .chip) {
  overflow-wrap: anywhere;
  word-break: normal;
}

.map-point-linked-section .chip {
  white-space: normal;
}

.directory-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(90px, 0.8fr) minmax(100px, 0.9fr) minmax(140px, 1fr);
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.emergency-card,
.alert-panel {
  border-color: #e6c4c0;
  background: #fff7f5;
}

.hide-mobile {
  display: none;
}

.ai-panel {
  border-left: 4px solid var(--blue);
}

.ai-panel.compact {
  margin-top: 12px;
}

.ai-response {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.ai-response-body {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.action-preview {
  margin-top: 8px;
  box-shadow: none;
}

.ai-confirm-card {
  display: grid;
  gap: 10px;
}

.ai-confirm-card .button-row {
  justify-content: flex-start;
}

.sub-panel,
.voice-panel,
.bilingual-context {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.language-assist-panel {
  margin: 12px 0;
}

.voice-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  background: var(--surface-soft);
}

.voice-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.voice-output {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.bilingual-context {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  background: #fff8ed;
}

.bilingual-context.compact {
  margin: 0;
  padding: 10px;
}

.team-admin-card {
  display: grid;
  gap: 12px;
}

.team-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

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

.company-ops-warning {
  border-left: 4px solid var(--amber);
}

.company-ops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 12px 0;
}

.company-ops-detail {
  align-self: start;
}

.company-ops-action-card {
  width: 100%;
  text-align: left;
  color: var(--ink);
}

@media (min-width: 720px) {
  .login-panel {
    width: min(1372px, 100%);
    grid-template-columns: 1.1fr 0.9fr;
    column-gap: 150px;
    align-items: center;
  }

  .login-card {
    order: -1;
    /* The adjacent brand narrative is intentionally matched to this card. */
    min-height: 420px;
  }

  .login-panel .login-card,
  .login-panel .login-branding {
    box-sizing: border-box;
  }

  .login-panel .login-branding {
    align-self: center;
    display: flex;
    flex-direction: column;
    height: var(--login-card-height, auto);
    justify-content: space-between;
    padding: 0;
  }

  .login-branding .login-story {
    flex: 1;
    /* Reserve visual clearance beneath the lockup before any rotating copy. */
    margin-top: clamp(48px, 6vh, 80px);
    min-height: 0;
  }

  .login-branding .login-story-slide {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .login-branding .login-customer-rail {
    margin-top: 0;
  }

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

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

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

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

  .field-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  }

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

  .hide-mobile {
    display: initial;
  }
}

@media (min-width: 1100px) {
  .company-ops-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  }

  .inventory-workspace {
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  }
}

@media (max-width: 560px) {
  .transaction-card {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-right {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .page-header {
    display: grid;
  }

  .button-row {
    flex-wrap: wrap;
  }

  .device-phone .content {
    padding: 12px;
  }

  .device-phone .metric-card {
    min-height: 82px;
  }

  .device-phone .map-canvas {
    min-height: 360px;
  }

  .device-phone .signature-card {
    grid-template-columns: 1fr;
  }

  .device-phone .signature-pad {
    height: 190px;
  }

  .device-phone .qr-panel {
    grid-template-columns: 1fr;
  }

  .device-phone .qr-preview,
  .device-phone .qr-placeholder {
    width: 144px;
    height: 144px;
  }

  .directory-row {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .topbar .btn {
    width: auto;
  }
}

@media (min-width: 720px) and (max-width: 1023px) {
  .device-tablet .map-layout,
  .device-tablet .split {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  }
}

@media (min-width: 720px) {
  .asset-scan-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  }
}

.notification-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
}

.notification-toast {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(7, 17, 60, 0.14);
  padding: 12px;
}

.notification-toast p {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.calendar-card {
  border-left: 4px solid var(--teal);
  min-width: 0;
}

.calendar-card-risk,
.calendar-mini-item-risk,
.scheduler-card-overdue {
  border-left-color: var(--red);
}

.calendar-card .button-row,
.notification-toast .button-row {
  margin-top: 8px;
}

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

.inline-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  padding: 10px;
}

.calendar-toolbar {
  display: grid;
  gap: 12px;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}

.calendar-day-cell {
  min-height: 132px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  overflow: hidden;
}

.calendar-day-number {
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 6px;
}

.calendar-mini-item {
  display: block;
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  background: var(--surface-soft);
  padding: 6px;
  margin-bottom: 6px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.calendar-mini-item span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
}

.calendar-mini-item strong {
  display: block;
  font-size: 0.8rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.calendar-mini-meta {
  display: block;
  font-size: 0.72rem;
  line-height: 1.2;
}

.calendar-item-operational-meta,
.scheduler-operational-meta {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 8px 0;
  padding: 8px;
  font-size: 0.82rem;
}

.calendar-item-operational-meta span,
.scheduler-operational-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.calendar-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.calendar-column {
  min-width: 180px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.calendar-time-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  min-height: 76px;
  border-top: 1px solid var(--border);
  padding: 10px 0;
}

.scheduler-panel {
  margin-top: 14px;
}

.scheduler-actions,
.scheduler-card-title,
.scheduler-meta-row,
.scheduler-resource-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.scheduler-actions {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
  margin-bottom: 10px;
}

.scheduler-draft-summary {
  display: grid;
  gap: 4px;
}

.scheduler-resource-strip {
  justify-content: flex-start;
  margin: 10px 0;
}

.scheduler-slot-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.scheduler-drop-slot {
  border: 1px dashed #94a3b8;
  background: #fff;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 8px 10px;
  text-align: left;
}

.scheduler-drop-slot span {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.scheduler-drop-slot strong {
  font-size: 0.9rem;
}

.scheduler-drop-slot:hover,
.scheduler-drop-slot.is-drop-target {
  border-color: var(--brand);
  background: #eefafa;
}

.scheduler-dispatch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 14px;
}

.scheduler-main-column,
.scheduler-side-column,
.scheduler-risk-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.scheduler-card {
  display: grid;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.scheduler-card .grid.two {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.scheduler-card .field,
.scheduler-card .input,
.scheduler-card .select {
  min-width: 0;
  width: 100%;
}

.scheduler-card-scheduled {
  border-left: 4px solid var(--teal);
}

.scheduler-card-unscheduled {
  border-left: 4px solid var(--amber);
}

.scheduler-card-priority {
  box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.08);
}

.scheduler-card-vendor,
.scheduler-card-technician {
  background-image: linear-gradient(90deg, rgba(12, 143, 136, 0.06), rgba(255, 255, 255, 0));
}

.scheduler-card[draggable="true"] {
  cursor: grab;
}

.scheduler-card.is-dragging {
  opacity: 0.68;
}

.scheduler-card-draft {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(201, 133, 43, 0.16);
}

.scheduler-card-title h4 {
  margin-bottom: 2px;
  overflow-wrap: anywhere;
}

.drag-handle {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 8px;
  text-transform: uppercase;
}

.scheduler-meta-row {
  color: var(--muted);
  font-size: 0.8rem;
  justify-content: flex-start;
}

.scheduler-column-heading {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.scheduler-panel-details {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  min-width: 0;
  overflow: hidden;
}

.scheduler-panel-details summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.scheduler-risk-card p {
  margin: 6px 0;
}

.scheduler-more-actions {
  margin-top: 6px;
}

@media (max-width: 719px) {
  .calendar-month-grid,
  .calendar-week-grid {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .calendar-day-cell {
    min-height: auto;
  }

  .calendar-time-row {
    grid-template-columns: 1fr;
  }

  .scheduler-dispatch-layout {
    grid-template-columns: 1fr;
  }

  .scheduler-slot-rail {
    grid-template-columns: 1fr;
  }

  .scheduler-actions .button-row,
  .scheduler-actions .btn {
    width: 100%;
  }
}

@media (min-width: 720px) and (max-width: 1100px) {
  .device-tablet .scheduler-dispatch-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
  }

  .device-tablet .scheduler-slot-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.push-panel .sub-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.push-panel.compact {
  margin: 0;
}

.labor-panel {
  display: grid;
  gap: 10px;
}

.labor-panel.compact {
  margin: 10px 0;
}

.labor-actions .btn {
  min-height: 42px;
}

.labor-entry-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 0;
}

.button-row.tight {
  gap: 6px;
}

@media (max-width: 719px) {
  .labor-entry-row {
    align-items: stretch;
    flex-direction: column;
  }

  .labor-panel .button-row,
  .labor-panel .btn {
    width: 100%;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .nav-wrap,
  .print-toolbar,
  .toast {
    display: none !important;
  }

  .content {
    width: 100%;
    padding: 0;
  }

  .shell {
    display: block;
    min-height: 0;
  }

  .qr-label-sheet {
    border: 0;
    padding: 0;
  }
}

/* Feature-freeze mobile and work-order output polish. */
img,
svg,
canvas,
video {
  max-width: 100%;
}

.page-actions {
  justify-content: flex-end;
  max-width: 100%;
}

.page-actions .btn {
  min-height: 42px;
}

.calendar-mini-item,
.scheduler-card,
.list-card,
.detail-line,
.chip {
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .page-actions {
    justify-content: stretch;
    width: 100%;
  }

  .page-actions .btn,
  .calendar-toolbar .btn,
  .scheduler-actions .btn,
  .scheduler-more-actions .btn {
    width: 100%;
  }
}

@media (max-width: 719px) {
  .calendar-toolbar .button-row,
  .scheduler-actions,
  .scheduler-card-title,
  .scheduler-meta-row {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-card .button-row,
  .calendar-card .btn {
    width: 100%;
  }
}
/* Feature-freeze app experience refinement: desktop command center, mobile field mode. */
.device-desktop .nav-wrap,
.device-tablet .nav-wrap {
  display: none;
}

.mobile-role-dock {
  display: none;
}

@media (max-width: 639px) {
  .device-phone.shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
      "topbar"
      "nav"
      "dock"
      "main";
    max-width: 100%;
    overflow-x: clip;
  }

  .device-phone .topbar,
  .device-phone .nav-wrap,
  .device-phone .mobile-role-dock,
  .device-phone .content {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .device-phone .topbar-left,
  .device-phone .topbar-right,
  .device-phone .nav-row {
    min-width: 0;
  }

  .device-phone .app-sidebar {
    display: none;
  }

  .device-phone button,
  .device-phone .btn,
  .device-phone input,
  .device-phone select,
  .device-phone textarea,
  .device-phone [data-action] {
    scroll-margin-top: 132px;
    scroll-margin-bottom: 132px;
  }

  .device-phone .topbar {
    align-items: flex-start;
    gap: 10px;
  }

  .device-phone .topbar-right {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .device-phone .property-context-topbar {
    grid-column: 1 / -1;
    max-width: none;
    min-width: 0;
  }

  .device-phone .topbar-right .sync-badge {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .device-phone .nav-row {
    gap: 6px;
    padding-bottom: 6px;
  }

  .device-phone .nav-link.mobile-secondary-nav {
    display: none;
  }

  .device-phone .mobile-role-dock {
    grid-area: dock;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 26px rgba(7, 17, 60, 0.06);
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 12px;
  }

  .device-phone .notification-stack {
    bottom: auto;
    margin: 0 12px 12px;
    position: static;
    right: auto;
    width: auto;
  }

  .device-phone .mobile-role-dock .btn {
    justify-content: center;
    min-height: 44px;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .device-phone .desktop-command-only {
    display: none !important;
  }

  .device-phone .content {
    padding-bottom: 88px;
  }

  .device-phone .page-header {
    align-items: stretch;
    gap: 12px;
  }

  .device-phone .page-header h2 {
    font-size: 1.25rem;
    line-height: 1.2;
  }

  .device-phone .page-header p {
    font-size: 0.92rem;
  }

  .device-phone .button-row,
  .device-phone .chip-row,
  .device-phone .page-actions,
  .device-phone .labor-actions,
  .device-phone .scheduler-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .device-phone .button-row .btn,
  .device-phone .page-actions .btn,
  .device-phone .labor-actions .btn,
  .device-phone .scheduler-actions .btn,
  .device-phone .mobile-secondary-action {
    justify-content: center;
    min-height: 44px;
    width: 100%;
  }

  .device-phone .mobile-secondary-action {
    order: 5;
  }

  .device-phone .filter-pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .device-phone .filter-pills .btn {
    width: 100%;
  }

  .device-phone .metric-card,
  .device-phone .task-card,
  .device-phone .list-card,
  .device-phone .panel {
    border-radius: 8px;
  }

  .device-phone .details-grid,
  .device-phone .details-grid.compact {
    grid-template-columns: 1fr;
  }

  .device-phone .field-work-layout {
    gap: 10px;
  }

  .device-phone .field-secondary-panel {
    order: 2;
  }

  .device-phone .table-wrap,
  .device-phone .report-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .device-phone .calendar-toolbar,
  .device-phone .scheduler-panel {
    padding: 12px;
  }

  .device-phone .calendar-toolbar .button-row,
  .device-phone .scheduler-resource-strip,
  .device-phone .scheduler-draft-summary {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .device-phone .scheduler-slot-rail {
    grid-template-columns: 1fr;
  }

  .device-phone .scheduler-panel-details[open] {
    padding: 10px;
  }

  .device-phone .board-action-card,
  .device-phone .vendor-portal-card {
    min-height: auto;
  }

  .device-phone .report-export-row,
  .device-phone .push-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .device-tablet.shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .device-tablet.shell.sidebar-collapsed {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .device-tablet .mobile-role-dock {
    display: none;
  }

  .device-tablet .split,
  .device-tablet .field-work-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
  }

  .device-tablet .calendar-toolbar .button-row,
  .device-tablet .scheduler-actions {
    flex-wrap: wrap;
  }
}

@media (min-width: 1024px) {
  .device-desktop .desktop-command-only {
    display: revert;
  }

  .device-desktop .command-metrics {
    align-items: stretch;
  }
}


/* Field execution evidence package */
.evidence-chip {
  background: #e8f4f3;
  border-color: #b9ddda;
  color: #064e4a;
}

.field-evidence-snapshot,
.evidence-metric-grid {
  display: grid;
  gap: 8px;
}

.field-evidence-snapshot {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 12px 0;
}

.field-evidence-snapshot > div,
.evidence-metric-grid > div {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  min-width: 0;
}

.field-evidence-snapshot span,
.evidence-metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.field-evidence-snapshot strong,
.evidence-metric-grid strong {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.evidence-metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 12px 0;
}

.evidence-metric-grid small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.completion-review-package {
  border: 1px solid #b9ddda;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfb 100%);
  border-radius: 10px;
  margin-top: 16px;
  padding: 16px;
}

.completion-review-package .attachment-section {
  margin-top: 14px;
}

.workflow-continuity-strip {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 12px;
  padding: 12px;
}

.workflow-continuity-strip .button-row {
  justify-content: flex-end;
}

.evidence-note-list {
  border-top: 1px solid var(--border);
  margin-top: 14px;
  padding-top: 12px;
}

.evidence-note-list h4 {
  margin: 0 0 8px;
}

.request-conversion-package {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.request-conversion-package > div {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  min-width: 0;
}

.request-conversion-package strong {
  display: block;
  color: var(--ink);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.conversion-details {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .evidence-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request-conversion-package {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .field-evidence-snapshot,
  .evidence-metric-grid {
    grid-template-columns: 1fr;
  }

  .completion-review-package {
    padding: 12px;
  }

  .workflow-continuity-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-continuity-strip .button-row {
    justify-content: stretch;
  }

  .workflow-continuity-strip .btn {
    width: 100%;
  }
}

/* Internal Launch Readiness command center */
.launch-readiness-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.onboarding-stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.onboarding-stage {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.onboarding-stage h3 { margin: 0 0 .45rem; }
.onboarding-stage p { margin: 0 0 1rem; }
.onboarding-stage-number {
  display: inline-grid;
  place-items: center;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--accent, #0d9488);
  color: #fff;
  font-weight: 700;
}

.critical-launch-notice {
  border-color: #efb5b5;
  background: #fff7f7;
}

.launch-workstream-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin: 14px 0;
}

.launch-workstream-summary {
  appearance: none;
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  min-height: 92px;
  padding: 12px;
  text-align: left;
}

.launch-workstream-summary:hover,
.launch-workstream-summary:focus-visible {
  border-color: var(--primary);
  outline: 2px solid color-mix(in srgb, var(--primary) 25%, transparent);
}

.launch-workstream-summary span,
.launch-workstream-summary small {
  display: block;
}

.launch-workstream-summary strong {
  display: block;
  font-size: 1.35rem;
  margin: 6px 0 2px;
}

.launch-readiness-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
}

.launch-readiness-list {
  min-width: 0;
}

.launch-readiness-row {
  align-items: start;
  border-top: 1px solid var(--border);
  color: var(--ink);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.32fr);
  padding: 14px 4px;
  text-decoration: none;
}

.launch-readiness-row:first-of-type {
  border-top: 0;
}

.launch-readiness-row:hover,
.launch-readiness-row.selected {
  background: #f4f8fa;
}

.launch-readiness-row strong,
.launch-readiness-row p {
  display: block;
  overflow-wrap: anywhere;
}

.launch-readiness-row p {
  color: var(--muted);
  margin: 5px 0 0;
}

.launch-readiness-row-meta {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  text-align: right;
}

.launch-readiness-row-meta small {
  flex-basis: 100%;
}

.launch-readiness-detail {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 24px);
  min-width: 0;
  overflow-y: auto;
  position: sticky;
  top: 12px;
}

.launch-readiness-editor textarea,
.launch-readiness-editor select,
.launch-readiness-editor input {
  max-width: 100%;
}

.launch-dependency-select {
  min-height: 132px;
}

/* Preventive Maintenance operational plan workspace */
.pm-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pm-operational-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

.pm-plan-row {
  align-items: start;
  border-top: 1px solid var(--border);
  color: var(--ink);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.32fr);
  padding: 14px 4px;
  text-decoration: none;
}

.pm-plan-row:first-of-type {
  border-top: 0;
}

.pm-plan-row:hover,
.pm-plan-row.selected {
  background: #f4f8fa;
}

.pm-plan-row strong,
.pm-plan-row span,
.pm-plan-row p,
.pm-plan-row small {
  display: block;
  overflow-wrap: anywhere;
}

.pm-plan-row p {
  color: var(--muted);
  margin: 6px 0 0;
}

.pm-plan-row-meta {
  text-align: right;
}

.pm-plan-row-meta .chip {
  display: inline-flex;
  margin-bottom: 5px;
}

.pm-plan-detail {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 24px);
  min-width: 0;
  overflow-y: auto;
  position: sticky;
  top: 12px;
}

.pm-plan-editor input,
.pm-plan-editor select,
.pm-plan-editor textarea {
  max-width: 100%;
}

@media (max-width: 1180px) {
  .launch-readiness-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .launch-readiness-layout {
    grid-template-columns: 1fr;
  }

  .launch-readiness-detail {
    max-height: none;
    overflow-y: visible;
    position: static;
  }

  .pm-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pm-operational-layout {
    grid-template-columns: 1fr;
  }

  .pm-plan-detail {
    max-height: none;
    overflow-y: visible;
    position: static;
  }
}

@media (max-width: 640px) {
  .launch-readiness-metrics,
  .launch-workstream-strip {
    grid-template-columns: 1fr;
  }

  .launch-readiness-row {
    grid-template-columns: 1fr;
  }

  .pm-summary-grid,
  .pm-plan-row {
    grid-template-columns: 1fr;
  }

  .launch-readiness-row-meta {
    justify-content: flex-start;
    text-align: left;
  }

  .pm-plan-row-meta {
    text-align: left;
  }
}

/* Landscape & Grounds operational workspace */
.landscape-header {
  align-items: flex-start;
}

.landscape-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  max-width: 100%;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: thin;
}

.landscape-tabs .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.landscape-kpis {
  margin-bottom: 14px;
}

.landscape-split {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
}

.landscape-split > *,
.landscape-editor,
.landscape-action-detail,
.landscape-field-form,
.landscape-category,
.landscape-inspection-item {
  min-width: 0;
}

.landscape-list-panel {
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  position: sticky;
  top: 12px;
}

.landscape-record-link {
  align-items: flex-start;
  color: var(--ink);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  text-decoration: none;
}

.landscape-record-link > div:first-child {
  min-width: 0;
}

.landscape-record-link strong,
.landscape-record-link p,
.landscape-inspection-item h4,
.landscape-inspection-item p {
  overflow-wrap: anywhere;
}

.landscape-record-link.selected {
  background: color-mix(in srgb, var(--primary) 9%, var(--surface));
  border-color: var(--primary);
}

.landscape-template-items,
.landscape-category-items,
.landscape-field-form {
  display: grid;
  gap: 12px;
}

.landscape-category {
  padding: 0;
}

.landscape-category > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-weight: 800;
  justify-content: space-between;
  min-height: 52px;
  padding: 14px 16px;
}

.landscape-category > summary + .landscape-category-items {
  border-top: 1px solid var(--border);
  padding: 14px;
}

.landscape-inspection-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 14px;
}

.landscape-inspection-item.safety {
  border-left-color: var(--danger);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 16%, transparent);
}

.landscape-score-field {
  border: 0;
  margin: 12px 0;
  padding: 0;
}

.landscape-score-field legend {
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.landscape-score-buttons {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(6, minmax(48px, 1fr));
}

.landscape-score-buttons label {
  cursor: pointer;
  min-width: 0;
  position: relative;
}

.landscape-score-buttons input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.landscape-score-buttons span {
  align-items: center;
  background: #eef3f6;
  border: 2px solid transparent;
  border-radius: 7px;
  display: flex;
  font-size: 1rem;
  font-weight: 850;
  justify-content: center;
  min-height: 48px;
}

.landscape-score-buttons label:nth-child(1) span { background: #dcefe6; color: #14532d; }
.landscape-score-buttons label:nth-child(2) span { background: #dceff0; color: #12545b; }
.landscape-score-buttons label:nth-child(3) span { background: #fff2bf; color: #6f5000; }
.landscape-score-buttons label:nth-child(4) span { background: #ffe0c2; color: #814000; }
.landscape-score-buttons label:nth-child(5) span { background: #f8d4d1; color: #8a1c16; }
.landscape-score-buttons label:nth-child(6) span { background: #e7ebef; color: #475569; }

.landscape-score-buttons input:checked + span {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--navy) 15%, transparent);
}

.landscape-score-buttons input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--primary) 30%, transparent);
  outline-offset: 2px;
}

.landscape-item-fields .span-two {
  grid-column: span 2;
}

.landscape-photo-control {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 10px;
}

.landscape-photo-control > summary {
  cursor: pointer;
  font-weight: 750;
}

.landscape-sticky-actions {
  align-items: center;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--border);
  border-radius: 8px;
  bottom: 10px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 10px;
  position: sticky;
  z-index: 8;
}

.landscape-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.landscape-action-buttons,
.landscape-filter-row {
  margin: 12px 0;
}

.landscape-report-grid .panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.landscape-report-grid .panel .btn {
  align-self: flex-start;
}

@media (max-width: 1020px) {
  .landscape-split {
    grid-template-columns: 1fr;
  }

  .landscape-list-panel {
    max-height: none;
    overflow-y: visible;
    position: static;
  }

  .landscape-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .landscape-header {
    gap: 8px;
  }

  .landscape-kpis,
  .landscape-dashboard-grid,
  .landscape-report-grid,
  .landscape-item-fields {
    grid-template-columns: 1fr;
  }

  .landscape-score-buttons {
    grid-template-columns: repeat(3, minmax(64px, 1fr));
  }

  .landscape-score-buttons span {
    min-height: 54px;
  }

  .landscape-item-fields .span-two {
    grid-column: auto;
  }

  .landscape-record-link,
  .landscape-category > summary {
    align-items: flex-start;
  }

  .landscape-record-link {
    flex-direction: column;
  }

  .landscape-sticky-actions {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .landscape-sticky-actions .btn {
    flex: 1 1 0;
    min-height: 48px;
  }
}
