:root {
  --ink: #17212b;
  --muted: #5f6b7a;
  --line: #d7dde6;
  --paper: #ffffff;
  --soft: #f3f5f8;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #c2410c;
  --shadow: 0 10px 28px rgba(31, 41, 51, 0.08);
  --panel-shadow: 0 1px 2px rgba(31, 41, 51, 0.04);
}

* {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--soft);
  line-height: 1.45;
}

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: rgba(15, 118, 110, 0.18);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 200;
  transform: translateY(-140%);
  border-radius: 8px;
  padding: 10px 14px;
  color: white;
  background: var(--brand-dark);
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.public-header {
  justify-content: flex-start;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

.crm-header-action-card {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--brand-dark);
  background: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.crm-header-action-card:hover,
.crm-header-action-card:focus-visible {
  border-color: var(--brand);
  background: #ecfdf5;
}

.brand-mark {
  display: grid;
  overflow: hidden;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--brand);
  font-weight: 800;
  font-size: 26px;
}

.brand-mark.has-logo {
  background: white;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

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

h1 {
  margin-bottom: 0;
  font-size: clamp(22px, 3vw, 32px);
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.1;
}

h3 {
  margin-bottom: 12px;
  font-size: 20px;
}

.top-nav {
  display: flex;
  gap: 8px;
}

.nav-button,
.ghost-button,
.primary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: none;
  background: white;
  color: var(--ink);
  font-weight: 700;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.ghost-button:hover,
.nav-button:hover,
.ghost-button.active {
  border-color: #b7d9d5;
  background: #f0fdfa;
}

.nav-button.active,
.primary-button {
  border-color: var(--brand);
  color: white;
  background: var(--brand);
}

.primary-button:hover {
  background: var(--brand-dark);
}

.context-help-toggle {
  white-space: nowrap;
}

body.context-help-enabled button,
body.context-help-enabled a,
body.context-help-enabled input,
body.context-help-enabled select,
body.context-help-enabled textarea,
body.context-help-enabled label,
body.context-help-enabled .stat-card,
body.context-help-enabled .personal-period-card,
body.context-help-enabled .panel h3 {
  cursor: help;
}

.context-help-tooltip {
  position: fixed;
  z-index: 10000;
  max-width: min(300px, calc(100vw - 24px));
  border: 1px solid #99f6e4;
  border-radius: 8px;
  padding: 10px 12px;
  color: #042f2e;
  background: rgba(240, 253, 250, 0.98);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  pointer-events: none;
}

.context-help-tooltip[hidden] {
  display: none;
}

.danger-button {
  border-color: #fecaca;
  color: #991b1b;
  background: #fff1f2;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

main {
  padding: 0 clamp(16px, 3vw, 38px) 42px;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 26px;
  align-items: end;
  min-height: 430px;
  margin-top: 24px;
  border-radius: 8px;
  padding: 48px clamp(18px, 4vw, 44px) 34px;
  background:
    linear-gradient(135deg, rgba(244, 247, 251, 0.96), rgba(217, 231, 229, 0.7)),
    #f4f7fb;
}

.hero.has-hero-image {
  color: white;
  background:
    linear-gradient(90deg, rgba(15, 44, 43, 0.86), rgba(15, 44, 43, 0.42)),
    var(--hero-image) center / cover;
}

.hero.has-hero-image .eyebrow,
.hero.has-hero-image .hero-copy p:last-child {
  color: rgba(255, 255, 255, 0.82);
}

.hero-copy {
  max-width: 790px;
}

.hero-copy p:last-child {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.hero-search,
.admin-shell,
.panel,
.property-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--panel-shadow);
}

.hero-search {
  display: grid;
  gap: 14px;
  padding: 18px;
}

label {
  display: grid;
  gap: 5px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

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

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18);
  border-color: var(--brand);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.office-menu-button:focus-visible,
.suggestion-item:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.36);
  outline-offset: 2px;
}

textarea {
  resize: vertical;
}

.section-heading,
.dashboard-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 8px 0 14px;
}

.section-heading.compact h2 {
  font-size: 26px;
}

.page-heading {
  padding-top: 38px;
}

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

.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.advanced-filters {
  margin-bottom: 24px;
}

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

.filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.form-cancel-button {
  justify-self: end;
}

.filter-group {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fafbfc;
}

.filter-group legend {
  padding: 0 6px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
}

.paired-fields,
.triple-fields {
  display: grid;
  gap: 10px;
}

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

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

.filter-group label {
  gap: 6px;
  font-size: 13px;
}

.filter-group input,
.filter-group select {
  min-height: 40px;
  padding: 9px 10px;
}

.property-card {
  overflow: hidden;
  box-shadow: none;
}

body[data-page="public"] .property-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

body[data-page="public"] .property-grid.is-centered {
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  justify-content: center;
}

body[data-page="public"] .property-card {
  font-size: 14px;
}

.photo-frame {
  display: grid;
  min-height: 170px;
  place-items: center;
  background: #d9e7e5;
  color: var(--brand-dark);
  font-weight: 700;
}

.photo-frame img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.property-body {
  padding: 14px;
}

.property-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--brand-dark);
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.sold {
  color: #7f1d1d;
  background: #fee2e2;
}

.property-card.is-sold .photo-frame {
  position: relative;
}

.property-card.is-sold .photo-frame::after {
  content: "Venduto";
  position: absolute;
  top: 14px;
  left: 14px;
  border-radius: 8px;
  padding: 7px 10px;
  color: white;
  background: #991b1b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.location {
  color: var(--muted);
  font-weight: 700;
}

.price {
  margin-bottom: 8px;
  color: var(--brand-dark);
  font-size: 19px;
  font-weight: 800;
}

.description {
  color: #475467;
  line-height: 1.5;
}

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

.features div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
}

.features dt {
  color: var(--muted);
  font-size: 12px;
}

.features dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.office-box {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: #475467;
  line-height: 1.45;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.link-button {
  min-width: 112px;
}

.admin-shell {
  max-width: 1180px;
  margin: 34px auto 0;
  padding: 24px;
}

.admin-shell.narrow {
  max-width: 560px;
}

.hidden {
  display: none !important;
}

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

.management-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  margin: 18px 0;
}

.office-list-panel {
  grid-column: 1 / -1;
}

.panel {
  padding: 18px;
  box-shadow: none;
}

.compact-crm-form {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.crm-list-item {
  align-items: start;
}

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

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

.crm-kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  align-items: start;
}

.kanban-column {
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.kanban-column h4 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 15px;
}

.kanban-column h4 span {
  display: inline-grid;
  min-width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--brand);
  font-size: 12px;
}

