.app-update-banner {
  position: fixed;
  z-index: 10000;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 32px);
  padding: 10px 12px 10px 16px;
  border: 1px solid color-mix(in srgb, var(--surface) 22%, transparent);
  border-radius: 12px;
  color: var(--on-status);
  background: var(--blue);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--blue) 24%, transparent);
}

.app-update-banner[hidden] {
  display: none;
}

.app-update-banner button {
  min-height: 36px;
  padding: 7px 11px;
  border: 0;
  border-radius: 8px;
  color: var(--blue);
  background: var(--surface);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* Finance v2 ----------------------------------------------------------- */
.finance-dashboard {
  align-items: start;
}

.finance-principle-banner {
  overflow: hidden;
  border-color: var(--line);
  background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 62%);
}

.finance-principle-copy {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.finance-principle-icon,
.finance-document-icon,
.finance-alert-list > article > span {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--text);
  border-radius: 13px;
  background: var(--surface-muted);
}

.finance-principle-icon svg,
.finance-document-icon svg,
.finance-alert-list svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.finance-connector-strip {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, auto) minmax(240px, 1fr);
  gap: 12px 22px;
  align-items: center;
  margin: 0 20px 20px;
  padding: 13px 16px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.finance-connector-strip strong { color: var(--text); }
.finance-connector-strip small { text-align: right; }
.finance-connector-strip.has-error { border-color: var(--red-soft); background: var(--red-soft); }

.finance-settlement-list,
.finance-document-list,
.finance-alert-list,
.finance-audit-list {
  display: grid;
  gap: 12px;
}

.finance-settlement-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-glass-sm);
}

.finance-settlement-card.has-discrepancy { border-color: var(--red-soft); }

.finance-settlement-card > header,
.finance-settlement-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px;
}

.finance-settlement-card > header { border-bottom: 1px solid var(--surface-muted); }
.finance-settlement-card > header h3 { margin: 3px 0 4px; font-size: 18px; }
.finance-settlement-card > header p,
.finance-settlement-card > header span { margin: 0; color: var(--text-soft); font-size: 13px; }
.finance-settlement-card > footer { flex-wrap: wrap; justify-content: flex-end; background: var(--bg); }

.finance-amount-grid,
.finance-allocation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--surface-muted);
}

.finance-amount-grid > div,
.finance-allocation-grid > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 15px 18px;
  border-right: 1px solid var(--surface-muted);
}

.finance-amount-grid > div:last-child,
.finance-allocation-grid > div:last-child { border-right: 0; }
.finance-amount-grid span,
.finance-allocation-grid span { color: var(--text-soft); font-size: 12px; }
.finance-amount-grid strong,
.finance-allocation-grid strong { overflow-wrap: break-word; font-size: 16px; }
.finance-allocation-grid { background: var(--surface); }
.is-error { color: var(--red) !important; }

.finance-formulas { padding: 13px 18px; border-bottom: 1px solid var(--surface-muted); }
.finance-formulas summary { min-height: 44px; display: flex; align-items: center; color: var(--primary-dark); font-weight: 700; cursor: pointer; }
.finance-formulas > div { display: grid; gap: 8px; padding: 8px 0; }
.finance-formulas p { display: grid; gap: 3px; margin: 0 0 7px; }
.finance-formulas p span { color: var(--text-soft); }
.finance-formulas code { display: block; padding: 8px 10px; white-space: normal; color: var(--text); border-radius: 8px; background: var(--surface-muted); }

.finance-document-row {
  display: grid;
  grid-template-columns: 44px minmax(210px, 1fr) minmax(100px, auto) auto minmax(220px, auto);
  gap: 14px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.finance-document-copy { display: grid; gap: 3px; min-width: 0; }
.finance-document-copy > span { color: var(--text-soft); font-size: 12px; }
.finance-document-copy > strong,
.finance-document-copy > small { overflow-wrap: break-word; }
.finance-document-copy > small { color: var(--text-soft); }
.finance-document-amount { font-size: 17px; white-space: normal; }
.finance-document-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }

.finance-alert-count {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  color: var(--red);
  border-radius: 18px;
  background: var(--red-soft);
  font-weight: 700;
}

.finance-alert-list > article {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--red-soft);
  border-radius: 12px;
  background: var(--surface);
}

.finance-alert-list > article > span { width: 38px; height: 38px; color: var(--red); background: var(--red-soft); }
.finance-alert-list > article div { display: grid; gap: 3px; }
.finance-alert-list > article small { color: var(--red); }

.finance-audit-list > div {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(160px, auto);
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.finance-audit-list > div:last-child { border-bottom: 0; }
.finance-audit-list small { color: var(--text-soft); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.finance-empty-state {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 24px;
  color: var(--text-soft);
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--bg);
}
.finance-empty-state p { margin: 0 0 5px; }

.finance-entry-form .form-helper { margin-top: 0; }
.finance-live-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  margin-top: 14px;
  padding: 13px;
  border-radius: 12px;
  background: var(--surface-muted);
}
.finance-live-summary small { grid-column: 1 / -1; color: var(--text-soft); }

.finance-question-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.finance-question-grid article {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 5px 10px;
  min-width: 0;
  padding: 18px;
  background: var(--surface);
}

.finance-question-grid article > span {
  grid-row: 1 / 4;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--surface);
  border-radius: var(--radius-sm);
  background: var(--text);
  font-weight: 700;
}

.finance-question-grid small { color: var(--text-soft); }
.finance-question-grid strong { font-size: 21px; }
.finance-question-grid p { margin: 0; color: var(--text-soft); font-size: 12px; }

.finance-ledger-list,
.finance-deposit-list,
.finance-period-list { display: grid; gap: 10px; }

.finance-ledger-row,
.finance-reconciliation-row,
.finance-deposit-list article,
.finance-period-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.finance-ledger-row > div,
.finance-reconciliation-row > div,
.finance-deposit-list article > div { display: grid; gap: 3px; min-width: 0; }
.finance-ledger-row span,
.finance-reconciliation-row span,
.finance-deposit-list small,
.finance-period-list span { color: var(--text-soft); font-size: 12px; overflow-wrap: break-word; }
.finance-reconciliation-row { border-color: var(--line); background: var(--bg); }
.finance-currency-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.finance-currency-grid label { min-width: 0; }

@media (max-width: 1100px) {
  .finance-document-row { grid-template-columns: 44px minmax(180px, 1fr) auto; }
  .finance-document-row > .pill { justify-self: start; }
  .finance-document-actions { grid-column: 2 / -1; justify-content: flex-start; }
  .finance-question-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .finance-principle-banner .panel-header,
  .finance-settlement-card > header { align-items: flex-start; flex-direction: column; }
  .finance-connector-strip { grid-template-columns: 1fr; margin: 0 14px 14px; }
  .finance-connector-strip small { text-align: left; }
  .finance-amount-grid,
  .finance-allocation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-amount-grid > div:nth-child(2),
  .finance-allocation-grid > div:nth-child(2) { border-right: 0; }
  .finance-amount-grid > div:nth-child(-n + 2),
  .finance-allocation-grid > div:nth-child(-n + 2) { border-bottom: 1px solid var(--surface-muted); }
  .finance-document-row { grid-template-columns: 44px minmax(0, 1fr); }
  .finance-document-amount,
  .finance-document-row > .pill,
  .finance-document-actions { grid-column: 2; }
  .finance-document-actions { justify-content: stretch; }
  .finance-document-actions .button { width: 100%; min-height: 44px; }
  .finance-audit-list > div { grid-template-columns: 1fr; gap: 3px; }
  .finance-question-grid,
  .finance-currency-grid { grid-template-columns: 1fr; }
  .finance-ledger-row,
  .finance-reconciliation-row,
  .finance-deposit-list article,
  .finance-period-list article { align-items: flex-start; flex-direction: column; }
  .finance-ledger-row .button,
  .finance-reconciliation-row .button { width: 100%; min-height: 44px; }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.5;
}

.lab-banner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 7px 18px;
  color: var(--text);
  background: var(--surface-strong);
  border-bottom: 1px solid var(--primary);
  font-size: 12px;
  letter-spacing: normal;
}

.lab-banner strong {
  padding: 2px 7px;
  color: var(--surface);
  background: var(--text);
  border-radius: var(--radius-sm);
  font-size: 11px;
  letter-spacing: normal;
}

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

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.app-shell {
  min-height: calc(100vh - 34px);
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  background: var(--text);
  color: var(--surface-muted);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 34px);
  position: sticky;
  top: 0;
}

.brand {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 6px 8px 22px;
  border-bottom: 1px solid color-mix(in srgb, var(--surface-muted) 12%, transparent);
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: var(--surface);
  border-radius: 8px;
  padding: 6px;
  box-shadow: var(--shadow-glass-sm);
}

.brand strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.brand span,
.sidebar-footer p {
  display: block;
  color: color-mix(in srgb, var(--surface-muted) 72%, transparent);
  font-size: 13px;
  margin-top: 3px;
}

.nav-list {
  display: grid;
  gap: 4px;
  padding: 20px 0;
}

.nav-section-label {
  margin: 15px 12px 3px;
  color: color-mix(in srgb, var(--surface-muted) 48%, transparent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: uppercase;
}

.nav-section-label:first-child {
  margin-top: 0;
}

.nav-item {
  min-height: 44px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  color: color-mix(in srgb, var(--surface-muted) 74%, transparent);
  background: transparent;
  text-align: left;
  padding: 11px 12px;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}.nav-item.is-active {
  background: color-mix(in srgb, var(--surface-muted) 9%, transparent);
  color: var(--surface);
}
@media (hover: hover) and (pointer: fine) {
.nav-item:hover {
  background: color-mix(in srgb, var(--surface-muted) 9%, transparent);
  color: var(--surface);
}
}

.nav-item.is-active {
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav-item-lab {
  color: var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nav-item-lab small {
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--line-strong) 34%, transparent);
  border-radius: var(--radius-sm);
  color: var(--line-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: normal;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid color-mix(in srgb, var(--surface-muted) 14%, transparent);
  padding: 16px 8px 4px;
}

.small-label,
.eyebrow {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.sidebar .small-label {
  color: color-mix(in srgb, var(--surface-muted) 54%, transparent);
}

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

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.page-subnav {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-height: 50px;
  margin: -12px 0 22px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 94%, var(--primary-soft));
  scrollbar-width: thin;
}

.page-subnav[hidden] {
  display: none;
}

.page-subnav-item {
  min-width: max-content;
  min-height: 42px;
  padding: 9px 15px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
.page-subnav-item:hover {
  background: var(--surface-muted);
  color: var(--text);
}
}

.page-subnav-item.is-active {
  background: var(--surface);
  color: var(--primary-strong);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--text) 11%, transparent), inset 0 -2px 0 var(--primary);
}

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

h1 {
  font-size: 32px;
  line-height: 1.14;
  margin-bottom: 0;
}

h2 {
  font-size: 21px;
  line-height: 1.2;
  margin-bottom: 6px;
}

h3 {
  font-size: 16px;
  line-height: 1.25;
  margin-bottom: 10px;
}

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

input,
select,
textarea {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  min-height: 42px;
  border-radius: 8px;
  padding: 9px 11px;
  width: 100%;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 8%, transparent);
}

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

.button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 42px;
  padding: 9px 14px;
  font-weight: 600;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
.button:hover, .icon-button:hover {
  transform: none;
}
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.button-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-glass-sm);
}
@media (hover: hover) and (pointer: fine) {
.button-primary:hover {
  background: var(--primary-hover);
}
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}
@media (hover: hover) and (pointer: fine) {
.button-secondary:hover {
  border-color: var(--line-strong);
  background: var(--surface-muted);
}
}

.button-quiet {
  background: transparent;
  color: var(--primary-dark);
  border-color: var(--line);
}
@media (hover: hover) and (pointer: fine) {
.button-quiet:hover {
  background: var(--primary-soft);
}
}

.button-danger {
  background: var(--surface);
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 35%, var(--line));
}
@media (hover: hover) and (pointer: fine) {
.button-danger:hover {
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
  border-color: var(--red);
}
}

.icon-button {
  width: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 22px;
}

.view {
  display: none;
}

.is-hidden {
  display: none !important;
}

.company-fields {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.company-fields-header {
  display: grid;
  gap: 3px;
}

.company-fields-header strong {
  color: var(--text);
  font-size: 14px;
}

.company-fields-header span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.view.is-active {
  display: block;
}

.global-result {
  min-height: 88px;
  display: grid;
  justify-items: start;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 11px;
  text-align: left;
}
@media (hover: hover) and (pointer: fine) {
.global-result:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
}

.global-result strong,
.global-result span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
}

