:root {
  color-scheme: light;
  --ink: #122031;
  --muted: #667387;
  --line: #dce3ea;
  --surface: #ffffff;
  --soft: #f3f6f8;
  --navy: #0e263f;
  --navy-2: #153b5c;
  --accent: #e5743b;
  --accent-dark: #c95d29;
  --green: #2a7f62;
  --shadow: 0 18px 45px rgba(16, 37, 57, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Etap 20 — bezpieczna skrzynka odbiorcza */
.mail-settings-group {
  border: 0;
  border-top: 1px solid var(--line, #d8dee8);
  margin: 0 0 1.4rem;
  padding: 1.3rem 0 0;
}

.mail-settings-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.mail-settings-group legend {
  color: var(--ink, #132033);
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.35rem;
  font-weight: 800;
  padding: 0 .7rem 0 0;
}

.field-help {
  color: #667085;
  font-size: .92rem;
  line-height: 1.55;
}

.button-block {
  display: block;
  margin-top: .75rem;
  width: 100%;
}

.email-inbox-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 0 0 1rem;
}

.email-inbox-summary span {
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  color: #526077;
  padding: .65rem 1rem;
}

.inbound-email-table tr.is-unread td {
  background: #fff9ed;
}

.inbound-email-table td small {
  color: #667085;
  display: block;
  margin-top: .25rem;
}

.inbound-detail-sidebar {
  display: grid;
  gap: 1rem;
}

.inbound-relations-form p {
  margin: 0 0 .8rem;
}

.inbound-relations-form label {
  display: block;
  font-size: .82rem;
  font-weight: 800;
  margin-bottom: .3rem;
}

.inbound-relations-form select {
  width: 100%;
}

@media (max-width: 760px) {
  .email-inbox-summary { display: grid; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  line-height: 1.55;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 20;
  background: var(--navy);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  text-decoration: none;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand span { color: #f4a77d; }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a { color: #edf5fa; text-decoration: none; font-weight: 650; }
.main-nav a:hover { color: #f4a77d; }

.hero {
  position: relative;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 82% 18%, rgba(230, 116, 59, 0.35), transparent 28%),
    linear-gradient(125deg, #0b2238 0%, #164665 100%);
}

.hero::after {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  right: -180px;
  bottom: -330px;
  border: 90px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.hero-content { position: relative; z-index: 1; padding: 92px 0 96px; }

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: #f4b28e;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow.dark { color: var(--accent-dark); }

.hero h1,
.page-heading h1,
.detail-header h1 {
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.hero h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.7rem);
}

.hero-content > p {
  max-width: 650px;
  margin: 22px 0 34px;
  color: #d9e8f1;
  font-size: 1.15rem;
}

.hero-search {
  max-width: 950px;
  padding: 15px;
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) minmax(180px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
  background: white;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.hero-search label { display: grid; gap: 6px; color: var(--ink); }
.hero-search label > span { padding-left: 3px; font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cfd8e1;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea { resize: vertical; }
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(229, 116, 59, 0.18);
  border-color: var(--accent);
}

.button {
  min-height: 46px;
  padding: 11px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { border-color: var(--navy); color: var(--navy); background: white; }
.button.ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.button.full { width: 100%; }

.section { padding: 82px 0; }
.soft-section { background: var(--soft); }

.section-heading {
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}

.section-heading h2,
.description-section h2,
.contact-card h2 {
  margin: 0;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.section-heading h2 { font-size: clamp(2rem, 4vw, 3rem); }
.text-link { color: var(--accent-dark); font-weight: 800; text-decoration: none; }

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

.listing-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.listing-card:hover { transform: translateY(-3px); box-shadow: 0 22px 54px rgba(16, 37, 57, 0.14); }
.public-heading-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.offer-language-switch { width: fit-content; padding: 3px; display: inline-flex; gap: 3px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.offer-language-switch a { min-width: 38px; padding: 6px 9px; color: var(--muted); text-align: center; text-decoration: none; border-radius: 999px; font-size: 0.72rem; font-weight: 900; }
.offer-language-switch a.active { color: #fff; background: var(--navy-2); }
.header-language-switch { border-color: rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.1); }
.main-nav .header-language-switch a { min-width: 34px; padding: 5px 8px; color: #d9e8f1; }
.main-nav .header-language-switch a:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.main-nav .header-language-switch a.active { color: var(--navy); background: #fff; }
.detail-language-switch { margin: 9px 0 10px; }

.listing-image {
  position: relative;
  min-height: 235px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #e8edf1;
  text-decoration: none;
}

.listing-image img { width: 100%; height: 235px; object-fit: cover; transition: transform 300ms ease; }
.listing-card:hover .listing-image img { transform: scale(1.025); }
.image-placeholder { color: #82909e; font-weight: 700; }

.transaction-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(14, 38, 63, 0.91);
  color: white;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.listing-body { padding: 19px 20px 21px; }
.listing-location { margin: 0 0 7px; color: var(--muted); font-size: 0.88rem; }
.listing-body h3 { min-height: 2.7em; margin: 0; font-size: 1.12rem; line-height: 1.35; }
.listing-body h3 a { text-decoration: none; }
.listing-body h3 a:hover { color: var(--accent-dark); }

.listing-facts {
  margin: 15px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 13px;
  color: #536174;
  font-size: 0.86rem;
}

.listing-price { font-size: 1.28rem; font-weight: 850; letter-spacing: -0.02em; }
.listing-price small { color: var(--muted); font-size: 0.72rem; font-weight: 600; }

.benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.benefit-grid article { padding: 8px 18px 8px 0; }
.benefit-grid article > span { color: var(--accent); font-weight: 900; }
.benefit-grid h3 { margin: 10px 0 6px; font-size: 1.25rem; }
.benefit-grid p { margin: 0; color: var(--muted); }

.empty-state {
  padding: 54px 28px;
  text-align: center;
  background: var(--soft);
  border: 1px dashed #c8d1da;
  border-radius: 14px;
}
.empty-state h2,
.empty-state h3 { margin-top: 0; }
.empty-state p { color: var(--muted); }

.page-main { padding: 58px 0 82px; background: #f8fafb; min-height: 70vh; }
.page-heading { margin-bottom: 28px; }
.page-heading h1 { margin: 0; font-size: clamp(2.5rem, 5vw, 4.2rem); }
.page-heading p { margin: 10px 0 0; color: var(--muted); }

.filter-panel {
  margin-bottom: 32px;
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(16, 37, 57, 0.06);
}

.filter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.field { display: grid; align-content: start; gap: 6px; }
.field > span { font-size: 0.78rem; font-weight: 800; color: #4b596a; }
.field-wide { grid-column: span 2; }
.field-error { color: #b42318; font-size: 0.78rem; }
.filter-actions { margin-top: 18px; display: flex; gap: 10px; }
.listing-results { margin-top: 16px; }

.pagination {
  margin-top: 38px;
  padding: 18px;
  display: flex;
  justify-content: center;
  gap: 22px;
  border-top: 1px solid var(--line);
}
.pagination a { color: var(--accent-dark); font-weight: 800; text-decoration: none; }

.breadcrumbs { margin-bottom: 24px; display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 0.88rem; }
.breadcrumbs a { text-decoration: none; }

.gallery {
  min-height: 440px;
  max-height: 570px;
  margin-bottom: 34px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-auto-rows: minmax(180px, 1fr);
  gap: 8px;
  overflow: hidden;
  background: #e6ebef;
  border-radius: 16px;
}

.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main { grid-row: span 2; }
.gallery-empty { grid-column: 1 / -1; display: grid; place-items: center; color: var(--muted); font-weight: 700; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 34px; align-items: start; }
.detail-content { padding: 32px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.detail-header { display: flex; justify-content: space-between; gap: 28px; }
.detail-header h1 { max-width: 700px; margin: 0; font-size: clamp(2rem, 4vw, 3.35rem); }
.detail-location { color: var(--muted); }
.detail-price { flex: 0 0 auto; text-align: right; font-size: 1.65rem; font-weight: 900; }
.detail-price small { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 650; }

.fact-grid {
  margin: 30px 0;
  padding: 20px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  border-block: 1px solid var(--line);
}
.fact-grid div { display: grid; gap: 3px; }
.fact-grid span { color: var(--muted); font-size: 0.78rem; }
.fact-grid strong { font-size: 1.05rem; }

.description-section + .description-section { margin-top: 34px; }
.description-section h2 { margin-bottom: 14px; font-size: 1.45rem; }
.prose { color: #344255; }
.prose p { margin-top: 0; }
.privacy-note { color: var(--muted); font-size: 0.9rem; }

.contact-card {
  position: sticky;
  top: 22px;
  padding: 26px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.contact-card h2 { font-size: 1.45rem; }
.contact-card form { margin-top: 20px; display: grid; gap: 13px; }
.checkbox-field { grid-template-columns: auto 1fr; align-items: start; }
.checkbox-field input { width: 18px; min-height: 18px; margin-top: 3px; }
.checkbox-field .field-error { grid-column: 1 / -1; }
.form-note { margin-bottom: 0; color: var(--muted); text-align: center; font-size: 0.78rem; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.messages { padding-top: 16px; }
.message { padding: 13px 16px; border-radius: 9px; background: #dff3e8; color: #176044; border: 1px solid #b9dfca; }
.message.warning { background: #fff4d8; color: #795300; border-color: #eed69a; }
.message.info { background: #e7f1fb; color: #17547c; border-color: #bdd8ed; }

.panel-page { min-height: 75vh; padding: 34px 0 72px; background: #f4f7f9; }
.panel-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 30px; align-items: start; }
.panel-sidebar {
  position: sticky;
  top: 20px;
  overflow: hidden;
  background: var(--navy);
  color: white;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.panel-organization { position: relative; padding: 22px 58px 22px 22px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.panel-notification-bell { position: absolute; top: 19px; right: 17px; width: 34px; height: 34px; display: grid; place-items: center; color: white; text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.17); border-radius: 50%; background: rgba(255, 255, 255, 0.08); }
.panel-notification-bell > span { margin: 0; color: inherit; font-size: 1rem; }
.panel-notification-bell > strong { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border: 2px solid var(--navy); border-radius: 99px; color: white; background: #d74b3f; font-size: 0.61rem; }
.panel-organization span,
.panel-organization small { display: block; color: #aebfcd; font-size: 0.74rem; }
.panel-organization span { margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; }
.panel-organization strong { display: block; line-height: 1.3; }
.panel-organization small { margin-top: 5px; }
.organization-switcher { padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.organization-switcher label { display: block; margin-bottom: 6px; color: #aebfcd; font-size: 0.72rem; }
.organization-switcher select { min-height: 38px; padding: 7px 8px; font-size: 0.83rem; }
.panel-nav { padding: 12px; display: grid; gap: 3px; }
.panel-nav a { padding: 10px 11px; color: #dce7ed; text-decoration: none; border-radius: 8px; font-weight: 700; font-size: 0.9rem; }
.panel-nav a:hover { background: rgba(255, 255, 255, 0.1); color: white; }
.panel-logout { padding: 0 12px 14px; }
.panel-logout button { width: 100%; padding: 9px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 8px; color: #dce7ed; background: transparent; cursor: pointer; }
.panel-content { min-width: 0; }
.panel-heading { min-height: 100px; margin-bottom: 24px; display: flex; justify-content: space-between; gap: 24px; align-items: end; }
.panel-heading h1 { margin: 0; font-size: clamp(2.1rem, 4vw, 3.4rem); letter-spacing: -0.05em; line-height: 1; }
.panel-heading p { margin: 9px 0 0; color: var(--muted); }
.panel-back { display: block; margin-bottom: 12px; color: var(--accent-dark); text-decoration: none; font-weight: 750; font-size: 0.86rem; }
.metric-grid { margin-bottom: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.metric-grid article { padding: 21px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.metric-grid span { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 750; }
.metric-grid strong { display: block; margin-top: 5px; font-size: 2.05rem; line-height: 1; letter-spacing: -0.04em; }
.panel-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel-card { padding: 23px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 8px 24px rgba(16, 37, 57, 0.05); }
.panel-card h2 { margin: 0 0 14px; font-size: 1.25rem; }
.panel-card h3 { margin: 24px 0 10px; }
.panel-card-spaced { margin-top: 22px; }
.panel-card-heading { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.panel-card-heading h2 { margin: 0; }
.panel-card-heading a { color: var(--accent-dark); text-decoration: none; font-weight: 750; font-size: 0.86rem; }
.panel-muted { color: var(--muted); }
.compact-list { display: grid; }
.compact-list > a { padding: 12px 0; display: flex; justify-content: space-between; gap: 18px; align-items: center; text-decoration: none; border-top: 1px solid var(--line); }
.compact-list > a:first-child { border-top: 0; }
.compact-list span:first-child { min-width: 0; }
.compact-list strong,
.compact-list small,
.panel-table strong,
.panel-table small { display: block; }
.compact-list small,
.panel-table small { margin-top: 3px; color: var(--muted); font-size: 0.76rem; }
.status-pill { display: inline-flex; width: fit-content; padding: 4px 8px; border-radius: 999px; color: #536174; background: #e9edf1; font-size: 0.69rem; font-weight: 850; white-space: nowrap; }
.status-published,
.status-succeeded,
.status-active,
.status-won,
.status-signed,
.status-valid { color: #176044; background: #dff3e8; }
.status-new,
.status-queued,
.status-update_queued,
.status-running { color: #17547c; background: #e2f0fa; }
.status-waiting_configuration,
.status-access_requested,
.status-reserved,
.status-reservation,
.status-contacted,
.status-awaiting_signature { color: #795300; background: #fff0c9; }
.status-negotiation { color: #17547c; background: #e2f0fa; }
.status-preliminary { color: #5b3d88; background: #eee7f8; }
.status-financing { color: #8a4d16; background: #ffead7; }
.status-finalization { color: #263f5d; background: #e1e9f2; }
.status-failed,
.status-error,
.status-lost,
.status-spam,
.status-expired { color: #9a2b20; background: #fde6e3; }
.status-draft,
.status-disabled,
.status-inactive,
.status-paused,
.status-completed,
.status-archived,
.status-cancelled { color: #596579; background: #e8ecf0; }
.panel-filter { margin-bottom: 20px; padding: 15px; display: grid; grid-template-columns: minmax(220px, 1fr) 220px auto; gap: 12px; align-items: end; background: white; border: 1px solid var(--line); border-radius: 12px; }
.panel-filter-short { grid-template-columns: 260px auto; justify-content: start; }
.panel-filter-contacts { grid-template-columns: minmax(240px, 1fr) 190px 190px auto; }
.panel-filter label { display: grid; gap: 5px; }
.panel-filter label span { color: var(--muted); font-size: 0.75rem; font-weight: 800; }
.panel-table-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 12px; }
.panel-table-wrap.borderless { border: 0; border-radius: 0; }
.panel-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.panel-table th { padding: 12px 14px; text-align: left; color: var(--muted); background: #f7f9fa; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
.panel-table td { padding: 14px; vertical-align: top; border-top: 1px solid var(--line); }
.panel-table a { text-decoration: none; }
.table-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.table-actions a { color: var(--accent-dark); font-weight: 800; }
.table-empty { padding: 36px !important; text-align: center; color: var(--muted); }
.panel-pagination { margin-top: 20px; display: flex; justify-content: center; align-items: center; gap: 24px; color: var(--muted); }
.panel-pagination a { color: var(--accent-dark); font-weight: 800; text-decoration: none; }
.publication-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr); gap: 20px; align-items: start; }
.publication-form { margin-top: 20px; }
.channel-checklist ul { margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; list-style: none; }
.channel-checklist label { padding: 11px 12px; display: flex; gap: 9px; align-items: center; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.channel-checklist input { width: 18px; min-height: 18px; }
.readiness-card dl,
.detail-list { margin: 0; }
.readiness-card dl div,
.detail-list div { padding: 11px 0; display: grid; grid-template-columns: 120px 1fr; gap: 12px; border-top: 1px solid var(--line); }
.readiness-card dl div:first-child,
.detail-list div:first-child { border-top: 0; }
.readiness-card dt,
.detail-list dt { color: var(--muted); font-size: 0.78rem; }
.readiness-card dd,
.detail-list dd { margin: 0; font-weight: 700; }
.portal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.portal-card { padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.portal-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.portal-card p { margin: 11px 0 0; color: var(--muted); font-size: 0.78rem; }
.portal-card > a { display: inline-block; margin-top: 9px; color: var(--accent-dark); font-size: 0.78rem; font-weight: 800; }
.issue-list { margin: 10px 0 0; padding-left: 17px; color: #9a2b20; font-size: 0.75rem; }
.integration-note { margin-bottom: 20px; padding: 17px 20px; color: #17547c; background: #e7f1fb; border: 1px solid #bdd8ed; border-radius: 11px; }
.integration-note p { margin: 5px 0 0; }
.integration-error { color: #9a2b20 !important; }
.lead-columns { grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); }
.contact-columns { grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr); align-items: start; }
.lead-message { padding: 16px; background: var(--soft); border-radius: 9px; }
.lead-convert-form { margin-bottom: 20px; }
.heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-list span { padding: 4px 7px; color: #17547c; background: #e7f1fb; border-radius: 999px; font-size: 0.69rem; font-weight: 800; white-space: nowrap; }
.panel-form { display: grid; gap: 14px; }
.panel-form label { display: grid; gap: 5px; }
.panel-form label > span { grid-row: 1; color: var(--muted); font-size: 0.78rem; font-weight: 800; }
.panel-form label > input,
.panel-form label > select,
.panel-form label > textarea { grid-row: 2; }
.panel-form .checkbox-row { grid-template-columns: auto 1fr; align-items: center; }
.panel-form .checkbox-row input { grid-row: 1; width: 18px; min-height: 18px; }
.panel-form .checkbox-row span { grid-row: 1; }
.form-errors,
.errorlist { margin: 0 0 15px; padding: 12px 14px; color: #9a2b20; background: #fde6e3; border-radius: 8px; list-style-position: inside; }
.form-error-summary { padding: 15px 17px; color: #7f251d; border: 1px solid #efb4ad; border-left: 5px solid #c74638; border-radius: 9px; background: #fff2f0; }
.form-error-summary strong { display: block; font-size: 0.94rem; }
.form-error-summary p { margin: 4px 0 7px; font-size: 0.8rem; }
.form-error-summary ul { margin: 0; padding-left: 20px; }
.form-error-summary a { color: inherit; font-size: 0.8rem; font-weight: 750; }
.permission-note { color: #795300; }
.login-page { min-height: 72vh; padding: 70px 20px; display: grid; place-items: start center; background: #f4f7f9; }
.login-card { width: min(440px, 100%); padding: 34px; background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.login-card h1 { margin: 0; font-size: 2.3rem; letter-spacing: -0.04em; }
.login-card > p { color: var(--muted); }
.listing-edit-form { display: grid; gap: 22px; }
.translation-status-card { margin-bottom: 18px; padding: 18px; display: flex; justify-content: space-between; align-items: start; gap: 20px; border: 1px solid #cbd5df; border-left: 5px solid #65778b; border-radius: 11px; background: #fff; }
.translation-status-card.translation-translated { border-left-color: #2a7f62; }
.translation-status-card.translation-failed { border-left-color: #b9463a; }
.translation-status-card.translation-not_configured { border-left-color: #d49a2d; }
.translation-status-card h2 { margin: 2px 0 5px; font-size: 1.05rem; }
.translation-status-card p { margin: 0; color: var(--muted); font-size: 0.78rem; }
.translation-status-card > div > small { display: block; margin-top: 5px; color: #9a2b20; }
.translation-status-card .translation-review-warning { margin-top: 8px; padding: 9px 11px; border-radius: 7px; color: #6c4700; background: #fff3cf; }
.translation-status-card .translation-review-approved { margin-top: 8px; color: #176044; }
.translation-kicker { color: var(--accent-dark); font-size: 0.67rem; font-weight: 900; letter-spacing: 0.07em; text-transform: uppercase; }
.translation-status-card details { margin-top: 12px; }
.translation-status-card summary { color: var(--accent-dark); cursor: pointer; font-size: 0.76rem; font-weight: 850; }
.translation-preview-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.translation-preview-grid article { padding: 12px; border-radius: 8px; background: var(--soft); }
.translation-preview-grid article > span { color: var(--accent-dark); font-size: 0.65rem; font-weight: 900; }
.translation-preview-grid article > strong { margin-top: 3px; display: block; font-size: 0.82rem; }
.translation-preview-grid article > p { margin-top: 5px; font-size: 0.72rem; line-height: 1.5; }
.translation-review-form { margin-top: 10px; }
.translation-review-form label { display: block; margin-top: 8px; }
.translation-review-form label strong { display: block; margin-bottom: 4px; color: #273646; font-size: 0.7rem; }
.translation-review-form input,
.translation-review-form textarea { width: 100%; padding: 9px 10px; border: 1px solid #cbd5df; border-radius: 7px; color: var(--ink); background: #fff; font: inherit; font-size: 0.75rem; line-height: 1.45; }
.translation-review-form textarea { min-height: 150px; resize: vertical; }
.translation-review-form > .button { margin-top: 10px; }
.translation-pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: #536376; background: #e8edf1; font-size: 0.67rem; font-weight: 850; white-space: nowrap; }
.translation-pill.translation-translated { color: #176044; background: #dff3e8; }
.translation-pill.translation-failed { color: #9a2b20; background: #fde6e3; }
.translation-pill.translation-not_configured { color: #795300; background: #fff0c9; }
.listing-form-sections { display: grid; gap: 18px; }
.listing-form-section { margin: 0; padding: 19px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfd; }
.listing-form-section legend { padding: 0 8px; color: var(--navy); font-size: 1rem; font-weight: 900; }
.listing-form-section > p { margin: -3px 0 16px; color: var(--muted); font-size: 0.76rem; line-height: 1.5; }
.listing-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.listing-form-grid > label { display: grid; align-content: start; gap: 6px; }
.listing-form-grid > label > span,
.image-upload-form label > span { color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.listing-form-grid > label > small { color: var(--muted); font-size: 0.72rem; }
.listing-form-grid .form-field-wide { grid-column: 1 / -1; }
.listing-map-panel { grid-column: 1 / -1; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #f8fafb; }
.listing-map-heading { margin-bottom: 14px; display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.listing-map-heading h2 { margin: 0 0 4px; font-size: 1.15rem; }
.listing-map-heading p { margin: 0; color: var(--muted); font-size: 0.82rem; }
.listing-map-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.listing-map-actions .button { min-height: 40px; padding: 8px 13px; font-size: 0.82rem; }
.listing-location-map,
.public-listing-map { min-height: 380px; overflow: hidden; border: 1px solid #cbd5df; border-radius: 10px; background: #e8edf1; }
.public-listing-map { margin-top: 16px; }
.map-status { margin: 11px 0 0; color: #176044; font-size: 0.82rem; font-weight: 700; }
.map-status-error { color: #9a2b20; }
.map-provider-note { margin: 5px 0 0; color: var(--muted); font-size: 0.72rem; }
.estate-map-marker-icon { background: transparent; border: 0; overflow: visible; }
.estate-map-pin { position: relative; width: 48px; height: 58px; display: block; }
.estate-map-pin-head {
  position: absolute;
  z-index: 2;
  top: 3px;
  left: 7px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(135deg, #ef8b54 0%, var(--accent) 48%, #be4f21 100%);
  box-shadow: 0 8px 18px rgba(14, 38, 63, 0.34);
  transform: rotate(-45deg);
}
.estate-map-pin-dot {
  width: 11px;
  height: 11px;
  display: block;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(14, 38, 63, 0.16);
}
.estate-map-pin-shadow {
  position: absolute;
  z-index: 1;
  left: 13px;
  bottom: 1px;
  width: 22px;
  height: 8px;
  border-radius: 50%;
  background: rgba(14, 38, 63, 0.3);
  filter: blur(2px);
}
.estate-map-marker-editor .estate-map-pin::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 12px;
  bottom: -2px;
  width: 24px;
  height: 12px;
  border: 2px solid rgba(229, 116, 59, 0.58);
  border-radius: 50%;
  animation: estate-map-marker-pulse 1.8s ease-out infinite;
}
.estate-map-marker-editor:active .estate-map-pin-head { cursor: grabbing; }
@keyframes estate-map-marker-pulse {
  0% { opacity: 0.9; transform: scale(0.7); }
  75%, 100% { opacity: 0; transform: scale(1.65); }
}
@media (prefers-reduced-motion: reduce) {
  .estate-map-marker-editor .estate-map-pin::before { animation: none; opacity: 0.45; }
}
.contact-role-field { display: grid; gap: 7px; }
.contact-role-field > span { color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.contact-role-field > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.contact-role-field > div > div > label { padding: 10px 12px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.contact-role-field input { width: 17px; min-height: 17px; }
.listing-form-grid .checkbox-row { grid-template-columns: auto 1fr; align-items: center; }
.listing-form-grid .checkbox-row > span { grid-column: 2; grid-row: 1; }
.listing-form-grid .checkbox-row > input { grid-column: 1; grid-row: 1; width: 18px; min-height: 18px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.image-upload-form { margin-bottom: 22px; padding: 15px; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto; align-items: end; gap: 12px; background: var(--soft); border-radius: 10px; }
.image-upload-form label { display: grid; gap: 6px; }
.panel-image-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.panel-image-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.panel-image-card > img { width: 100%; height: 175px; object-fit: cover; background: #e8edf1; }
.panel-image-card > div { padding: 12px; }
.panel-image-card strong,
.panel-image-card small { display: block; }
.panel-image-card small { margin-top: 3px; color: var(--muted); }
.image-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; }
.image-actions button { padding: 0; border: 0; color: var(--accent-dark); background: transparent; font: inherit; font-size: 0.75rem; font-weight: 800; cursor: pointer; }
.image-actions .danger-link { color: #9a2b20; }
.listing-record-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.listing-record-card .panel-card-heading > div small { display: block; margin-top: 3px; color: var(--muted); font-size: 0.68rem; }
.listing-record-list { display: grid; }
.listing-record-list article { padding: 14px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; border-top: 1px solid var(--line); }
.listing-record-list article:first-child { border-top: 0; }
.listing-record-list strong,
.listing-record-list small { display: block; }
.listing-record-list small { margin-top: 4px; color: var(--muted); font-size: 0.72rem; }
.listing-record-list p { margin: 5px 0 0; color: #45576a; font-size: 0.74rem; }
.listing-record-list a { color: var(--accent-dark); font-size: 0.72rem; font-weight: 800; text-decoration: none; }
.listing-record-actions { display: flex; flex: 0 0 auto; gap: 10px; }
.listing-record-actions form { margin: 0; }
.listing-record-actions button { padding: 0; border: 0; color: #9a2b20; background: transparent; font: inherit; font-size: 0.72rem; font-weight: 800; cursor: pointer; }
.listing-document-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.listing-document-list > a { padding: 11px; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 10px; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; text-decoration: none; }
.listing-document-list > a:hover { border-color: #9cb6c8; background: #f2f7fa; }
.listing-document-list strong,
.listing-document-list small { display: block; }
.listing-document-list small { margin-top: 3px; color: var(--muted); font-size: 0.68rem; }
.listing-relation-editor { max-width: 960px; }
.listing-relation-editor .document-security-note { margin-bottom: 18px; }
.listing-relation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.listing-relation-grid > label { display: grid; align-content: start; gap: 6px; }
.listing-relation-grid > label > span { color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.listing-relation-grid > label > small { color: var(--muted); font-size: 0.7rem; }
.listing-relation-grid .form-field-wide { grid-column: 1 / -1; }
.listing-relation-grid .checkbox-row { grid-template-columns: auto 1fr; align-items: center; }
.listing-relation-grid .checkbox-row > input { grid-column: 1; grid-row: 1; width: 18px; min-height: 18px; }
.listing-relation-grid .checkbox-row > span { grid-column: 2; grid-row: 1; }
.activity-timeline { display: grid; }
.activity-timeline article { padding: 16px 0; display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 18px; border-top: 1px solid var(--line); }
.activity-timeline article:first-child { border-top: 0; }
.activity-kind { width: fit-content; height: fit-content; padding: 5px 8px; color: #17547c; background: #e7f1fb; border-radius: 999px; font-size: 0.7rem; font-weight: 850; }
.activity-timeline p { margin: 6px 0; }
.activity-timeline small { color: var(--muted); }
.search-summary .lead-message { margin-top: 18px; }

.deal-metric-grid { margin-bottom: 18px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.deal-metric-grid article { padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.deal-metric-grid span { display: block; color: var(--muted); font-size: 0.72rem; font-weight: 800; }
.deal-metric-grid strong { display: block; margin-top: 5px; font-size: 1.28rem; letter-spacing: -0.03em; }
.deal-metric-grid strong + strong { margin-top: 2px; padding-top: 5px; border-top: 1px solid var(--line); }
.deal-metric-grid strong small { color: var(--muted); font-size: 0.64em; letter-spacing: 0; }
.deal-filter { grid-template-columns: minmax(220px, 1fr) 190px 210px auto; }
.deal-view-switch { margin: -6px 0 16px; padding: 4px; width: fit-content; display: flex; flex-wrap: wrap; gap: 2px; background: #e8edf1; border-radius: 9px; }
.deal-view-switch a { padding: 7px 11px; color: var(--muted); text-decoration: none; border-radius: 7px; font-size: 0.76rem; font-weight: 850; }
.deal-view-switch a.active { color: #fff; background: var(--navy-2); }
.deal-board-shell { overflow-x: auto; padding-bottom: 8px; }
.deal-board { min-width: 1540px; display: grid; grid-template-columns: repeat(6, minmax(240px, 1fr)); gap: 12px; align-items: start; }
.deal-column { --stage-color: #647386; overflow: hidden; border: 1px solid var(--line); border-top: 4px solid var(--stage-color); border-radius: 11px; background: #eef2f5; }
.deal-stage-new { --stage-color: #3d88ba; }
.deal-stage-negotiation { --stage-color: #2d7bb3; }
.deal-stage-reservation { --stage-color: #d59a2d; }
.deal-stage-preliminary { --stage-color: #7658a8; }
.deal-stage-financing { --stage-color: #d47a2f; }
.deal-stage-finalization { --stage-color: #344c6b; }
.deal-stage-completed { --stage-color: #2a7f62; }
.deal-stage-cancelled { --stage-color: #9a5960; }
.deal-column > header { padding: 11px 12px; display: flex; justify-content: space-between; align-items: center; background: #fff; border-bottom: 1px solid var(--line); }
.deal-column > header h2 { margin: 0; font-size: 0.86rem; }
.deal-column > header span { width: 24px; height: 24px; display: grid; place-items: center; color: #fff; border-radius: 50%; background: var(--stage-color); font-size: 0.67rem; font-weight: 900; }
.deal-column-body { min-height: 180px; padding: 9px; display: grid; align-content: start; gap: 9px; }
.deal-card { padding: 12px; display: block; color: var(--ink); text-decoration: none; border: 1px solid #dbe2e8; border-radius: 9px; background: #fff; box-shadow: 0 4px 12px rgba(14, 38, 63, 0.06); }
.deal-card:hover { border-color: var(--stage-color); box-shadow: 0 7px 18px rgba(14, 38, 63, 0.11); }
.deal-card-reference { display: block; margin-bottom: 5px; color: var(--stage-color); font-size: 0.65rem; font-weight: 900; letter-spacing: 0.05em; }
.deal-card > strong { display: block; font-size: 0.8rem; line-height: 1.35; }
.deal-card > small { display: block; margin-top: 5px; color: var(--muted); font-size: 0.7rem; }
.deal-card dl { margin: 10px 0 0; padding-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-top: 1px solid var(--line); }
.deal-card dl div { min-width: 0; }
.deal-card dt { color: var(--muted); font-size: 0.61rem; }
.deal-card dd { margin: 2px 0 0; overflow: hidden; font-size: 0.7rem; font-weight: 850; white-space: nowrap; text-overflow: ellipsis; }
.deal-card footer { margin-top: 9px; display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 0.62rem; }
.deal-card footer span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.deal-card footer time { color: var(--stage-color); font-weight: 900; }
.deal-column-empty { padding: 30px 8px; color: var(--muted); text-align: center; font-size: 0.73rem; }
.deal-table { min-width: 1180px; }
.deal-form { display: grid; gap: 22px; }
.deal-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.deal-form-grid > label { display: grid; align-content: start; gap: 6px; }
.deal-form-grid > label > span { color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.deal-form-grid > label > small { color: var(--muted); font-size: 0.72rem; }
.deal-form-grid input[readonly] { color: #26415a; background: #edf3f7; font-weight: 850; }
.commission-calculation-note strong { color: #176044; }
.deal-form-grid .form-field-wide { grid-column: 1 / -1; }
.deal-form-grid .checkbox-row { grid-template-columns: auto 1fr; align-items: center; }
.deal-form-grid .checkbox-row > input { grid-column: 1; grid-row: 1; width: 18px; min-height: 18px; }
.deal-form-grid .checkbox-row > span { grid-column: 2; grid-row: 1; }
.deal-stage-banner { --stage-color: #647386; margin-bottom: 20px; padding: 14px 18px; display: flex; align-items: center; gap: 12px; border-left: 5px solid var(--stage-color); border-radius: 10px; background: #fff; box-shadow: 0 5px 16px rgba(14, 38, 63, 0.06); }
.deal-stage-banner span { color: var(--muted); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; }
.deal-stage-banner strong { color: var(--stage-color); }
.deal-stage-banner small { margin-left: auto; color: var(--muted); }
.deal-detail-columns { align-items: start; }
.deal-detail-columns a { color: var(--accent-dark); text-decoration: none; }
.commission-pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 850; }
.commission-none { color: #596579; background: #e8ecf0; }
.commission-unpaid { color: #9a2b20; background: #fde6e3; }
.commission-partial { color: #795300; background: #fff0c9; }
.commission-paid { color: #176044; background: #dff3e8; }
.deal-history { display: grid; }
.deal-history article { position: relative; padding: 0 0 21px 30px; display: grid; grid-template-columns: minmax(0, 1fr); }
.deal-history article::before { content: ""; position: absolute; top: 13px; bottom: 0; left: 8px; width: 2px; background: var(--line); }
.deal-history article:last-child { padding-bottom: 0; }
.deal-history article:last-child::before { display: none; }
.deal-history-dot { --stage-color: #647386; position: absolute; z-index: 2; top: 3px; left: 2px; width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: var(--stage-color); box-shadow: 0 0 0 1px var(--stage-color); }
.deal-history strong { font-size: 0.86rem; }
.deal-history p { margin: 5px 0; font-size: 0.82rem; }
.deal-history small { color: var(--muted); font-size: 0.7rem; }

.calendar-heading { align-items: end; }
.calendar-toolbar {
  margin-bottom: 18px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.calendar-navigation { display: flex; gap: 7px; }
.calendar-navigation .button { min-width: 42px; padding: 8px 11px; }
.calendar-agent-filter { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.calendar-agent-filter label { color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.calendar-agent-filter select { min-height: 39px; min-width: 190px; padding: 7px 9px; }
.calendar-view-switch { padding: 3px; display: flex; border-radius: 9px; background: var(--soft); }
.calendar-view-switch a { padding: 7px 11px; color: var(--muted); text-decoration: none; border-radius: 7px; font-size: 0.78rem; font-weight: 850; }
.calendar-view-switch a.active { color: #fff; background: var(--navy-2); }
.calendar-week-shell,
.calendar-month-shell { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 8px 24px rgba(16, 37, 57, 0.05); }
.calendar-week-content { min-width: 1080px; }
.calendar-week-header,
.calendar-all-day-row,
.calendar-timeline { display: grid; grid-template-columns: 66px repeat(7, minmax(140px, 1fr)); }
.calendar-week-header { position: sticky; top: 0; z-index: 8; background: #fff; border-bottom: 1px solid var(--line); }
.calendar-corner { padding: 10px 7px; display: flex; align-items: end; color: var(--muted); font-size: 0.66rem; }
.calendar-day-heading { position: relative; min-height: 62px; padding: 8px 10px; text-align: center; border-left: 1px solid var(--line); }
.calendar-day-heading span { display: block; color: var(--muted); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; }
.calendar-day-heading strong { display: block; margin-top: 2px; font-size: 1.25rem; }
.calendar-day-heading a { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; display: grid; place-items: center; color: var(--accent-dark); text-decoration: none; border-radius: 50%; background: #fff2ea; font-weight: 900; }
.calendar-day-heading.is-today strong { width: 32px; height: 32px; margin: 2px auto 0; display: grid; place-items: center; color: #fff; border-radius: 50%; background: var(--accent); }
.calendar-all-day-row { min-height: 44px; border-bottom: 1px solid var(--line); }
.calendar-all-day-label { padding: 9px 6px; color: var(--muted); font-size: 0.66rem; text-align: right; }
.calendar-all-day-cell { min-width: 0; padding: 5px; display: grid; align-content: start; gap: 4px; border-left: 1px solid var(--line); }
.calendar-all-day-cell.is-today { background: rgba(229, 116, 59, 0.045); }
.calendar-all-day-event { padding: 4px 6px; overflow: hidden; color: #fff; text-decoration: none; border-radius: 5px; font-size: 0.67rem; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.calendar-time-axis { position: relative; background: #fbfcfd; }
.calendar-time-axis > span { position: absolute; right: 7px; color: #7b8798; font-size: 0.65rem; transform: translateY(-50%); }
.calendar-day-track { position: relative; overflow: hidden; border-left: 1px solid var(--line); background: #fff; }
.calendar-day-track.is-today { background: rgba(229, 116, 59, 0.045); }
.calendar-hour-line { position: absolute; right: 0; left: 0; height: 1px; background: #e9edf1; }
.calendar-event-card { position: absolute; z-index: 3; min-height: 30px; padding: 4px 6px; overflow: hidden; color: #fff; text-decoration: none; border-left: 3px solid rgba(255, 255, 255, 0.68); border-radius: 6px; box-shadow: 0 3px 9px rgba(14, 38, 63, 0.16); }
.calendar-event-card:hover { z-index: 5; filter: brightness(0.94); }
.calendar-event-card strong,
.calendar-event-card small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.calendar-event-card strong { font-size: 0.67rem; line-height: 1.25; }
.calendar-event-card small { margin-top: 2px; color: rgba(255, 255, 255, 0.86); font-size: 0.61rem; }
.calendar-kind-presentation { background: #2d7bb3; }
.calendar-kind-call { background: #2a7f62; }
.calendar-kind-meeting { background: #7658a8; }
.calendar-kind-task { background: #d47a2f; }
.calendar-kind-contract { background: #b5505c; }
.calendar-kind-notary { background: #344c6b; }
.calendar-kind-other { background: #647386; }
.calendar-event-card.status-completed,
.calendar-all-day-event.status-completed,
.calendar-month-event.status-completed { opacity: 0.55; }
.calendar-event-card.status-cancelled,
.calendar-all-day-event.status-cancelled,
.calendar-month-event.status-cancelled { opacity: 0.42; text-decoration: line-through; }
.calendar-month-shell { min-width: 0; }
.calendar-month-grid { min-width: 900px; display: grid; grid-template-columns: repeat(7, minmax(125px, 1fr)); }
.calendar-month-weekday { padding: 10px; color: var(--muted); text-align: center; background: #f7f9fa; border-bottom: 1px solid var(--line); font-size: 0.7rem; font-weight: 850; text-transform: uppercase; }
.calendar-month-day { min-height: 142px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.calendar-month-day:nth-child(7n) { border-right: 0; }
.calendar-month-day.is-outside { background: #f7f9fa; opacity: 0.62; }
.calendar-month-day.is-today { background: #fff8f3; box-shadow: inset 0 0 0 2px rgba(229, 116, 59, 0.42); }
.calendar-month-day header { min-height: 28px; display: flex; justify-content: space-between; align-items: start; }
.calendar-month-day header strong { font-size: 0.8rem; }
.calendar-month-day header a { width: 22px; height: 22px; display: grid; place-items: center; color: var(--accent-dark); text-decoration: none; border-radius: 50%; background: #fff2ea; font-weight: 900; }
.calendar-month-day > div { display: grid; gap: 4px; }
.calendar-month-event { padding: 4px 5px; overflow: hidden; color: #fff; text-decoration: none; border-radius: 5px; font-size: 0.65rem; font-weight: 750; white-space: nowrap; text-overflow: ellipsis; }
.calendar-month-event span { margin-right: 4px; opacity: 0.8; }
.calendar-more { color: var(--muted); font-size: 0.66rem; font-weight: 800; }
.calendar-event-form { display: grid; gap: 22px; }
.calendar-event-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.calendar-event-form-grid > label { display: grid; align-content: start; gap: 6px; }
.calendar-event-form-grid > label > span { color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.calendar-event-form-grid > label > small { color: var(--muted); font-size: 0.72rem; }
.calendar-event-form-grid .form-field-wide { grid-column: 1 / -1; }
.calendar-event-form-grid .checkbox-row { grid-template-columns: auto 1fr; align-items: center; }
.calendar-event-form-grid .checkbox-row > input { grid-column: 1; grid-row: 1; width: 18px; min-height: 18px; }
.calendar-event-form-grid .checkbox-row > span { grid-column: 2; grid-row: 1; }
.calendar-detail-columns { grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); align-items: start; }
.calendar-related-list { display: grid; }
.calendar-related-list > a { padding: 12px 0; display: grid; gap: 2px; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.calendar-related-list > a:first-child { border-top: 0; }
.calendar-related-list > a span { color: var(--muted); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; }
.calendar-related-list > a strong { color: var(--accent-dark); font-size: 0.86rem; }
.calendar-status-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 9px; }
.calendar-status-actions form { margin: 0; }
.dashboard-today-card .panel-card-heading > div:first-child { display: grid; gap: 3px; }
.dashboard-today-card .panel-card-heading h2 { margin: 0; }
.dashboard-today-card .panel-card-heading small { color: var(--muted); }
.today-event-list { display: grid; gap: 8px; }
.today-event-list > a {
  min-height: 64px;
  padding: 10px 13px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) minmax(130px, auto);
  align-items: center;
  gap: 13px;
  color: #fff;
  text-decoration: none;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(14, 38, 63, 0.11);
}
.today-event-list time { font-size: 0.86rem; font-weight: 900; }
.today-event-list time small,
.today-event-list span small { display: block; margin-top: 2px; color: rgba(255, 255, 255, 0.82); font-size: 0.7rem; }
.today-event-list span strong { display: block; font-size: 0.88rem; }
.today-event-list em { font-size: 0.7rem; font-style: normal; font-weight: 750; text-align: right; opacity: 0.84; }
.today-event-list > a.status-completed { opacity: 0.58; }

.document-metric-grid { margin-bottom: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.document-metric-grid article { padding: 17px 19px; border: 1px solid var(--line); border-left: 4px solid #5b86a4; border-radius: 11px; background: #fff; }
.document-metric-grid article.is-alert { border-left-color: #b9463a; background: #fff8f7; }
.document-metric-grid span { display: block; color: var(--muted); font-size: 0.72rem; font-weight: 800; }
.document-metric-grid strong { display: block; margin-top: 5px; font-size: 1.55rem; line-height: 1; }
.document-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.document-folder-panel { padding: 16px; }
.document-folder-list { display: grid; }
.document-folder-list > a { padding: 9px 10px; display: flex; justify-content: space-between; gap: 10px; color: var(--ink); text-decoration: none; border-radius: 7px; font-size: 0.78rem; }
.document-folder-list > a:hover,
.document-folder-list > a.active { color: #17547c; background: #e7f1fb; }
.document-folder-list > a strong { min-width: 24px; color: var(--muted); text-align: right; }
.document-folder-form { margin-top: 15px; padding-top: 15px; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.document-folder-form label { display: grid; gap: 5px; }
.document-folder-form label span { color: var(--muted); font-size: 0.7rem; font-weight: 800; }
.document-folder-form input { min-width: 0; width: 100%; }
.document-folder-form .button { width: 100%; padding: 8px 10px; }
.document-main { min-width: 0; }
.document-filter { grid-template-columns: minmax(220px, 1fr) 205px 190px auto; }
.document-table { min-width: 1080px; }
.document-name { display: flex; gap: 10px; align-items: center; color: var(--ink); }
.document-extension { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; border-radius: 8px; background: linear-gradient(135deg, var(--navy-2), #4b7a9d); font-size: 0.59rem; font-weight: 900; text-transform: uppercase; }
.document-extension.large { width: 54px; height: 54px; border-radius: 11px; font-size: 0.7rem; }
.document-form { display: grid; gap: 18px; }
.document-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.document-form-grid > label { display: grid; align-content: start; gap: 6px; }
.document-form-grid > label > span { color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.document-form-grid > label > small { color: var(--muted); font-size: 0.7rem; }
.document-form-grid .form-field-wide { grid-column: 1 / -1; }
.document-file-field { padding: 15px; border: 1px dashed #aabac7; border-radius: 9px; background: #f7fafb; }
.document-security-note { margin: 0; padding: 13px 15px; color: #365168; border: 1px solid #c8d9e5; border-radius: 9px; background: #edf5fa; font-size: 0.76rem; line-height: 1.5; }
.document-detail-banner { margin-bottom: 20px; padding: 16px 18px; display: flex; align-items: center; gap: 18px; border-left: 5px solid #41799f; border-radius: 11px; background: #fff; box-shadow: 0 5px 16px rgba(14, 38, 63, 0.06); }
.document-detail-banner > div { display: grid; gap: 2px; }
.document-detail-banner > div:last-child { margin-left: auto; }
.document-detail-banner span:not(.document-extension) { color: var(--muted); font-size: 0.68rem; font-weight: 800; text-transform: uppercase; }
.document-detail-banner small { color: var(--muted); font-size: 0.68rem; }
.document-detail-columns { align-items: start; }
.document-detail-columns a { color: var(--accent-dark); text-decoration: none; }
.document-checksum { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.7rem; }
.document-history { display: grid; }
.document-history article { padding: 13px 0; display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 17px; border-top: 1px solid var(--line); }
.document-history article:first-child { border-top: 0; }
.document-history-action { width: fit-content; height: fit-content; padding: 5px 8px; border-radius: 999px; color: #17547c; background: #e7f1fb; font-size: 0.68rem; font-weight: 850; }
.document-history-action.action-downloaded { color: #5b3d88; background: #eee7f8; }
.document-history-action.action-updated { color: #795300; background: #fff0c9; }
.document-history-action.action-generated { color: #176341; background: #ddf4e9; }
.document-history p { margin: 4px 0; font-size: 0.8rem; }
.document-history small { color: var(--muted); font-size: 0.7rem; }
.template-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.template-card { display: grid; gap: 15px; }
.template-card.is-inactive { opacity: 0.65; }
.template-card header { display: flex; align-items: center; gap: 12px; }
.template-card h2 { margin: 0; font-size: 1rem; }
.template-card h2 a { color: var(--ink); text-decoration: none; }
.template-card header p { margin: 3px 0 0; color: var(--muted); font-size: 0.73rem; }
.template-card footer { margin-top: auto; padding-top: 13px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.template-card footer > a:not(.button) { color: var(--accent-dark); font-size: 0.76rem; font-weight: 800; text-decoration: none; }
.template-empty { grid-column: 1 / -1; padding: 34px; text-align: center; }
.template-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; align-items: start; gap: 18px; }
.template-editor-form textarea { min-height: 440px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; line-height: 1.55; }
.placeholder-reference { position: sticky; top: 18px; max-height: calc(100vh - 36px); overflow-y: auto; }
.placeholder-reference > p { color: var(--muted); font-size: 0.75rem; }
.placeholder-reference section { margin-top: 17px; }
.placeholder-reference section h3 { margin: 0 0 7px; color: var(--muted); font-size: 0.7rem; text-transform: uppercase; }
.placeholder-reference section > div { padding: 7px 0; display: grid; gap: 2px; border-top: 1px solid var(--line); }
.placeholder-reference code { color: #17547c; font-size: 0.72rem; font-weight: 800; }
.placeholder-reference small { color: var(--muted); font-size: 0.68rem; }
.template-body-preview { min-height: 220px; padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78rem; line-height: 1.6; white-space: normal; }

.management-heading { align-items: center; }
.analytics-filter { margin-bottom: 22px; padding: 15px; display: flex; align-items: end; gap: 12px; border: 1px solid #d6e0e7; border-radius: 12px; background: #eaf1f5; }
.analytics-filter label { min-width: 210px; display: grid; gap: 5px; }
.analytics-filter label span { color: #536174; font-size: 0.72rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.04em; }
.analytics-filter select { min-height: 42px; }
.analytics-filter .button { min-height: 42px; }
.management-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.management-kpi { position: relative; overflow: hidden; padding: 20px; border: 1px solid var(--line); border-left: 5px solid #738293; border-radius: 12px; background: #fff; }
.management-kpi::after { content: ""; position: absolute; right: -28px; top: -38px; width: 100px; height: 100px; border-radius: 50%; background: rgba(115, 130, 147, 0.08); }
.management-kpi.is-blue { border-left-color: #3478a6; }
.management-kpi.is-green { border-left-color: #2a7f62; }
.management-kpi.is-orange { border-left-color: var(--accent); }
.management-kpi.is-violet { border-left-color: #6d5aa0; }
.management-kpi span { display: block; color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.management-kpi strong { position: relative; z-index: 1; display: block; margin: 7px 0 5px; font-size: 2rem; line-height: 1; letter-spacing: -0.045em; }
.management-kpi small { color: #536174; font-size: 0.73rem; }
.finance-card { border-top: 4px solid var(--navy-2); }
.panel-card-heading > div small { display: block; margin-top: 4px; color: var(--muted); font-size: 0.73rem; }
.finance-currency-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.finance-currency-grid > article { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.finance-currency-grid header { padding: 11px 14px; display: flex; justify-content: space-between; color: #fff; background: var(--navy-2); }
.finance-currency-grid header span { color: #dce8ef; font-size: 0.72rem; }
.finance-currency-grid dl { margin: 0; padding: 4px 14px 10px; }
.finance-currency-grid dl div { padding: 9px 0; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); }
.finance-currency-grid dl div:first-child { border-top: 0; }
.finance-currency-grid dt { color: var(--muted); font-size: 0.76rem; }
.finance-currency-grid dd { margin: 0; font-size: 0.87rem; font-weight: 850; }
.finance-currency-grid .is-outstanding dd { color: #a64235; }
.pipeline-summary { margin-top: 14px; padding: 11px 13px; border-radius: 8px; color: #29465f; background: #e8f2f8; font-size: 0.78rem; }
.management-columns { margin-top: 22px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.stage-chart { display: grid; gap: 14px; }
.stage-chart-row > div:first-child { margin-bottom: 5px; display: flex; justify-content: space-between; gap: 14px; font-size: 0.78rem; }
.stage-chart-track { height: 9px; overflow: hidden; border-radius: 99px; background: #e7edf1; }
.stage-chart-track span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #3d789f, #63a7c9); }
.management-subheading { margin: 22px 0 5px !important; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.86rem !important; }
.attention-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.attention-grid a { padding: 13px; display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; border: 1px solid #ebd6d2; border-radius: 9px; background: #fff9f8; }
.attention-grid a:hover { border-color: #d79b92; }
.attention-grid strong { min-width: 27px; color: #a64235; font-size: 1.3rem; line-height: 1; text-align: center; }
.attention-grid span { color: #5b6573; font-size: 0.73rem; line-height: 1.3; }
.leaderboard-list { display: grid; }
.leaderboard-list article { padding: 12px 0; display: grid; grid-template-columns: 40px minmax(160px, 1fr) minmax(280px, 1.4fr) 80px; align-items: center; gap: 13px; border-top: 1px solid var(--line); }
.leaderboard-list article:first-child { border-top: 0; }
.leaderboard-rank { width: 31px; height: 31px; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; background: var(--navy-2); font-size: 0.78rem; font-weight: 900; }
.leaderboard-list article:nth-child(1) .leaderboard-rank { color: #604600; background: #f6d56d; }
.leaderboard-list article:nth-child(2) .leaderboard-rank { color: #3f4b55; background: #dce2e7; }
.leaderboard-list article:nth-child(3) .leaderboard-rank { color: #693e1c; background: #ddb07f; }
.leaderboard-person strong,
.leaderboard-person small { display: block; }
.leaderboard-person small { color: var(--muted); font-size: 0.7rem; }
.leaderboard-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.leaderboard-stats span { padding: 4px 8px; border-radius: 99px; color: #4b5b6c; background: #edf2f5; font-size: 0.67rem; font-weight: 750; }
.leaderboard-score { color: var(--accent-dark); white-space: nowrap; }
.score-explanation { display: flex; justify-content: space-between; align-items: center; gap: 24px; border-left: 5px solid #6d5aa0; }
.score-explanation p { margin: 4px 0 0; color: var(--muted); font-size: 0.78rem; }
.score-explanation ul { margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; list-style: none; }
.score-explanation li { padding: 6px 9px; border-radius: 7px; background: #f0edf7; color: #58477e; font-size: 0.7rem; }
.leaderboard-table { min-width: 1080px; }
.leaderboard-table td { vertical-align: middle; }
.leaderboard-table tr.is-current-user td { background: #f0f7fb; }
.leaderboard-table td:nth-child(n+3):not(:nth-child(8)) { text-align: center; }
.leaderboard-table td:nth-child(8) strong,
.leaderboard-table td:nth-child(8) small { white-space: nowrap; }

.task-filter { grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(145px, 0.8fr)) auto; }
.task-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.task-form-grid label { display: grid; gap: 6px; align-content: start; }
.task-form-grid label > span { color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.task-form-grid .form-field-wide { grid-column: 1 / -1; }
.task-list-card { padding: 8px 20px; }
.task-list { display: grid; }
.task-row { padding: 14px 3px; display: grid; grid-template-columns: 72px minmax(220px, 1fr) minmax(130px, 0.65fr) 120px 110px; align-items: center; gap: 13px; color: inherit; text-decoration: none; border-top: 1px solid var(--line); }
.task-row:first-child { border-top: 0; }
.task-row:hover { background: #f7fafc; }
.task-row.is-overdue { margin: 0 -20px; padding-left: 23px; padding-right: 23px; background: #fff7f6; }
.task-main strong,
.task-main small { display: block; }
.task-main small { margin-top: 3px; color: var(--muted); font-size: 0.72rem; }
.task-owner,
.task-row time { color: #536174; font-size: 0.75rem; }
.task-priority { width: fit-content; padding: 4px 8px; border-radius: 99px; color: #536174; background: #e9edf1; font-size: 0.66rem; font-weight: 850; white-space: nowrap; }
.task-priority.priority-high { color: #8a4d16; background: #ffead7; }
.task-priority.priority-urgent { color: #9a2b20; background: #fde6e3; }
.task-priority.priority-low { color: #176044; background: #dff3e8; }
.status-open { color: #17547c; background: #e2f0fa; }
.status-in_progress { color: #795300; background: #fff0c9; }

.calendar-task-strip { margin-bottom: 18px; padding: 13px 16px; border: 1px solid #d5e2ea; border-left: 5px solid #3478a6; border-radius: 11px; background: #f7fbfd; }
.calendar-task-strip > header { margin-bottom: 8px; display: flex; justify-content: space-between; gap: 15px; font-size: 0.78rem; }
.calendar-task-strip > header a { color: var(--accent-dark); text-decoration: none; font-weight: 800; }
.calendar-task-strip > div { display: flex; gap: 9px; overflow-x: auto; }
.calendar-task-strip > div > a { min-width: 245px; padding: 9px 11px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; color: inherit; text-decoration: none; border: 1px solid var(--line); border-radius: 8px; background: white; }
.calendar-task-strip > div > a.is-overdue { border-color: #e3aaa3; background: #fff6f5; }
.calendar-task-strip time { color: #3478a6; font-size: 0.7rem; font-weight: 850; }
.calendar-task-strip span strong,
.calendar-task-strip span small { display: block; }
.calendar-task-strip span strong { font-size: 0.75rem; }
.calendar-task-strip span small { margin-top: 2px; color: var(--muted); font-size: 0.64rem; }
.calendar-task-strip em { color: var(--muted); font-size: 0.62rem; font-style: normal; }

.dashboard-task-list { display: grid; }
.dashboard-task-list > a { padding: 11px 0; display: grid; grid-template-columns: 70px minmax(180px, 1fr) 125px; align-items: center; gap: 12px; color: inherit; text-decoration: none; border-top: 1px solid var(--line); }
.dashboard-task-list > a:first-child { border-top: 0; }
.dashboard-task-list > a.is-overdue time { color: #a64235; font-weight: 850; }
.dashboard-task-list span:nth-child(2) strong,
.dashboard-task-list span:nth-child(2) small { display: block; }
.dashboard-task-list span:nth-child(2) small { margin-top: 3px; color: var(--muted); font-size: 0.7rem; }
.dashboard-task-list time { color: #536174; font-size: 0.72rem; text-align: right; }

.notification-list-card { padding: 8px 20px; }
.notification-list { display: grid; }
.notification-row { position: relative; padding: 15px 3px; display: grid; grid-template-columns: 40px minmax(0, 1fr) 12px auto; align-items: center; gap: 14px; border-top: 1px solid var(--line); }
.notification-row:first-child { border-top: 0; }
.notification-row.is-unread { margin: 0 -20px; padding-left: 23px; padding-right: 23px; background: #f3f9fd; }
.notification-row.severity-critical { border-left: 3px solid #cf5146; }
.notification-row.severity-warning { border-left: 3px solid #e3a53e; }
.notification-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #245b7c; background: #e5f1f7; font-size: 1rem; font-weight: 900; }
.notification-row > div strong { display: block; }
.notification-row > div p { margin: 4px 0; color: #536174; font-size: 0.8rem; }
.notification-row > div small { color: var(--muted); font-size: 0.68rem; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: #2e80b3; }

.board-heading { align-items: center; }
.board-filter { margin: -8px 0 20px; padding: 5px; width: fit-content; display: flex; flex-wrap: wrap; gap: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.board-filter a { padding: 8px 12px; color: #536174; border-radius: 7px; font-size: 0.74rem; font-weight: 800; text-decoration: none; }
.board-filter a:hover,
.board-filter a.active { color: #fff; background: var(--navy-2); }
.board-feed { width: min(100%, 840px); margin-inline: auto; display: grid; gap: 18px; }
.board-post { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 28px rgba(14, 35, 52, 0.06); }
.board-post.is-pinned { border-color: #e6c774; box-shadow: 0 10px 30px rgba(128, 93, 15, 0.1); }
.board-pin-banner { padding: 8px 20px; color: #70520d; background: linear-gradient(90deg, #fff5cf, #fffaf0); border-bottom: 1px solid #ecd999; font-size: 0.7rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; }
.board-post-header { padding: 17px 20px 12px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.board-avatar,
.board-comment-avatar { display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: linear-gradient(145deg, #316f96, #173c58); font-weight: 900; }
.board-avatar { width: 44px; height: 44px; border-radius: 50%; font-size: 1rem; }
.board-comment-avatar { width: 34px; height: 34px; border-radius: 50%; font-size: 0.75rem; }
.board-author strong,
.board-author span { display: block; }
.board-author strong { font-size: 0.83rem; }
.board-author span { margin-top: 3px; color: var(--muted); font-size: 0.67rem; }
.board-post-menu { display: flex; align-items: center; gap: 6px; }
.board-post-menu a,
.board-post-menu button,
.board-post-footer button { padding: 5px 7px; color: #647282; background: none; border: 0; font: inherit; font-size: 0.68rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.board-post-menu a:hover,
.board-post-menu button:hover { color: var(--accent-dark); }
.board-post-body { padding: 4px 20px 15px; }
.board-post-body h2 { margin: 3px 0 9px; font-size: 1.12rem; line-height: 1.25; }
.board-post-copy { color: #2f3c4a; font-size: 0.88rem; line-height: 1.65; overflow-wrap: anywhere; }
.board-post-image { margin: 16px -20px 0; display: block; overflow: hidden; background: #edf1f3; }
.board-post-image img { width: 100%; max-height: 620px; display: block; object-fit: contain; }
.board-listing-card { margin-top: 16px; padding: 13px; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 13px; color: inherit; text-decoration: none; border: 1px solid #cfe0ea; border-radius: 10px; background: #f4f9fc; }
.board-listing-card:hover { border-color: #83b2cf; }
.board-listing-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: #3478a6; font-size: 1.35rem; }
.board-listing-card small,
.board-listing-card strong,
.board-listing-card em { display: block; }
.board-listing-card small { color: #3478a6; font-size: 0.65rem; font-weight: 850; text-transform: uppercase; }
.board-listing-card strong { margin: 3px 0; font-size: 0.82rem; }
.board-listing-card em { color: var(--muted); font-size: 0.7rem; font-style: normal; }
.board-listing-card b { color: var(--accent-dark); font-size: 0.72rem; }
.board-mentions { margin-top: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 0.68rem; }
.board-mentions strong { padding: 4px 7px; color: #5a4784; border-radius: 99px; background: #f0edf8; font-size: 0.66rem; }
.board-post-stats { margin: 0 20px; padding: 9px 0; display: flex; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--line); font-size: 0.68rem; }
.board-reactions { margin: 0 20px; padding: 6px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; border-top: 1px solid var(--line); }
.board-reactions form { margin: 0; }
.board-reactions button { width: 100%; padding: 8px 5px; color: #526272; background: transparent; border: 0; border-radius: 7px; font: inherit; font-size: 0.7rem; font-weight: 800; cursor: pointer; }
.board-reactions button:hover { background: #f0f5f8; }
.board-reactions button.active { color: #17547c; background: #e4f1f8; }
.board-comments { padding: 8px 20px 2px; border-top: 1px solid var(--line); background: #f8fafb; }
.board-comments > article { padding: 8px 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; }
.board-comments > article > div:last-child { padding: 9px 11px; border-radius: 10px; background: #fff; border: 1px solid #e3e9ed; }
.board-comments header { display: flex; justify-content: space-between; gap: 12px; }
.board-comments header strong { font-size: 0.73rem; }
.board-comments header time { color: var(--muted); font-size: 0.62rem; }
.board-comments p { margin: 5px 0 0; color: #3d4a57; font-size: 0.76rem; line-height: 1.5; }
.board-comments small { margin-top: 5px; display: block; color: #65538d; font-size: 0.63rem; }
.board-comment-form { padding: 13px 20px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: start; gap: 9px; border-top: 1px solid var(--line); background: #f8fafb; }
.board-comment-form textarea { min-height: 72px; resize: vertical; }
.board-comment-form details { margin-top: 6px; }
.board-comment-form summary { width: fit-content; color: #5a4784; font-size: 0.65rem; font-weight: 800; cursor: pointer; }
.board-comment-form select { margin-top: 6px; min-height: 88px; font-size: 0.7rem; }
.board-comment-form .button { min-height: 40px; }
.board-post-footer { padding: 0 20px 10px; display: flex; justify-content: flex-end; background: #f8fafb; }
.board-post-footer button { color: #a04b42; }
.board-empty { text-align: center; }
.board-empty .button { margin-top: 12px; }
.board-editor { width: min(100%, 850px); margin-inline: auto; }
.board-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.board-editor-grid label { display: grid; gap: 6px; align-content: start; }
.board-editor-grid label > span { color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.board-editor-grid .form-field-wide { grid-column: 1 / -1; }
.board-editor-grid textarea { resize: vertical; }
.board-editor-grid select[multiple] { min-height: 128px; }
.board-editor-note { margin-top: 16px; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; gap: 11px; color: #4b5a69; border: 1px solid #d6e5ee; border-radius: 9px; background: #f4f9fc; font-size: 0.72rem; }

.site-footer { padding: 42px 0; background: #0a1c2e; color: #d5e1e8; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; }
.footer-inner p { margin: 6px 0 0; color: #9fb0be; }
.footer-note { color: #9fb0be; }

@media (max-width: 960px) {
  .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .contact-card { position: static; }
  .panel-shell { grid-template-columns: 190px minmax(0, 1fr); gap: 20px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .portal-grid { grid-template-columns: repeat(2, 1fr); }
  .deal-metric-grid { grid-template-columns: repeat(2, 1fr); }
  .document-metric-grid { grid-template-columns: repeat(2, 1fr); }
  .document-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .document-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-editor-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .management-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-row { grid-template-columns: 65px minmax(180px, 1fr) 110px; }
  .task-row .task-owner,
  .task-row time { grid-row: 2; }
  .leaderboard-list article { grid-template-columns: 36px minmax(150px, 1fr) 80px; }
  .board-feed { width: 100%; }
  .leaderboard-stats { grid-column: 2 / -1; }
  .deal-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publication-layout { grid-template-columns: 1fr; }
  .listing-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listing-record-grid { grid-template-columns: 1fr; }
  .panel-image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-event-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-toolbar { flex-wrap: wrap; }
  .calendar-agent-filter { margin-left: 0; }
}

@media (max-width: 680px) {
  .wrap { width: min(100% - 24px, 1180px); }
  .header-inner { min-height: 64px; }
  .main-nav { gap: 14px; font-size: 0.9rem; }
  .main-nav .header-language-switch a { min-width: 31px; padding-inline: 6px; }
  .hero-content { padding: 68px 0 72px; }
  .hero-search { grid-template-columns: 1fr; }
  .section { padding: 58px 0; }
  .section-heading { display: block; }
  .section-heading .text-link { display: inline-block; margin-top: 14px; }
  .listing-grid,
  .benefit-grid,
  .filter-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .gallery { min-height: 320px; grid-template-columns: 1fr; }
  .gallery img:not(.gallery-main) { display: none; }
  .gallery-main { grid-row: auto; }
  .detail-content { padding: 22px; }
  .detail-header { display: block; }
  .public-heading-row { align-items: flex-start; }
  .detail-price { margin-top: 20px; text-align: left; }
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { display: block; }
  .footer-note { margin-top: 18px; }
  .panel-page { padding-top: 14px; }
  .panel-shell { grid-template-columns: 1fr; }
  .panel-sidebar { position: static; }
  .panel-nav { grid-template-columns: repeat(2, 1fr); }
  .panel-logout { padding-top: 4px; }
  .panel-heading { display: block; }
  .panel-heading .button { margin-top: 16px; }
  .metric-grid,
  .panel-columns,
  .portal-grid,
  .deal-metric-grid,
  .channel-checklist ul { grid-template-columns: 1fr; }
  .panel-filter,
  .panel-filter-short,
  .panel-filter-contacts { grid-template-columns: 1fr; }
  .deal-filter { grid-template-columns: 1fr; }
  .document-filter,
  .document-layout,
  .document-metric-grid,
  .document-form-grid { grid-template-columns: 1fr; }
  .template-card-grid,
  .template-editor-layout { grid-template-columns: 1fr; }
  .placeholder-reference { position: static; max-height: none; }
  .analytics-filter { display: grid; grid-template-columns: 1fr; }
  .analytics-filter label { min-width: 0; }
  .management-kpi-grid,
  .finance-currency-grid,
  .management-columns,
  .attention-grid { grid-template-columns: 1fr; }
  .task-filter,
  .task-form-grid { grid-template-columns: 1fr; }
  .task-row { grid-template-columns: 1fr auto; }
  .task-row .task-priority { grid-column: 1; }
  .task-row .task-main { grid-column: 1 / -1; }
  .notification-row { grid-template-columns: 36px minmax(0, 1fr); }
  .board-editor-grid { grid-template-columns: 1fr; }
  .board-editor-grid .form-field-wide { grid-column: auto; }
  .board-post-header { grid-template-columns: 40px minmax(0, 1fr); }
  .board-post-menu { grid-column: 2; }
  .board-listing-card { grid-template-columns: 42px minmax(0, 1fr); }
  .board-listing-card b { grid-column: 2; }
  .board-comment-form { grid-template-columns: 30px minmax(0, 1fr); }
  .board-comment-form .button { grid-column: 2; width: fit-content; }
  .notification-row .unread-dot { position: absolute; top: 16px; right: 12px; }
  .notification-row form { grid-column: 2; }
  .dashboard-task-list > a { grid-template-columns: 1fr auto; }
  .dashboard-task-list > a > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .leaderboard-list article { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .score-explanation { display: block; }
  .score-explanation ul { margin-top: 14px; justify-content: flex-start; }
  .document-form-grid .form-field-wide { grid-column: auto; }
  .document-history article { grid-template-columns: 1fr; gap: 7px; }
  .panel-table { min-width: 720px; }
  .login-page { padding-top: 35px; }
  .listing-form-grid,
  .panel-image-grid,
  .image-upload-form,
  .calendar-event-form-grid,
  .listing-document-list,
  .listing-relation-grid { grid-template-columns: 1fr; }
  .listing-relation-grid .form-field-wide { grid-column: auto; }
  .listing-record-list article { display: grid; }
  .deal-form-grid { grid-template-columns: 1fr; }
  .deal-form-grid .form-field-wide { grid-column: auto; }
  .calendar-event-form-grid .form-field-wide { grid-column: auto; }
  .calendar-toolbar { align-items: stretch; }
  .calendar-agent-filter { width: 100%; display: grid; }
  .calendar-agent-filter select { width: 100%; }
  .calendar-view-switch { width: 100%; }
  .calendar-view-switch a { flex: 1; text-align: center; }
  .listing-map-heading { display: block; }
  .listing-map-actions { margin-top: 12px; }
  .listing-location-map,
  .public-listing-map { min-height: 300px; }
  .contact-role-field > div { grid-template-columns: 1fr; }
  .heading-actions { justify-content: flex-start; }
  .activity-timeline article { grid-template-columns: 1fr; gap: 8px; }
  .today-event-list > a { grid-template-columns: 62px minmax(0, 1fr); }
  .today-event-list em { grid-column: 2; text-align: left; }
}

/* Etap 26: spersonalizowane pakiety ofertowe. */
.package-explainer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  margin: 0 0 22px;
  padding: 18px 21px;
  border: 1px solid #d9e3e8;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbfc, #fff8f3);
  color: #536570;
  line-height: 1.55;
}
.package-explainer strong { color: #172b48; white-space: nowrap; }
.package-copy-card { display: grid; gap: 20px; }
.package-copy-card label > span,
.package-copy-card label > small { display: block; }
.package-copy-card label > span { margin-bottom: 7px; color: #172b48; font-weight: 800; }
.package-copy-card label > small { margin-top: 6px; color: var(--muted); }
.package-copy-card input,
.package-copy-card textarea { width: 100%; }
.package-selection { padding: 0 24px 24px; }
.package-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.package-choice { position: relative; display: grid; grid-template-columns: auto 23px 1fr; gap: 11px; align-items: center; min-height: 72px; padding: 14px 16px; border: 1px solid #dce4e8; border-radius: 13px; background: #fbfcfd; cursor: pointer; }
.package-choice:hover { border-color: #d77b43; background: #fff9f5; }
.package-choice input { width: 18px; height: 18px; accent-color: #d77b43; }
.package-choice-mark { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #e7edf1; color: transparent; font-weight: 900; }
.package-choice:has(input:checked) { border-color: #d77b43; box-shadow: 0 0 0 2px rgba(215,123,67,.12); background: #fff8f3; }
.package-choice:has(input:checked) .package-choice-mark { background: #d77b43; color: #fff; }
.package-choice strong { color: #172b48; line-height: 1.45; }
.package-result-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.package-result-summary > div { padding: 21px 23px; border-left: 1px solid #e1e8ec; }
.package-result-summary > div:first-child { border-left: 0; }
.package-result-summary span,
.package-result-summary strong,
.package-result-summary small { display: block; }
.package-result-summary span { color: var(--muted); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.package-result-summary strong { margin-top: 8px; color: #172b48; font-family: Georgia, serif; font-size: 1.08rem; }
.package-result-summary small { margin-top: 5px; color: #66757e; }
.package-introduction p { margin-bottom: 0; color: #536570; line-height: 1.65; }
.package-snapshot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; padding: 0 24px 24px; }
.package-snapshot-grid article { padding: 18px; border: 1px solid #dfe6ea; border-radius: 13px; background: #fbfcfd; }
.package-snapshot-grid header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.package-snapshot-grid h3 { margin: 14px 0 7px; color: #172b48; font-family: Georgia, serif; }
.package-snapshot-grid p { min-height: 38px; color: var(--muted); }
.package-snapshot-grid dl { display: grid; gap: 7px; margin: 16px 0; }
.package-snapshot-grid dl div { display: flex; justify-content: space-between; gap: 12px; padding-top: 7px; border-top: 1px solid #e5ebee; }
.package-snapshot-grid dt { color: var(--muted); }
.package-snapshot-grid dd { margin: 0; color: #172b48; font-weight: 800; text-align: right; }
.package-snapshot-grid a { color: #b75e2c; font-weight: 800; text-decoration: none; }

@media (max-width: 980px) {
  .package-result-summary,
  .package-snapshot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .package-explainer,
  .package-choice-grid,
  .package-result-summary,
  .package-snapshot-grid { grid-template-columns: 1fr; }
  .package-explainer strong { white-space: normal; }
  .package-result-summary > div { border-left: 0; border-top: 1px solid #e1e8ec; }
  .package-result-summary > div:first-child { border-top: 0; }
}

/* Etap 25: lokalna analiza dokumentów. */
.analysis-heading form { align-self: end; }
.analysis-local-note,
.analysis-format-warning,
.analysis-disclaimer {
  margin: 0 0 20px;
  padding: 17px 20px;
  border: 1px solid #cfe0e9;
  border-radius: 12px;
  background: #f3f8fb;
  color: #415967;
  line-height: 1.55;
}
.analysis-format-warning { border-color: #ead19a; background: #fff9e9; color: #745719; }
.analysis-disclaimer { margin-top: 22px; margin-bottom: 0; border-color: #ead9ae; background: #fffaf0; color: #675526; }
.analysis-overview {
  display: grid;
  grid-template-columns: 190px minmax(320px, 1fr) 190px;
  gap: 28px;
  align-items: center;
}
.analysis-risk { min-height: 155px; display: grid; place-content: center; text-align: center; border: 1px solid #dde5e9; border-radius: 16px; background: #f8fafb; }
.analysis-risk span,
.analysis-risk b,
.analysis-integrity span,
.analysis-integrity strong,
.analysis-integrity small { display: block; }
.analysis-risk span,
.analysis-integrity span { color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.analysis-risk strong { margin: 5px 0; color: #172439; font-family: Georgia, serif; font-size: 2.8rem; line-height: 1; }
.analysis-risk strong small { font-size: .36em; }
.analysis-risk b { font-size: .8rem; }
.analysis-risk.risk-low { border-color: #b9dec8; background: #f0faf4; color: #26704a; }
.analysis-risk.risk-medium { border-color: #ead19a; background: #fff9e9; color: #866113; }
.analysis-risk.risk-high { border-color: #e9b8ae; background: #fff5f2; color: #a14439; }
.analysis-risk.risk-critical { border-color: #d89090; background: #fff0f0; color: #861f1f; }
.analysis-summary h2 { margin: 8px 0 10px; }
.analysis-summary p { color: #536772; line-height: 1.55; }
.analysis-summary small { color: var(--muted); }
.analysis-integrity { padding: 17px; border: 1px solid #e0e7eb; border-radius: 13px; background: #f9fbfc; }
.analysis-integrity strong { margin: 8px 0 4px; font-family: Georgia, serif; font-size: 1.35rem; }
.analysis-integrity .is-ok { color: #26704a; }
.analysis-integrity .is-error { color: #a13b36; }
.analysis-integrity small { color: var(--muted); }
.analysis-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.analysis-metric-grid article { padding: 18px; border: 1px solid #dfe7eb; border-radius: 13px; background: #fff; }
.analysis-metric-grid span,
.analysis-metric-grid strong,
.analysis-metric-grid small { display: block; }
.analysis-metric-grid span { color: var(--muted); font-size: .75rem; font-weight: 800; }
.analysis-metric-grid strong { margin-top: 7px; color: #172439; font-family: Georgia, serif; font-size: 1.7rem; }
.analysis-metric-grid small { color: var(--muted); }
.analysis-columns { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(420px, 1.2fr); gap: 18px; }
.analysis-fields,
.analysis-checklist,
.analysis-findings { padding: 0 24px 24px; }
.analysis-fields article { padding: 14px 0; border-top: 1px solid #e5eaed; }
.analysis-fields article:first-child { border-top: 0; }
.analysis-fields strong { display: block; margin-bottom: 8px; }
.analysis-fields article div { display: flex; flex-wrap: wrap; gap: 6px; }
.analysis-fields article span { padding: 5px 8px; border-radius: 7px; background: #edf3f6; color: #3d5665; font-size: .78rem; }
.analysis-checklist article,
.analysis-findings article { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 11px; padding: 13px 0; border-top: 1px solid #e5eaed; }
.analysis-checklist article:first-child,
.analysis-findings article:first-child { border-top: 0; }
.analysis-checklist article > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; }
.analysis-checklist .check-present > span { background: #dff3e6; color: #277048; }
.analysis-checklist .check-missing > span { background: #f8e4df; color: #a34139; }
.analysis-checklist .check-manual > span { background: #fff0cf; color: #8a620e; }
.analysis-checklist strong,
.analysis-findings strong { color: #172439; }
.analysis-checklist p,
.analysis-findings p { margin: 4px 0 0; color: #61717a; font-size: .8rem; line-height: 1.45; }
.analysis-findings article > span { align-self: start; padding: 5px 6px; border-radius: 6px; text-align: center; font-size: .62rem; font-weight: 900; }
.analysis-findings .severity-medium > span { background: #fff0cf; color: #805c0d; }
.analysis-findings .severity-high > span { background: #f8e4df; color: #983c35; }
.analysis-findings .severity-critical > span { background: #8c2424; color: #fff; }
.analysis-warnings ul { margin-bottom: 0; color: #76571a; line-height: 1.6; }
.analysis-history-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0 24px 24px; }
.analysis-history-grid article { padding: 15px; border: 1px solid #e0e7eb; border-radius: 12px; background: #f9fbfc; }
.analysis-history-grid article.is-current { border-color: #d6a07d; background: #fff8f3; }
.analysis-history-grid span,
.analysis-history-grid strong,
.analysis-history-grid small { display: block; }
.analysis-history-grid span,
.analysis-history-grid small { color: var(--muted); font-size: .74rem; }
.analysis-history-grid strong { margin: 7px 0 5px; color: #172439; font-family: Georgia, serif; }
.analysis-history-grid small + small { margin-top: 3px; }
.analysis-empty { padding: 50px 28px; text-align: center; }
.analysis-empty h2 { margin: 8px 0 12px; }
.analysis-empty p { max-width: 740px; margin: 0 auto; color: var(--muted); line-height: 1.6; }
.document-analysis-preview { display: grid; grid-template-columns: minmax(320px, 1fr) auto auto; gap: 24px; align-items: center; }
.document-analysis-preview h2 { margin: 7px 0 8px; }
.document-analysis-preview p { margin: 0; color: var(--muted); line-height: 1.5; }
.analysis-preview-score { min-width: 120px; padding: 13px 16px; border: 1px solid #dfe6e9; border-radius: 11px; text-align: center; }
.analysis-preview-score span,
.analysis-preview-score strong,
.analysis-preview-score small { display: block; }
.analysis-preview-score span,
.analysis-preview-score small { color: var(--muted); font-size: .72rem; }
.analysis-preview-score strong { margin: 3px 0; font-family: Georgia, serif; font-size: 1.35rem; }

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

@media (max-width: 680px) {
  .analysis-metric-grid,
  .analysis-history-grid,
  .document-analysis-preview { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .header-inner { padding: 10px 0; flex-wrap: wrap; }
  .main-nav { width: 100%; justify-content: space-between; }
}

/* Etap 18: bezpieczna korespondencja wychodząca CRM. */
.email-configuration-warning,
.email-error-box {
  margin: 0 0 20px;
  padding: 14px 17px;
  border: 1px solid #f1d28d;
  border-radius: 12px;
  background: #fff8e7;
  color: #684a07;
}
.email-error-box { border-color: #f0b4b4; background: #fff1f1; color: #8a2020; }
.email-error-box p { margin: 6px 0 0; }
.email-filter { grid-template-columns: minmax(240px, 1fr) 220px auto; }
.email-table th:first-child { width: 145px; }
.email-table th:nth-child(2) { width: 150px; }
.email-table td { vertical-align: middle; }
.email-error-inline { display: block; color: #b33a3a; margin-top: 4px; }
.email-template-picker { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 20px; }
.email-template-picker h2,
.email-template-picker p { margin: 0; }
.email-template-picker p { margin-top: 5px; }
.email-template-picker > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.email-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.email-editor-grid .form-field-wide { grid-column: 1 / -1; }
.email-editor-grid label > span { display: block; font-weight: 700; margin-bottom: 7px; }
.email-editor-grid label > ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.email-editor-grid label > ul label { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid #dfe6ec; border-radius: 9px; background: #fafcfd; font-weight: 500; }
.email-editor-actions { display: flex; align-items: center; gap: 16px; margin-top: 20px; }
.email-editor-actions span { color: #6c7881; font-size: .9rem; }
.placeholder-help summary { cursor: pointer; font-weight: 800; }
.placeholder-help div,
.placeholder-reference div { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.placeholder-help code,
.placeholder-reference code { padding: 6px 8px; border-radius: 6px; background: #edf3f7; color: #284456; }
.email-detail-columns { grid-template-columns: minmax(0, 1.7fr) minmax(280px, .7fr); }
.email-preview { overflow: hidden; }
.email-preview-meta { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 8px 12px; padding-bottom: 18px; border-bottom: 1px solid #e4e9ed; }
.email-preview-meta span { color: #78858d; }
.email-preview-body { min-height: 240px; padding: 26px 4px; line-height: 1.65; color: #25333b; }
.email-attachments { border-top: 1px solid #e4e9ed; padding-top: 16px; }
.email-attachments a { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px 0; border-top: 1px solid #edf0f2; }
.email-history article { display: grid; grid-template-columns: 145px 180px minmax(0, 1fr) 180px; gap: 14px; padding: 13px 0; border-top: 1px solid #e5e9ec; align-items: start; }
.email-history article:first-child { border-top: 0; }
.email-history p { margin: 0; }
.email-template-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.email-template-card h2 { margin: 12px 0 7px; }
.email-template-card p { margin: 0 0 7px; }

/* Etap 19: panel kont SMTP i widoczna polityka antyspamowa. */
.email-quota-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}
.email-quota-strip span {
  padding: 8px 11px;
  border: 1px solid #dce5eb;
  border-radius: 999px;
  background: #f8fbfc;
  color: #53636d;
  font-size: .83rem;
}
.smtp-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 22px;
  align-items: start;
}
.smtp-settings-sidebar { display: grid; gap: 18px; }
.smtp-account-form .button { justify-self: start; }
.smtp-status-card h2,
.smtp-policy-card h2 { margin-top: 0; }
.smtp-status-card form { margin-top: 18px; }
.smtp-status-card .panel-muted { margin-bottom: 0; }
.smtp-policy-card ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.smtp-policy-card p { color: #5e6d76; line-height: 1.55; margin-bottom: 0; }
.contact-optout-field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-content: center;
}
.contact-optout-field input { width: 18px; min-height: 18px; }
.contact-optout-field small { grid-column: 1 / -1; }
.button:disabled,
button:disabled { cursor: not-allowed; opacity: .55; }

@media (max-width: 820px) {
  .email-filter,
  .email-editor-grid,
  .email-detail-columns { grid-template-columns: 1fr; }
  .email-editor-grid .form-field-wide { grid-column: auto; }
  .email-template-picker { display: block; }
  .email-template-picker > div:last-child { justify-content: flex-start; margin-top: 14px; }
  .email-history article { grid-template-columns: 1fr; gap: 5px; }
  .email-editor-grid label > ul { grid-template-columns: 1fr; }
  .email-editor-actions { align-items: flex-start; flex-direction: column; }
  .smtp-settings-layout { grid-template-columns: 1fr; }
}

/* Etap 21: zespół, agenci i bezpieczny cykl dostępu. */
.team-filter { grid-template-columns: minmax(260px, 1fr) auto; }
.team-section { padding: 0; overflow: hidden; }
.team-section-heading { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; padding: 22px 24px 18px; }
.team-section-heading h2 { margin: 0; }
.team-section-heading p { margin: 5px 0 0; color: var(--muted); }
.team-table { min-width: 940px; }
.team-person { display: flex; gap: 11px; align-items: center; color: inherit; }
.team-person > span:last-child { min-width: 0; }
.team-person strong,
.team-person small { display: block; }
.team-person small { margin-top: 3px; color: var(--muted); font-size: .76rem; }
.team-avatar { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 13px; background: #e9f0f5; color: #17324d; font-family: Georgia, serif; font-weight: 900; }
.team-avatar.large { width: 68px; height: 68px; flex-basis: 68px; border-radius: 20px; font-size: 1.3rem; background: #17324d; color: #fff; }
.team-role { display: inline-flex; width: fit-content; padding: 5px 9px; border-radius: 999px; background: #edf2f5; color: #52616b; font-size: .72rem; font-weight: 800; }
.team-role.role-owner { background: #f8e8dd; color: #9b4e22; }
.team-role.role-manager { background: #e9e6f5; color: #59428b; }
.team-role.role-agent { background: #e2f2e8; color: #287044; }
.team-role.role-viewer { background: #edf2f5; color: #66727a; }
.team-invitation-link { margin-bottom: 20px; padding: 16px 18px; display: grid; grid-template-columns: minmax(250px, .7fr) minmax(300px, 1.3fr); gap: 16px; align-items: center; border: 1px solid #e8c66c; border-radius: 12px; background: #fff8e4; color: #62470b; }
.team-invitation-link p { margin: 4px 0 0; }
.team-invitation-link input { background: #fff; }
.team-management-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 22px; align-items: start; }
.team-invitation-list { padding: 0 24px 22px; }
.team-invitation-list article { display: grid; grid-template-columns: minmax(150px, 1fr) auto minmax(145px, .8fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid #e6ebee; }
.team-invitation-list article:first-child { border-top: 0; }
.team-invitation-list strong,
.team-invitation-list small { display: block; }
.team-invitation-list small { margin-top: 3px; color: var(--muted); }
.text-action { border: 0; padding: 0; background: transparent; color: #31556c; font: inherit; font-weight: 800; cursor: pointer; }
.text-action.danger { color: #a83b3b; }
.team-audit-list { padding: 0 24px 22px; }
.team-audit-list article { display: grid; grid-template-columns: 105px minmax(0, 1fr) 130px; gap: 12px; align-items: start; padding: 13px 0; border-top: 1px solid #e6ebee; }
.team-audit-list article:first-child { border-top: 0; }
.team-audit-list time,
.team-audit-list small { color: var(--muted); font-size: .78rem; }
.team-audit-list p { margin: 4px 0 0; color: #53636d; font-size: .84rem; line-height: 1.45; }
.team-form-card { max-width: 900px; }
.team-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.team-form-grid label { display: grid; gap: 7px; align-content: start; }
.team-form-grid label > span { color: var(--muted); font-size: .78rem; font-weight: 800; }
.team-form-grid .form-field-wide { grid-column: 1 / -1; }
.team-form-grid .checkbox-row { grid-template-columns: auto 1fr; align-items: center; }
.team-form-grid .checkbox-row input { width: 18px; min-height: 18px; }
.team-form-grid .checkbox-row small { grid-column: 1 / -1; }
.team-security-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 14px 16px; margin: 18px 0; border: 1px solid #d7e4ec; border-radius: 10px; background: #f5f9fb; color: #475a67; }
.team-security-note p { margin: 0; line-height: 1.5; }
.team-profile-layout { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(420px, 1.28fr); gap: 22px; align-items: start; }
.team-profile-identity { display: flex; gap: 15px; align-items: center; padding-bottom: 20px; }
.team-profile-identity h2 { margin: 7px 0 2px; }
.team-profile-identity p { margin: 0; color: var(--muted); }
.team-owner-notes { margin-top: 20px; padding: 15px; border-radius: 10px; background: #fff8e8; color: #654b12; }
.team-owner-notes p { margin: 7px 0 0; }
.team-workload-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0 24px 24px; }
.team-workload-grid div { padding: 15px; border: 1px solid #e1e8ec; border-radius: 11px; background: #f8fafb; }
.team-workload-grid strong,
.team-workload-grid span { display: block; }
.team-workload-grid strong { font-family: Georgia, serif; font-size: 1.5rem; color: #172439; }
.team-workload-grid span { margin-top: 4px; color: var(--muted); font-size: .76rem; }
.team-danger-zone { margin: 0 24px 24px; padding: 17px; border: 1px solid #f0c6c6; border-radius: 11px; background: #fff7f7; }
.team-danger-zone.safe { border-color: #d5e4ec; background: #f6fafc; }
.team-danger-zone h3 { margin: 0; }
.team-danger-zone p { color: var(--muted); }
.team-danger-zone form { display: grid; grid-template-columns: minmax(200px, 1fr) auto; gap: 10px; }
.team-access-card { margin-top: 22px; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 1fr); gap: 25px; align-items: center; border-color: #efd1d1; }
.team-access-card h2 { margin-top: 0; }
.team-access-card p { margin-bottom: 0; color: var(--muted); }
.team-access-card form { display: grid; gap: 10px; justify-items: start; }
.team-access-card label { width: 100%; display: grid; gap: 7px; }
.team-access-card label span { color: var(--muted); font-size: .78rem; font-weight: 800; }
.danger-button { border-color: #a83b3b; background: #a83b3b; color: #fff; }
.team-accept-page { min-height: 70vh; padding: 70px 20px; display: grid; place-items: start center; background: #f3f6f8; }
.team-accept-card { width: min(100%, 560px); padding: 34px; border: 1px solid #dfe6eb; border-radius: 18px; background: #fff; box-shadow: 0 18px 45px rgba(25, 45, 62, .1); }
.team-accept-card h1 { margin: 10px 0 20px; }
.team-accept-organization { margin-bottom: 20px; padding: 18px; border-radius: 12px; background: #f5f8fa; }
.team-accept-organization > strong { display: inline-block; margin-right: 8px; font-size: 1.15rem; }
.team-accept-organization p { margin: 11px 0 4px; }
.team-accept-form { margin-top: 20px; }
.team-accept-expiry { margin: 20px 0 0; color: var(--muted); font-size: .82rem; text-align: center; }

@media (max-width: 980px) {
  .team-management-columns,
  .team-profile-layout { grid-template-columns: 1fr; }
  .team-invitation-list article { grid-template-columns: minmax(150px, 1fr) auto; }
  .team-invitation-list article > div:nth-child(3) { grid-column: 1; }
  .team-invitation-list article form { grid-column: 2; grid-row: 2; }
}

@media (max-width: 680px) {
  .team-filter,
  .team-invitation-link,
  .team-form-grid,
  .team-access-card { grid-template-columns: 1fr; }
  .team-form-grid .form-field-wide { grid-column: auto; }
  .team-workload-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-danger-zone form { grid-template-columns: 1fr; }
  .team-audit-list article { grid-template-columns: 1fr; gap: 5px; }
  .team-accept-card { padding: 24px; }
}

/* Etap 23: scoring dopasowań i historia prezentacji nieruchomości. */
.matching-explainer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 18px 0 0;
  padding: 15px 18px;
  border: 1px solid #d7e4ec;
  border-radius: 12px;
  background: #f5f9fb;
  color: #475a67;
}
.matching-explainer strong { color: #183149; white-space: nowrap; }
.match-table { min-width: 1120px; }
.match-score {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf2f5;
  color: #596872;
  font-family: Georgia, serif;
  font-weight: 900;
}
.match-score.match-high { background: #def3e5; color: #247044; }
.match-score.match-medium { background: #fff0cf; color: #8a620e; }
.match-score.match-low { background: #f8e4e2; color: #9a3e39; }
.match-reasons { min-width: 210px; display: grid; gap: 4px; }
.match-reasons span { font-size: .75rem; line-height: 1.35; }
.match-positive { color: #287044; }
.match-caution { color: #9a6818; }
.viewing-filter { grid-template-columns: minmax(260px, 1fr) 230px auto; }
.viewing-table { min-width: 980px; }
.viewing-form-card { max-width: 960px; }
.viewing-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.viewing-form-grid label { display: grid; gap: 7px; align-content: start; }
.viewing-form-grid label > span { color: var(--muted); font-size: .78rem; font-weight: 800; }
.viewing-form-grid .form-field-wide { grid-column: 1 / -1; }
.viewing-history article {
  display: grid;
  grid-template-columns: 125px minmax(260px, 1fr) 170px auto;
  gap: 16px;
  align-items: start;
  padding: 15px 0;
  border-top: 1px solid #e4eaee;
}
.viewing-history article:first-child { border-top: 0; }
.viewing-history time,
.viewing-history small { color: var(--muted); font-size: .78rem; }
.viewing-history strong,
.viewing-history small { display: block; }
.viewing-history p { margin: 7px 0 0; color: #53636d; }
.viewing-history article > div:nth-child(3) { display: grid; gap: 7px; }

@media (max-width: 780px) {
  .matching-explainer,
  .viewing-filter,
  .viewing-form-grid,
  .viewing-history article { grid-template-columns: 1fr; }
  .matching-explainer strong { white-space: normal; }
  .viewing-form-grid .form-field-wide { grid-column: auto; }
}

/* Etap 24: automatyczna analiza ofert porównawczych. */
.valuation-heading form { align-self: end; }
.valuation-subject {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.valuation-subject > div { padding: 22px 24px; border-left: 1px solid #e2e8ec; }
.valuation-subject > div:first-child { border-left: 0; }
.valuation-subject span,
.valuation-subject strong,
.valuation-subject small { display: block; }
.valuation-subject span { color: var(--muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.valuation-subject strong { margin-top: 8px; color: #172439; font-family: Georgia, serif; font-size: 1.12rem; }
.valuation-subject small { margin-top: 5px; color: #66747c; }
.valuation-result {
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(420px, .95fr);
  gap: 32px;
  margin-top: 22px;
  background: linear-gradient(135deg, #fff 0%, #f7fafb 100%);
}
.valuation-result-main { align-self: center; }
.valuation-result-main > p:last-child { max-width: 680px; color: #596a75; line-height: 1.55; }
.valuation-total { margin: 12px 0 5px; color: #172439; font-family: Georgia, serif; font-size: clamp(2.3rem, 5vw, 4.6rem); font-weight: 900; line-height: 1; }
.valuation-total small { font-size: .34em; }
.valuation-range { margin: 12px 0 20px; color: #63717a; }
.valuation-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.valuation-metrics article { min-height: 112px; padding: 17px; border: 1px solid #dde5e9; border-radius: 13px; background: #fff; }
.valuation-metrics span,
.valuation-metrics strong,
.valuation-metrics small { display: block; }
.valuation-metrics span { min-height: 32px; color: var(--muted); font-size: .75rem; font-weight: 800; }
.valuation-metrics strong { margin-top: 9px; color: #172439; font-family: Georgia, serif; font-size: 1.25rem; }
.valuation-metrics small { margin-top: 4px; color: #69777f; }
.valuation-confidence.confidence-low { color: #a33f39; }
.valuation-confidence.confidence-medium { color: #9a6b12; }
.valuation-confidence.confidence-high { color: #26734a; }
.valuation-table-wrap { padding: 0 24px 24px; }
.valuation-table { min-width: 980px; }
.valuation-table a { color: #244c65; text-decoration: none; }
.valuation-table small { max-width: 310px; }
.valuation-empty { margin-top: 22px; text-align: center; padding: 50px 28px; }
.valuation-empty h2 { margin: 8px 0 12px; }
.valuation-empty p { max-width: 760px; margin: 0 auto; color: var(--muted); line-height: 1.6; }
.valuation-history { margin-top: 22px; }
.valuation-history-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0 24px 24px; }
.valuation-history-grid article { padding: 16px; border: 1px solid #e0e7eb; border-radius: 12px; background: #f9fbfc; }
.valuation-history-grid article.is-current { border-color: #d6a07d; background: #fff8f3; }
.valuation-history-grid span,
.valuation-history-grid strong,
.valuation-history-grid small { display: block; }
.valuation-history-grid span,
.valuation-history-grid small { color: var(--muted); font-size: .75rem; }
.valuation-history-grid strong { margin: 7px 0 6px; color: #172439; font-family: Georgia, serif; }
.valuation-history-grid small + small { margin-top: 3px; }
.valuation-disclaimer { margin-top: 22px; padding: 17px 20px; border: 1px solid #ead9ae; border-radius: 12px; background: #fffaf0; color: #675526; line-height: 1.55; }

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

@media (max-width: 680px) {
  .valuation-subject,
  .valuation-metrics,
  .valuation-history-grid { grid-template-columns: 1fr; }
  .valuation-subject > div { border-left: 0; border-top: 1px solid #e2e8ec; }
  .valuation-subject > div:first-child { border-top: 0; }
}