.kanban-card {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 10px;
  background: white;
}

.deal-column {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.deal-column.status-calda,
.deal-card.status-calda {
  border-left-color: #dc2626;
}

.deal-column.status-fredda,
.deal-card.status-fredda {
  border-left-color: #0ea5e9;
}

.deal-column.status-in-chiusura,
.deal-card.status-in-chiusura {
  border-left-color: #f59e0b;
}

.deal-column.status-chiusa-con-successo,
.deal-card.status-chiusa-con-successo {
  border-left-color: #16a34a;
}

.deal-column.status-chiusa-persa,
.deal-card.status-chiusa-persa {
  border-left-color: #64748b;
}

.deal-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.deal-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.deal-party-list {
  display: grid;
  gap: 4px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}

.deal-party-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.party-role {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.party-role.seller {
  background: #b91c1c;
}

.party-role.buyer {
  background: #166534;
}

.kanban-card span,
.kanban-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.task-history-section {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fafc;
}

.task-history-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
}

.task-history-details summary span {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: #64748b;
  font-size: 12px;
}

.task-history-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.task-history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.task-history-toolbar .hint {
  margin: 0;
}

.task-list-column {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  min-height: 0;
  background: #ffffff;
}

.task-list-row {
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
  padding: 9px 10px;
}

.task-row-main,
.task-row-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.task-row-main strong,
.task-row-main span,
.task-row-meta strong,
.task-row-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-row-meta {
  grid-template-columns: repeat(3, minmax(0, auto));
  justify-content: start;
  color: var(--muted);
  font-size: 13px;
}

.task-date {
  color: var(--ink);
  font-weight: 800;
}

.task-list-row.due-today {
  border-left-color: #0ea5e9;
  background: #f0f9ff;
}

.task-list-row.due-overdue {
  border-left-color: #dc2626;
  background: #fff7f7;
}

.task-list-row.due-no-due {
  border-left-color: #eab308;
  background: #fffbeb;
}

.task-list-row.due-no-due .task-date {
  color: #92400e;
}

.task-profile-panel {
  backdrop-filter: blur(3px);
}

.task-reference-field {
  display: grid;
  gap: 6px;
}

.task-reference-field input[type="search"] {
  width: 100%;
}

.task-no-due-date-dialog {
  max-width: 460px;
}

.task-profile-modal {
  width: min(980px, 96vw);
}

.task-profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.task-profile-header h3 {
  margin: 0;
}

.priority-alta,
.priority-urgente {
  border-left-color: var(--accent);
}

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

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

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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


.personal-stats-heading {
  grid-column: 1 / -1;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.personal-stats-period-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.personal-period-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfe;
}

.personal-period-card h4 {
  margin: 0;
  font-size: 15px;
  color: var(--brand-dark);
}

.personal-period-metrics {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: baseline;
}

.personal-period-metrics span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.personal-period-metrics strong {
  color: var(--ink);
  font-size: 20px;
}

.owner-stats-section {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
}

.owner-stats-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.owner-stats-heading h4,
.owner-team-summary h4 {
  margin: 0;
}

.owner-stats-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
}

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

.owner-office-card strong {
  font-size: 24px;
}

.owner-stats-detail summary {
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 800;
}

.owner-stats-detail div {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: normal;
}

.owner-team-summary {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.owner-team-summary p,
.owner-stats-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.monthly-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.chart-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.chart-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.chart-heading h4 {
  margin: 0;
}

.chart-heading span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.bar-chart {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(42px, 1fr);
  align-items: end;
  gap: 10px;
  min-height: 168px;
  overflow-x: auto;
  padding: 12px 2px 0;
}

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

.stats-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.stats-table th,
.stats-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}

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

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

.bar-group {
  display: grid;
  justify-items: center;
  align-items: end;
  gap: 6px;
  min-width: 42px;
}

.bar-group strong {
  max-width: 60px;
  color: var(--ink);
  font-size: 12px;
  text-align: center;
  overflow-wrap: anywhere;
}

.bar-group span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.stacked-bar,
.single-bar {
  display: flex;
  flex-direction: column-reverse;
  width: 26px;
  min-height: 4px;
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  background: #e5e7eb;
}

.single-bar {
  background: #2563eb;
}

.stats-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 10px 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.stats-legend i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

.stacked-bar i {
  display: block;
  width: 100%;
}

.segment-leads {
  background: #2563eb;
}

.segment-news {
  background: #16a34a;
}

.segment-acquisitions {
  background: #f59e0b;
}

.segment-appointments {
  background: #7c3aed;
}

.agenda-calendar {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: white;
}

.agenda-calendar-title {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
  text-transform: capitalize;
}

.agenda-weekdays,
.agenda-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.agenda-days.week-view {
  min-height: 170px;
}

.agenda-time-grid,
.agenda-week-schedule {
  min-width: 720px;
  background: #fff;
}

.agenda-time-grid {
  max-height: 640px;
  overflow: auto;
}

.agenda-time-row,
.agenda-week-row,
.agenda-week-header {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
}

.agenda-week-row,
.agenda-week-header {
  grid-template-columns: 72px repeat(7, minmax(92px, 1fr));
}