.global-result span {
  color: var(--text-soft);
  font-size: 13px;
}

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

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-glass-sm);
}

.panel-header {
  min-height: 64px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.panel-header > div {
  min-width: 0;
}

.panel-header p {
  color: var(--text-soft);
  margin-bottom: 0;
}

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

.panel-body {
  padding: 18px 20px 20px;
}

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

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.stat-card {
  min-height: 118px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-card strong {
  font-size: 32px;
  line-height: 1;
}

.stat-card span {
  color: var(--text-soft);
  font-weight: 600;
}

.stat-card small {
  color: var(--text-muted);
}

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

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

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

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

.internal-doc-card .row-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.internal-doc-card .pill {
  justify-self: start;
}

.internal-doc-card .row-title {
  max-width: 36rem;
  font-size: 18px;
  line-height: 1.25;
}

.internal-doc-card .row-meta {
  max-width: 44rem;
  font-size: 16px;
  line-height: 1.5;
}

.internal-doc-card .table-actions {
  margin-top: auto;
}

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

.internal-doc-row {
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
}

.contract-builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 18px;
  align-items: start;
}

.contract-builder-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.contract-simple-form fieldset {
  gap: 14px;
}

.contract-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 12px 14px;
}

.contract-details summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
}

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

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

.contract-check-grid label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.contract-check-grid input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

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

.contract-property-picker-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.contract-property-picker-header strong {
  color: var(--text);
}

.contract-property-picker-header span,
.contract-property-option small {
  color: var(--muted);
}

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

.contract-property-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.contract-property-option input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
}

.contract-property-option span {
  display: grid;
  gap: 2px;
}

.contract-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.contract-output {
  display: grid;
  gap: 8px;
  align-self: stretch;
  min-height: 100%;
}

.contract-output-header {
  display: grid;
  gap: 3px;
}

.contract-output-header span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.contract-output-header small {
  color: var(--text-muted);
  font-size: 12px;
}

.contract-output-preview {
  min-height: 760px;
  max-height: 900px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: normal;
}

.contract-placeholder {
  color: var(--red);
  background: var(--red-soft);
  border-radius: 4px;
  padding: 0 3px;
  font-weight: 600;
}

.row-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  display: grid;
  gap: 8px;
  min-width: 0;
}
@media (hover: hover) and (pointer: fine) {
.row-card.is-clickable:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
}

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

.row-top > div {
  min-width: 0;
  flex: 1 1 auto;
}

.row-top > .pill {
  flex: 0 0 auto;
  max-width: min(180px, 45%);
  justify-content: center;
  text-align: center;
}

.row-title {
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.row-meta {
  color: var(--text-soft);
  font-size: 13px;
  margin: 0;
  line-height: 1.45;
  overflow-wrap: break-word;
}

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

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

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.table-actions-inline {
  margin-top: 10px;
}

.document-library-body,
.document-card-list,
.document-expiry-list {
  display: grid;
  gap: 14px;
}

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

.document-search-form label,
.document-metadata-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.document-search-form label > span,
.document-metadata-form label > span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.document-search-wide {
  grid-column: span 2;
}

.document-search-actions,
.document-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.document-library-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.document-card-heading,
.document-file-list > div {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.document-card-heading h3,
.document-card-heading p {
  margin: 0;
  overflow-wrap: break-word;
}

.document-card-heading p,
.document-search-snippet,
.document-expiry-list small {
  color: var(--text-soft);
}

.document-search-snippet {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-muted);
  overflow-wrap: break-word;
}

.document-search-snippet mark {
  background: var(--amber-soft);
}

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

.document-facts > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.document-facts dt {
  color: var(--text-soft);
  font-size: 12px;
}

.document-facts dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: break-word;
}

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

.document-file-list > div {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.document-file-list span {
  min-width: 0;
  overflow-wrap: break-word;
}

.document-metadata-details {
  min-width: 0;
}

.document-metadata-details summary {
  list-style: none;
  cursor: pointer;
}

.document-metadata-details summary::-webkit-details-marker {
  display: none;
}

.document-metadata-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
}

.document-metadata-form small,
.form-help {
  color: var(--text-soft);
  line-height: 1.4;
}

.button-small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.path-preview {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.path-preview span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

code {
  overflow-wrap: break-word;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  color: var(--text);
  background: var(--surface-strong);
  border-radius: 6px;
  padding: 2px 5px;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-height: 25px;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface);
  color: var(--text-soft);
  border: 1px solid var(--line);
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.25;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.82;
  flex: 0 0 auto;
}

.pill.green {
  color: var(--green);
  background: var(--green-soft);
  border-color: var(--line);
}

.pill.amber {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: var(--amber-soft);
}

.pill.red {
  color: var(--red);
  background: var(--red-soft);
  border-color: var(--red-soft);
}

.pill.blue {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: var(--blue-soft);
}

.pill.pink {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: var(--primary-soft);
}

.pill.teal {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: var(--line);
}

.layout-two {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  gap: 16px;
  min-width: 0;
}

.property-card {
  grid-template-columns: 104px minmax(0, 1fr);
  text-align: left;
  align-items: stretch;
  padding: 10px;
  min-width: 0;
}

.property-card-content {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
}

.property-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface-strong), var(--primary-soft));
  border: 1px solid var(--line);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  font-weight: 700;
}

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

.property-cover-detail {
  width: 112px;
  aspect-ratio: 16 / 10;
  flex: 0 0 auto;
}

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

.property-detail-title > div:last-child {
  min-width: 0;
}

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

.segmented {
  display: flex;
  gap: 4px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  overflow-x: auto;
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 6px 10px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 600;
  white-space: normal;
}

.segmented button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-glass-sm);
}

.detail-empty {
  min-height: 520px;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  text-align: center;
  padding: 28px;
}

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

.detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  min-height: 112px;
  background: var(--surface);
  overflow: hidden;
}

.detail-section.full {
  grid-column: 1 / -1;
}

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

.section-heading-row h3 {
  margin: 0;
}

.publication-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.listing-workbench {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(150px, 1.05fr) minmax(120px, 0.8fr) minmax(0, 1.25fr);
  gap: 12px;
  min-width: 0;
}

.listing-workbench > div {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.listing-workbench .pill-row {
  min-width: 0;
  max-width: 100%;
}

.listing-workbench .pill {
  min-width: 0;
  max-width: 100%;
  font-size: 11px;
  padding-inline: 7px;
}

.mini-kv {
  display: grid;
  gap: 7px;
  margin: 0;
}

.mini-kv div {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
  gap: 10px;
  font-size: 13px;
  min-width: 0;
}

.mini-kv dt {
  color: var(--text-soft);
}

.mini-kv dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  min-width: 0;
  overflow-wrap: break-word;
}

.photo-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.photo-strip a,
.photo-count {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--surface-strong);
  flex: 0 0 auto;
}

.partner-link-controls {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  min-width: 0;
}

.partner-link-controls.is-compact {
  margin-top: 4px;
}

.partner-link-controls p,
.service-link-block p {
  margin: 0;
}

.warning-text {
  color: var(--amber);
}

.service-link-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  min-width: 0;
  overflow-wrap: break-word;
}

.partner-link-manual-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--amber);
  border-radius: 8px;
  background: var(--amber-soft);
}

.partner-link-manual-copy input {
  width: 100%;
  min-width: 0;
}

.service-photo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.service-photo-strip a,
.service-photo-strip img {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 8px;
}

.service-photo-strip img {
  object-fit: cover;
  border: 1px solid var(--line);
}

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

.photo-count {
  display: grid;
  place-items: center;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.calendar-block-form {
  display: grid;
  gap: 12px;
  width: min(100%, 820px);
  margin-inline: auto;
}

.calendar-rate-form {
  display: grid;
  gap: 14px;
  width: min(100%, 820px);
  margin-inline: auto;
}

.calendar-rate-form label small {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.optional-label {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
}

.calendar-rate-recap {
  width: min(100%, 820px);
  margin: 22px auto 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  box-sizing: border-box;
}

.calendar-rate-recap h3,
.calendar-rate-recap p {
  margin: 0;
}

.calendar-rate-recap dl {
  display: grid;
  gap: 0;
  margin: 14px 0;
}

.calendar-rate-recap dl > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
}

.calendar-rate-recap dt {
  color: var(--text-soft);
  font-weight: 600;
}

.calendar-rate-recap dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  overflow-wrap: break-word;
}

.calendar-rate-warning {
  margin-bottom: 12px !important;
  line-height: 1.5;
}

.calendar-rate-recap .button {
  min-height: 44px;
  margin-top: 14px;
}

.calendar-block-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 4px;
}

.calendar-block-form-footer .form-helper {
  max-width: 590px;
  margin: 0;
  line-height: 1.5;
}

.calendar-block-form-footer .button {
  min-width: 178px;
  flex: 0 0 auto;
}

.calendar-source-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.photo-tool-layout,
.account-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(360px, 1.2fr);
  gap: 16px;
  align-items: start;
}

.photo-tool-form,
.account-form {
  display: grid;
  gap: 14px;
}

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

.photo-tool-result,
.account-list {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 15px;
  display: grid;
  gap: 12px;
}

.photo-result-list {
  display: grid;
  gap: 8px;
  max-height: 440px;
  overflow: auto;
  padding-right: 2px;
}

.photo-result-row {
  gap: 10px;
}

.photo-result-actions {
  justify-content: flex-start;
  margin: 8px 0 0;
}

.photo-submit-button {
  width: 100%;
  min-height: 52px;
}

.photo-auto-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(145deg, var(--bg) 0%, var(--surface) 72%);
}

.photo-auto-heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.photo-auto-heading p {
  margin: 4px 0 0;
  color: var(--text-soft);
  line-height: 1.45;
}

.photo-auto-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 9px;
  background: var(--primary);
  color: var(--on-primary);
}

.photo-auto-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
}

.photo-auto-features {
  display: grid;
  gap: 8px;
}

.photo-auto-features span {
  position: relative;
  padding-left: 22px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
}

.photo-auto-features span::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}

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

.photo-custom-details summary {
  min-height: 24px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.photo-custom-details summary span {
  color: var(--text-soft);
  font-weight: 600;
}

.photo-custom-details[open] summary {
  margin-bottom: 12px;
}

.photo-custom-details label {
  display: grid;
  gap: 7px;
}

.photo-progress {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.photo-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

.photo-progress-top span {
  font-weight: 700;
  color: var(--primary-dark);
}

.photo-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--line);
}

.photo-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transform: scaleX(var(--photo-progress, 0));
  transform-origin: left;
  transition: transform 300ms var(--ease-out);
}

.photo-progress p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.photo-history-list {
  display: grid;
  gap: 10px;
  max-height: 680px;
  overflow: auto;
  padding-right: 2px;
}

.photo-history-item {
  gap: 10px;
}

.photo-history-details {
  margin-top: 4px;
}

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

.photo-style-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.photo-style-option:has(input:checked) {
  border-color: var(--line);
  background: var(--primary-soft);
}

.photo-style-option input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
  accent-color: var(--primary);
}

.photo-style-option span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.photo-style-option strong,
.photo-style-option small {
  overflow-wrap: break-word;
}

.photo-style-option small {
  color: var(--text-soft);
  font-weight: 600;
  line-height: 1.35;
}

.account-table {
  min-width: 760px;
}

.account-table-wrap {
  max-width: 100%;
}

.password-strength {
  margin: -4px 0 2px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.ical-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding-top: 6px;
}

.ical-copy-row code {
  display: block;
  min-width: 0;
}

.ical-copy-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.import-context {
  margin-top: 6px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
}

.pricing-capture-tool {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--primary-soft);
}

.pricing-capture-tool div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pricing-capture-tool span,
.pricing-image-preview span,
.pricing-rates-preview .muted {
  color: var(--text-soft);
  font-size: 13px;
}

.pricing-image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pricing-image-preview span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.pricing-rates-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.pricing-rates-preview:empty {
  display: none;
}

.pricing-rate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: start;
  font-size: 13px;
}

.pricing-rate-grid span {
  min-width: 0;
  overflow-wrap: break-word;
  color: var(--text-soft);
}

.kv-grid {
  display: grid;
  gap: 9px;
}

.kv-grid div {
  display: grid;
  grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  border-bottom: 1px solid var(--surface-muted);
  padding-bottom: 7px;
  min-width: 0;
}

.kv-grid dt {
  color: var(--text-soft);
  font-weight: 600;
  min-width: 0;
}

.kv-grid dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.35;
}

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

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

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

