:root {
  --bg: #f5f6f7;
  --surface: #ffffff;
  --ink: #1c2522;
  --muted: #65716b;
  --line: #dfe5df;
  --green: #0f6b5f;
  --green-2: #e2f4f0;
  --blue: #254f8f;
  --blue-2: #e6eefb;
  --red: #a7443f;
  --red-2: #f7e7e5;
  --gold: #9a6a15;
  --gold-2: #f5ead3;
  --shadow: 0 14px 35px rgba(28, 37, 34, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

body.location-locked {
  overflow: hidden;
}

body.location-locked .app {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

.login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(32px + env(safe-area-inset-top)) calc(32px + env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) calc(32px + env(safe-area-inset-left));
  background:
    linear-gradient(135deg, rgba(17, 29, 37, 0.92), rgba(15, 107, 95, 0.82)),
    url("https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
}

.public-auth-shell {
  width: min(1180px, 100%);
  min-height: min(760px, calc(100vh - 64px));
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 460px);
  gap: 28px;
  align-items: stretch;
}

.public-hero {
  color: #ffffff;
  display: grid;
  align-content: space-between;
  gap: 28px;
  padding: 16px 0;
}

.public-brand {
  width: fit-content;
}

.public-brand span {
  color: rgba(255, 255, 255, 0.76);
}

.public-hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #f6d98a;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.public-hero h1 {
  margin: 0;
  max-width: 740px;
  font-size: clamp(46px, 7vw, 86px);
  line-height: 0.96;
}

.public-hero p {
  max-width: 640px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
  line-height: 1.45;
}

.public-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
}

.public-proof-grid span {
  min-height: 118px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(7, 12, 15, 0.28);
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.public-proof-grid strong,
.public-proof-grid small {
  display: block;
}

.public-proof-grid small {
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.35;
}

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

.public-cta {
  width: fit-content;
  min-height: 48px;
  border: 1px solid rgba(246, 217, 138, 0.52);
  border-radius: 8px;
  background: rgba(246, 217, 138, 0.14);
  color: #fff7df;
  font-weight: 800;
  padding: 0 18px;
}

.public-cta.secondary {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.public-sms-link {
  width: max-content;
  max-width: 100%;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.auth-panel {
  align-self: center;
  display: grid;
  gap: 12px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.auth-tab {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  font-weight: 800;
}

.auth-tab.active {
  color: var(--ink);
  background: #ffffff;
}

.auth-tab:focus-visible,
.public-cta:focus-visible,
.public-sms-link:focus-visible,
.login-card button:focus-visible,
.login-card input:focus-visible,
.login-card select:focus-visible {
  outline: 3px solid #f6d98a;
  outline-offset: 3px;
}

.login-card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  padding: 24px;
  display: grid;
  gap: 18px;
}

.auth-card {
  display: none;
}

.auth-card.active:not([hidden]) {
  display: grid;
}

.login-card h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
}

.login-brand {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
}

.login-brand strong,
.login-brand span,
.login-help span {
  display: block;
}

.login-brand span,
.login-help span {
  color: var(--muted);
  font-size: 13px;
}

.login-help {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: grid;
  gap: 4px;
}

.login-card .form-grid.compact {
  grid-template-columns: 1fr;
}

.login-submit .button-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: login-spin 0.75s linear infinite;
}

.login-card[aria-busy="true"] .button-spinner {
  display: inline-block;
}

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

@media (prefers-reduced-motion: reduce) {
  .login-submit .button-spinner {
    animation-duration: 1.5s;
  }
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.verification-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf8;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.verification-box strong,
.verification-box p {
  margin: 0;
}

.official-link {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

input[type="file"] {
  padding: 10px;
  background: #fff;
  font-size: 13px;
}

.location-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 17, 20, 0.74);
  backdrop-filter: blur(8px);
}

.location-gate-card {
  width: min(560px, 100%);
  border: 1px solid rgba(246, 217, 138, 0.32);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
  padding: 24px;
  display: grid;
  gap: 18px;
}

.location-gate-card h2,
.location-gate-card p {
  margin: 0;
}

.location-gate-card h2 {
  font-size: 28px;
  line-height: 1.1;
}

.location-gate-card p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.location-gate-card small {
  color: var(--muted);
}

.location-gate-message {
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  background: var(--gold-2);
  padding: 12px;
}

.app {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 16px;
  background: #111d25;
  color: #f9fbf7;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #090907;
  border: 1px solid rgba(244, 198, 76, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 232, 144, 0.1), 0 10px 24px rgba(0, 0, 0, 0.22);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand strong,
.brand span {
  display: block;
  overflow-wrap: anywhere;
}

.brand span {
  color: #aeb9b3;
  font-size: 13px;
  margin-top: 2px;
}

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

.nav-item {
  height: 42px;
  border: 0;
  border-radius: 8px;
  color: #d9e1dd;
  background: transparent;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  text-align: left;
  padding: 0 10px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.icon {
  width: 24px;
  text-align: center;
  font-weight: 700;
}

.sidebar-note {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 14px;
}

.sidebar-note span {
  color: #aeb9b3;
  font-size: 12px;
  text-transform: uppercase;
}

.sidebar-note strong {
  display: block;
  margin-top: 4px;
}

.sidebar-note p {
  color: #d9e1dd;
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

.main {
  min-width: 0;
  padding: 24px;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(26px, 4vw, 38px);
  margin-bottom: 6px;
}

h2 {
  font-size: 16px;
  margin-bottom: 0;
}

h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.topbar p,
.muted {
  color: var(--muted);
}

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

.role-switch,
.language-switch {
  min-width: 130px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 5px 9px;
  display: grid;
  gap: 2px;
}

.role-switch span,
.language-switch span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
}

.role-switch select,
.language-switch select {
  min-height: 26px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
}

.language-switch.public-language-switch {
  justify-self: end;
  width: min(156px, 100%);
  padding: 8px 10px;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(7, 12, 15, 0.22);
}

.language-switch.public-language-switch span,
.language-switch.public-language-switch select {
  color: #ffffff;
}

.language-switch.public-language-switch option {
  color: var(--ink);
}

.search {
  height: 42px;
  min-width: 250px;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}

.session-chip {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 4px 5px 4px 12px;
}

.session-chip span {
  max-width: 210px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-chip .secondary {
  min-height: 32px;
  padding: 0 10px;
}

.search input {
  border: 0;
  outline: 0;
  min-width: 0;
}

.primary,
.secondary,
.ghost,
.segment,
.icon-button {
  border-radius: 8px;
  min-height: 40px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  white-space: nowrap;
}

.primary {
  background: var(--green);
  color: #fff;
}

.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.secondary.danger {
  color: var(--red);
  background: var(--red-2);
  border-color: #efc9c4;
}

.secondary.compact {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.92rem;
}

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

.ghost {
  background: transparent;
  color: var(--green);
  min-height: 32px;
}

.icon-button {
  width: 38px;
  padding: 0;
  background: var(--surface);
  border-color: var(--line);
  font-size: 24px;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 18px;
}

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

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

.metric {
  padding: 16px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.metric small {
  color: var(--green);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(270px, 0.7fr);
  gap: 18px;
}

.sync-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 18px;
}

.integrations-panel {
  margin-bottom: 18px;
}

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

.integration-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 14px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.integration-card.blocked {
  border-color: #efc9c4;
  background: var(--red-2);
}

.integration-card.ready {
  border-color: rgba(15, 107, 95, 0.25);
  background: var(--green-2);
}

.integration-head,
.integration-client-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.integration-head span,
.integration-client-row span,
.integration-card small {
  color: var(--muted);
  font-size: 12px;
}

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

.integration-client-row {
  align-items: center;
  border: 1px solid rgba(28, 37, 34, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  padding: 8px;
  flex-wrap: wrap;
}

.integration-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  width: 100%;
}

.integration-link-row input {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.integration-link-row .mini {
  width: auto;
  min-width: 64px;
  padding: 0 10px;
}

.integration-link-row .primary-mini {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.owner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
}

.field-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 18px;
}

.field-layout.compact {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 18px;
}

.field-tabs {
  margin-top: -4px;
}

.field-tab-panel,
.owner-tab-panel {
  display: none;
}

.field-tab-panel.active,
.owner-tab-panel.active {
  display: block;
}

.owner-tabs {
  margin-bottom: 16px;
}

.owner-dashboard,
.cleaner-dashboard,
.field-task-detail {
  display: grid;
  gap: 14px;
}

.owner-dashboard-grid,
.owner-menu-grid,
.owner-dashboard-columns {
  display: grid;
  gap: 12px;
}

.owner-dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.owner-dashboard-grid span,
.owner-dashboard-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.owner-dashboard-grid strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
}

.owner-dashboard-grid small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.owner-menu-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.owner-menu-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 14px;
  text-align: left;
  display: grid;
  gap: 4px;
  min-height: 104px;
  cursor: pointer;
}

.owner-menu-button:hover {
  border-color: #b9c9c2;
  background: var(--green-2);
}

.owner-menu-button strong {
  font-size: 18px;
}

.owner-menu-button span,
.owner-menu-button small {
  color: var(--muted);
}

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

.cleaner-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(120px, 0.45fr));
  gap: 12px;
  align-items: stretch;
}

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

.cleaner-hero-card,
.cleaner-summary-card,
.dashboard-next-job {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  min-width: 0;
  box-shadow: var(--shadow);
}

.cleaner-hero-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.cleaner-hero-card h2 {
  margin: 8px 0 4px;
  font-size: 24px;
}

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

.cleaner-summary-card {
  display: grid;
  align-content: center;
  gap: 6px;
}