.agenda-week-header {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.agenda-week-header span {
  padding: 10px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: capitalize;
}

.agenda-week-header span.today {
  color: var(--brand-dark);
  background: #eff6ff;
}

.agenda-time-label {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.agenda-time-slot {
  display: grid;
  min-height: 58px;
  align-content: start;
  gap: 4px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.agenda-time-slot:hover,
.agenda-day:hover {
  background: #f8fafc;
}

.agenda-empty-slot {
  color: #94a3b8;
  font-size: 12px;
}

.agenda-event-chip {
  display: grid;
  gap: 2px;
  overflow: hidden;
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  padding: 5px 7px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.agenda-event-chip small {
  color: #475569;
  font-size: 10px;
  font-weight: 700;
}

.agenda-event-chip.task {
  border-left-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

.agenda-event-chip.appointment {
  border-left-color: #7c3aed;
  background: #f5f3ff;
  color: #5b21b6;
}

.agenda-source-badge {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  border-radius: 999px;
  padding: 2px 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.5;
}

.agenda-source-appointment {
  background: #f5f3ff;
  color: #5b21b6;
}

.agenda-source-task {
  background: #fffbeb;
  color: #92400e;
}

.agenda-appointment-panel {
  margin-top: 18px;
}

.agenda-weekdays span {
  padding: 10px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.agenda-day {
  min-height: 96px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 8px;
  background: white;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.agenda-day.empty {
  background: #f8fafc;
}

.agenda-day.today {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.agenda-day strong,
.agenda-day span,
.agenda-day small {
  display: block;
}

.agenda-day span {
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-notes {
  border-left: 3px solid var(--brand);
  padding-left: 12px;
  color: var(--muted);
}

.public-tour-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.office-management-shell {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-top: 12px;
}

.office-sidebar {
  position: sticky;
  top: 78px;
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: calc(100vh - 92px);
  overflow: auto;
  padding: 8px;
  background: white;
  box-shadow: var(--panel-shadow);
}

.office-menu-button {
  justify-content: flex-start;
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 9px;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.office-menu-button:hover,
.office-menu-button.active {
  border-color: #b7d9d5;
  color: var(--brand-dark);
  background: #e6f4f1;
}

.office-section-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.sub-panel {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.editor-panel {
  margin-top: 18px;
}

.form-fieldset {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}

.property-form > .form-fieldset + .form-fieldset {
  margin-top: 4px;
}

.form-fieldset legend {
  padding: 0 6px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
}

.request-compatible-section {
  padding: 0;
}

.request-compatible-section > summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 11px 42px 11px 12px;
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  list-style: none;
}

.request-compatible-section > summary::-webkit-details-marker {
  display: none;
}

.request-compatible-section > summary::marker {
  content: "";
}

.request-compatible-section > summary::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.request-compatible-section[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.request-compatible-section[open] > summary::after {
  content: "▴";
}

.request-compatible-section .match-list {
  padding: 12px;
}

.property-detail-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
  color: var(--ink);
}

.property-detail-summary strong,
.property-detail-summary small,
.property-detail-summary span {
  display: block;
}

.property-detail-summary strong {
  margin-top: 3px;
  font-size: 18px;
  line-height: 1.2;
}

.property-detail-summary small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.4;
}

.summary-kicker {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.property-summary-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: min(260px, 100%);
}

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

.property-detail-section {
  min-width: 0;
}

.property-detail-section > summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  position: relative;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 42px 9px 12px;
  background: #fff;
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.property-detail-section > summary span {
  flex: 1 1 auto;
}

.property-detail-section > summary small {
  flex: 0 1 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.property-section-edit-button {
  flex: 0 0 auto;
  padding: 5px 9px;
}

.property-detail-section > summary::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.property-detail-section[open] > summary {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  background: #f8fafc;
}

.property-detail-section[open] > summary::after {
  content: "▴";
}

.property-detail-section.section-edit-active > summary {
  border-color: rgba(15, 118, 110, 0.45);
  background: #ecfdf5;
}

.property-section-edit-notice {
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  padding: 9px 10px;
  background: #f0fdfa;
  color: #115e59;
  font-weight: 700;
}

.property-section-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
}

.address-line-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 140px);
  gap: 12px;
  align-items: end;
}

.property-detail-section > .form-fieldset {
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

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

.list-filter {
  margin: 14px 0;
}

.list-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 220px));
  gap: 10px;
  margin: 0 0 12px;
}

.lead-guide-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  cursor: default;
  border-style: dashed;
  background: #f8fafc;
}

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

.lead-example-grid article {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.lead-example-grid span,
.lead-example-grid small {
  color: var(--muted);
}

.lead-example-grid p {
  margin: 0;
}

.lead-example-badge {
  justify-self: start;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 2px 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}

.lead-list-item {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.26fr);
}

.lead-list-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lead-list-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.lead-list-heading small {
  color: var(--muted);
  white-space: nowrap;
}

.lead-list-message {
  margin: 6px 0 0;
}

.lead-detail-overlay {
  position: fixed;
  inset: 72px max(18px, calc((100vw - 980px) / 2)) 18px;
  z-index: 62;
  overflow: auto;
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.lead-detail-overlay.hidden {
  display: none;
}

.lead-detail-sections {
  display: grid;
  gap: 14px;
}

.lead-detail-section {
  cursor: default;
}

.lead-detail-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.lead-detail-field {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.lead-detail-field span,
.lead-status-inline {
  color: var(--muted);
  font-size: 13px;
}

.lead-detail-field strong {
  color: var(--ink);
  font-size: 14px;
}

.lead-status-inline {
  display: grid;
  max-width: 280px;
  gap: 6px;
  margin-top: 12px;
}

.lead-detail-actions {
  justify-content: start;
}

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

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

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

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

.check-row input {
  width: auto;
}

.address-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.compact-suggestions {
  align-self: start;
  max-height: 220px;
  overflow: auto;
}

.request-town-autocomplete {
  position: relative;
  display: block;
}

.inline-input-action .request-town-autocomplete {
  flex: 1;
}

.crm-autocomplete-list {
  position: absolute;
  z-index: 45;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

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

.crm-autocomplete-option:hover,
.crm-autocomplete-option.is-active {
  background: #e6f4f1;
}

.crm-autocomplete-province {
  flex: 0 0 auto;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  padding: 2px 7px;
  color: #0f766e;
  background: #f0fdfa;
  font-size: 11px;
  font-weight: 800;
}

.suggestion-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  background: #f8fafc;
}

.suggestion-item:hover {
  border-color: var(--brand);
}

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

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

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

.office-list,
.admin-property-list {
  display: grid;
  gap: 8px;
}

.collaborator-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}

.collaborator-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.collaborator-action-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  background: #ffffff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.collaborator-action-button:hover,
.collaborator-action-button.active {
  border-color: rgba(15, 118, 110, 0.45);
  background: #ecfdf5;
  color: #0f766e;
}

.collaborator-action-button.primary {
  border-color: #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.collaborator-action-button.primary:hover {
  background: #115e59;
  color: #ffffff;
}

.office-item,
.admin-property-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfe;
}

.office-item {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.48fr);
  align-items: start;
  max-width: 100%;
}

.office-item span {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.office-item .admin-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

.office-item .ghost-button,
.office-item .danger-button {
  min-height: 38px;
  padding: 8px 10px;
  white-space: normal;
}

.admin-property-item {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.collaborator-profile-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #f8fafc;
}

.collaborator-profile-panel.hidden {
  display: none;
}

.collaborator-profile-overlay {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  padding: 18px;
  background: rgba(15, 23, 42, 0.48);
}

.collaborator-profile-modal {
  width: min(1280px, 96vw);
}

.collaborator-profile-edit-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.collaborator-profile-header,
.profile-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.collaborator-profile-header h3,
.profile-card-heading h4 {
  margin: 0;
}

.collaborator-profile-content {
  display: grid;
  gap: 14px;
}

.collaborator-profile-sections {
  display: grid;
  gap: 10px;
}

.collaborator-profile-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--panel-shadow);
}

.collaborator-profile-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  min-height: 58px;
  padding: 12px 44px 12px 14px;
  cursor: pointer;
  list-style: none;
}

.collaborator-profile-section > summary::-webkit-details-marker {
  display: none;
}

.collaborator-profile-section > summary::marker {
  content: "";
}

.collaborator-profile-section > summary::after {
  content: "▾";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
}

.collaborator-profile-section[open] > summary::after {
  content: "▴";
}

.collaborator-profile-section > summary span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.collaborator-profile-section > summary strong {
  color: var(--brand-dark);
}

.collaborator-profile-section > summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.collaborator-profile-section-body {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 14px;
}

.collaborator-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 14px;
}