th {
  color: var(--text-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: normal;
  background: var(--bg);
}

tr:last-child td {
  border-bottom: 0;
}

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

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

.time-block {
  font-weight: 700;
  color: var(--primary-dark);
}

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

.calendar-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.segmented-control {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.segmented-control button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.segmented-control button.is-active {
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: var(--shadow-glass-sm);
}

.calendar-controls-inline {
  justify-content: center;
  margin: 4px 0 14px;
}

.calendar-controls strong {
  min-width: 150px;
  text-align: center;
  text-transform: none;
}

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

.month-weekday {
  min-height: 38px;
  background: var(--surface-muted);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: normal;
}

.month-cell {
  min-height: 128px;
  background: var(--surface);
  padding: 9px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.month-cell.is-muted {
  background: var(--bg);
}

.month-cell.is-today {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 70%, transparent);
}

.month-day {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--text);
}

.is-today .month-day {
  background: var(--primary);
  color: var(--on-primary);
}

.month-events {
  display: grid;
  gap: 5px;
}

.month-event,
.month-more {
  min-height: 22px;
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  background: var(--surface);
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-left-width: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-event.green {
  background: var(--green-soft);
  color: var(--green);
  border-color: var(--line);
}

.month-event.blue {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: var(--blue-soft);
}

.month-event.amber {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: var(--amber-soft);
}

.month-event.red {
  background: var(--red-soft);
  color: var(--red);
  border-color: var(--red-soft);
}

.month-event.teal {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: var(--line);
}

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

.owner-calendar-toolbar label {
  min-width: min(360px, 100%);
}

.calendar-page-header {
  display: block;
  padding-bottom: 0;
}

.calendar-page-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.calendar-view-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 20px;
  border-bottom: 1px solid var(--line);
}

.calendar-view-tabs button {
  min-height: 42px;
  margin-bottom: -1px;
  padding: 0 2px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font-weight: 700;
  transition: color 180ms ease, border-color 180ms ease;
}.calendar-view-tabs button.is-active {
  border-bottom-color: var(--primary);
  color: var(--text);
}
@media (hover: hover) and (pointer: fine) {
.calendar-view-tabs button:hover {
  border-bottom-color: var(--primary);
  color: var(--text);
}
}

.calendar-planning-body {
  padding-top: 16px;
}

.calendar-filter-strip {
  display: grid;
  grid-template-columns: auto minmax(170px, 1fr) minmax(150px, 0.8fr) minmax(190px, 1.2fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
}

.calendar-filter-strip label {
  min-width: 0;
}

.calendar-filter-strip label > span {
  display: block;
  margin: 0 0 4px 2px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
}

.calendar-filter-strip select {
  width: 100%;
  min-height: 42px;
}

.calendar-availability-label {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--primary);
  border-radius: 7px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  white-space: nowrap;
}

.calendar-occupancy-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.calendar-occupancy-switch button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}.calendar-occupancy-switch button.is-active {
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: var(--shadow-glass-sm);
}
@media (hover: hover) and (pointer: fine) {
.calendar-occupancy-switch button:hover {
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: var(--shadow-glass-sm);
}
}

.calendar-page-header .eyebrow,
.reservation-hero .eyebrow {
  margin-bottom: 5px;
}

.calendar-health-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}

.calendar-health-strip > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  min-height: 48px;
  padding: 9px 14px;
  border-right: 1px solid var(--line);
}

.calendar-health-strip > div:last-child {
  border-right: 0;
}

.calendar-health-strip strong {
  color: var(--primary-dark);
  font-size: 19px;
  font-weight: 700;
}

.calendar-health-strip span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.calendar-navigation {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 1fr);
  align-items: center;
  gap: 16px;
  margin: 4px 0 12px;
}

.calendar-navigation > strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-transform: none;
  white-space: nowrap;
}

.calendar-navigation-buttons {
  display: flex;
  align-items: center;
  gap: 7px;
}

.calendar-icon-button,
.calendar-detail-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-soft);
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
.calendar-icon-button:hover, .calendar-detail-close:hover {
  border-color: var(--line-strong);
  background: var(--primary-soft);
  color: var(--primary-dark);
}
}

.calendar-icon-button svg,
.calendar-detail-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-navigation .calendar-legends {
  justify-items: end;
}

.calendar-navigation .occupancy-legend {
  padding-top: 0;
  border-top: 0;
}