.cleaner-summary-card strong {
  font-size: 26px;
}

.cleaner-summary-card span {
  color: var(--muted);
}

.cleaner-summary-card.today {
  border-color: rgba(37, 79, 143, 0.25);
}

.cleaner-summary-card.late {
  border-color: rgba(167, 68, 63, 0.35);
  background: var(--red-2);
}

.compact-head {
  margin-bottom: 10px;
}

.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 18px;
  align-items: start;
}

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

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

.table {
  display: grid;
  gap: 8px;
}

.row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr 0.8fr auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.row.header {
  min-height: auto;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.row strong,
.entity-card strong {
  overflow-wrap: anywhere;
}

.status {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  display: inline-flex;
  width: fit-content;
}

.status.pending {
  background: var(--gold-2);
  color: var(--gold);
}

.status.progress {
  background: var(--blue-2);
  color: var(--blue);
}

.status.done {
  background: var(--green-2);
  color: var(--green);
}

.status.late {
  background: var(--red-2);
  color: var(--red);
}

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

.closed-row {
  background: #f9fbf8;
}

.archived-assignment {
  display: grid;
  gap: 3px;
  color: var(--ink);
}

.archived-assignment small {
  color: var(--muted);
}

.source-chip {
  width: fit-content;
  max-width: 100%;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.source-chip.attention {
  border-color: #efc9c4;
  background: var(--red-2);
  color: var(--red);
}

.source-chip.done {
  border-color: #b8ded5;
  background: var(--green-2);
  color: var(--green);
}

.external-close-panel {
  margin-bottom: 14px;
}

.external-close-board {
  display: grid;
  gap: 10px;
}

.external-close-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 12px;
  min-width: 0;
}

.external-close-card p {
  margin-bottom: 0;
}

.admin-controls {
  display: grid;
  gap: 6px;
}

.multi-assignee-control {
  position: relative;
  width: 100%;
  max-width: 260px;
}

.multi-assignee-control > summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 6px 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.multi-assignee-menu {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  max-height: 240px;
  overflow: auto;
}

.multi-assignee-menu label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-radius: 7px;
  padding: 7px;
  cursor: pointer;
}

.multi-assignee-menu label:hover {
  background: #f4f7f3;
}

.multi-assignee-menu label > span,
.multi-assignee-menu small {
  display: block;
}

.multi-assignee-menu small {
  color: var(--muted);
  font-size: 11px;
}

.admin-select {
  width: 100%;
  max-width: 260px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 6px 9px;
  font: inherit;
  font-size: 13px;
}

.action-note {
  align-self: center;
  font-size: 12px;
  white-space: nowrap;
}

.mini {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
}

.mini.danger {
  color: var(--red);
  background: var(--red-2);
  border-color: #efc9c4;
}

.mini.primary-mini {
  width: auto;
  min-width: 72px;
  padding: 0 10px;
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-weight: 800;
}

.stack {
  display: grid;
  gap: 10px;
}

.alert {
  border-left: 4px solid var(--gold);
  background: #fffaf0;
  padding: 12px;
  border-radius: 6px;
}

.alert.red {
  border-left-color: var(--red);
  background: #fff6f4;
}

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

.team-load-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  gap: 12px;
}

.load-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px;
  display: grid;
  gap: 8px;
  text-align: left;
  width: 100%;
}

.load-card:hover,
.load-card.active {
  border-color: rgba(15, 107, 95, 0.45);
  box-shadow: 0 12px 24px rgba(15, 107, 95, 0.1);
}

.load-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.load-card-head strong {
  overflow-wrap: anywhere;
}

.worker-load-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.worker-load-stats small,
.location-line {
  color: var(--muted);
}

.worker-load-stats small {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: #f8faf8;
}

.bar {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #e8ece9;
  overflow: hidden;
  margin-top: 10px;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--green);
}

.worker-map-card,
.worker-monitor-card,
.worker-location-share-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.worker-map-card.empty {
  background: #fbfcfb;
}

.worker-street-map {
  min-height: 380px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #edf3f0;
  margin-bottom: 8px;
}

.leaflet-worker-pin {
  min-width: 118px;
  border: 1px solid rgba(15, 107, 95, 0.4);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 12px 24px rgba(28, 37, 34, 0.18);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px 6px 6px;
  white-space: nowrap;
}

.leaflet-worker-pin span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
}

.leaflet-worker-pin strong {
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.leaflet-worker-pin.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(154, 106, 21, 0.2), 0 14px 28px rgba(28, 37, 34, 0.22);
}

.worker-map-popup {
  display: grid;
  gap: 5px;
  min-width: 180px;
}

.worker-map-popup strong {
  font-size: 15px;
}

.worker-map-popup span,
.worker-map-popup small {
  color: var(--muted);
}

.worker-map-popup button {
  margin-top: 6px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  padding: 7px 10px;
  font-weight: 800;
}

.worker-map-surface {
  position: relative;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(rgba(15, 107, 95, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 107, 95, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 25% 30%, rgba(154, 106, 21, 0.12), transparent 22%),
    radial-gradient(circle at 74% 68%, rgba(37, 79, 143, 0.12), transparent 24%),
    #f8fbf9;
  background-size: 46px 46px, 46px 46px, auto, auto, auto;
}

.worker-map-fallback {
  margin-top: 8px;
}

.worker-map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 112px;
  border: 1px solid rgba(15, 107, 95, 0.35);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(28, 37, 34, 0.13);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px 6px 6px;
  text-align: left;
}

.worker-map-pin span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
}

.worker-map-pin strong {
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.worker-map-pin.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(154, 106, 21, 0.14), 0 12px 26px rgba(28, 37, 34, 0.18);
}

.coordination-center {
  overflow: hidden;
}

.coordination-head {
  align-items: flex-start;
}

.coordination-head p {
  margin: 5px 0 0;
}

.coordination-legend {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 720px;
}

.map-key {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.map-key::before,
.coordination-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8a9490;
  content: "";
  flex: 0 0 auto;
}