.collaborator-profile-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  box-shadow: none;
}

.inline-feedback {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  padding: 11px 13px;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 14px;
  line-height: 1.4;
}

.inline-feedback.is-info {
  border-left-color: #2563eb;
}

.inline-feedback.is-warning {
  border-left-color: #d97706;
  background: #fffbeb;
}

.inline-feedback.is-error {
  border-left-color: #dc2626;
  background: #fef2f2;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.status-pill.status-active {
  color: #14532d;
  background: #dcfce7;
}

.status-pill.status-warning {
  color: #7f1d1d;
  background: #fee2e2;
}

.profile-definition-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.profile-definition-list div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profile-definition-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-definition-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--brand-dark);
  font-weight: 700;
}

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

.assignment-kpi-grid div {
  display: grid;
  gap: 4px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #f8fafc;
}

.assignment-kpi-grid strong {
  color: var(--brand-dark);
  font-size: 24px;
  line-height: 1;
}

.assignment-kpi-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.assignment-lists-grid h5 {
  margin: 0 0 8px;
  color: var(--brand-dark);
}

.compact-profile-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-profile-list li {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfcfe;
}

.compact-profile-list span {
  color: var(--muted);
  font-size: 12px;
}

.permissions-accordion {
  display: grid;
  gap: 8px;
}

.permission-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfe;
}

.permission-section summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  position: relative;
  min-height: 42px;
  padding-right: 34px;
  cursor: pointer;
  font-weight: 800;
}

.permission-section summary::-webkit-details-marker {
  display: none;
}

.permission-section summary::marker {
  content: "";
}

.permission-section summary::after {
  content: "▾";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 17px;
  font-weight: 900;
}

.permission-section[open] summary::after {
  content: "▴";
}

.permission-section-title {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}

.permission-section-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.permission-action-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.permission-action-list-readonly {
  margin-top: 12px;
}

.permission-simple-summary {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  color: var(--brand-dark);
}

.permission-simple-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

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

.permission-readonly-summary strong {
  color: var(--brand-dark);
  font-size: 15px;
}

.permission-readonly-summary span,
.permission-section-summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.permission-action-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.permission-action-main small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.permission-badge-standard {
  color: #334155;
  background: #e2e8f0;
}

.permission-badge-added {
  color: #14532d;
  background: #dcfce7;
}

.permission-badge-removed,
.permission-badge-locked {
  color: #7f1d1d;
  background: #fee2e2;
}

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

.permission-section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.permission-section-toggle,
.permission-action-toggle {
  justify-content: flex-start;
  color: var(--brand-dark);
  font-weight: 800;
}

.permission-section-toggle {
  margin-top: 10px;
}

.permission-section.local-changed,
.permission-action-row.local-changed {
  border-color: #86efac;
  background: #f0fdf4;
}

.permission-preview-box {
  display: grid;
  gap: 10px;
}

.collaborator-permission-preview-backdrop {
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(4px);
}

.collaborator-permission-preview-modal {
  width: min(860px, 100%);
}

.permission-effective-preview-list {
  display: grid;
  gap: 10px;
}

.permission-effective-preview-section {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.permission-effective-preview-section h5 {
  margin: 0;
  color: var(--brand-dark);
}

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

.permission-preview-grid h5 {
  margin: 0 0 8px;
  color: var(--brand-dark);
}

.permission-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(100px, 0.55fr) repeat(4, auto);
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 7px;
  font-size: 13px;
}

.permission-action-row-readonly {
  grid-template-columns: minmax(0, 1.35fr) minmax(100px, 0.5fr) repeat(3, auto);
}

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

.future-actions-row button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}


.collaborator-status-modal {
  width: min(620px, 100%);
}

.collaborator-status-message {
  display: grid;
  gap: 8px;
  color: var(--brand-dark);
}

.collaborator-status-message p {
  margin: 0;
}

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

.collaborator-reset-password-modal {
  width: min(620px, 100%);
}

.collaborator-reset-password-message {
  display: grid;
  gap: 8px;
  color: var(--brand-dark);
}

.collaborator-reset-password-message p {
  margin: 0;
}

.collaborator-transfer-modal {
  width: min(700px, 100%);
}

.collaborator-transfer-message {
  display: grid;
  gap: 8px;
  color: var(--brand-dark);
}

.collaborator-transfer-message p {
  margin: 0;
}

.collaborator-transfer-options {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.collaborator-transfer-options legend {
  padding: 0 6px;
  color: var(--brand-dark);
  font-weight: 800;
}

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

.transfer-category-item {
  justify-content: flex-start;
}

.transfer-category-item input:disabled + span {
  color: var(--muted);
}

.collaborator-profile-loading {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.empty-state.compact {
  margin: 0;
  padding: 9px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 860px) {
  .collaborator-profile-edit-form {
    grid-template-columns: 1fr;
  }

  .collaborator-profile-header,
  .profile-card-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-badges {
    justify-content: flex-start;
  }

  .collaborator-profile-grid,
  .assignment-lists-grid {
    grid-template-columns: 1fr;
  }

  .profile-definition-list,
  .assignment-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .permission-readonly-summary,
  .permission-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .profile-definition-list,
  .assignment-kpi-grid,
  .permission-readonly-summary,
  .permission-preview-grid {
    grid-template-columns: 1fr;
  }
}

.compact-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.62fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfe;
  box-shadow: var(--panel-shadow);
}

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

.coordinator-listings-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12px;
}

.coordinator-listings-table th,
.coordinator-listings-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.coordinator-listings-table th {
  background: #f8fafc;
  color: var(--muted);
  font-weight: 700;
}

.coordinator-listings-quality-alerts {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.coordinator-listings-cover {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 32px;
  border-radius: 6px;
  background: #e2e8f0;
  color: #334155;
  font-weight: 700;
}

.property-list-item,
.request-list-item {
  grid-template-columns: minmax(0, 1fr) minmax(138px, 0.32fr) auto;
  align-items: center;
  min-height: 132px;
  gap: 8px;
  padding: 7px 9px;
}

.property-list-item,
.request-list-item {
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.46fr) auto;
}