.calendar-legends {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.owner-calendar-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.airbnb {
  background: var(--primary);
}

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

.legend-dot.abritel {
  background: var(--amber);
}

.legend-dot.gites-france {
  background: var(--primary);
}

.legend-dot.miguel {
  background: var(--text-soft);
}

.occupancy-legend {
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.legend-occupancy {
  width: 18px;
  height: 10px;
  display: inline-block;
  border: 1px solid var(--text-soft);
  border-radius: 3px;
  background: var(--surface-muted);
}

.legend-occupancy.is-blocked {
  border-style: dashed;
  background-image: repeating-linear-gradient(135deg, transparent 0 3px, color-mix(in srgb, var(--text-soft) 20%, transparent) 3px 5px);
}

.legend-occupancy.is-unqualified {
  border-color: var(--amber);
  background: var(--amber-soft);
  box-shadow: inset 0 0 0 1px var(--surface);
}

.owner-calendar-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.owner-calendar-summary strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.owner-calendar-summary span {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}

.owner-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 16px;
  align-items: start;
}

.owner-calendar-layout > * {
  min-width: 0;
}

.owner-calendar-layout-timeline {
  grid-template-columns: minmax(0, 1fr);
}

.owner-calendar-summary-timeline {
  margin-top: 2px;
}

.owner-calendar-legend-bottom {
  justify-content: flex-start;
  margin-top: 10px;
}

.calendar-selected-detail {
  margin-top: 12px;
}

.calendar-selected-detail .owner-calendar-detail {
  position: static;
}

.legend-dot.weekend {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid var(--line);
}

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

.owner-month-weekday {
  min-height: 38px;
  background: var(--surface-muted);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.owner-month-weekday:nth-child(7) {
  border-right: 0;
}

.owner-month-week {
  grid-column: 1 / -1;
  position: relative;
  min-height: calc(80px + (var(--lane-count, 1) * 43px));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.owner-month-week:last-child {
  border-bottom: 0;
}

.owner-month-week-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.owner-month-bars {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: 42px;
  padding: 42px 8px 8px;
  pointer-events: none;
}

.owner-month-cell {
  min-height: 100%;
  background: var(--surface);
  padding: 8px;
  border-right: 1px solid var(--line);
}

.owner-month-cell.is-muted {
  background: var(--bg);
}

.owner-month-cell:nth-child(7) {
  border-right: 0;
}

.owner-month-cell.is-today {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 65%, transparent);
}

.owner-month-day {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--text);
}

.owner-month-cell.is-today .owner-month-day {
  background: var(--primary);
  color: var(--on-primary);
}

.owner-calendar-event {
  width: 100%;
  height: 36px;
  border-radius: 7px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  padding: 4px 9px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  align-self: start;
  pointer-events: auto;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.owner-calendar-event.continues-before {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left-width: 1px;
}

.owner-calendar-event.continues-after {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}.owner-calendar-event.is-selected {
  box-shadow: var(--shadow-glass-sm);
}
@media (hover: hover) and (pointer: fine) {
.owner-calendar-event:hover {
  box-shadow: var(--shadow-glass-sm);
}
}

.owner-calendar-event.airbnb {
  background: var(--primary-soft);
  border-color: var(--primary-soft);
  border-left-color: var(--primary);
}

.owner-calendar-event.booking {
  background: var(--blue-soft);
  border-color: var(--blue-soft);
  border-left-color: var(--blue);
}

.owner-calendar-event.gites-france {
  background: var(--surface-muted);
  border-color: var(--line);
  border-left-color: var(--primary);
}

.owner-calendar-event.miguel,
.owner-calendar-event.other {
  background: var(--bg);
  border-color: var(--line);
  border-left-color: var(--text-soft);
}

.owner-calendar-event-property,
.owner-calendar-event-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-calendar-event-property {
  font-size: 12px;
  font-weight: 700;
}

.owner-calendar-event-meta {
  margin-top: 1px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.owner-calendar-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  position: sticky;
  top: 12px;
}

.owner-calendar-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.owner-calendar-detail-header > div {
  display: grid;
  gap: 8px;
}

.owner-calendar-detail-header strong {
  font-size: 20px;
  line-height: 1.2;
  color: var(--text);
}

.owner-calendar-platform {
  width: fit-content;
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.owner-calendar-platform.airbnb {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.owner-calendar-platform.booking {
  background: var(--blue-soft);
  color: var(--blue);
}

.owner-calendar-platform.abritel {
  background: var(--amber-soft);
  color: var(--amber);
}

.owner-calendar-platform.gites-france {
  background: var(--surface-muted);
  color: var(--primary-dark);
}

.owner-calendar-platform.miguel,
.owner-calendar-platform.other,
.owner-calendar-platform.direct {
  background: var(--surface-muted);
  color: var(--text-soft);
}

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

.owner-calendar-detail-grid div,
.owner-calendar-detail-notes {
  border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  padding-top: 10px;
}

.owner-calendar-detail-grid dt {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.owner-calendar-detail-grid dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.owner-calendar-detail-notes {
  margin-top: 12px;
}

.owner-calendar-detail-notes strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text);
}

.owner-calendar-detail-notes ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.owner-calendar-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.owner-calendar-detail-actions .button {
  min-height: 44px;
}

.owner-calendar-delete-help {
  margin: 9px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.reservation-list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}

.reservation-list-header strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.reservation-list {
  display: grid;
  gap: 9px;
}

.reservation-list-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1.4fr) minmax(280px, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
.reservation-list-item:hover {
  box-shadow: var(--shadow-glass-sm);
}
}

.reservation-list-item.airbnb {
  border-left-color: var(--primary);
  background: linear-gradient(90deg, var(--surface) 0, var(--surface) 30%);
}

.reservation-list-item.booking {
  border-left-color: var(--blue);
  background: linear-gradient(90deg, var(--blue-soft) 0, var(--surface) 30%);
}

.reservation-list-item.gites-france {
  border-left-color: var(--primary);
  background: linear-gradient(90deg, var(--bg) 0, var(--surface) 30%);
}

.reservation-list-item.miguel,
.reservation-list-item.other {
  border-left-color: var(--text-soft);
}

.reservation-list-item.is-blocked {
  background: linear-gradient(90deg, var(--amber-soft) 0, var(--surface) 34%);
}

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

.reservation-list-date {
  display: grid;
  gap: 2px;
  color: var(--primary-dark);
}

.reservation-list-date strong {
  font-size: 20px;
  font-weight: 700;
  text-transform: none;
}

.reservation-list-date span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.reservation-list-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.reservation-list-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.reservation-list-info dt {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.reservation-list-info dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: clip;
}

.reservation-page {
  gap: 18px;
}

.reservation-hero {
  overflow: hidden;
  background: linear-gradient(125deg, var(--surface) 0%, var(--surface) 60%, var(--surface-muted) 100%);
}

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

.reservation-kpi {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  min-height: 90px;
  align-content: center;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.reservation-kpi span,
.reservation-kpi small {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.reservation-kpi span {
  align-self: end;
  text-transform: uppercase;
}

.reservation-kpi strong {
  grid-row: span 2;
  color: var(--primary-dark);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.reservation-kpi.is-soon {
  border-color: var(--blue-soft);
  background: var(--bg);
}

.reservation-kpi.is-attention {
  border-color: var(--amber-soft);
  background: var(--amber-soft);
}

.reservation-kpi.is-attention strong {
  color: var(--amber);
}

.reservation-kpi.is-complete {
  border-color: var(--green-soft);
  background: var(--bg);
}

.reservation-list-heading {
  align-items: center;
}

.reservation-filter-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

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

.managed-reservation-row {
  display: flex;
  flex-wrap: wrap;
  /* Les valeurs longues restent lisibles par retour à la ligne. */
  overflow: visible;
  gap: 16px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 5px solid var(--text-soft);
  border-radius: 10px;
  padding: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-glass-sm);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
.managed-reservation-row:hover {
  box-shadow: var(--shadow-glass-sm);
}
}

.managed-reservation-row.airbnb { border-left-color: var(--primary); }
.managed-reservation-row.booking { border-left-color: var(--blue); }
.managed-reservation-row.abritel { border-left-color: var(--amber); }
.managed-reservation-row.gites-france { border-left-color: var(--primary); }
.managed-reservation-row.direct { border-left-color: var(--primary); }
.managed-reservation-row.is-cancelled {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.managed-reservation-dates {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1px 8px;
}

.managed-reservation-dates > span:first-child {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.managed-reservation-dates strong {
  grid-column: 1;
  color: var(--primary-dark);
  font-size: 19px;
  font-weight: 700;
  text-transform: none;
}

.managed-reservation-dates small {
  grid-column: 1;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.managed-reservation-dates i {
  grid-column: 2;
  grid-row: 1 / span 3;
  width: 1px;
  height: 42px;
  background: var(--line);
}

.managed-reservation-dates > span:last-child {
  grid-column: 1 / -1;
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
}

.managed-reservation-property,
.managed-reservation-contact {
  flex: 1 1 11rem;
  min-width: 0;
}

.managed-reservation-guest {
  display: flex;
  flex-wrap: wrap;
  flex: 3 1 26rem;
  min-width: 0;
  gap: 9px;
  margin: 0;
}

.managed-reservation-guest > div {
  flex: 1 1 6rem;
  min-width: 0;
}

.managed-reservation-guest dt,
.managed-reservation-contact > span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.managed-reservation-guest dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.managed-reservation-contact {
  display: grid;
  gap: 3px;
}

.managed-reservation-contact a,
.managed-reservation-contact strong {
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
  white-space: normal;
}
@media (hover: hover) and (pointer: fine) {
.managed-reservation-contact a:hover {
  color: var(--primary-dark);
}
}

.managed-reservation-contact small {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
}

.reservation-attention { color: var(--amber); }
.reservation-ready { color: var(--green); }
.reservation-new-count { color: var(--blue); }

.managed-reservation-action {
  display: flex;
  flex: 0 0 auto;
  margin-left: auto;
  justify-content: flex-end;
}

.managed-reservation-action .button {
  flex: 0 0 auto;
  min-width: 0;
  white-space: normal;
}

.property-timeline-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.owner-site-timeline {
  border-radius: 8px;
  cursor: grab;
  user-select: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

.property-timeline-inner {
  min-width: max-content;
}

.property-timeline-month-row,
.property-timeline-day-row,
.property-timeline-row {
  display: flex;
}

.property-timeline-month-row {
  background: var(--surface-muted);
  border-bottom: 1px solid var(--line);
}

.property-timeline-label-pad,
.property-timeline-day-pad {
  flex: 0 0 auto;
  position: sticky;
  left: 0;
  z-index: 20;
  background: var(--surface-muted);
  border-right: 2px solid var(--line);
  box-shadow: var(--shadow-glass-sm);
}

.property-timeline-month-label {
  flex: 0 0 auto;
  min-height: 30px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  border-left: 1px solid var(--line);
}

.property-timeline-day-row {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.property-timeline-day-pad {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
}

.property-timeline-day {
  flex: 0 0 auto;
  min-height: 46px;
  display: grid;
  place-items: center;
  gap: 1px;
  color: var(--text-soft);
  font-size: 11px;
  border-left: 1px solid var(--line);
  box-sizing: border-box;
}

.property-timeline-day span {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.7;
}

.property-timeline-day strong {
  font-size: 12px;
  color: var(--text);
}

.property-timeline-day.week-start,
.property-timeline-cell.week-start {
  border-left-color: var(--line);
}

.property-timeline-day.saturday,
.property-timeline-cell.saturday {
  background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.property-timeline-day.weekend,
.property-timeline-cell.weekend {
  background: color-mix(in srgb, var(--primary) 4.5%, transparent);
}

.property-timeline-day.today strong {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--primary);
  color: var(--on-primary);
}

.property-timeline-body {
  position: relative;
}

.property-timeline-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: color-mix(in srgb, var(--primary) 55%, transparent);
  z-index: 6;
  pointer-events: none;
}

.property-timeline-row {
  min-height: var(--row-height, 56px);
  border-bottom: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  transition: background-color 160ms ease;
}

.property-timeline-row:last-child {
  border-bottom: 0;
}

.property-timeline-name {
  flex: 0 0 auto;
  position: sticky;
  left: 0;
  z-index: 20;
  min-height: var(--row-height, 56px);
  border: 0;
  border-right: 2px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-glass-sm);
  padding: 7px 12px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
.property-timeline-row:hover .property-timeline-name, .property-timeline-row:hover .property-timeline-track {
  background-color: var(--surface);
}
}

.property-timeline-name strong,
.property-timeline-name span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-timeline-name strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.property-timeline-name span {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.property-timeline-track {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  min-height: var(--row-height, 56px);
}

.property-timeline-cell {
  position: relative;
  flex: 0 0 auto;
  min-height: var(--row-height, 56px);
  border-left: 1px solid var(--line);
  box-sizing: border-box;
}

.property-timeline-rate {
  position: absolute;
  right: 2px;
  bottom: 2px;
  left: 2px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 12px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-timeline-cell.today {
  background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.property-timeline-bar {
  position: absolute;
  height: 28px;
  gap: 6px;
  border-radius: 3px;
  padding: 0 10px 0 7px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: var(--shadow-glass-sm);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: box-shadow 160ms ease, filter 160ms ease;
  clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
}.property-timeline-bar.is-selected {
  filter: brightness(1.03);
  box-shadow: var(--shadow-glass-sm);
  z-index: 8;
}
@media (hover: hover) and (pointer: fine) {
.property-timeline-bar:hover {
  filter: brightness(1.03);
  box-shadow: var(--shadow-glass-sm);
  z-index: 8;
}
}

.property-timeline-bar .calendar-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-platform-mark {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--surface) 74%, transparent);
  border-radius: var(--radius-sm);
  aspect-ratio: 1;
  box-sizing: border-box;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  box-shadow: var(--shadow-glass-sm);
}

.calendar-platform-mark.airbnb { color: var(--primary-dark); }
.calendar-platform-mark.booking { color: var(--blue); }
.calendar-platform-mark.abritel { color: var(--amber); }
.calendar-platform-mark.gites-france { color: var(--primary-dark); }
.calendar-platform-mark.direct,
.calendar-platform-mark.miguel,
.calendar-platform-mark.other { color: var(--text-soft); }

.property-timeline-bar.clip-l {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
}

.property-timeline-bar.clip-r {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  clip-path: polygon(7px 0, 100% 0, 100% 100%, 0 100%);
}

.property-timeline-bar.clip-l.clip-r {
  clip-path: none;
}

.property-timeline-bar.airbnb {
  background: var(--primary-soft);
  border-color: var(--primary-soft);
  border-left: 5px solid var(--primary);
  color: var(--primary-dark);
}

.property-timeline-bar.booking {
  background: var(--blue-soft);
  border-color: var(--blue-soft);
  border-left: 5px solid var(--blue);
  color: var(--blue);
}

.property-timeline-bar.abritel {
  background: var(--amber-soft);
  border-color: var(--amber-soft);
  border-left: 5px solid var(--amber);
  color: var(--amber);
}

.property-timeline-bar.gites-france {
  background: var(--surface-muted);
  border-color: var(--line);
  border-left: 5px solid var(--primary);
  color: var(--primary-dark);
}

.property-timeline-bar.miguel,
.property-timeline-bar.other,
.property-timeline-bar.direct {
  background: var(--bg);
  border-color: var(--line);
  border-left: 5px solid var(--text-soft);
  color: var(--text-soft);
}

.property-timeline-bar.is-blocked {
  border-color: var(--line-strong);
  border-left-color: var(--text-soft);
  background-color: var(--surface-muted);
  border-top-style: dashed;
  border-right-style: dashed;
  border-bottom-style: dashed;
  background-image: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--text-soft) 12%, transparent) 5px 8px);
  color: var(--text-soft);
}

.property-timeline-bar.is-unqualified {
  background-color: var(--amber-soft);
  color: var(--amber);
  border-top-color: var(--amber);
  border-right-color: var(--amber);
  border-bottom-color: var(--amber);
  box-shadow: inset 0 0 0 1px var(--amber-soft);
}

.property-timeline-bar.is-owner-direct,
.property-timeline-bar.is-unmanaged-reservation {
  border-color: var(--primary);
  border-left-color: var(--primary);
  background: var(--surface-muted);
  color: var(--text);
}

.property-timeline-bar.is-managed-reservation {
  border-color: var(--primary);
  border-left-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 8%, transparent), inset 0 -2px 0 color-mix(in srgb, var(--surface) 18%, transparent);
}

.property-timeline-bar.is-managed-reservation .calendar-platform-mark {
  border-color: color-mix(in srgb, var(--surface) 70%, transparent);
}

.property-timeline-bar:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 28%, transparent), inset 0 0 0 2px var(--surface);
  z-index: 9;
}

.property-timeline-bar.red {
  background: var(--red-soft);
  border-color: var(--red-soft);
  color: var(--red);
}

.property-timeline-bar.green {
  background: var(--green-soft);
  border-color: var(--line);
  color: var(--green);
}

.property-timeline-bar.blue {
  background: var(--blue-soft);
  border-color: var(--blue-soft);
  color: var(--blue);
}

.property-timeline-bar.amber {
  background: var(--amber-soft);
  border-color: var(--amber-soft);
  color: var(--amber);
}

.annual-calendar-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.annual-calendar {
  min-width: 1180px;
}

.annual-calendar-header,
.annual-calendar-row {
  display: grid;
  grid-template-columns: 246px repeat(12, minmax(76px, 1fr));
}

.annual-calendar-header {
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.annual-calendar-header > div {
  display: grid;
  place-items: center;
  border-left: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.annual-calendar-header .annual-property-heading {
  position: sticky;
  left: 0;
  z-index: 20;
  place-items: center start;
  padding-left: 14px;
  border-left: 0;
  border-right: 2px solid var(--line);
  background: var(--surface-muted);
  box-shadow: var(--shadow-glass-sm);
}

.annual-calendar-row {
  min-height: 62px;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}

.annual-calendar-row:last-child {
  border-bottom: 0;
}

.annual-property-name {
  position: sticky;
  left: 0;
  z-index: 20;
  min-width: 0;
  padding: 8px 12px;
  border: 0;
  border-right: 2px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-glass-sm);
  color: var(--text);
  text-align: left;
}

.annual-property-name strong,
.annual-property-name span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.annual-property-name strong {
  font-size: 13px;
  font-weight: 700;
}

.annual-property-name span {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 11px;
}

.annual-month-cell {
  position: relative;
  min-width: 0;
  display: grid;
  place-content: center;
  gap: 1px;
  overflow: hidden;
  border-left: 1px solid var(--line);
  text-align: center;
}

.annual-month-cell span {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.annual-month-cell small {
  position: relative;
  z-index: 1;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
}

.annual-month-cell i {
  position: absolute;
  right: 7px;
  bottom: 5px;
  left: 7px;
  height: 4px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: linear-gradient(to right, var(--primary) var(--annual-occupancy), var(--line) var(--annual-occupancy));
}

.annual-calendar-help {
  margin: 9px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  -webkit-backdrop-filter: var(--backdrop-filter);
  backdrop-filter: var(--backdrop-filter);
  opacity: 0;
  transition: opacity 200ms ease, display 200ms allow-discrete;
  transition-behavior: allow-discrete;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 50;
}

.modal-backdrop.is-open {
  display: flex;
  opacity: 1;
}

@starting-style { .modal-backdrop.is-open { opacity: 0; } }

.modal {
  width: min(980px, 100%);
  max-height: min(92vh, 980px);
  overflow: auto;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow-overlay);
  border: 1px solid var(--line);
}

.modal-small {
  width: min(560px, 100%);
}

.modal-header {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.form-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px 18px;
  margin: 0;
  display: grid;
  align-content: start;
  gap: 12px;
}

#billingItemForm {
  gap: 14px;
}

#billingItemForm fieldset {
  padding: 14px 16px;
  gap: 10px;
}

#billingItemForm input,
#billingItemForm select {
  min-height: 38px;
  padding: 7px 10px;
}

legend {
  font-weight: 700;
  padding: 0 6px;
}

.owner-mode-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
}

.billing-choice-row {
  display: grid;
  gap: 10px;
}

.billing-choice-row label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.billing-choice-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.billing-choice-row span {
  font-weight: 700;
}

.billing-choice-row small {
  grid-column: 2;
  color: var(--text-soft);
  font-weight: 500;
}

.form-helper {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.label-muted {
  color: var(--text-soft);
  font-weight: 600;
}

.owner-mode-switch label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
}

.owner-mode-switch input {
  width: 16px;
  min-height: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

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

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

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-bottom: 12px;
  color: var(--text);
}

.toggle-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.toggle-row input {
  width: 18px;
  min-height: 18px;
}

.toggle-line input {
  width: 18px;
  min-height: 18px;
}