.map-key.yellow::before,
.coordination-dot.yellow { background: #e0ad22; }
.map-key.orange::before,
.coordination-dot.orange { background: #dc792c; }
.map-key.red::before,
.coordination-dot.red { background: var(--red); }
.map-key.blue::before,
.coordination-dot.blue { background: var(--blue); }
.map-key.green::before,
.coordination-dot.green { background: var(--green); }
.map-key.purple::before,
.coordination-dot.purple { background: #7552a3; }
.map-key.gray::before,
.coordination-dot.gray { background: #8a9490; }

.coordination-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.55fr);
  gap: 14px;
  min-height: 470px;
}

.coordination-map {
  min-height: 470px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #edf3f0;
}

.coordination-map-empty {
  min-height: 470px;
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
  color: var(--muted);
}

.coordination-map-empty strong {
  color: var(--ink);
}

.coordination-queue {
  min-height: 0;
  max-height: 470px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
  padding: 12px;
}

.coordination-queue-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.coordination-queue-head span {
  border-radius: 999px;
  background: var(--green-2);
  color: var(--green);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

.coordination-exceptions,
.coordination-property-list {
  display: grid;
  gap: 8px;
}

.coordination-exceptions {
  margin-bottom: 10px;
}

.coordination-exception {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid #ead7aa;
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.coordination-exception.danger {
  border-color: #efc9c4;
  background: var(--red-2);
}

.coordination-exception strong {
  font-size: 20px;
  color: var(--gold);
}

.coordination-exception.danger strong {
  color: var(--red);
}

.coordination-exception span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.coordination-property-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 34px;
  gap: 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: #fff;
  padding: 9px;
}

.coordination-property-row.yellow { border-left-color: #e0ad22; }
.coordination-property-row.orange { border-left-color: #dc792c; background: #fff8ed; }
.coordination-property-row.red { border-left-color: var(--red); background: #fff6f4; }
.coordination-property-row.blue { border-left-color: var(--blue); background: #f4f7fd; }
.coordination-property-row.green { border-left-color: var(--green); background: #f4fbf9; }
.coordination-property-row.purple { border-left-color: #7552a3; background: #f8f4fc; }

.coordination-property-row div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.coordination-property-row strong,
.coordination-property-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coordination-property-row small {
  color: var(--muted);
  font-size: 11px;
}

.leaflet-property-pin,
.leaflet-coordination-worker {
  min-width: 126px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 2px solid #8a9490;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(28, 37, 34, 0.22);
  padding: 5px 9px 5px 5px;
  white-space: nowrap;
}

.leaflet-property-pin > span,
.leaflet-coordination-worker > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8a9490;
  color: #fff;
  font-weight: 900;
}

.leaflet-property-pin > b {
  position: absolute;
  left: 23px;
  top: -10px;
  font-size: 14px;
}

.leaflet-property-pin strong,
.leaflet-coordination-worker strong {
  max-width: 94px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.leaflet-property-pin.yellow { border-color: #e0ad22; }
.leaflet-property-pin.yellow > span { background: #e0ad22; color: #3d3215; }
.leaflet-property-pin.orange { border-color: #dc792c; }
.leaflet-property-pin.orange > span { background: #dc792c; }
.leaflet-property-pin.red { border-color: var(--red); }
.leaflet-property-pin.red > span { background: var(--red); }
.leaflet-property-pin.blue { border-color: var(--blue); }
.leaflet-property-pin.blue > span { background: var(--blue); }
.leaflet-property-pin.green { border-color: var(--green); }
.leaflet-property-pin.green > span { background: var(--green); }
.leaflet-property-pin.purple { border-color: #7552a3; }
.leaflet-property-pin.purple > span { background: #7552a3; }

.leaflet-coordination-worker {
  border-color: #1f2937;
  border-style: dashed;
}

.leaflet-coordination-worker > span {
  background: #1f2937;
  font-size: 10px;
}

.coordination-popup {
  min-width: 210px;
  display: grid;
  gap: 4px;
}

.coordination-popup span,
.coordination-popup small {
  color: var(--muted);
}

.worker-monitor-card {
  display: grid;
  gap: 12px;
}

.worker-monitor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.worker-monitor-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 2px;
  color: var(--muted);
}

.worker-monitor-grid strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.worker-location-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}

.worker-location-line > span:not(.status) {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: #f8faf8;
}

.worker-location-share-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.worker-location-share-card p {
  margin: 4px 0 0;
}

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

.segment {
  background: var(--surface);
  border-color: var(--line);
}

.segment.active {
  background: var(--ink);
  color: #fff;
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.calendar-period {
  display: grid;
  gap: 3px;
}

.calendar-period span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.calendar-period strong {
  font-size: 26px;
  line-height: 1.1;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.calendar-filter-bar label {
  margin: 0;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.calendar-legend span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
}

.calendar-legend span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-right: 6px;
  background: var(--green);
}

.calendar-legend .legend-out::before { background: #d98b25; }
.calendar-legend .legend-in::before { background: #2e8f78; }
.calendar-legend .legend-stay::before { background: #477bc4; }
.calendar-legend .legend-clean::before { background: #0f8f6d; }
.calendar-legend .legend-laundry::before { background: #1f9bb8; }
.calendar-legend .legend-maint::before { background: #a05d18; }
.calendar-legend .legend-pay::before { background: #a7443f; }
.calendar-legend .legend-photo::before { background: #6f55b5; }

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.day-name,
.day {
  min-height: 138px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px;
  background: #fbfcfa;
}

.day-name {
  min-height: 36px;
  background: #f1f4f1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.day:nth-child(7n),
.day-name:nth-child(7n) {
  border-right: 0;
}

.date-number {
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
}

.date-number span {
  color: var(--red);
  background: var(--red-2);
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.date-number span.stay-label {
  color: var(--blue);
  background: var(--blue-2);
}

.day.occupied-day {
  background: #f7fbff;
  box-shadow: inset 3px 0 0 rgba(37, 79, 143, 0.18);
}

.day.same-day-turn {
  background: #fffaf0;
  box-shadow: inset 0 0 0 2px rgba(154, 106, 21, 0.22);
}

.day.today-cell {
  box-shadow: inset 0 0 0 2px rgba(15, 107, 95, 0.25);
}

.day.today-cell .date-number {
  color: var(--green);
}

.day.selected-day {
  box-shadow: inset 0 0 0 2px rgba(15, 107, 95, 0.42);
  background: #f3fbf7;
}

.day.calendar-empty {
  background: #f6f8f6;
}

.calendar-stack {
  display: grid;
  gap: 6px;
}

.calendar-event {
  --event-bg: #edf4ff;
  --event-border: #7aa7d9;
  --event-ink: #1b3f73;
  --property-color: #6f7a74;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--event-border) 38%, transparent);
  border-left: 5px solid var(--event-border);
  border-right: 5px solid var(--property-color);
  border-radius: 7px;
  background: var(--event-bg);
  color: var(--event-ink);
  box-shadow: 0 4px 12px rgba(28, 37, 34, 0.08);
  padding: 6px 7px;
  font-size: 12px;
  min-width: 0;
}

.calendar-event-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.calendar-event strong,
.calendar-event small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event strong {
  font-size: 12px;
  line-height: 1.15;
}

.calendar-event small {
  display: block;
  color: color-mix(in srgb, var(--event-ink) 72%, #fff);
  font-size: 11px;
}

.calendar-day-card {
  min-height: 36px;
  padding: 5px 7px;
  box-shadow: 0 3px 9px rgba(28, 37, 34, 0.07);
}

.calendar-day-card strong {
  font-size: 12px;
}

.calendar-day-card small {
  font-size: 10px;
}

.calendar-badges {
  display: flex;
  align-items: center;
  justify-content: end;
  flex-wrap: wrap;
  gap: 3px;
  max-width: 72px;
}

.calendar-badges span {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.88);
  color: var(--event-ink);
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-size: 9px;
  font-weight: 900;
  padding: 0 4px;
}

.compact-badges {
  max-width: 96px;
}

.compact-badges span {
  min-width: auto;
  padding: 0 5px;
  font-size: 8px;
}

.calendar-badges .attention {
  background: var(--red-2);
  color: var(--red);
  border-color: rgba(167, 68, 63, 0.25);
}

.calendar-booking.out {
  --event-bg: #fff0c9;
  --event-border: #d98b25;
  --event-ink: #6d470c;
}

.calendar-booking.in {
  --event-bg: #dff8ed;
  --event-border: #2e8f78;
  --event-ink: #0d5f4d;
}

.calendar-booking.stay {
  --event-bg: #e9f2ff;
  --event-border: #477bc4;
  --event-ink: #254f8f;
}

.calendar-booking.booking-block {
  --event-bg: #eeeeee;
  --event-border: #8c8c8c;
  --event-ink: #3d3d3d;
}

.calendar-job.cleaning {
  --event-bg: #ddf7ee;
  --event-border: #0f8f6d;
  --event-ink: #0f6b5f;
}

.calendar-job.laundry {
  --event-bg: #ddf6fb;
  --event-border: #1f9bb8;
  --event-ink: #12657a;
}

.calendar-job.maintenance {
  --event-bg: #fff1d9;
  --event-border: #a05d18;
  --event-ink: #75400e;
}

.calendar-job.status-late {
  --event-bg: #fde9e7;
  --event-border: #c8524b;
  --event-ink: #87332e;
}

.calendar-job.status-done {
  opacity: 0.78;
}

.property-tone-0 { --property-color: #1aa7b8; }
.property-tone-1 { --property-color: #5aae63; }
.property-tone-2 { --property-color: #d46bb7; }
.property-tone-3 { --property-color: #e0a33b; }
.property-tone-4 { --property-color: #7e6ad8; }
.property-tone-5 { --property-color: #e45f5f; }
.property-tone-6 { --property-color: #79aee8; }
.property-tone-7 { --property-color: #8b6f59; }

.calendar-more,
.calendar-empty-note {
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted);
  padding: 6px 7px;
  font-size: 12px;
}

.calendar-more {
  background: #fff;
  font-weight: 800;
}

.calendar-empty-note {
  opacity: 0;
  min-height: 28px;
}

.calendar-detail-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.calendar-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #f7faf8;
}

.calendar-detail-head > div:first-child {
  display: grid;
  gap: 3px;
}

.calendar-detail-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-detail-head strong {
  font-size: 22px;
}

.calendar-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  gap: 8px;
  min-width: min(100%, 520px);
}

.calendar-detail-stats span,
.calendar-detail-access span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.calendar-detail-stats strong,
.calendar-detail-access strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.calendar-detail-stats .needs-attention {
  border-color: rgba(154, 106, 21, 0.3);
  background: var(--gold-2);
}

.calendar-detail-grid {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 12px;
}

.calendar-detail-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--property-color);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.calendar-detail-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.calendar-detail-card-head div {
  min-width: 0;
}

.calendar-detail-card-head small {
  color: var(--muted);
  display: block;
  overflow-wrap: anywhere;
}

.calendar-detail-access {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.calendar-detail-lines {
  display: grid;
  gap: 8px;
}

.calendar-detail-line {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.calendar-detail-line span {
  color: var(--muted);
  min-width: 0;
}

.calendar-detail-line strong {
  display: block;
  color: var(--ink);
}

.calendar-detail-line.job-line {
  background: #f7fbff;
}

.grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 14px;
  align-items: start;
}

.client-page-stack {
  display: grid;
  gap: 14px;
  align-items: start;
}

.client-create-card {
  max-width: 100%;
  overflow: hidden;
}

.client-create-card .form-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}

.client-cleanup-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #efc9c4;
  border-radius: 8px;
  background: var(--red-2);
}

.client-cleanup-card p {
  margin: 3px 0 0;
}

.danger-soft {
  border-color: #efc9c4;
  background: #fff7f5;
  color: var(--red);
}

#teamGrid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
}

#teamGrid > .manage-card {
  grid-column: 1 / -1;
  max-width: 100%;
  overflow: hidden;
}

#teamGrid .worker-applications-card,
#teamGrid .team-create-card,
#teamGrid .access-card {
  grid-column: 1 / -1;
}

#teamGrid .form-grid.compact,
#teamGrid .team-create-card .form-grid.compact,
#teamGrid .access-card .form-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  width: 100%;
}

#teamGrid .form-grid.compact > label {
  min-width: 0;
}

#teamGrid .form-grid.compact input,
#teamGrid .form-grid.compact select,
#teamGrid .team-create-card input,
#teamGrid .team-create-card select,
#teamGrid .access-card input,
#teamGrid .access-card select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.client-block {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.client-block > summary {
  min-height: 58px;
  padding: 12px 14px;
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f7faf8;
}

.client-block > summary::-webkit-details-marker {
  display: none;
}

.client-block > summary span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.client-block > summary strong {
  font-size: 18px;
  line-height: 1.15;
}

.client-block > summary small {
  color: var(--muted);
}

.client-block > summary b {
  border-radius: 999px;
  background: var(--green-2);
  color: var(--green);
  padding: 6px 10px;
  font-size: 13px;
  white-space: nowrap;
}

.client-block > summary b.needs-attention {
  background: var(--gold-2);
  color: var(--gold);
}

.client-block-grid {
  border-top: 1px solid var(--line);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.client-record {
  box-shadow: none;
}

.client-record[open] {
  box-shadow: var(--shadow);
}

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

.client-record .entity-meta,
.client-record .inline-edit-card,
.client-record .payment-setup,
.client-record .assigned-list,
.client-record .assign-row,
.client-record .field-actions {
  min-width: 0;
  max-width: 100%;
}

.client-record .payment-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}

.client-record .field-actions,
.client-record .payment-setup .field-actions {
  align-items: center;
}

.client-record .field-actions .primary,
.client-record .field-actions .secondary,
.client-record .assign-row .secondary {
  width: auto;
}

.client-record select,
.client-record input,
.client-record textarea {
  min-width: 0;
  max-width: 100%;
}

.module-history > summary {
  min-height: 48px;
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.module-history > summary::-webkit-details-marker {
  display: none;
}

.module-history > summary span {
  border-radius: 999px;
  background: var(--green-2);
  color: var(--green);
  padding: 6px 10px;
  font-size: 13px;
}

.module-history .table {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.property-client-grid,
.sync-client-grid,
.booking-date-grid,
.booking-feed-grid,
.invoice-client-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  align-items: start;
}

.service-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 14px;
}

.service-card {
  min-height: 210px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.service-card.partner {
  border-color: #c9d9f2;
  background: #fbfdff;
}

.service-card h3 {
  margin-top: 14px;
}

.service-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.service-foot strong {
  color: var(--ink);
}

.service-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.service-stats span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 9px;
}

.service-stats strong,
.service-stats small {
  display: block;
}

.service-stats small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.property-ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.property-ops-grid textarea,
[data-create-property] textarea {
  min-height: 150px;
}

.property-ops-grid small,
[data-create-property] small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.space-configurator,
.owner-property-menu,
.owner-property-form,
.owner-property-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 12px;
}

.space-configurator summary,
.owner-property-menu summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-weight: 800;
}

.space-configurator summary::marker,
.owner-property-menu summary::marker {
  color: var(--green);
}

.space-configurator summary strong,
.owner-property-menu summary strong {
  color: var(--muted);
  font-size: 12px;
}

.space-config-body,
.owner-property-list,
.owner-property-board {
  display: grid;
  gap: 12px;
}

.owner-property-menu {
  padding: 0;
  overflow: hidden;
}

.owner-property-menu > summary {
  padding: 14px 16px;
}

.owner-property-menu > .owner-property-list {
  border-top: 1px solid var(--line);
  padding: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
}

.owner-create-panel {
  grid-column: 1 / -1;
  padding: 0;
  overflow: hidden;
}

.owner-create-panel > summary,
.owner-property-details > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.owner-create-panel > summary::-webkit-details-marker,
.owner-property-details > summary::-webkit-details-marker {
  display: none;
}

.owner-create-panel > summary {
  padding: 14px;
}

.owner-create-panel > summary span,
.owner-property-details > summary span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.owner-create-panel > summary small,
.owner-property-details > summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.owner-create-panel > summary b,
.owner-property-details > summary b {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  padding: 7px 11px;
  font-size: 14px;
  white-space: nowrap;
}

.owner-property-create-body {
  border-top: 1px solid var(--line);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.owner-property-card {
  align-content: start;
}

.owner-property-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  min-width: 0;
}

.owner-property-quick-grid {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}

.owner-property-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.owner-property-details > summary {
  padding: 12px;
}

.owner-property-details[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.owner-property-detail-body {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.space-config-alert,
.space-setup-warning {
  border: 1px solid #f0c36d;
  border-radius: 8px;
  background: #fff8e8;
  color: #4b3a13;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.space-config-alert span,
.space-setup-warning span {
  color: #6d5d32;
  font-size: 13px;
  line-height: 1.4;
}

.space-builder-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px auto;
  gap: 8px;
  align-items: end;
}

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

.selected-space-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.selected-space-item {
  border-color: #c8e0d8;
  background: var(--green-2);
}

.selected-space-item.optional {
  border-style: dashed;
  background: #fff;
}

.selected-space-item span,
.selected-space-item strong,
.selected-space-item small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.selected-space-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.custom-space-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.sync-board,
.booking-feed,
.booking-board,
.source-list,
.owner-report-list,
.field-jobs,
.message-log,
.payroll-board,
.invoice-board,
.report-board {
  display: grid;
  gap: 10px;
}

.sync-card,
.booking-card,
.booking-flow-card,
.turnover-card,
.owner-report,
.field-card,
.message-card,
.payroll-card,
.combine-card,
.invoice-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 14px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.sync-card-head,
.source-row,
.booking-card > div:first-child,
.booking-flow-head,
.turnover-head,
.owner-report-head,
.invoice-head,
.field-head,
.payroll-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.owner-report-head > div,
.invoice-head > div {
  min-width: 0;
}

.sync-card-head p,
.booking-card p,
.booking-flow-head p,
.turnover-head p,
.owner-report p,
.field-head p,
.message-card p,
.payroll-head p {
  margin-bottom: 0;
}

.job-money {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.payroll-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}

.payroll-totals span,
.payroll-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}

.payroll-totals strong {
  display: block;
  font-size: 20px;
}

.payroll-totals small,
.payroll-row span,
.payroll-note span {
  color: var(--muted);
  font-size: 12px;
}

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

.payroll-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.payroll-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.payroll-row > div {
  display: grid;
  gap: 4px;
}

.payroll-row > div:last-child {
  justify-items: end;
}

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

.payroll-actions .secondary,
.annual-card .secondary {
  min-height: 34px;
  padding: 0 10px;
}

.annual-card .payroll-note {
  display: grid;
  gap: 4px;
}

.field-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 8px;
}

.field-jobs {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  align-items: start;
}

.field-task-card {
  gap: 12px;
}

.field-task-card.embedded {
  box-shadow: none;
}

.field-detail-card {
  max-width: 940px;
}

.priority-card {
  align-content: start;
}

.priority-card.today {
  border-color: rgba(37, 79, 143, 0.35);
  box-shadow: inset 4px 0 0 var(--blue);
}

.priority-card.late {
  border-color: rgba(167, 68, 63, 0.35);
  box-shadow: inset 4px 0 0 var(--red);
}

.priority-card.upcoming {
  border-color: rgba(154, 106, 21, 0.25);
  box-shadow: inset 4px 0 0 var(--gold);
}

.priority-card.closed {
  opacity: 0.78;
}

.field-priority-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.field-priority-head > div:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.field-priority-head strong {
  overflow-wrap: anywhere;
}

.field-date-badge {
  width: 58px;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 6px;
}

.field-date-badge strong {
  font-size: 24px;
  line-height: 1;
}

.field-date-badge span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.field-meta-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.field-meta-strip span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 9px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.field-meta-strip strong {
  display: block;
  color: var(--ink);
  margin-bottom: 3px;
}

.task-address-line {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 10px;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.task-address-line strong,
.task-address-line span {
  overflow-wrap: anywhere;
}

.task-address-line span {
  color: var(--muted);
  font-size: 13px;
}

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

.worker-property-info span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 9px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.worker-property-info strong {
  display: block;
  color: var(--ink);
  margin-bottom: 3px;
}

.field-checklist label {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  color: var(--ink);
  font-size: 14px;
}

.field-checklist input {
  min-height: 18px;
  margin: 0;
  padding: 0;
}

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

.upload-button {
  cursor: pointer;
}

.photo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.photo-list a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--green-2);
  color: var(--green);
  padding: 5px 9px;
  font-size: 12px;
  text-decoration: none;
}

.photo-thumb-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
}

.photo-thumb-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0;
}

.photo-thumb-details > summary {
  cursor: pointer;
  list-style: none;
  padding: 9px 10px;
}

.photo-thumb-details > summary::-webkit-details-marker {
  display: none;
}

.photo-thumb-details > summary span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.photo-thumb-details > summary small {
  color: var(--muted);
}

.photo-thumb-details .photo-thumb-list {
  padding: 0 10px 10px;
}

.photo-thumb-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  display: grid;
  gap: 6px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
  overflow-wrap: anywhere;
}

.photo-thumb-preview {
  display: block;
  width: 100%;
  height: 74px;
  border-radius: 7px;
  background: #f0f3ef;
  overflow: hidden;
  border: 1px solid var(--line);
}

.photo-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-thumb-link small {
  color: var(--green);
}

.photo-thumb-link.missing {
  color: var(--muted);
  background: var(--surface);
}

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

.space-photo-grid .wide-head {
  grid-column: 1 / -1;
}

.space-photo-card,
.maintenance-request-box,
.maintenance-request-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.space-photo-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.space-photo-card > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.space-photo-card strong,
.space-photo-card span {
  overflow-wrap: anywhere;
}

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

.space-photo-card.missing {
  border-color: #efc9c4;
  background: var(--red-2);
}

.space-photo-card.complete {
  border-color: #c8e0d8;
  background: #fbfffc;
}

.space-photo-card .photo-list {
  grid-column: 1 / -1;
}

.maintenance-request-box {
  background: #fbfcfa;
}

.maintenance-request-board {
  display: grid;
  gap: 10px;
}

.maintenance-request-card.urgent {
  border-color: #efc9c4;
  box-shadow: inset 4px 0 0 var(--red);
}

.maintenance-request-card.operations-compact {
  gap: 8px;
  padding: 10px 12px;
}

.maintenance-request-card.operations-compact .maintenance-request-head {
  align-items: center;
}

.maintenance-request-card.operations-compact .maintenance-request-head strong {
  font-size: 16px;
}

.maintenance-request-card.operations-compact .maintenance-request-head p {
  font-size: 13px;
}

.operations-request-line {
  display: grid;
  grid-template-columns: 180px 110px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.operations-request-line > span,
.operations-request-line > label {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 8px 9px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.operations-request-line strong,
.operations-request-line small {
  display: block;
}

.operations-request-line small,
.operations-request-note {
  color: var(--muted);
  font-size: 12px;
}

.operations-request-note {
  max-width: 900px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.maintenance-request-head > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.maintenance-request-head p,
.maintenance-request-card p {
  margin: 0;
  overflow-wrap: anywhere;
}

.request-money-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.request-money-grid span,
.request-money-grid .request-cost-input,
.request-meta span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 9px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.request-money-grid .request-cost-input {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.request-money-grid .request-cost-input input {
  background: #fff;
}

.request-money-grid strong,
.request-money-grid small {
  display: block;
}

.request-money-grid small,
.request-meta {
  color: var(--muted);
  font-size: 12px;
}

.request-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.request-actions {
  justify-content: flex-start;
}

.field-team-admin {
  display: grid;
  gap: 14px;
}

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

.access-card {
  grid-column: 1 / -1;
}

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

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

.package-options {
  display: grid;
  gap: 8px;
}

.finance-options {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.financial-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.financial-summary span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.financial-summary strong,
.financial-summary small {
  display: block;
}

.financial-summary small {
  color: var(--muted);
  font-size: 12px;
}

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

.assigned-item small {
  color: var(--muted);
  margin-top: 2px;
}

.evidence-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.evidence-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

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

.evidence-box textarea {
  width: 100%;
  min-height: 58px;
  resize: vertical;
}

.evidence-box p {
  margin-bottom: 0;
  font-size: 12px;
}

.completion-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 8px 10px;
}

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

.message-head,
.message-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.message-actions {
  justify-content: flex-start;
}

.messaging-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--green-2);
  color: var(--ink);
  padding: 12px;
  display: grid;
  gap: 6px;
}

.messaging-panel p {
  margin-bottom: 0;
}

.messaging-panel small {
  color: var(--muted);
}

.send-link {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.booking-dates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.booking-dates span,
.plan-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.booking-dates strong {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

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

.plan-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 8px;
}

.plan-item strong,
.plan-item small {
  min-width: 0;
}

.plan-item span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--green-2);
  color: var(--green);
  font-size: 12px;
}

.plan-item small {
  grid-column: 2;
  color: var(--muted);
}

.booking-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.booking-foot .muted {
  min-width: 0;
  overflow-wrap: anywhere;
}

.turnover-card.same-day-turnover {
  border-color: rgba(154, 106, 21, 0.45);
  box-shadow: inset 4px 0 0 var(--gold);
}

.turnover-head > div {
  min-width: 0;
}

.turnover-timeline,
.turnover-property-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.turnover-property-strip {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(120px, 0.7fr) auto;
  align-items: stretch;
}

.turnover-timeline span,
.turnover-property-strip span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.turnover-timeline strong,
.turnover-property-strip strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  margin-bottom: 4px;
}

.turnover-property-strip .status {
  align-self: center;
  white-space: nowrap;
}

.service-readiness {
  display: grid;
  gap: 8px;
}

.service-readiness-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(150px, 0.75fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  min-width: 0;
}

.service-readiness-row.missing {
  border-color: rgba(154, 106, 21, 0.35);
  background: #fffaf0;
}

.service-readiness-row.created {
  background: #f7fcfa;
}

.service-readiness-row.empty {
  grid-template-columns: 1fr;
  color: var(--muted);
}

.service-readiness-row strong,
.service-readiness-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.service-readiness-row span,
.service-money {
  color: var(--muted);
  font-size: 13px;
}

.service-money {
  display: grid;
  gap: 3px;
}

.service-total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(15, 107, 95, 0.25);
  border-radius: 8px;
  background: var(--green-2);
  color: var(--green);
  padding: 10px 12px;
  font-weight: 800;
}

.service-total-row span {
  color: var(--green);
  text-align: right;
}

.turnover-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.turnover-actions .admin-select {
  max-width: 220px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.report-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}

.report-grid strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.report-grid.price-grid span {
  background: #fff;
}

.report-grid.price-grid strong {
  color: var(--green);
}

.owner-cleaning-history,
.owner-cleaning-board,
.owner-cleaning-list {
  display: grid;
  gap: 12px;
}

.owner-cleaning-property {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.owner-cleaning-property summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-weight: 800;
}

.owner-cleaning-property summary strong {
  color: var(--muted);
  font-size: 12px;
}

.owner-cleaning-list {
  margin-top: 12px;
}

.owner-cleaning-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 12px;
}

.owner-cleaning-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  cursor: pointer;
  list-style: none;
}

.owner-cleaning-summary::-webkit-details-marker {
  display: none;
}

.owner-cleaning-summary::after {
  content: "+";
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--green);
  font-weight: 800;
}

.owner-cleaning-card[open] .owner-cleaning-summary::after {
  content: "−";
}

.owner-cleaning-summary > div {
  min-width: 0;
}

.owner-cleaning-detail {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.owner-cleaning-summary p,
.owner-cleaning-note {
  margin: 0;
}

.owner-cleaning-meta,
.owner-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.owner-cleaning-meta span,
.owner-photo-grid a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.owner-cleaning-meta strong,
.owner-photo-grid strong,
.owner-photo-grid small {
  display: block;
}

.owner-cleaning-meta strong,
.owner-photo-grid small {
  color: var(--muted);
  font-size: 12px;
}

.owner-photo-grid a {
  color: var(--ink);
  text-decoration: none;
  display: grid;
  gap: 6px;
}

.owner-photo-grid a small {
  color: var(--green);
  margin-top: 4px;
}

.owner-photo-preview {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  background: #f0f3ef;
  overflow: hidden;
  border: 1px solid var(--line);
}

.owner-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.invoice-lines {
  display: grid;
  gap: 6px;
}

.invoice-lines > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 7px;
}

.invoice-lines span {
  color: var(--muted);
  overflow-wrap: anywhere;
  min-width: 0;
}

.invoice-lines strong {
  white-space: nowrap;
}

.invoice-origin {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 9px 10px;
  font-size: 13px;
}

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

.property-report-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.property-report-block > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  background: #f7faf8;
}

.property-report-block > summary::-webkit-details-marker {
  display: none;
}

.property-report-block > summary span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.property-report-block > summary small {
  color: var(--muted);
}

.property-report-block > summary b {
  white-space: nowrap;
}

.property-report-grid {
  padding: 10px;
}

.property-report-block .invoice-lines {
  padding: 0 10px 10px;
}

.combine-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.combine-head p {
  font-size: 13px;
}

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

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

.combine-row span,
.combine-row small {
  display: block;
  color: var(--muted);
  overflow-wrap: anywhere;
}

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

.archive-panel summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
}

.archive-panel .invoice-board {
  margin-top: 10px;
}

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

.source-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}

.source-row strong,
.source-row span,
.source-row small {
  display: block;
}

.source-row span,
.source-row small {
  color: var(--muted);
  font-size: 12px;
}

.source-row .late-text {
  color: var(--red);
  font-weight: 700;
}

.source-row .status {
  margin-left: auto;
  color: inherit;
}

.entity-card {
  padding: 16px;
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
}

.manage-card {
  padding: 16px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  box-shadow: var(--shadow);
}

#propertiesGrid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
}

.property-create-panel {
  grid-column: 1 / -1;
  padding: 0;
  overflow: hidden;
}

.property-create-panel summary,
.property-drawer summary,
.sub-drawer summary {
  cursor: pointer;
  list-style: none;
}

.property-create-panel summary::-webkit-details-marker,
.property-drawer summary::-webkit-details-marker,
.sub-drawer summary::-webkit-details-marker {
  display: none;
}

.property-create-panel > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.property-create-panel > summary span,
.property-drawer > summary span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.property-create-panel > summary strong,
.property-drawer > summary strong {
  color: var(--ink);
}

.property-create-panel > summary small,
.property-drawer > summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.property-create-panel > summary b,
.property-drawer > summary b {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  padding: 7px 11px;
  font-size: 14px;
  white-space: nowrap;
}

.property-create-form {
  border-top: 1px solid var(--line);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.property-card {
  gap: 12px;
}

.property-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  min-width: 0;
}

.property-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.property-title strong {
  font-size: 18px;
  line-height: 1.1;
}

.property-title span {
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.property-quick-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 9px 10px;
  min-width: 0;
}

.property-quick-grid strong,
.property-quick-grid small {
  display: block;
}

.property-quick-grid strong {
  color: var(--ink);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-quick-grid small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.property-service-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.service-badge {
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.service-badge.cleaning {
  background: var(--green-2);
  color: var(--green);
  border-color: #b9d9cc;
}

.service-badge.laundry {
  background: var(--blue-2);
  color: var(--blue);
  border-color: #c5d4f3;
}

.service-badge.maintenance {
  background: var(--gold-2);
  color: var(--gold);
  border-color: #ead5a4;
}

.service-badge.package {
  background: #f3f0ea;
  color: #51483d;
  border-color: #ddd5ca;
}

.muted-badge {
  color: var(--muted);
  background: #f8faf8;
}

.property-drawer {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.property-drawer > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.property-drawer[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.property-drawer-body {
  display: grid;
  gap: 12px;
  padding: 12px;
}

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

.section-mini-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.section-mini-head span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.compact-services {
  border: 0;
  background: transparent;
  padding: 0;
}

.sub-drawer {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 0;
}

.sub-drawer > summary {
  padding: 10px;
  color: var(--green);
  font-weight: 800;
}

.sub-drawer[open] > summary {
  border-bottom: 1px dashed var(--line);
}

.sub-drawer .price-options {
  padding: 10px;
  margin: 0;
}

.form-error {
  margin: 0;
  color: var(--red);
  font-weight: 700;
  font-size: 13px;
}

.form-success {
  margin: 0;
  color: var(--green);
  font-weight: 700;
  font-size: 13px;
}

.section-divider {
  height: 1px;
  background: var(--line);
  margin: 8px 0;
}

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

.worker-application-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 12px;
  min-width: 0;
}

.worker-application-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.worker-application-title,
.worker-application-meta,
.document-link-row,
.worker-application-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.worker-application-title strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.worker-application-meta {
  color: var(--muted);
  font-size: 13px;
}

.worker-application-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 4px 8px;
  overflow-wrap: anywhere;
}

.worker-identity-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  color: var(--muted);
}

.worker-identity-note strong {
  color: var(--ink);
}

.worker-identity-note.pending {
  background: var(--gold-2);
  border-color: #ead49e;
}

.worker-identity-note.done {
  background: var(--green-2);
  border-color: #b8ded5;
}

.document-link-row {
  margin-top: 2px;
}

.doc-link {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}

.worker-application-actions {
  justify-content: flex-end;
  min-width: 190px;
}

.worker-application-actions .primary,
.worker-application-actions .secondary {
  min-height: 36px;
  padding: 0 12px;
}

.entity-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.entity-head > div {
  min-width: 0;
}

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

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

.entity-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.inline-edit-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 12px;
  display: grid;
  gap: 12px;
}

.full-row {
  grid-column: 1 / -1;
}

.service-options {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.service-options > strong {
  font-size: 13px;
}

.service-options.compact-services {
  border: 0;
  background: transparent;
  padding: 0;
}

.approval-banner,
.owner-service-picker {
  border: 1px solid #e6d5ad;
  border-radius: 8px;
  background: var(--gold-2);
  color: var(--ink);
  padding: 10px;
  display: grid;
  gap: 5px;
}

.approval-banner span,
.owner-service-picker p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.payment-setup,
.owner-payment-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.payment-setup.blocked,
.owner-payment-panel.blocked {
  border-color: #efc9c4;
  background: var(--red-2);
}

.payment-setup.ready,
.owner-payment-panel.ready {
  border-color: rgba(15, 107, 95, 0.22);
  background: var(--green-2);
}

.payment-setup-head,
.owner-payment-panel {
  align-items: start;
}

.payment-setup-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.payment-setup-head span,
.owner-payment-panel p {
  color: var(--muted);
  font-size: 12px;
}

.payment-grid {
  align-items: end;
}

.owner-service-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.service-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--ink);
  font-size: 14px;
}

.service-option input {
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
}

.service-option span,
.service-option small {
  display: block;
}

.service-option small {
  color: var(--muted);
  margin-top: 2px;
}

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

.price-options label {
  color: var(--muted);
  font-size: 12px;
}

.price-options input {
  min-height: 34px;
  padding: 6px 8px;
}

.price-note {
  margin-bottom: 0;
  font-size: 12px;
}

.wide-field {
  grid-column: span 2;
}

.calendar-manager {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 12px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.calendar-manager-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.calendar-source-list {
  display: grid;
  gap: 7px;
}

.calendar-source-item {
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.calendar-source-item span {
  overflow-wrap: anywhere;
}

.add-calendar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.check-row,
.assign-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.check-row label {
  grid-template-columns: 18px auto;
  align-items: center;
  color: var(--ink);
}

.check-row input {
  min-height: 18px;
  padding: 0;
}

.assign-row select {
  flex: 1 1 220px;
}

.assigned-list {
  display: grid;
  gap: 7px;
}

.assigned-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.assigned-item span {
  overflow-wrap: anywhere;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  background: #edf0ec;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
}

.muted-pill {
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
}

dialog {
  border: 0;
  padding: 0;
  border-radius: 8px;
  width: min(720px, calc(100vw - 28px));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

dialog::backdrop {
  background: rgba(19, 33, 29, 0.42);
}

.modal {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.form-grid.compact {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

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

textarea {
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

@media (max-width: 1180px) {
  .public-auth-shell {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  }

  .public-proof-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .public-proof-grid span {
    min-height: 0;
  }

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

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

  .coordination-queue {
    max-height: none;
  }

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

  .cleaner-dashboard-grid.two-col {
    grid-template-columns: 1fr;
  }

  .booking-dates,
  .plan-list,
  .turnover-timeline,
  .turnover-property-strip,
  .field-meta-strip {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .service-readiness-row {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.7fr);
  }

  .service-readiness-row .secondary,
  .service-readiness-row .status {
    justify-self: start;
  }
}

@media (max-width: 980px) {
  .public-auth-shell {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .public-hero {
    grid-row: 2;
    padding: 0;
    gap: 18px;
  }

  .public-hero h1 {
    font-size: 48px;
  }

  .public-hero p {
    font-size: 17px;
  }

  .auth-panel {
    grid-row: 1;
    align-self: stretch;
  }

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

  .sidebar {
    position: static;
    height: auto;
  }

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

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    height: auto;
    min-height: 48px;
  }

  .nav-item span:last-child {
    display: none;
  }

  .sidebar-note {
    display: none;
  }

  .topbar,
  .top-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .search {
    min-width: 0;
  }

  .session-chip {
    justify-content: space-between;
  }

  .session-chip span {
    max-width: none;
  }

  .maintenance-request-head {
    display: grid;
  }

  .worker-application-item {
    grid-template-columns: 1fr;
  }

  .worker-application-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .metrics,
  .split,
  .sync-layout,
  .owner-layout,
  .owner-dashboard-columns,
  .booking-layout,
  .cleaner-dashboard-grid,
  .cleaner-dashboard-grid.two-col,
  .report-layout,
  .field-layout,
  .load-grid,
  .team-load-list,
  .worker-monitor-grid,
  .grid-list,
  .integration-grid,
  .service-board,
  .property-ops-grid,
  .property-quick-grid,
  .worker-property-info {
    grid-template-columns: 1fr;
  }

  .space-configurator summary,
  .owner-property-menu summary,
  .owner-create-panel > summary,
  .owner-property-details > summary,
  .property-create-panel > summary,
  .property-drawer > summary,
  .section-mini-head {
    align-items: flex-start;
  }

  .row,
  .external-close-card,
	  .maintenance-request-head,
	  .calendar-filter-bar,
	  .calendar-detail-stats,
	  .calendar-detail-access,
	  .row.header,
	  .booking-dates,
  .plan-list,
  .turnover-timeline,
  .turnover-property-strip,
  .service-readiness-row,
  .field-meta-strip,
  .field-checklist,
  .space-photo-grid,
  .space-photo-card,
  .request-money-grid,
  .request-meta,
  .operations-request-line,
  .worker-location-share-card,
  .space-builder-row,
  .custom-space-row,
  .payroll-totals,
  .price-options,
  .form-grid.compact,
  .service-stats {
    grid-template-columns: 1fr;
  }

  .property-card-head,
  .owner-property-card-head,
  .section-mini-head {
    display: grid;
  }

  .property-card-head .entity-actions {
    justify-content: start;
  }

  .owner-property-card-head .entity-actions {
    justify-content: start;
  }

  .wide-field {
    grid-column: auto;
  }

  .row.header {
    display: none;
  }

}

@media (max-width: 620px) {
  .main {
    padding: 16px;
  }

  .location-gate {
    padding: 14px;
  }

  .location-gate-card {
    padding: 18px;
  }

  .location-gate-card h2 {
    font-size: 24px;
  }

  .location-gate-card .primary {
    min-height: 54px;
  }

  .metrics {
    gap: 10px;
  }

  .coordination-head {
    align-items: stretch;
    flex-direction: column;
  }

  .coordination-legend {
    justify-content: flex-start;
  }

  .coordination-map,
  .coordination-map-empty {
    min-height: 360px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .add-calendar-row,
  .assign-row,
  .integration-link-row {
    grid-template-columns: 1fr;
  }

  .add-calendar-row .secondary {
    width: 100%;
  }

  .calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-period strong {
    font-size: 22px;
  }

  .calendar-controls {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

	  .calendar-controls .icon-button,
	  .calendar-controls .secondary {
	    width: 100%;
	  }

	  .calendar-detail-head {
	    display: grid;
	  }

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

	  .calendar-detail-line {
	    display: grid;
	  }

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

  .day-name {
    display: none;
  }

  .day,
  .day:nth-child(7n) {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  .login-screen {
    min-height: 100dvh;
    padding: calc(14px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
    place-items: start;
  }

  .login-card {
    padding: 20px;
    gap: 15px;
  }

  .login-card h2 {
    font-size: 28px;
    line-height: 1.05;
  }

  .public-hero h1 {
    font-size: 40px;
  }

  .public-proof-grid {
    gap: 8px;
  }

  .public-cta {
    width: 100%;
  }

  .app {
    display: block;
    min-height: 100dvh;
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    padding: calc(10px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 10px calc(12px + env(safe-area-inset-left));
    gap: 0;
    box-shadow: 0 10px 28px rgba(17, 29, 37, 0.18);
  }

  .brand {
    grid-template-columns: 40px 1fr;
    gap: 10px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand span {
    font-size: 12px;
  }

  .nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 8px calc(10px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left));
    background: #111d25;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -12px 30px rgba(17, 29, 37, 0.28);
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar,
  .segments::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 72px;
    min-height: 58px;
    height: 58px;
    padding: 6px 8px;
    grid-template-columns: 1fr;
    grid-template-rows: 22px 1fr;
    justify-items: center;
    align-items: center;
    text-align: center;
  }

  .nav-item span:last-child {
    display: block;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.15;
  }

  .icon {
    width: auto;
    font-size: 16px;
  }

  .main {
    padding: 14px calc(12px + env(safe-area-inset-right)) 0 calc(12px + env(safe-area-inset-left));
  }

  .topbar {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
  }

  .topbar h1 {
    font-size: 28px;
    line-height: 1.05;
  }

  .topbar p {
    font-size: 14px;
    line-height: 1.35;
    margin-bottom: 0;
  }

  .top-actions,
  .toolbar,
  .cleaner-hero-card,
  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .role-switch,
  .language-switch,
  .search,
  .session-chip,
  .cleaner-quick-actions .primary,
  .cleaner-quick-actions .secondary,
  #newJobButton,
  #exportButton {
    width: 100%;
  }

  .session-chip {
    min-height: 46px;
  }

  .session-chip span {
    min-width: 0;
  }

  .primary,
  .secondary,
  .ghost,
  .segment,
  .icon-button,
  .send-link {
    min-height: 44px;
  }

  .segments {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .segment {
    flex: 0 0 auto;
  }

  .view.active {
    gap: 12px;
  }

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

  .metric,
  .panel,
  .entity-card,
  .manage-card,
  .service-card,
  .cleaner-hero-card,
  .cleaner-summary-card,
  .dashboard-next-job {
    box-shadow: 0 8px 22px rgba(28, 37, 34, 0.06);
  }

  .metric {
    padding: 12px;
    min-width: 0;
  }

  .metric span,
  .metric small {
    font-size: 12px;
    line-height: 1.25;
  }

  .metric strong {
    font-size: 23px;
    line-height: 1.08;
  }

  .panel,
  .entity-card,
  .manage-card,
  .service-card,
  .cleaner-hero-card,
  .cleaner-summary-card,
  .dashboard-next-job,
  .sync-card,
  .booking-card,
  .booking-flow-card,
  .turnover-card,
  .owner-report,
  .field-card,
  .message-card,
  .payroll-card,
  .combine-card,
  .invoice-card {
    padding: 12px;
  }

  .panel-head,
  .entity-head,
  .sync-card-head,
  .booking-flow-head,
  .turnover-head,
  .owner-report-head,
  .invoice-head,
  .field-head,
  .payroll-head,
  .evidence-head {
    align-items: stretch;
  }

  .row {
    gap: 9px;
    padding: 12px;
  }

  .row-actions,
  .field-actions,
  .message-actions,
  .turnover-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .field-actions .primary,
  .field-actions .secondary,
  .field-actions .upload-button,
  .row-actions .secondary,
  .turnover-actions .primary,
  .turnover-actions .secondary,
  .turnover-actions .admin-select,
  .message-actions .secondary,
  .message-actions .send-link {
    width: 100%;
  }

  .turnover-actions .muted {
    grid-column: 1 / -1;
  }

  .mini {
    width: 44px;
    height: 44px;
    justify-self: stretch;
  }

  .admin-select {
    max-width: none;
    min-height: 44px;
  }

  .multi-assignee-control {
    max-width: none;
  }

  .multi-assignee-control > summary {
    min-height: 44px;
  }

  .job-money {
    justify-items: start;
  }

  .field-checklist {
    gap: 9px;
  }

  .field-priority-head {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .field-priority-head > .status {
    grid-column: 2;
    justify-self: start;
  }

  .field-date-badge {
    width: 52px;
    min-height: 58px;
  }

  .field-checklist label {
    min-height: 48px;
    font-size: 14px;
  }

  .calendar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    border: 0;
    overflow: visible;
  }

  .day-name {
    display: none;
  }

  .day:empty {
    display: none;
  }

  .day,
  .day:nth-child(7n) {
    min-height: 72px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
  }

  .calendar-event {
    font-size: 12px;
    padding: 7px 8px;
    min-height: 42px;
  }

  .calendar-day-card {
    min-height: 36px;
    padding: 6px 7px;
  }

  .compact-badges {
    max-width: 84px;
  }

  .booking-dates,
  .plan-list,
  .turnover-timeline,
  .turnover-property-strip,
  .service-readiness-row,
  .financial-summary,
  .finance-options,
  .invoice-lines > div,
  .combine-row,
  .add-calendar-row,
  .form-grid,
  .form-grid.compact {
    grid-template-columns: 1fr;
  }

  .invoice-lines > div,
  .combine-row {
    align-items: start;
  }

  .invoice-lines strong,
  .combine-row strong {
    white-space: normal;
  }

  .assigned-item {
    align-items: start;
  }

  .pill,
  .status {
    font-size: 11px;
  }

  dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .modal {
    max-height: calc(100dvh - 20px);
    overflow: auto;
    padding: 16px;
  }
}

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

  .row-actions,
  .field-actions,
  .message-actions {
    grid-template-columns: 1fr;
  }

  .nav-item {
    flex-basis: 68px;
  }
}

/* JD STR premium interface — visual system v1 */
:root {
  --bg: #f2f6f5;
  --surface: #ffffff;
  --ink: #14262b;
  --muted: #66777a;
  --line: #d9e4e1;
  --green: #0a7469;
  --green-2: #e1f4f0;
  --blue: #2b5f91;
  --blue-2: #e8f1fa;
  --red: #b1443f;
  --red-2: #fbe9e7;
  --gold: #936714;
  --gold-2: #f8edcf;
  --navy: #0b1e28;
  --navy-2: #102d36;
  --premium-gold: #d8ad4a;
  --shadow: 0 12px 34px rgba(10, 41, 45, 0.08);
  --shadow-hover: 0 18px 42px rgba(10, 41, 45, 0.13);
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 86% 4%, rgba(10, 116, 105, 0.07), transparent 30rem),
    radial-gradient(circle at 26% 88%, rgba(216, 173, 74, 0.055), transparent 34rem),
    var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(216, 173, 74, 0.28);
  color: var(--ink);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

.sidebar {
  padding: 24px 18px 18px;
  gap: 22px;
  background:
    radial-gradient(circle at 12% 0%, rgba(216, 173, 74, 0.14), transparent 15rem),
    linear-gradient(165deg, #0b1e28 0%, #0d2b33 58%, #092128 100%);
  border-right: 1px solid rgba(216, 173, 74, 0.16);
  box-shadow: 16px 0 48px rgba(8, 30, 36, 0.08);
  scrollbar-width: thin;
  scrollbar-color: rgba(216, 173, 74, 0.36) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(216, 173, 74, 0.36);
}

.brand {
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 13px;
  padding: 2px 3px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border-color: rgba(216, 173, 74, 0.52);
  background: #070b0d;
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 191, 0.1),
    0 14px 30px rgba(0, 0, 0, 0.3),
    0 0 24px rgba(216, 173, 74, 0.08);
}

.brand strong {
  color: #ffffff;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.brand span {
  color: rgba(229, 239, 235, 0.64);
  font-size: 12px;
  line-height: 1.35;
}

.nav {
  gap: 4px;
}

.nav-item {
  position: relative;
  min-height: 46px;
  height: auto;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  padding: 6px 10px 6px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: rgba(235, 244, 240, 0.74);
  font-size: 13px;
  font-weight: 650;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.nav-item:nth-child(3),
.nav-item:nth-child(6),
.nav-item:nth-child(9),
.nav-item:nth-child(12),
.nav-item:nth-child(15) {
  margin-top: 7px;
}

.nav-item:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(2px);
}

.nav-item.active {
  color: #ffffff;
  border-color: rgba(216, 173, 74, 0.21);
  background: linear-gradient(90deg, rgba(216, 173, 74, 0.16), rgba(255, 255, 255, 0.075));
  box-shadow: inset 3px 0 0 var(--premium-gold), 0 8px 22px rgba(0, 0, 0, 0.12);
}

.icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: currentColor;
  background: rgba(255, 255, 255, 0.065);
}

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

.nav-item.active .icon {
  color: #ffe7a2;
  background: rgba(216, 173, 74, 0.16);
}

.sidebar-note {
  border-radius: 15px;
  border-color: rgba(216, 173, 74, 0.18);
  background:
    linear-gradient(145deg, rgba(216, 173, 74, 0.12), rgba(255, 255, 255, 0.055));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 16px;
}

.sidebar-note span {
  color: rgba(255, 226, 147, 0.76);
  letter-spacing: 0.08em;
}

.main {
  padding: 26px;
  background: transparent;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 18;
  margin: -26px -26px 24px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid rgba(14, 70, 68, 0.1);
  background: rgba(246, 249, 248, 0.9);
  box-shadow: 0 10px 28px rgba(10, 41, 45, 0.045);
  backdrop-filter: blur(18px) saturate(150%);
}

.topbar h1 {
  max-width: 760px;
  margin-bottom: 5px;
  color: #102c31;
  font-size: clamp(27px, 3.2vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.topbar p {
  max-width: 720px;
  margin-bottom: 0;
  font-size: 13px;
}

.top-actions {
  gap: 8px;
}

.role-switch,
.language-switch,
.search,
.session-chip {
  border-color: rgba(15, 75, 72, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 5px 16px rgba(10, 41, 45, 0.045);
}

.role-switch,
.language-switch {
  padding: 5px 10px;
}

.role-switch span,
.language-switch span {
  color: #718284;
  letter-spacing: 0.07em;
}

.search {
  min-width: min(250px, 28vw);
}

.search > span {
  color: var(--green);
  font-size: 19px;
}

.session-chip {
  padding-left: 12px;
}

.primary,
.secondary,
.ghost,
.segment,
.icon-button,
.send-link,
.upload-button {
  border-radius: 11px;
  font-weight: 750;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

.primary {
  border-color: rgba(6, 86, 78, 0.9);
  background: linear-gradient(135deg, #0b7d71, #075e57);
  box-shadow: 0 8px 18px rgba(8, 104, 95, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(8, 104, 95, 0.27), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.secondary {
  border-color: rgba(15, 75, 72, 0.16);
  background: linear-gradient(180deg, #ffffff, #f8fbfa);
  box-shadow: 0 4px 12px rgba(10, 41, 45, 0.04);
}

.secondary:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  border-color: rgba(10, 116, 105, 0.35);
  background: #f2faf8;
  transform: translateY(-1px);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(216, 173, 74, 0.48);
  outline-offset: 2px;
}

.view.active {
  gap: 20px;
  animation: view-enter 220ms ease-out;
}

@keyframes view-enter {
  from { opacity: 0.55; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.metrics {
  gap: 16px;
}

.metric,
.panel,
.entity-card,
.manage-card,
.service-card,
.cleaner-hero-card,
.cleaner-summary-card,
.dashboard-next-job,
.sync-card,
.booking-card,
.booking-flow-card,
.turnover-card,
.owner-report,
.field-card,
.message-card,
.payroll-card,
.combine-card,
.invoice-card,
.integration-card,
.property-card,
.owner-property-card,
.maintenance-request-card {
  border-color: rgba(15, 75, 72, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.metric {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  padding: 20px;
  isolation: isolate;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.metric::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--green), #50b8a7);
}

.metric::after {
  position: absolute;
  z-index: -1;
  right: -34px;
  bottom: -45px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  content: "";
  background: rgba(10, 116, 105, 0.055);
}

.metric:nth-child(2)::before { background: linear-gradient(90deg, #356ea0, #72a5d2); }
.metric:nth-child(2)::after { background: rgba(43, 95, 145, 0.06); }
.metric:nth-child(3)::before { background: linear-gradient(90deg, #c0912e, #e3be62); }
.metric:nth-child(3)::after { background: rgba(216, 173, 74, 0.08); }
.metric:nth-child(4)::before { background: linear-gradient(90deg, #853f66, #bd7399); }
.metric:nth-child(4)::after { background: rgba(133, 63, 102, 0.055); }

.metric:hover {
  border-color: rgba(10, 116, 105, 0.2);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.metric span {
  color: #6a7c7e;
  font-weight: 700;
}

.metric strong {
  margin-top: 8px;
  color: #122e33;
  font-size: 31px;
  letter-spacing: -0.03em;
}

.metric small {
  display: block;
  margin-top: 4px;
  font-weight: 700;
}

.panel {
  padding: 19px;
}

.panel-head,
.toolbar {
  margin-bottom: 16px;
}

.panel-head h2,
.entity-head h2,
.toolbar h2 {
  color: #15383b;
  font-size: 17px;
  letter-spacing: -0.012em;
}

.row {
  min-height: 62px;
  border-color: rgba(15, 75, 72, 0.1);
  border-radius: 12px;
  background: #fbfdfc;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.row:not(.header):hover {
  border-color: rgba(10, 116, 105, 0.22);
  background: #f6fbf9;
  transform: translateY(-1px);
}

.row.header {
  color: #718184;
  font-weight: 800;
  letter-spacing: 0.055em;
}

.status,
.pill,
.map-key {
  border: 1px solid transparent;
  font-weight: 750;
}

.status.pending { border-color: rgba(147, 103, 20, 0.16); }
.status.progress { border-color: rgba(43, 95, 145, 0.15); }
.status.done { border-color: rgba(10, 116, 105, 0.16); }
.status.late { border-color: rgba(177, 68, 63, 0.16); }

input,
select,
textarea {
  border-color: #d5e1de;
  border-radius: 11px;
  background: #fcfefd;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #b9ceca;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(10, 116, 105, 0.62);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(10, 116, 105, 0.1);
  outline: 0;
}

dialog {
  max-height: min(88dvh, 900px);
  overflow: hidden;
  border: 1px solid rgba(216, 173, 74, 0.24);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 34px 100px rgba(5, 25, 30, 0.32);
}

dialog::backdrop {
  background: rgba(5, 22, 28, 0.62);
  backdrop-filter: blur(7px);
}

.modal {
  position: relative;
  max-height: min(88dvh, 900px);
  overflow-y: auto;
  gap: 18px;
  padding: 24px;
}

.modal::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  content: "";
  background: linear-gradient(90deg, var(--green), var(--premium-gold));
}

.modal-head {
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  color: #143438;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.coordination-map,
.coordination-map-empty,
.leaflet-container {
  border-radius: 14px;
}

.login-screen {
  background:
    linear-gradient(120deg, rgba(7, 24, 31, 0.94), rgba(8, 77, 73, 0.82)),
    url("https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?auto=format&fit=crop&w=1800&q=86");
  background-position: center;
}

.public-auth-shell {
  gap: clamp(28px, 5vw, 72px);
}

.public-hero {
  padding: 22px 0;
}

.public-brand .brand-mark {
  width: 62px;
  height: 62px;
}

.public-hero h1 {
  letter-spacing: -0.055em;
  text-wrap: balance;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.public-proof-grid span {
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(7, 25, 31, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.public-cta,
.auth-tabs,
.login-card {
  border-radius: 15px;
}

.public-cta {
  min-height: 50px;
  border-color: rgba(255, 226, 147, 0.48);
  background: linear-gradient(135deg, rgba(216, 173, 74, 0.24), rgba(216, 173, 74, 0.11));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.auth-tabs {
  padding: 7px;
  background: rgba(7, 25, 31, 0.34);
  backdrop-filter: blur(14px);
}

.auth-tab {
  border-radius: 10px;
}

.login-card {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.965);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
  padding: 30px;
  backdrop-filter: blur(22px);
}

.login-card h2 {
  color: #112f34;
  letter-spacing: -0.03em;
}

.login-help,
.verification-box,
.location-gate-message {
  border-radius: 12px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1180px) {
  .app {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 14px;
  }

  .topbar {
    align-items: stretch;
  }

  .top-actions {
    justify-content: flex-start;
  }
}

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

  .sidebar {
    position: static;
    height: auto;
  }

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

  .nav-item,
  .nav-item:nth-child(n) {
    min-height: 52px;
    margin-top: 0;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 8px;
  }

  .nav-item span:last-child {
    display: none;
  }

  .nav-item:hover {
    transform: none;
  }

  .topbar {
    position: static;
  }
}

@media (max-width: 760px) {
  .login-card {
    padding: 22px;
  }

  .public-hero {
    padding-bottom: 18px;
  }

  .public-brand .brand-mark {
    width: 50px;
    height: 50px;
  }

  .app {
    display: block;
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 24;
    height: auto;
    padding: calc(9px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 9px calc(12px + env(safe-area-inset-left));
    border-right: 0;
    border-bottom: 1px solid rgba(216, 173, 74, 0.18);
    box-shadow: 0 10px 28px rgba(8, 30, 36, 0.2);
  }

  .brand {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 0;
    border-bottom: 0;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .brand strong {
    font-size: 14px;
  }

  .nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px calc(10px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left));
    border-top: 1px solid rgba(216, 173, 74, 0.2);
    background: rgba(9, 30, 38, 0.96);
    box-shadow: 0 -14px 32px rgba(8, 30, 36, 0.28);
    backdrop-filter: blur(18px);
  }

  .nav-item,
  .nav-item:nth-child(n) {
    flex: 0 0 76px;
    min-height: 62px;
    grid-template-columns: 1fr;
    grid-template-rows: 30px 1fr;
    gap: 2px;
    padding: 5px 6px;
    border-radius: 12px;
  }

  .nav-item span:last-child {
    display: block;
    max-width: 68px;
    overflow: hidden;
    color: inherit;
    font-size: 10px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .icon {
    width: 29px;
    height: 29px;
    border-radius: 8px;
  }

  .icon svg {
    width: 17px;
    height: 17px;
  }

  .main {
    padding: 16px calc(12px + env(safe-area-inset-right)) 0 calc(12px + env(safe-area-inset-left));
  }

  .topbar {
    margin: 0 0 16px;
    padding: 0;
    border-bottom: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .topbar h1 {
    font-size: 27px;
  }

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

  .search,
  .session-chip,
  #newJobButton {
    grid-column: 1 / -1;
  }

  .search {
    min-width: 0;
  }

  .metrics {
    gap: 10px;
  }

  .metric {
    min-height: 112px;
    padding: 15px;
  }

  .metric strong {
    font-size: 27px;
  }

  .panel {
    padding: 14px;
  }

  .metric,
  .panel,
  .entity-card,
  .manage-card,
  .service-card,
  .cleaner-hero-card,
  .cleaner-summary-card,
  .dashboard-next-job,
  .sync-card,
  .booking-card,
  .booking-flow-card,
  .turnover-card,
  .owner-report,
  .field-card,
  .message-card,
  .payroll-card,
  .combine-card,
  .invoice-card {
    border-radius: 14px;
  }

  dialog {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
    border-radius: 17px;
  }

  .modal {
    max-height: calc(100dvh - 18px);
    padding: 19px;
  }
}

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

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

  .role-switch,
  .language-switch,
  .search,
  .session-chip,
  #newJobButton {
    grid-column: 1;
  }
}