.compact-list-item.status-censito {
  border-left: 6px solid #64748b;
}

.compact-list-item.status-notizia {
  border-left: 6px solid #f59e0b;
  background: #fffbeb;
}

.compact-list-item.status-incarico-verbale {
  border-left: 6px solid #8b5cf6;
  background: #f5f3ff;
}

.compact-list-item.status-incarico {
  border-left: 6px solid #14b8a6;
  background: #f0fdfa;
}

.compact-list-item.status-vendita {
  border-left: 6px solid #2563eb;
  background: #eff6ff;
}

.compact-list-item.status-affitto {
  border-left: 6px solid #16a34a;
  background: #f0fdf4;
}

.compact-list-item.is-bought {
  border-left: 6px solid #991b1b;
  background: #fff1f2;
}

.category-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  color: #111827;
  background: white;
  font-size: 12px;
  font-weight: 800;
}

.secondary-pill {
  color: #334155;
  background: #eef2f7;
}

.property-contact,
.request-phone-row {
  display: grid;
  grid-template-columns: max-content auto;
  align-items: center;
  gap: 1px 6px;
}

.property-contact strong {
  grid-column: 1 / -1;
}

.property-contact strong,
.property-phone {
  margin: 0;
}

.property-phone-actions {
  display: inline-flex !important;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 0 !important;
}

.property-list-item .property-contact {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  gap: 5px 8px;
  width: fit-content;
  max-width: 100%;
}

.property-list-item .property-contact strong {
  white-space: nowrap;
}

.property-list-item .property-phone {
  white-space: nowrap;
}

.property-list-item .property-phone-actions {
  grid-column: 1 / -1;
  display: inline-flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.property-list-item .phone-action-button,
.request-list-item .phone-action-button {
  width: 76px;
  justify-content: center;
}

.property-status-row {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px !important;
}

.property-list-item .property-status-row,
.request-list-item .property-status-row {
  gap: 3px;
  margin-top: 2px !important;
  min-height: 22px;
}

.inline-input-action {
  display: flex;
  gap: 8px;
  align-items: end;
}

.inline-input-action input {
  flex: 1;
}

.field-hint {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tag-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  color: #334155;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 800;
}

.tag-chip-remove {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #475467;
  background: #e5e7eb;
  cursor: pointer;
  font-weight: 900;
}

.tag-chip-remove:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.property-last-note {
  background: #fff;
  border-color: #d8e3e1;
}

.document-status-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.document-status-pill.ok {
  color: #14532d;
  background: #dcfce7;
}

.document-status-pill.missing {
  color: #7f1d1d;
  background: #fee2e2;
}

.compact-list-item span {
  display: block;
  margin-top: 4px;
}

.property-list-item span,
.request-list-item span {
  margin-top: 0;
}

.inline-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.collaborator-location-map {
  width: min(100%, 260px);
  height: 132px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef4f0;
}

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

.note-summary {
  display: grid;
  min-width: 0;
  height: 76px;
  border: 1px solid #b7d9d5;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  color: #475467;
  background: #f0fdfa;
}

.note-summary strong {
  color: var(--brand-dark);
  font-size: 12px;
}

.note-summary span {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
  font-size: 13px;
}

.property-list-item .note-summary,
.request-list-item .note-summary {
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  height: 64px;
  min-height: 64px;
  gap: 5px;
  padding: 8px 10px;
  text-align: center;
}

.property-list-item .note-summary,
.request-list-item .note-summary {
  height: 92px;
  min-height: 92px;
  padding: 10px 12px;
}

.property-list-item .note-summary strong,
.request-list-item .note-summary strong {
  font-size: 13px;
  line-height: 1.05;
}

.property-list-item .note-summary span,
.request-list-item .note-summary span {
  margin-top: 0;
  -webkit-line-clamp: 1;
  font-size: 13px;
  line-height: 1.25;
}

.property-list-item .note-summary span,
.request-list-item .note-summary span {
  -webkit-line-clamp: 4;
  font-size: 12px;
  line-height: 1.28;
}

.request-summary-line {
  font-weight: 700;
}

.request-card-header {
  display: flex !important;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.request-card-header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-list-item .request-state-pill {
  flex: 0 0 auto;
}

.request-list-item .request-summary-line,
.request-list-item .request-location-line {
  display: block;
  overflow: hidden;
  margin-top: 0;
  line-height: 1.2;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-list-item .request-phone-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  line-height: 1.15;
}

.request-list-item .property-phone-actions {
  gap: 5px;
}

.property-list-item .compact-main,
.request-list-item .compact-main {
  display: grid;
  gap: 2px;
}

.request-list-item .compact-main {
  gap: 1px;
}

.property-list-item .category-pill,
.request-list-item .category-pill,
.property-list-item .document-status-pill,
.request-list-item .document-status-pill {
  padding: 2px 5px;
  font-size: 10px;
  line-height: 1.2;
}

.property-list-item .inline-link,
.request-list-item .inline-link {
  margin-top: 0;
  font-size: 11px;
}

.property-list-item .tiny-button,
.request-list-item .tiny-button {
  min-height: 22px;
  padding: 3px 5px;
  font-size: 11px;
}

.property-list-item .small-button,
.request-list-item .small-button {
  min-height: 26px;
  padding: 4px 6px;
  font-size: 12px;
}

.compact-actions {
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr;
  align-self: center;
  justify-items: center;
}

.property-owner-manager {
  display: grid;
  gap: 8px;
}

.property-owner-form-panel {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
}

.property-owner-add-panel {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.property-owner-add-panel label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 800;
}

.property-owner-list {
  display: grid;
  gap: 6px;
}

.property-owner-item {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: #f8fafc;
}

.property-owner-entry > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.property-owner-entry-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.property-owner-entry-name,
.property-owner-entry-phone {
  color: var(--ink);
}

.property-owner-entry-phone {
  font-weight: 900;
}

.property-owner-entry > summary::marker {
  color: var(--brand-dark);
}

.property-owner-entry-body {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 8px 10px 10px;
  background: #fff;
}

.property-owner-entry-data {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px 10px;
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.property-owner-entry-data div {
  display: grid;
  gap: 2px;
}

.property-owner-entry-data dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.property-owner-entry-data dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.property-owner-inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 10px;
}

.property-owner-inline-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.property-owner-entry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  justify-items: end;
  grid-template-columns: none;
}

.owner-role-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 900;
}

.owner-role-badge.primary {
  color: #065f46;
  background: #d1fae5;
}

.owner-role-badge.secondary {
  color: #1e40af;
  background: #dbeafe;
}

.property-owner-edit-hint {
  border-radius: 8px;
  padding: 7px 9px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
}