.draft-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.draft-banner div {
  display: grid;
  gap: 3px;
}

.draft-banner strong {
  font-size: 14px;
  color: var(--text);
}

.draft-banner span {
  color: var(--text-soft);
  font-size: 13px;
}

.switch-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 14px;
  color: var(--text);
}

.switch-line-compact {
  margin-bottom: 0;
}

.switch-line input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-ui {
  position: relative;
  width: 66px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--line);
  border: 1px solid var(--line-strong);
  transition: background 160ms ease, border-color 160ms ease;
}

.switch-ui::before {
  content: "OFF";
  position: absolute;
  top: 0;
  right: 8px;
  bottom: 0;
  width: 32px;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: normal;
}

.switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-glass-sm);
  transition: transform 160ms ease;
}

.switch-line input:checked + .switch-ui {
  background: var(--primary);
  border-color: var(--primary);
}

.switch-line input:checked + .switch-ui::before {
  content: "ON";
  left: 10px;
  right: auto;
  color: var(--surface);
}

.switch-line input:checked + .switch-ui::after {
  transform: translateX(38px);
}

.switch-line small {
  display: block;
  margin-top: 3px;
  color: var(--text-soft);
  font-weight: 600;
  line-height: 1.35;
}

.publication-fieldset textarea {
  min-height: 108px;
}

.publication-quick-fieldset {
  background: var(--bg);
  padding-bottom: 16px;
}

.import-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  margin: 8px 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.import-strip div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.import-strip strong {
  color: var(--text);
  font-size: 15px;
}

.import-strip span {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.35;
}

.import-step {
  position: relative;
  background: var(--surface);
}

.import-step textarea {
  min-height: 96px;
}

.import-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.import-action-row span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.import-preview {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.import-preview strong {
  color: var(--text);
  font-size: 15px;
}

.import-preview ul {
  margin: 0;
  padding-left: 18px;
}

.import-preview li + li {
  margin-top: 4px;
}

.import-preview .warning {
  color: var(--amber);
  font-weight: 600;
}

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

.calendar-source-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.calendar-source-card.is-airbnb {
  border-color: var(--primary-soft);
  background: var(--surface);
}

.calendar-source-card.is-blue {
  border-color: var(--blue-soft);
  background: var(--surface);
}

.calendar-source-card.is-abritel {
  border-color: var(--amber-soft);
  background: var(--amber-soft);
}

.calendar-source-card.is-green {
  border-color: var(--green-soft);
  background: var(--bg);
}

.calendar-source-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.calendar-source-card-title strong {
  font-size: 16px;
  font-weight: 700;
}

.calendar-source-card-title span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.calendar-source-settings {
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--text) 9%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.calendar-source-settings .checkbox-line {
  min-height: 32px;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.reservation-management-fieldset {
  border-color: var(--line);
  background: var(--bg);
}

.calendar-source-direction {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.platform-ical-export {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid currentColor;
  color: var(--text-soft);
}

.platform-ical-export-label {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.platform-ical-export-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.platform-ical-export-row code {
  min-width: 0;
  padding: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 11px;
  text-overflow: clip;
  white-space: normal;
}

.promo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(110px, 0.6fr) repeat(2, minmax(130px, 0.8fr));
  gap: 8px;
  align-items: end;
}

.promo-grid > span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.platform-choice-group {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.platform-choice-group > span {
  grid-column: 1 / -1;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.platform-choice {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.platform-choice input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--blue);
}

.platform-choice.is-airbnb {
  border-color: var(--primary-soft);
  background: var(--primary-soft);
}

.platform-choice.is-airbnb input {
  accent-color: var(--primary);
}

.platform-choice.is-blue {
  border-color: var(--blue-soft);
  background: var(--blue-soft);
}

.platform-choice.is-green {
  border-color: var(--green-soft);
  background: var(--bg);
}

.platform-choice.is-green input {
  accent-color: var(--green);
}

.reservation-option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.reservation-option-grid .reservation-option {
  position: relative;
  display: inline-flex;
  width: auto;
  margin: 0;
  cursor: pointer;
}

.reservation-option input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  margin: 0;
  opacity: 0;
}

.reservation-option > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.reservation-option > span::before { content: "+"; width: 12px; text-align: center; }
.reservation-option input:checked + span { background: var(--surface-muted); border-color: var(--primary); color: var(--text); }
.reservation-option input:checked + span::before { content: "✓"; }
.reservation-option input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.reservation-amount-provenance { margin: 4px 0 10px; font-size: 13px; color: var(--text-soft); }
.reservation-amount-history { margin-top: 8px; font-size: 13px; overflow-wrap: break-word; }
#reservationEditForm input[readonly] { background: var(--surface-muted); color: var(--text-soft); }

.billing-reservation-breakdown {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.billing-commission-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.billing-commission-summary input {
  color: var(--primary-dark);
  font-weight: 700;
  background: var(--surface);
}

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

.billing-property-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.billing-property-card.is-selected {
  border-color: var(--text-soft);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 8%, transparent);
}

.billing-property-select {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  cursor: pointer;
}

.billing-property-select input,
.billing-select-all input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--primary-dark);
}

.billing-property-select strong,
.billing-property-select small {
  display: block;
}

.billing-property-select small {
  margin-top: 2px;
  color: var(--text-soft);
  font-weight: 500;
}

.billing-property-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

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

.billing-property-mode label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 2px 8px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
}

.billing-property-mode input {
  width: 16px;
  min-height: 16px;
  margin-top: 2px;
  accent-color: var(--primary-dark);
}

.billing-property-mode span {
  font-weight: 700;
}

.billing-property-mode small {
  grid-column: 2;
  color: var(--text-soft);
  font-weight: 500;
  line-height: 1.35;
}

.billing-property-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--text-soft);
}

.billing-property-result strong {
  color: var(--primary-dark);
  font-size: 17px;
}

.billing-select-all {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.billing-property-reservations {
  color: var(--text-soft);
  font-size: 12px;
}

.billing-property-reservations summary {
  width: fit-content;
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 700;
}

.billing-property-reservations > div {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.billing-reservation-detail-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.billing-reservation-detail-line strong,
.billing-reservation-detail-line small {
  display: block;
}

.billing-reservation-detail-line small {
  margin-top: 2px;
  color: var(--text-soft);
}

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

.billing-reservation-line input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
}

.billing-reservation-line input[type="text"] {
  min-height: 38px;
}

.billing-reservation-line strong,
.billing-reservation-line small {
  display: block;
}

.billing-reservation-line small {
  margin-top: 2px;
  color: var(--text-soft);
}

.billing-breakdown-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-soft);
  font-size: 12px;
}

.billing-breakdown-heading strong,
.billing-breakdown-heading span {
  display: block;
}

.billing-breakdown-heading strong {
  color: var(--text);
}

.billing-breakdown-heading span {
  margin-top: 2px;
}

.billing-breakdown-details {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 12px;
}

.billing-breakdown-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 700;
}

.billing-breakdown-details p {
  display: grid;
  gap: 2px;
  margin: 8px 0 0;
}

.billing-breakdown-details small {
  color: var(--text-soft);
}

.billing-invoice-list {
  display: grid;
  gap: 12px;
}

.billing-invoice-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.billing-invoice-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px 18px;
}

.billing-invoice-title {
  min-width: 0;
}

.billing-invoice-title > span,
.billing-invoice-meta span,
.billing-invoice-summary > span {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.billing-invoice-title h3 {
  margin: 5px 0 0;
  font-size: 19px;
  line-height: 1.3;
}

.billing-invoice-title p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.billing-invoice-summary {
  min-width: 170px;
  display: grid;
  justify-items: end;
  gap: 5px;
  text-align: right;
}

.billing-invoice-summary > .pill {
  margin-bottom: 5px;
}

.billing-invoice-summary > strong {
  font-size: 25px;
  line-height: 1.1;
}

.billing-invoice-meta {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 0.85fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.billing-invoice-meta > div {
  min-width: 0;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}

.billing-invoice-meta > div:last-child {
  border-right: 0;
}

.billing-invoice-meta strong,
.billing-invoice-meta small {
  display: block;
  overflow-wrap: break-word;
}

.billing-invoice-meta strong {
  margin-top: 5px;
  line-height: 1.4;
}

.billing-invoice-meta small {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}

.billing-invoice-breakdown:empty {
  display: none;
}

.billing-invoice-breakdown .billing-breakdown-details {
  margin: 0;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
}

.billing-invoice-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
}

.billing-invoice-main-actions,
.billing-invoice-secondary-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.billing-invoice-secondary-actions {
  justify-content: flex-end;
}

.billing-paid-label {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .billing-invoice-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .billing-invoice-meta > div:nth-child(2) {
    border-right: 0;
  }

  .billing-invoice-meta > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .billing-invoice-header,
  .billing-invoice-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .billing-invoice-summary {
    min-width: 0;
    justify-items: start;
    text-align: left;
  }

  .billing-invoice-meta {
    grid-template-columns: 1fr;
  }

  .billing-invoice-meta > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .billing-invoice-meta > div:last-child {
    border-bottom: 0;
  }

  .billing-invoice-main-actions,
  .billing-invoice-secondary-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Miguel Core ------------------------------------------------------------- */

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.88;
}

.nav-item > span {
  min-width: 0;
  flex: 1;
  font-size: 16px;
}

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

.calendar-setup-page {
  width: min(100%, 1160px);
  margin-inline: auto;
}

.calendar-setup-kpis > div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.calendar-setup-kpis strong {
  color: var(--text);
  font-size: 25px;
  line-height: 1;
}

.calendar-setup-kpis span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.calendar-setup-kpis .is-attention {
  border-color: color-mix(in srgb, var(--amber) 38%, var(--line));
  background: color-mix(in srgb, var(--amber) 7%, var(--surface));
}

.disclosure-panel {
  overflow: clip;
}

.disclosure-panel > summary {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  cursor: pointer;
  list-style: none;
}

.disclosure-panel > summary::-webkit-details-marker {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
.disclosure-panel > summary:hover {
  background: var(--surface-muted);
}
}

.disclosure-panel > summary h2,
.disclosure-panel > summary p {
  margin-bottom: 0;
}

.disclosure-panel > summary p {
  margin-top: 4px;
  color: var(--text-soft);
}

.disclosure-indicator {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  color: var(--primary-strong);
  font-size: 22px;
  line-height: 1;
  transition: transform 160ms ease;
}

.disclosure-panel[open] .disclosure-indicator {
  transform: rotate(180deg);
}

.disclosure-panel[open] > summary {
  border-bottom: 1px solid var(--line);
}

@media (max-width: 760px) {
  .page-subnav {
    margin-inline: -4px;
  }

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

  .calendar-block-form-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .calendar-block-form-footer .button {
    width: 100%;
  }

  .calendar-rate-form,
  .calendar-rate-recap {
    min-width: 0;
    max-width: 100%;
  }

  .calendar-rate-recap {
    padding: 15px;
  }

  .calendar-rate-recap dl > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .calendar-rate-recap .button {
    width: 100%;
  }
}

.reserve-drawer {
  margin-top: 15px;
  border-top: 1px solid color-mix(in srgb, var(--surface-muted) 12%, transparent);
  padding-top: 14px;
}

.reserve-drawer summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  color: color-mix(in srgb, var(--surface-muted) 68%, transparent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  transition: color 180ms ease, background-color 180ms ease;
}

.reserve-drawer summary::-webkit-details-marker {
  display: none;
}

.reserve-drawer summary::before {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(-45deg);
  transition: transform 180ms ease;
}

.reserve-drawer[open] summary::before {
  transform: rotate(45deg) translate(-2px, -2px);
}.reserve-drawer summary:focus-visible {
  color: var(--surface);
  background: color-mix(in srgb, var(--surface-muted) 7%, transparent);
}
@media (hover: hover) and (pointer: fine) {
.reserve-drawer summary:hover {
  color: var(--surface);
  background: color-mix(in srgb, var(--surface-muted) 7%, transparent);
}
}

.reserve-drawer summary span {
  flex: 1;
}

.reserve-drawer summary small {
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--surface-muted) 16%, transparent);
  border-radius: var(--radius-sm);
  color: color-mix(in srgb, var(--surface-muted) 50%, transparent);
  font-size: 11px;
  letter-spacing: normal;
  text-transform: uppercase;
}

.reserve-list {
  max-height: min(380px, 42vh);
  display: grid;
  gap: 2px;
  margin: 5px 0 0 18px;
  padding: 3px 0 3px 10px;
  overflow-y: auto;
  border-left: 1px solid color-mix(in srgb, var(--surface-muted) 12%, transparent);
  scrollbar-width: thin;
}

.reserve-list button {
  min-height: 36px;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  color: color-mix(in srgb, var(--surface-muted) 58%, transparent);
  background: transparent;
  text-align: left;
  font-size: 12px;
  transition: color 180ms ease, background-color 180ms ease;
}.reserve-list button:focus-visible, .reserve-list button.is-active {
  color: var(--surface);
  background: color-mix(in srgb, var(--surface-muted) 8%, transparent);
}
@media (hover: hover) and (pointer: fine) {
.reserve-list button:hover {
  color: var(--surface);
  background: color-mix(in srgb, var(--surface-muted) 8%, transparent);
}
}

.core-today {
  display: grid;
  gap: 18px;
}

.core-status-strip {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(140px, 0.7fr) minmax(140px, 0.7fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-glass-sm);
}

.core-status-strip > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.core-status-strip > div:not(:first-child) {
  display: grid;
  gap: 1px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.core-status-strip strong,
.core-status-strip small {
  display: block;
}

.core-status-strip strong {
  color: var(--text);
  font-size: 14px;
}

.core-status-strip small {
  color: var(--text-soft);
  font-size: 11px;
}

.core-live-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--amber) 12%, transparent);
}

.core-live-dot.is-ready {
  background: var(--green);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 12%, transparent);
}

.core-inline-alert {
  padding: 11px 14px;
  border: 1px solid var(--amber-soft);
  border-radius: 8px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 13px;
}

.core-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: 12px;
}

.core-kpi-card {
  min-width: 0;
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
  text-align: left;
  box-shadow: var(--shadow-glass-sm);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}.core-kpi-card:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-glass-sm);
}
@media (hover: hover) and (pointer: fine) {
.core-kpi-card:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-glass-sm);
}
}

.core-kpi-card span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.core-kpi-card strong {
  margin-top: 3px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: normal;
}

.core-kpi-card small {
  margin-top: auto;
  color: var(--text-muted);
  font-size: 11px;
  white-space: normal;
}

.core-work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.core-action-list,
.core-stay-list {
  display: grid;
  gap: 8px;
}

.core-action-row,
.core-stay-list > button {
  width: 100%;
  min-height: 62px;
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  text-align: left;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.core-action-row {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  border-left-width: 4px;
}

.core-action-row.is-blue { border-left-color: var(--blue); }
.core-action-row.is-teal { border-left-color: var(--primary); }
.core-action-row.is-amber { border-left-color: var(--amber); }
.core-action-row.is-green { border-left-color: var(--green); }
.core-action-row.is-red { border-left-color: var(--red); }
@media (hover: hover) and (pointer: fine) {
.core-action-row:hover, .core-stay-list > button:hover {
  border-color: var(--line-strong);
  background: var(--surface-muted);
}
}

.core-action-row > strong {
  font-size: 22px;
  text-align: center;
}

.core-action-row span,
.core-action-row b,
.core-action-row small,
.core-stay-list span,
.core-stay-list strong,
.core-stay-list small {
  display: block;
}

.core-action-row b,
.core-stay-list strong {
  font-size: 13px;
}

.core-action-row small,
.core-stay-list small {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 11px;
}

.core-action-row i {
  color: var(--text-muted);
  font-style: normal;
}

.core-stay-list > button {
  grid-template-columns: 82px minmax(0, 1fr) auto;
}

.core-stay-list time {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.core-stay-list > button > b {
  color: var(--text-soft);
  font-size: 11px;
  white-space: normal;
}

.core-empty-state {
  min-height: 150px;
  display: grid;
  place-content: center;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  text-align: center;
  background: var(--surface);
}

.core-empty-state p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.core-su-dock {
  margin-bottom: 18px;
}

.reserve-module-card {
  max-width: 820px;
  padding: 28px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--primary);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.reserve-module-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: normal;
}

.reserve-module-card h2 {
  margin-top: 16px;
}

.reserve-module-card > p {
  max-width: 68ch;
}

.reserve-module-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.reserve-module-details span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text-soft);
  background: var(--surface-muted);
  font-size: 12px;
  font-weight: 700;
}

.miguel-assistant {
  display: none;
}

body.is-reserved-module .miguel-assistant {
  display: block;
}

@media (max-width: 1260px) {
  .core-status-strip {
    grid-template-columns: minmax(230px, 1fr) repeat(2, minmax(130px, 0.6fr));
  }

  .core-status-strip .button {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 1120px) {
  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .nav-section-label {
    grid-column: 1 / -1;
  }

  .reserve-drawer {
    grid-column: 1 / -1;
  }

  .reserve-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: none;
  }
}

@media (max-width: 900px) {
  .core-status-strip,
  .core-work-grid {
    grid-template-columns: 1fr;
  }

  .core-status-strip > div:not(:first-child) {
    padding: 10px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .core-status-strip .button {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .reserve-list {
    grid-template-columns: 1fr;
  }

  .core-stay-list > button {
    grid-template-columns: 1fr auto;
  }

  .core-stay-list > button span {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .reserve-drawer {
    flex: 0 0 220px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .reserve-list {
    max-height: 240px;
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  .platform-choice-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-source-grid,
  .reservation-option-grid {
    grid-template-columns: 1fr;
  }

  .billing-reservation-line {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .billing-reservation-line input[type="text"] {
    grid-column: 2;
  }

  .billing-property-mode,
  .billing-commission-summary {
    grid-template-columns: 1fr;
  }

  .billing-reservation-detail-line {
    grid-template-columns: 1fr;
  }
}
.is-muted-section label:not(.toggle-line),
.is-muted-section .field-row,
.is-muted-section .platform-choice-group {
  opacity: 0.45;
}

.modal-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.sync-status {
  position: static;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--surface);
}
.sync-status:empty { display: none; }

.toast-region {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: grid;
  justify-items: end;
  gap: 8px;
  max-width: min(460px, calc(100vw - 48px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--text);
  color: var(--surface);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  overflow-wrap: break-word;
}

.toast-close, .toast-action { min-height: 36px; flex: none; border: 1px solid currentColor; border-radius: var(--radius-sm); padding: 6px 10px; color: inherit; background: transparent; font: inherit; font-weight: 700; cursor: pointer; }
.toast-action:disabled { cursor: wait; opacity: .65; }

.toast.success {
  background: var(--green);
}

.toast.warning {
  background: var(--amber);
}

.toast.error {
  background: var(--red);
}

.miguel-confirm-dialog {
  width: min(520px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-overlay);
}

.miguel-confirm-dialog h2 { margin: 0; padding: 20px 20px 0; font-size: 20px; letter-spacing: normal; }
.miguel-confirm-dialog > p { margin: 0; padding: 14px 20px 20px; color: var(--text-soft); line-height: 1.55; white-space: pre-line; }
.miguel-confirm-dialog > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); }
body:has(.miguel-confirm-dialog[open]) { overflow: hidden; }

@media (max-width: 600px) {
  .miguel-confirm-dialog { width: calc(100vw - 24px); max-width: calc(100vw - 24px); }
  .miguel-confirm-dialog > footer { display: grid; grid-template-columns: 1fr 1fr; }
  .miguel-confirm-dialog > footer .button { width: 100%; }
}

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

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

/* Calculateur de prix ------------------------------------------------------- */

.price-calculator-input-panel,
.price-calculator-results-panel {
  align-self: start;
}

.price-calculator-form {
  display: grid;
  gap: 14px;
}

.price-calculator-form [hidden] {
  display: none;
}

.price-calculator-form fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.price-calculator-form legend {
  margin-bottom: 2px;
  font-weight: 700;
}

.price-target-field {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--primary-soft);
}

.price-target-field label {
  color: var(--primary-dark);
  font-weight: 700;
}

.price-target-field input {
  min-height: 54px;
  border-color: var(--line-strong);
  font-size: 25px;
  font-weight: 700;
}

.price-target-field small {
  color: var(--text-soft);
}

.price-progressive-toggle {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
.price-progressive-toggle:hover {
  border-color: var(--line-strong);
  background: var(--primary-soft);
}
}

.price-progressive-toggle input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  accent-color: var(--primary);
  cursor: pointer;
}

.price-progressive-toggle span,
.price-progressive-toggle strong,
.price-progressive-toggle small {
  display: block;
}

.price-progressive-toggle strong {
  color: var(--text);
}

.price-progressive-toggle small {
  margin-top: 2px;
  color: var(--text-soft);
  font-weight: 500;
}

.price-standard-targets {
  display: grid;
  gap: 12px;
}

.price-progressive-targets {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--primary-soft);
}

.price-progressive-targets-heading strong,
.price-progressive-targets-heading small {
  display: block;
}

.price-progressive-targets-heading strong {
  color: var(--primary-dark);
}

.price-progressive-targets-heading small {
  margin-top: 2px;
  color: var(--text-soft);
}

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

.price-progressive-target-grid label {
  min-width: 0;
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.price-progressive-target-grid label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.price-progressive-target-grid input {
  min-width: 0;
  min-height: 42px;
  font-weight: 700;
}

.currency-input-wrap,
.rate-input-wrap {
  position: relative;
}

.currency-input-wrap input,
.rate-input-wrap input {
  padding-right: 38px;
}

.currency-input-wrap > span,
.rate-input-wrap > span {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  transform: translateY(-50%);
}

.price-calculator-options {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.price-calculator-options summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 11px 13px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  list-style-position: inside;
}

.price-calculator-options[open] summary {
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.price-calculator-options-body {
  display: grid;
  gap: 12px;
  padding: 13px;
}

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

.price-rate-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
}

.price-rate-table th,
.price-rate-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  text-align: left;
}

.price-rate-table thead th {
  color: var(--text-soft);
  font-size: 11px;
  text-transform: uppercase;
}

.price-rate-table tbody th {
  min-width: 132px;
}

.price-rate-table tbody th > span:first-child {
  display: block;
  margin-bottom: 5px;
}

.price-rate-table input {
  min-width: 78px;
  min-height: 38px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.price-result-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.price-result-overview > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.price-result-overview span,
.price-result-overview strong {
  display: block;
}

.price-result-overview span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.price-result-overview strong {
  margin-top: 3px;
  font-size: 17px;
}

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

.price-platform-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--surface);
}

.price-platform-card.is-pink {
  border-top-color: var(--primary);
}

.price-platform-card.is-green {
  border-top-color: var(--green);
}

.price-platform-card.is-error {
  padding: 14px;
  border-top-color: var(--red);
  background: var(--red-soft);
}

.price-platform-card-header {
  min-height: 92px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.price-platform-card-header strong,
.price-platform-name {
  display: block;
}

.price-platform-name {
  margin-bottom: 4px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.price-platform-card-header strong {
  font-size: 25px;
  line-height: 1.1;
}

.price-platform-card-header strong small {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.price-platform-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.price-platform-highlights > div {
  min-width: 0;
  padding: 10px;
  border-right: 1px solid var(--line);
}

.price-platform-highlights > div:last-child {
  border-right: 0;
}

.price-platform-highlights span,
.price-platform-highlights strong {
  display: block;
}

.price-platform-highlights span {
  min-height: 34px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.3;
}

.price-platform-highlights strong {
  margin-top: 3px;
  font-size: 15px;
}

.price-platform-highlights .is-owner {
  background: var(--green-soft);
}

.price-breakdown {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 8px 14px;
}

.price-breakdown > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 6px 0;
}

.price-breakdown dt {
  color: var(--text-soft);
}

.price-breakdown dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.price-breakdown .is-deducted dd {
  color: var(--red);
}

.price-breakdown .is-added dd {
  color: var(--blue);
}

.price-breakdown .is-total {
  margin-top: 5px;
  padding-top: 10px;
  border-top: 1px solid var(--line-strong);
}

.price-breakdown .is-total dt,
.price-breakdown .is-total dd {
  color: var(--green);
  font-weight: 700;
}

.price-platform-note {
  min-height: 62px;
  margin: 0;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  background: var(--amber-soft);
  color: var(--text-soft);
  font-size: 12px;
}

.price-progressive-plans {
  display: grid;
  gap: 14px;
}

.price-progressive-plan {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--surface);
}

.price-progressive-plan.is-airbnb {
  border-top-color: var(--primary);
}

.price-progressive-plan-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
}