.property-owner-main {
  display: inline-flex;
  width: fit-content;
  min-width: 0;
  gap: 6px;
  align-items: center;
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: #f8fafc;
  cursor: pointer;
}

.property-owner-main input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand-dark);
}

.property-owner-main span {
  display: inline;
  min-width: 0;
  font-size: 13px;
  font-weight: 900;
}

.property-owner-main small {
  color: var(--muted);
  font-size: 12px;
}

.property-owner-add-row {
  align-items: center;
}

.property-owner-add-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  grid-template-columns: none;
}

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

.property-owner-detail dl,
.property-owner-detail div {
  display: grid;
  gap: 4px;
  margin: 0;
}

.property-owner-detail dl {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px 12px;
}

.property-owner-detail dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.property-owner-detail dd {
  margin: 0;
  font-weight: 700;
}

.property-owner-duplicate-panel {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  padding: 10px;
  background: #fffbeb;
}

.property-owner-duplicate-list {
  display: grid;
  gap: 6px;
}

.property-owner-duplicate-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.property-owner-duplicate-list small {
  color: var(--muted);
}

.compact-status-select {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: white;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.client-list-item {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.65fr) auto;
}

.client-detail-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.client-detail-section {
  cursor: default;
}

.client-linked-preview-layer {
  position: fixed;
  inset: 0;
  z-index: 64;
  display: grid;
  place-items: center;
  padding: 18px;
}

.client-linked-preview-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
}

.client-linked-preview-card {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 72px);
  gap: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.client-linked-preview-card .section-heading {
  align-items: start;
}

.client-linked-preview-data {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 12px 0 0;
}

.client-linked-preview-data div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.client-linked-preview-data dt {
  color: var(--muted);
  font-size: 13px;
}

.client-linked-preview-data dd {
  margin: 0;
  font-weight: 700;
}

.client-linked-preview-actions {
  justify-content: end;
}

.client-detail-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.client-detail-field {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.client-detail-field span,
.client-action-availability span {
  color: var(--muted);
  font-size: 13px;
}

.client-detail-field strong {
  color: var(--ink);
  font-size: 14px;
}

.client-action-availability {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.client-detail-subheading {
  margin-bottom: 10px;
}

.client-linked-item {
  display: grid;
  gap: 4px;
  width: 100%;
  border-top: 1px solid var(--line);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  padding: 10px 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.client-linked-item:first-of-type {
  border-top: 0;
}

.client-linked-item:hover,
.client-linked-item:focus-visible {
  color: var(--brand-dark);
}

.client-linked-item span {
  color: var(--muted);
  font-size: 13px;
}

.client-linked-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.client-list-linked-counts {
  gap: 6px;
  margin-top: 6px;
}

.client-linked-count {
  display: grid;
  min-width: 150px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.client-linked-count strong {
  color: var(--brand-dark);
  font-size: 22px;
}

.client-linked-count span {
  color: var(--muted);
  font-size: 13px;
}

.client-linked-count.is-disabled {
  cursor: default;
  opacity: 0.55;
}

.client-list-linked-counts .client-linked-count {
  min-width: 118px;
  padding: 6px 8px;
}

.client-list-linked-counts .client-linked-count strong {
  font-size: 16px;
}

.client-linked-item.is-highlighted,
.comparison-card.is-highlighted {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.12);
}

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

.media-upload-box {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.photo-preview-item {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: white;
}

.photo-preview-item.is-cover {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.photo-preview-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  object-fit: cover;
}

.photo-thumb-button {
  border: 0;
  padding: 0;
  cursor: zoom-in;
  background: transparent;
  text-align: left;
}

.photo-preview-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.media-document-thumb {
  display: grid;
  min-width: 62px;
  min-height: 62px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #0f172a;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.media-document-thumb img {
  width: 62px;
  height: 62px;
  border-radius: 8px;
  object-fit: cover;
}

.document-kind-pill {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.photo-preview-actions .small-button,
.document-archive-item .small-button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.social-draft-form textarea {
  min-height: 150px;
}

.social-channel-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.social-channel-toggle legend {
  flex: 0 0 100%;
}

.social-channel-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  margin: 0;
  font-weight: 800;
}

.social-draft-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.social-draft-image-option {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: white;
  cursor: pointer;
}

.social-draft-image-option img,
.social-draft-preview-images img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
}

.social-draft-preview {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.social-draft-preview-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.social-draft-preview-header span,
.social-draft-hashtags {
  color: var(--muted);
  font-size: 13px;
}

.social-draft-preview-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 112px));
  gap: 8px;
  align-items: start;
}

.social-draft-preview pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.5;
}

.document-archive-fieldset .hint {
  margin-top: 0;
}

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

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

.document-archive-item.pending {
  border-style: dashed;
  background: #f8fafc;
}

.document-archive-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.document-archive-item .document-kind-pill {
  display: inline-flex;
  color: #0f172a;
  font-size: 11px;
}

.document-archive-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.document-archive-main div {
  min-width: 0;
}

.document-archive-main strong,
.document-archive-main span {
  overflow-wrap: anywhere;
}