.price-progressive-plan-header h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.price-progressive-plan-header h3 small {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.price-progressive-plan-header p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

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

.price-progressive-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

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

.price-progressive-table thead th {
  color: var(--text-soft);
  background: var(--surface-muted);
  font-size: 11px;
  letter-spacing: normal;
  text-transform: uppercase;
}

.price-progressive-table tbody th {
  white-space: normal;
}

.price-progressive-table td strong,
.price-progressive-table td small {
  display: block;
}

.price-progressive-table td small {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 11px;
}

.price-discount-value {
  color: var(--primary-dark);
  font-size: 17px;
}

.price-progressive-table .price-positive-difference {
  color: var(--green);
  font-weight: 700;
}

.price-progressive-plan-note {
  margin: 0;
  padding: 11px 14px;
  background: var(--amber-soft);
  color: var(--text-soft);
  font-size: 12px;
}

.price-booking-weekly-callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 14px;
  margin: 12px 14px;
  padding: 12px 14px;
  border: 1px solid var(--blue-soft);
  border-radius: 8px;
  background: var(--blue-soft);
}

.price-booking-weekly-callout span,
.price-booking-weekly-callout small {
  color: var(--text-soft);
}

.price-booking-weekly-callout span {
  font-weight: 600;
}

.price-booking-weekly-callout strong {
  grid-row: span 2;
  color: var(--blue);
  font-size: 28px;
}

.price-booking-weekly-callout small {
  font-size: 12px;
}

.price-progressive-empty {
  padding: 34px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  text-align: center;
}

.price-progressive-empty p {
  margin: 5px 0 0;
  color: var(--text-soft);
}

.price-calculator-disclaimer {
  border-left: 4px solid var(--amber);
  box-shadow: none;
}

.price-calculator-disclaimer .panel-body {
  padding: 14px 16px;
}

.price-calculator-disclaimer p {
  margin: 4px 0 0;
  color: var(--text-soft);
}

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

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

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

  .sidebar-footer {
    display: none;
  }

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

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

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

  .contract-builder-layout,
  .contract-builder-form,
  .contract-details-grid,
  .contract-check-grid,
  .contract-property-list,
  .listing-workbench,
  .calendar-source-list,
  .owner-calendar-layout,
  .photo-tool-layout,
  .account-layout {
    grid-template-columns: 1fr;
  }

  .price-calculator-input-panel,
  .price-calculator-results-panel {
    grid-column: span 12;
  }

  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8 {
    grid-column: span 12;
  }
}