.document-type-select {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.document-type-select select {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
  color: var(--ink);
}

.upload-status,
.publication-summary,
.publication-action-list,
.timeline-list {
  display: grid;
  gap: 10px;
}

.upload-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

.upload-status.is-success {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: #115e59;
}

.upload-status.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.upload-status.is-error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.media-modal-panel {
  display: grid;
  width: min(920px, 100%);
  max-height: 92vh;
  gap: 14px;
  overflow: auto;
  border-radius: 8px;
  padding: 18px;
  background: white;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

.media-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.media-preview-body {
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.media-preview-body img,
.media-preview-body iframe {
  width: 100%;
  max-height: 72vh;
  border: 0;
  border-radius: 8px;
  object-fit: contain;
  background: white;
}

.media-preview-body iframe {
  min-height: min(72vh, 720px);
}

.crop-modal-panel {
  width: min(760px, 100%);
}

.image-crop-canvas {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
}

.crop-control {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.publication-status-card,
.publication-target,
.publication-action-item,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 10px;
}

.publication-status-card,
.publication-action-item,
.timeline-item {
  display: grid;
  gap: 4px;
}

.publication-target-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

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

.publication-target-group h4,
.publication-target-group p {
  margin: 0;
}

.publication-target-group h4 {
  color: var(--brand-dark);
  font-size: 15px;
}

.publication-target-group p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.publication-target-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.publication-target {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
}

.publication-target span,
.publication-action-item div,
.timeline-item div {
  display: grid;
  gap: 3px;
}

.publication-target small,
.publication-action-item small,
.timeline-item span,
.timeline-item p,
.upload-status {
  color: var(--muted);
}

.publication-target em {
  color: #b42318;
  font-style: normal;
}

.private-photo-preview {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 10px;
  background: #fffbeb;
  color: #854d0e;
  font-weight: 800;
}

.private-photo-preview img {
  width: 130px;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
}

.agency-image-preview {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.agency-image-preview img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.integration-fieldset {
  margin-top: 4px;
}

.appointment-box {
  display: grid;
  gap: 10px;
  border: 1px solid #d7e3dc;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.check-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

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

.appointment-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.45);
}

.note-modal {
  width: min(680px, 100%);
  max-height: 92vh;
  overflow: auto;
  display: grid;
  gap: 14px;
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

.note-modal textarea {
  resize: vertical;
}

.note-modal.collaborator-profile-modal {
  width: min(1280px, 96vw);
}

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

.small-button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.tiny-button {
  min-height: 28px;
  padding: 4px 7px;
  font-size: 11px;
}

.whatsapp-button {
  border-color: #15803d;
  background: #15803d;
  color: #ffffff;
}

.whatsapp-button:hover {
  background: #166534;
  color: #ffffff;
}

.notes-history {
  display: grid;
  gap: 10px;
}

.note-history-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
}

.note-history-item p {
  margin: 6px 0 0;
  color: #475467;
}

.note-location {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.location-history {
  margin-top: 8px;
}

.location-history summary {
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 800;
}

.match-score {
  display: grid;
  width: 86px;
  height: 64px;
  place-items: center;
  border: 2px solid #0f766e;
  border-radius: 8px;
  color: var(--brand-dark);
  background: #f0fdfa;
}

.match-score strong {
  font-size: 22px;
}

.match-score span {
  margin: 0;
  font-size: 12px;
}

.match-highlight-list {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.match-highlight-list span {
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 13px;
}

.match-ok {
  background: #ecfdf3;
  color: #166534;
}

.match-gap {
  background: #fff7ed;
  color: #9a3412;
}

.comparison-panel {
  margin-top: 18px;
}

.crm-overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(3px);
}

.crm-overlay-backdrop.hidden {
  display: none;
}

.detail-overlay-panel {
  position: fixed;
  inset: 72px max(16px, calc((100vw - 1180px) / 2)) 18px;
  z-index: 60;
  overflow: auto;
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #f8fafc;
  box-shadow: var(--shadow);
}

.detail-overlay-panel.hidden {
  display: none;
}

.client-create-overlay {
  position: fixed;
  inset: 72px max(20px, calc((100vw - 860px) / 2)) auto;
  z-index: 62;
  max-height: calc(100vh - 110px);
  overflow: auto;
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.client-create-overlay.hidden {
  display: none;
}

.property-editor-overlay {
  background: #ffffff;
}

.icon-close-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.icon-close-button:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.client-create-form,
.client-create-grid,
.client-create-links {
  display: grid;
  gap: 12px;
}

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

.client-create-note {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.client-create-note textarea {
  resize: vertical;
}

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

.client-create-links article {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.client-create-links h4,
.client-create-links p {
  margin: 0;
}

.client-create-actions {
  justify-content: flex-end;
}

.property-owner-duplicate-panel dl div.is-same dd,
.property-owner-duplicate-panel dl div.is-same dt {
  color: #166534;
}

.property-owner-duplicate-panel dl div.is-only-existing dd,
.property-owner-duplicate-panel dl div.is-only-existing dt,
.property-owner-duplicate-panel dl div.is-only-new dd,
.property-owner-duplicate-panel dl div.is-only-new dt,
.property-owner-duplicate-panel dl div.is-different dd,
.property-owner-duplicate-panel dl div.is-different dt {
  color: #9a3412;
}

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

.comparison-card,
.match-mini-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  background: white;
}

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

.match-mini-card {
  display: grid;
  gap: 4px;
}

.match-mini-card:focus-visible {
  outline: 3px solid rgba(20, 184, 166, 0.28);
  outline-offset: 2px;
}

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

.match-side-card {
  min-width: 0;
}

.match-aligned-fields {
  display: grid;
  gap: 6px;
}

.match-aligned-fields div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.match-mini-card.open {
  border-width: 2px;
  border-color: #14b8a6;
  background: #f0fdfa;
}

.match-mini-card.processed {
  opacity: 0.55;
  background: #f3f4f6;
}

.processed-cross-section {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.processed-cross-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #d8dee8;
  border-left: 5px solid #94a3b8;
  border-radius: 8px;
  padding: 9px 10px;
  background: #f8fafc;
  color: #475467;
}

.processed-cross-item span,
.processed-cross-item small {
  display: block;
  margin-top: 3px;
}

.match-mini-card small {
  color: var(--muted);
}

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

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

.active-office-switcher {
  min-width: min(260px, 100%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.active-office-switcher select {
  min-height: 38px;
  margin-top: 4px;
  border-radius: 8px;
}

.office-directory {
  position: relative;
  padding: 0 54px;
}

.office-directory-section {
  margin: 56px calc(50% - 50vw) 0;
  padding: 46px max(24px, calc(50vw - 590px)) 54px;
  background: #eef4f0;
  border-top: 1px solid #d7e3dc;
  border-bottom: 1px solid #d7e3dc;
}

.office-card,
.office-hero,
.property-detail-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: white;
}

.office-card {
  display: grid;
  gap: 8px;
  flex: 0 0 150px;
  min-height: 150px;
  align-content: start;
  padding: 12px;
  cursor: pointer;
  color: inherit;
  text-align: center;
  box-shadow: none;
}

.office-carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.office-carousel-controls {
  pointer-events: none;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.carousel-arrow {
  pointer-events: auto;
  width: 40px;
  min-height: 40px;
  padding: 0;
  font-size: 25px;
  line-height: 1;
}

.office-directory .office-photo {
  width: 78px;
  height: 78px;
  min-height: 78px;
  margin: 0 auto;
  border-radius: 999px;
  overflow: hidden;
  font-size: 12px;
}

.office-card-copy {
  display: grid;
  gap: 3px;
}

.office-card h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
}

.office-card p {
  margin: 0;
  font-size: 12px;
}

.office-directory .ghost-button,
.office-directory .link-button {
  border-color: var(--brand-dark);
  color: white;
  background: var(--brand-dark);
}

.office-directory .ghost-button:hover,
.office-directory .link-button:hover {
  background: #0b4f4a;
}

.mobile-office-menu-button {
  display: none;
}

.office-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 26px;
}

.property-detail-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: 24px;
  margin-top: 26px;
}

.detail-photo-frame {
  display: grid;
  min-height: 440px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  color: var(--brand-dark);
  background: #d9e7e5;
  font-weight: 700;
}

.detail-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-detail-copy {
  min-width: 0;
}

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

.office-photo {
  display: grid;
  min-height: 190px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  color: var(--brand-dark);
  background: #d9e7e5;
  font-weight: 700;
}

.office-photo.large {
  min-height: 330px;
}

.office-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compact-top {
  margin-top: 0;
}

@media (max-width: 820px) {
  .site-header,
  .section-heading,
  .dashboard-top {
    align-items: stretch;
    flex-direction: column;
  }

  .top-nav {
    width: 100%;
  }

  .nav-button {
    flex: 1;
  }

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

  .task-row-meta {
    grid-template-columns: repeat(3, minmax(0, max-content));
  }

  .hero,
  .management-grid,
  .office-management-shell,
  .property-form,
  .nested-form,
  .appointment-fields,
  .office-hero,
  .property-detail-shell,
  .office-item,
  .coordinate-grid,
  .filter-grid,
  .paired-fields,
  .triple-fields {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 32px;
  }

  .office-management-shell {
    position: relative;
  }

  .mobile-office-menu-button {
    position: sticky;
    top: 86px;
    z-index: 8;
    display: inline-flex;
    width: fit-content;
    margin-left: auto;
    border: 1px solid var(--brand-dark);
    border-radius: 8px;
    padding: 10px 12px;
    color: white;
    background: var(--brand-dark);
    font-weight: 800;
  }

  .office-sidebar {
    position: fixed;
    top: 88px;
    right: 14px;
    z-index: 20;
    display: none;
    width: min(280px, calc(100vw - 28px));
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: white;
    box-shadow: var(--shadow);
  }

  .office-management-shell.menu-open .office-sidebar {
    display: grid;
  }

  .office-menu-button {
    width: 100%;
    padding: 11px 12px;
    text-align: left;
  }

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

  .detail-photo-frame {
    min-height: 280px;
  }

  .admin-property-item {
    grid-template-columns: 1fr;
  }

  .compact-list-item {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 8px;
  }

  .processed-cross-item {
    grid-template-columns: 1fr;
  }

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

  .admin-actions,
  .compact-actions,
  .action-row,
  .address-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .office-item .admin-actions {
    grid-template-columns: 1fr;
  }

  .ghost-button,
  .primary-button,
  .danger-button,
  .link-button {
    width: 100%;
  }

  .note-summary {
    height: auto;
    min-height: 58px;
  }

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

  .collaborator-location-map {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .office-directory {
    padding: 0;
  }

  .office-carousel-controls {
    display: none;
  }

  .office-carousel-track {
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
  }

  .office-card {
    flex-basis: 132px;
    scroll-snap-align: start;
  }

  body[data-page="management"] .site-header {
    display: none;
  }

  main {
    padding: 8px;
  }

  .panel,
  .sub-panel,
  .form-fieldset,
  .office-card,
  .property-card,
  .property-detail-shell {
    padding: 12px;
  }

  .site-header {
    padding: 14px;
  }

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

  .brand-mark {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
  }

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

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

  body[data-page="public"] .property-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body[data-page="public"] .property-card {
    min-width: 0;
    padding: 0;
  }

  .photo-frame img,
  .photo-frame {
    height: 150px;
    min-height: 150px;
  }

  body[data-page="public"] .photo-frame,
  body[data-page="public"] .photo-frame img {
    height: 88px;
    min-height: 88px;
  }

  body[data-page="public"] .property-body {
    padding: 7px;
    gap: 5px;
  }

  body[data-page="public"] .property-title-row {
    display: grid;
    gap: 6px;
  }

  body[data-page="public"] .property-title-row h3 {
    font-size: 13px;
    line-height: 1.15;
  }

  body[data-page="public"] .price {
    font-size: 14px;
  }

  body[data-page="public"] .office-box,
  body[data-page="public"] .location {
    font-size: 11px;
  }

  body[data-page="public"] .property-card .primary-button {
    min-height: 38px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .property-form {
    gap: 10px;
  }

  .compact-list-item {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 0;
    gap: 6px;
    padding: 7px;
    border-radius: 6px;
    font-size: 12px;
  }

  .compact-main strong {
    font-size: 13px;
  }

  .compact-list-item span {
    margin-top: 2px;
  }

  .note-summary {
    grid-column: 1 / -1;
    min-height: 36px;
    height: 36px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .compact-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .small-button {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .category-pill {
    padding: 2px 6px;
    font-size: 10px;
  }

  .cross-section .compact-list-item,
  .processed-cross-item {
    padding: 6px;
    gap: 5px;
    font-size: 11px;
  }

  .processed-cross-section {
    padding: 8px;
  }

  .map-panel {
    padding: 8px;
  }

  .map {
    min-height: 180px;
    height: 180px;
  }

  .property-form label,
  .list-filter {
    gap: 5px;
    font-size: 13px;
  }

  input,
  select,
  textarea {
    min-height: 42px;
  }

  .section-heading.compact {
    gap: 10px;
  }

  .compact-list-item {
    padding: 10px;
  }

  .compact-main span,
  .client-linked-item span {
    font-size: 12px;
  }

  .private-photo-preview {
    grid-template-columns: 1fr;
  }

  .private-photo-preview img {
    width: 100%;
  }

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

.toast-region {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 12000;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast-message {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-left-width: 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  color: #111827;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
  font-size: 14px;
  line-height: 1.35;
  pointer-events: auto;
}

.toast-message.is-success {
  border-left-color: #15803d;
}

.toast-message.is-warning {
  border-left-color: #d97706;
}

.toast-message.is-error {
  border-left-color: #dc2626;
}

.toast-message.is-info {
  border-left-color: #2563eb;
}

.toast-close {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: #374151;
  line-height: 1;
  cursor: pointer;
}

.toast-close:hover,
.toast-close:focus-visible {
  background: #e5e7eb;
}

form.is-busy {
  opacity: 0.82;
}

form.is-busy button[type="submit"] {
  cursor: wait;
}

@media (max-width: 640px) {
  .toast-region {
    top: auto;
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

@media print {
  body {
    background: white;
  }

  .top-nav,
  .office-sidebar,
  .office-menu,
  .compact-actions,
  #printStatsButton,
  .panel.hidden {
    display: none !important;
  }

  #dashboardPanel,
  #officeManagementShell,
  #statsRegistryPanel {
    display: block !important;
  }

  .panel,
  .chart-panel,
  .stat-card {
    break-inside: avoid;
    box-shadow: none;
  }

  .office-content {
    width: 100%;
  }
}