@media (max-width: 760px) {
  .sidebar {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .main-area {
    padding: 16px;
  }

  .topbar {
    display: grid;
  }

  .panel-header {
    display: grid;
    align-items: stretch;
  }

  .topbar-actions {
    width: 100%;
    min-width: 0;
  }

  .nav-list {
    display: flex;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding: 12px 0 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    scroll-snap-align: start;
  }

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

  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-12 {
    grid-column: 1;
  }

  .form-grid,
  .field-row,
  .detail-grid,
  .billing-summary,
  .internal-doc-grid,
  .platform-choice-group,
  .owner-calendar-layout,
  .calendar-source-grid,
  .promo-grid,
  .contract-builder-layout,
  .contract-builder-form,
  .contract-details-grid,
  .contract-check-grid {
    grid-template-columns: 1fr;
  }

  .price-result-overview,
  .price-platform-grid {
    grid-template-columns: 1fr;
  }

  .price-progressive-plan-header {
    align-items: stretch;
    flex-direction: column;
  }

  .price-booking-weekly-callout {
    grid-template-columns: 1fr;
  }

  .price-booking-weekly-callout strong {
    grid-row: auto;
  }

  .price-platform-highlights {
    grid-template-columns: 1fr;
  }

  .price-platform-highlights > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .price-platform-highlights > div:last-child {
    border-bottom: 0;
  }

  .property-card,
  .ical-copy-row,
  .platform-ical-export-row,
  .folder-picker-row,
  .photo-style-grid {
    grid-template-columns: 1fr;
  }

  .property-cover {
    aspect-ratio: 16 / 9;
  }

  .property-detail-title,
  .pricing-capture-tool {
    align-items: stretch;
    flex-direction: column;
  }

  .property-cover-detail {
    width: 100%;
  }

  .contract-output-preview {
    min-height: 420px;
  }

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

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

  .calendar-controls {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    justify-content: stretch;
  }

  .calendar-header-actions {
    display: grid;
    width: 100%;
    justify-content: stretch;
  }

  .calendar-header-actions .button {
    width: 100%;
  }

  .segmented-control {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .segmented-control button {
    width: 100%;
  }

  .calendar-controls .button,
  .calendar-controls strong {
    flex: 1;
    min-width: 0;
  }

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

  .owner-calendar-detail {
    position: static;
  }

  .month-calendar,
  .owner-month-calendar {
    min-width: 760px;
  }

  .panel-body:has(.month-calendar),
  .panel-body:has(.owner-month-calendar) {
    overflow-x: auto;
  }

  .reservation-list-header {
    display: grid;
  }

  .reservation-list-item,
  .reservation-list-info {
    grid-template-columns: 1fr;
  }

  .calendar-health-strip,
  .reservation-kpis,
  .reservation-filter-bar {
    grid-template-columns: 1fr;
  }

  .calendar-health-strip > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .calendar-health-strip > div:last-child {
    border-bottom: 0;
  }

  .calendar-legends {
    justify-items: start;
  }

  .managed-reservation-dates,
  .managed-reservation-guest {
    padding-bottom: 11px;
    border-bottom: 1px solid var(--line);
  }

  .managed-reservation-action,
  .managed-reservation-action .button {
    width: 100%;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .button {
    width: 100%;
  }
}

.market-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.market-toolbar h2,
.market-toolbar p {
  margin: 0;
}

.market-toolbar p {
  color: var(--text-soft);
  margin-top: 4px;
}

.market-layout {
  display: grid;
  grid-template-columns: minmax(460px, 0.92fr) minmax(520px, 1.08fr);
  align-items: start;
  gap: 18px;
}

.market-form-body {
  display: grid;
  gap: 16px;
}

.market-number-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.market-fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.market-fieldset legend {
  padding: 0 7px;
  font-weight: 700;
}

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

.market-check {
  min-height: 42px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.market-check:has(input:checked) {
  color: var(--primary-dark);
  border-color: var(--line-strong);
  background: var(--primary-soft);
}

.market-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--primary);
}

.market-quality-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.market-submit {
  display: grid;
  gap: 8px;
}

.market-submit p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.market-results {
  display: grid;
  gap: 18px;
}

.market-empty {
  min-height: 340px;
  display: grid;
  place-items: center;
  padding: 42px;
  text-align: center;
}

.market-empty > div {
  max-width: 480px;
}

.market-empty h2,
.market-empty p {
  margin: 0;
}

.market-empty p {
  margin-top: 8px;
  color: var(--text-soft);
}

.market-empty-mark {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 24px;
  font-weight: 700;
}

.market-result-header {
  align-items: center;
}

.market-score {
  width: 92px;
  height: 64px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.market-score strong {
  font-size: 20px;
  line-height: 1.1;
}

.market-score span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.market-price-range {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.market-price-range > div {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.market-price-range > div:last-child {
  border-right: 0;
}

.market-price-range span,
.market-price-range strong {
  display: block;
}

.market-price-range span {
  color: var(--text-soft);
  font-size: 12px;
}

.market-price-range strong {
  margin-top: 3px;
  font-size: 22px;
}

.market-price-range .is-recommended {
  background: var(--primary-soft);
}

.market-no-price {
  padding: 16px;
  margin-bottom: 16px;
  border-left: 4px solid var(--amber);
  background: var(--amber-soft);
}

.market-no-price p {
  margin: 4px 0 0;
}

.market-estimate-note {
  padding: 12px 14px;
  margin: -4px 0 16px;
  border-left: 3px solid var(--amber);
  background: var(--amber-soft);
}

.market-estimate-note p {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

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

.market-season-results {
  display: grid;
  gap: 16px;
  margin: 18px 0;
}

.market-season-result {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.market-season-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.market-season-heading .eyebrow {
  margin: 0 0 4px;
}

.market-season-heading > div > strong {
  font-size: 18px;
}

.market-season-heading > span {
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.market-season-result .market-price-range {
  margin-bottom: 10px;
}

.market-season-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.market-season-summary {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.market-season-details {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.market-season-details > summary {
  padding: 12px 0 0;
  color: var(--primary-dark);
  cursor: pointer;
  font-weight: 700;
}

.market-season-details .market-comparators {
  margin-bottom: 0;
}

.market-evidence-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.market-summary {
  color: var(--text-soft);
}

.market-comparators {
  margin: 20px 0;
}

.market-comparator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.market-comparator > div:first-child span,
.market-comparator-price span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
}

.market-comparator-price {
  text-align: right;
}

.market-comparator p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.market-comparator a {
  grid-column: 1 / -1;
  color: var(--primary-dark);
  font-weight: 700;
}

.market-unpriced {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.market-unpriced summary {
  padding: 14px 0;
  color: var(--primary-dark);
  cursor: pointer;
  font-weight: 700;
}

.market-unpriced .market-comparator:first-child {
  border-top: 0;
}

.market-history-list {
  max-height: 420px;
  overflow: auto;
}

.market-history-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
  text-align: left;
}.market-history-item.is-active {
  background: var(--primary-soft);
}
@media (hover: hover) and (pointer: fine) {
.market-history-item:hover {
  background: var(--primary-soft);
}
}

.market-history-item span:first-child {
  display: grid;
}

.market-history-item small {
  color: var(--text-soft);
}

.market-history-price {
  white-space: normal;
  font-weight: 700;
}

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

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

@media (max-width: 760px) {
  .market-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .market-number-grid,
  .market-quality-grid,
  .market-check-grid,
  .market-price-range {
    grid-template-columns: 1fr 1fr;
  }

  .market-price-range > div {
    border-bottom: 1px solid var(--line);
  }

  .market-price-range > div:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .market-comparator {
    grid-template-columns: 1fr;
  }

  .market-comparator-price {
    text-align: left;
  }
}

@media (max-width: 1180px) {
  .calendar-filter-strip {
    grid-template-columns: auto repeat(2, minmax(180px, 1fr));
  }

  .calendar-occupancy-switch {
    grid-column: 2 / -1;
    justify-self: end;
  }

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

  .calendar-navigation > strong {
    justify-self: end;
  }

  .calendar-navigation .calendar-legends {
    grid-column: 1 / -1;
    justify-items: start;
  }
}

@media (max-width: 760px) {
  .calendar-page-intro {
    display: grid;
  }

  .calendar-view-tabs {
    gap: 0;
  }

  .calendar-view-tabs button {
    flex: 1;
  }

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

  .calendar-availability-label,
  .calendar-filter-strip label,
  .calendar-occupancy-switch {
    width: 100%;
  }

  .calendar-occupancy-switch {
    grid-column: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calendar-navigation {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .calendar-navigation-buttons {
    justify-content: space-between;
  }

  .calendar-navigation > strong {
    grid-row: 1;
    justify-self: center;
    white-space: normal;
  }

  .calendar-navigation .calendar-legends {
    grid-column: auto;
  }

  .property-timeline-label-pad,
  .property-timeline-day-pad,
  .property-timeline-name {
    width: 168px !important;
  }

  .property-timeline-day-pad,
  .property-timeline-name {
    padding-right: 9px;
    padding-left: 9px;
  }

  .owner-calendar-summary {
    display: grid;
    gap: 2px;
  }

  .annual-calendar-header,
  .annual-calendar-row {
    grid-template-columns: 168px repeat(12, minmax(76px, 1fr));
  }
}

/* D18a: step progress is navigation progress, never publication readiness. */
.property-wizard { width: min(820px, calc(100vw - 24px)); max-height: 92dvh; overflow-y: auto; }
.property-wizard progress { width: 100%; height: 12px; accent-color: var(--blue); }
.property-wizard ol { display: flex; flex-wrap: wrap; gap: 10px 20px; padding: 0; list-style: none; }
.property-wizard [aria-current="step"] { font-weight: 600; color: var(--blue); text-decoration: underline; }
.property-wizard-state { padding: 14px; border: 2px solid var(--blue); border-radius: 10px; font-weight: 700; }
.property-wizard-coming { padding: 16px; background: var(--surface-muted); border-radius: 10px; }
.property-wizard input, .property-wizard select, .property-wizard button { min-height: 44px; }
.property-wizard .form-grid > label { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.property-wizard #propertyWizardMissing { overflow-wrap: break-word; line-height: 1.6; }
@media (max-width: 600px) {
  .property-wizard .form-grid { grid-template-columns: 1fr; }
  .property-wizard ol { display: grid; gap: 5px; }
}

.property-wizard > p, .property-wizard > #propertyWizardProgress { margin: 16px 18px; }
.su-property-row .su-property-row-footer { grid-template-columns: minmax(0, 1fr) auto; }
.su-property-row .su-property-row-footer > small,
.su-property-detail .su-property-detail-summary strong {
  white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; line-height: 1.5;
}
.su-property-row .su-property-row-footer > small { font-size: 12px; }
#reservationEditForm .checkbox-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
#reservationEditForm .checkbox-line input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Stay messages: neutral disclosures and forms, including narrow screens. */
.automatic-message-editor, .automatic-property-fields { min-width: 0; margin-block: 16px; }
.automatic-message-editor label, .automatic-property-fields label { display: grid; gap: 8px; margin-block: 12px; }
.automatic-message-editor textarea, .automatic-message-editor select, .automatic-message-editor input,
.automatic-property-fields textarea, .automatic-property-fields input { width: 100%; max-width: 100%; box-sizing: border-box; min-height: 44px; }
.automatic-template { border-top: 1px solid var(--line, var(--line)); padding-block: 16px; }
.automatic-template summary, .automatic-property-warning summary { cursor: pointer; padding-block: 8px; }
.automatic-message-text { white-space: pre-wrap; overflow-wrap: break-word; padding: 12px; background: var(--surface-muted); border-radius: 8px; }
.automatic-stay-list { padding-left: 24px; display: grid; gap: 20px; }
.automatic-stay-list li > span { display: block; margin-top: 6px; }
.automatic-property-warning { font-size: .85rem; color: var(--muted, var(--text-soft)); max-width: 100%; }
.automatic-property-warning .publication-marker { display: inline-grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; width: 18px; height: 18px; }
.automatic-property-warning p { white-space: normal; }

/* D18b: photo controls also work with touch and keyboard; no drag required. */
.property-photo-controls { border: 0; padding: 0; margin: 0; min-width: 0; }
.property-photo-drop { border: 2px dashed var(--blue); border-radius: 12px; padding: 16px; background: var(--bg); }
.property-photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.property-photo-card { min-width: 0; border: 1px solid var(--blue-soft); border-radius: 12px; padding: 12px; }
.property-photo-card img { display: block; width: 100%; height: 160px; object-fit: cover; border-radius: 8px; }
.property-photo-card p { overflow-wrap: break-word; }
.property-photo-card label { display: grid; gap: 6px; }
.property-photo-card select { width: 100%; min-width: 0; }
.property-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.property-photo-actions button { padding: 8px 12px; max-width: 100%; white-space: normal; }
.property-amenity-category { border-bottom: 1px solid var(--blue-soft); padding: 8px 0; }
.property-amenity-category summary { min-height: 44px; padding: 10px 0; cursor: pointer; font-weight: 600; }
.property-amenity-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.property-amenity-options label { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.property-amenity-options input { width: 20px; flex: 0 0 20px; margin: 0; }
.property-amenity-options [hidden], .property-wizard [hidden] { display: none !important; }
[data-property-amenities] > label { display: grid; gap: 6px; margin-bottom: 12px; }
[data-property-amenities] input[type="search"] { width: 100%; min-width: 0; }
@media (max-width: 560px) {
  .property-photo-grid, .property-amenity-options { grid-template-columns: minmax(0, 1fr); }
  .property-photo-drop .button { width: 100%; white-space: normal; }
}

/* T19: shared listing controls, usable at 375 px. */
.listing-property [hidden] { display: none !important; }
.listing-property, .listing-property .panel-body, .listing-property label, .listing-location, .listing-title { min-width: 0; }
.listing-property input, .listing-property select, .listing-property button { min-height: 44px; max-width: 100%; }
.listing-property input, .listing-property select { width: 100%; font-size: 16px; }
.listing-rule-fields, .listing-coordinate-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.listing-property .full-width { grid-column: 1 / -1; }
.listing-hour-note, .listing-title small { display: block; color: var(--muted, var(--blue)); font-size: 13px; }
.listing-title button { white-space: normal; text-align: left; }
.listing-location p { overflow-wrap: break-word; }
@media (max-width: 560px) {
  .listing-property .settings-form, .listing-rule-fields, .listing-coordinate-fields { display: grid; grid-template-columns: minmax(0, 1fr); }
  .listing-property .button, .listing-location .button { width: 100%; }
}

/* T20: equal space for each dossier; complete messages, including on phones. */
.request-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.request-comparison-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; overflow-wrap: break-word; }
.request-comparison-card:only-child { grid-column: 1 / -1; }
.request-comparison-card p { margin: 10px 0; }
.request-guest-message { white-space: pre-wrap; overflow-wrap: break-word; }
.request-transmission { padding: 12px; background: var(--surface-muted); border-radius: 8px; overflow-wrap: break-word; }
.request-decision-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
[data-request-decision] { display: grid; gap: 12px; min-width: 0; }
[data-request-decision][hidden] { display: none; }
[data-request-decision] label { display: grid; gap: 6px; min-width: 0; }
[data-request-decision] select, [data-request-decision] textarea { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; font-size: 16px; min-height: 44px; }
.request-decision-actions button, [data-request-decision] button, .request-comparison-card button { min-height: 44px; white-space: normal; }
@media (max-width: 560px) {
  .request-comparison { grid-template-columns: minmax(0, 1fr); }
  .request-decision-actions > button { flex: 1 1 120px; }
}

/* T22: long recipient labels wrap even on a 375 px screen. */
.collection-settings { min-width: 0; width: 100%; box-sizing: border-box; overflow-wrap: break-word; }
.collection-settings fieldset { min-width: 0; margin: 0 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.collection-settings legend { max-width: 100%; font-weight: 600; }
.collection-settings label { display: grid; gap: 8px; margin: 8px 0; min-width: 0; }
.collection-settings .collection-choice { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; }
.collection-settings .collection-choice input { flex: 0 0 20px; width: 20px; min-height: 20px; margin-top: 3px; }
.collection-settings input:not([type="radio"]):not([type="checkbox"]), .collection-settings select { min-width: 0; width: 100%; max-width: 100%; min-height: 44px; box-sizing: border-box; font-size: 16px; }
.collection-settings [hidden] { display: none !important; }
@media (max-width: 600px) { .collection-settings { grid-column: 1 / -1; } }

/* Establishment composition and accessible per-listing availability. */
.unit-configuration { margin-block: 16px; }
.unit-listing-editor { margin-block: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.unit-config-rows .field-row { align-items: end; margin-block: 12px; }
.unit-listing-editor details { margin-block: 12px; }
.unit-config-block { min-width: 0; padding-block: 20px; border-top: 1px solid var(--line); }
.unit-config-block > header { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 16px; }
.unit-config-block > header > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 700; }
.unit-config-block h4, .unit-config-block h5, .unit-config-block p { overflow-wrap: break-word; }
.unit-config-block h4 { margin: 3px 0 4px; font-size: 16px; }
.unit-config-block h4 small { color: var(--text-soft); font-size: 12px; font-weight: 500; }
.unit-config-block header p, .unit-empty { margin: 0; color: var(--text-soft); font-size: 13px; }
.unit-card-grid, .unit-listing-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; margin-bottom: 12px; }
.unit-config-card, .unit-listing-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.unit-card-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.unit-card-heading h5 { margin: 11px 0 0; font-size: 14px; }
.unit-card-heading label, .unit-space-fields label, .unit-room-names label, .unit-advanced label { display: grid; min-width: 0; gap: 6px; font-size: 12px; }
.unit-config-card input:not([type="checkbox"]), .unit-config-card select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; }
.unit-card-menu > summary { cursor: pointer; }
.unit-card-menu .button { display: block; min-inline-size: 0; box-shadow: none; }
.unit-quantity { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; margin: 14px 0; }
.unit-quantity > span { color: var(--text-soft); font-size: 12px; }
.unit-quantity [role="group"] { display: grid; grid-template-columns: 40px 42px 40px; align-items: center; text-align: center; }
.unit-quantity .button { width: 40px; min-width: 40px; min-inline-size: 40px; height: 40px; padding: 0; font-size: 20px; }
.unit-room-names { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.unit-room-names > strong { font-size: 12px; }
.unit-room-names label { grid-template-columns: minmax(70px, .45fr) minmax(0, 1fr); align-items: center; }
.unit-space-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.unit-space-fields label:first-child { grid-column: 1 / -1; }
.unit-advanced { margin-top: 12px; }
.unit-advanced summary { min-height: 44px; padding-block: 12px; cursor: pointer; font-size: 13px; }
.unit-empty { margin: 0 0 12px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; }
.unit-listing-cards { grid-template-columns: minmax(0, 1fr); }
.unit-listing-summary { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.unit-listing-summary > div { min-width: 0; }
.unit-listing-summary h5 { margin: 0 0 5px; font-size: 15px; }
.unit-listing-summary p { margin: 0; color: var(--text); }
.unit-listing-summary ul { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0; padding: 0; color: var(--text-soft); font-size: 12px; list-style: none; }
.unit-listing-summary .button { flex: none; }
.unit-readiness { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border-radius: var(--radius-row); font-size: 12px; font-weight: 600; }
.unit-readiness.is-ready { background: var(--green-soft); color: var(--green); }
.unit-readiness.is-missing { background: var(--amber-soft); color: var(--amber); }
.unit-listing-editor-wrap:not([hidden]) { display: block; margin-top: 14px; border-top: 1px solid var(--line); }
.unit-listing-editor { max-width: 100%; overflow: hidden; }
.unit-listing-editor .settings-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.unit-listing-editor :is(input:not([type="checkbox"]), select, textarea) { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; }
.unit-editor-actions, .unit-save-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.unit-save-actions { padding-top: 16px; border-top: 1px solid var(--line); }
.unit-calendar { margin-block: 24px; }
.unit-calendar-scroll { overflow-x: auto; max-width: 100%; }
.unit-calendar table { border-collapse: collapse; width: max-content; min-width: 100%; }
.unit-calendar th, .unit-calendar td { padding: 10px; border: 1px solid var(--line); font-size: 13px; white-space: nowrap; }
.unit-calendar th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.unit-calendar .is-closed { background: var(--amber-soft); color: var(--amber); }
.unit-calendar .is-available { background: var(--surface-muted); color: var(--text); }
.unit-calendar li { margin-block: 10px; overflow-wrap: break-word; }
@media (max-width: 560px) {
  .unit-config-rows .field-row, .unit-space-fields, .unit-listing-editor .settings-form { display: grid; grid-template-columns: minmax(0, 1fr); }
  .unit-space-fields label:first-child { grid-column: auto; }
  .unit-listing-summary { display: grid; }
  .unit-listing-summary .button, .unit-config-block > .button, .unit-save-actions .button { width: 100%; }
  .unit-room-names label { grid-template-columns: minmax(0, 1fr); }
  .unit-card-menu .button { width: 100%; }
}

/* Keep cached business data hidden until the server validates this tab. */
html[data-manager-access]:not([data-manager-access="granted"]) body > :not(#managerAccessScreen) { display: none !important; }
#managerAccessScreen { max-width: 640px; margin: 10vh auto; width: calc(100% - 32px); }
html[data-manager-access="granted"] #managerAccessScreen { display: none; }

.trust-copy { max-width: 960px; overflow-wrap: break-word; }
.trust-copy h3 { margin-top: 28px; }
.trust-copy p, .trust-copy dd, .trust-copy li { line-height: 1.6; }
.trust-copy dt { font-weight: 700; margin-top: 16px; }
.trust-copy dd { margin: 4px 0 12px; }
.trust-copy select { max-width: 100%; width: 100%; min-height: 44px; }
.trust-copy details { margin: 8px 0 16px; }
.trust-copy button { white-space: normal; }

/* T28 uses the existing company and collection forms. */
.carte-g-settings { min-width: 0; }
.carte-g-settings [hidden] { display: none; }
.carte-g-settings input:not([type="checkbox"]) { width: 100%; box-sizing: border-box; }
.carte-g-settings p, .carte-g-history { overflow-wrap: break-word; }
.carte-g-history { border-top: 1px solid var(--line); padding-block: 8px; }
.rent-collection-note { color: var(--text-muted, var(--blue)); }

/* T29: reuse the existing panel, form and button styles. */
.guide-manager { min-width: 0; padding: 24px; }
.guide-manager input,.guide-manager textarea { width:100%; }
.guide-manager .panel-actions { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.guide-preview { width:100%; max-width:760px; height:640px; border:1px solid var(--line); border-radius:20px; background:var(--bg); }
.guide-edit-section { border:1px solid var(--line); border-radius:12px; padding:16px; margin:12px 0; min-width:0; }
.guide-edit-section label { display:block; margin-bottom:12px; }
.guide-link-notice { padding:12px; background:var(--primary-soft); border-radius:12px; }
