:root {
  color-scheme: light;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #f4f6f8;
  color: #1f2933;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #10172a 0%, #243b53 40%, #f4f6f8 40%, #f4f6f8 100%);
}

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

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  padding: 3.5rem clamp(2rem, 6vw, 6rem) 4rem;
  color: #f8fafc;
}

.hero--compact {
  padding-bottom: 3rem;
}

.hero__back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.86);
  text-decoration: none;
  margin-bottom: 0.75rem;
}

.hero__back-link:hover,
.hero__back-link:focus-visible {
  color: #ffffff;
  text-decoration: underline;
}

.hero__content h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  letter-spacing: 0.04em;
}

.hero__content p {
  margin-top: 0.75rem;
  font-size: 1.15rem;
  max-width: 480px;
  opacity: 0.86;
}

.hero__subtitle {
  margin: 1rem 0 0;
  font-size: 1rem;
  opacity: 0.8;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hero__action-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero__status {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.55), rgba(11, 114, 133, 0.5));
  padding: 1rem 1.25rem;
  border-radius: 18px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
  font-weight: 500;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(6px);
}

.status-details {
  display: grid;
  gap: 0.25rem;
}

.status-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #f8fafc;
}

.status-role {
  font-size: 0.9rem;
  color: rgba(248, 250, 252, 0.78);
  letter-spacing: 0.02em;
}

.hero__icon-button {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.25);
  color: #f8fafc;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hero__icon-button:hover,
.hero__icon-button:focus-visible {
  outline: none;
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(148, 163, 184, 0.5);
  transform: translateY(-1px);
}

.hero__icon-button:disabled,
.hero__icon-button[hidden] {
  display: none;
}

.hero__icon-button--active {
  background: rgba(11, 114, 133, 0.8);
  border-color: rgba(13, 148, 136, 0.8);
}

.hero__icon {
  width: 1.5rem;
  height: 1.5rem;
  background: currentColor;
  mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/%3E%3Cline x1="8" y1="9" x2="16" y2="9"/%3E%3Cline x1="8" y1="13" x2="14" y2="13"/%3E%3C/svg%3E');
  -webkit-mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/%3E%3Cline x1="8" y1="9" x2="16" y2="9"/%3E%3Cline x1="8" y1="13" x2="14" y2="13"/%3E%3C/svg%3E');
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-size: contain;
}

.hero__icon-button[data-icon='bookmark'] .hero__icon {
  mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M19 21l-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"/%3E%3C/svg%3E');
  -webkit-mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M19 21l-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"/%3E%3C/svg%3E');
}

.hero__icon-button[data-icon='logout'] .hero__icon {
  mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/%3E%3Cpolyline points="16 17 21 12 16 7"/%3E%3Cline x1="21" y1="12" x2="9" y2="12"/%3E%3C/svg%3E');
  -webkit-mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/%3E%3Cpolyline points="16 17 21 12 16 7"/%3E%3Cline x1="21" y1="12" x2="9" y2="12"/%3E%3C/svg%3E');
}

.hero__status--guest {
  align-items: flex-start;
}

.hero__status .btn {
  margin: 0;
}

.container {
  margin: -3rem auto 4rem;
  padding: 0 clamp(1rem, 3vw, 3rem) 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1200px;
}

.container--narrow {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
}

.dashboard {
  margin: -3rem auto 4rem;
  padding: 0 clamp(1rem, 3vw, 3rem) 4rem;
  max-width: 1200px;
  display: grid;
  gap: 2.5rem;
}

.dashboard__grid {
  display: grid;
  gap: 2rem;
}

.dashboard__grid > * {
  min-width: 0;
}

.dashboard__primary {
  display: grid;
  gap: 2rem;
}

.card__body {
  margin-top: 1.5rem;
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  z-index: 1000;
}

.auth-modal[hidden] {
  display: none;
}

.auth-card {
  max-width: 480px;
  width: min(100%, 480px);
}

body.has-auth-modal {
  overflow: hidden;
}

body.listings-page .container {
  grid-template-columns: minmax(0, 1fr);
  max-width: 960px;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  padding: 2rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.card h2 {
  margin-top: 0;
  letter-spacing: 0.03em;
  color: #102a43;
}

.card__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: #486581;
  max-width: 460px;
}

.card__intro {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: #486581;
  line-height: 1.55;
  max-width: 560px;
}

.card__helper {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.95rem;
  color: #486581;
  max-width: 560px;
}

.card__heading .card__helper {
  margin: 0;
  max-width: none;
}

.card__link {
  color: #0b7285;
  font-weight: 600;
  text-decoration: none;
}

.card__link:hover,
.card__link:focus-visible {
  text-decoration: underline;
}

.card__heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.card__heading h2 {
  margin: 0;
}

.tabs {
  display: inline-flex;
  background-color: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 1.5rem;
}

.tab {
  border: none;
  background: transparent;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  color: #334e68;
}

.tab.active {
  background-color: #102a43;
  color: #f8fafc;
  box-shadow: 0 8px 20px rgba(16, 42, 67, 0.35);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.form {
  display: grid;
  gap: 1.25rem;
}

.form--search {
  gap: 1.5rem;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  color: #1f2933;
}

.form input,
.form textarea,
.form select {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.2);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: #334e68;
  outline: none;
  box-shadow: 0 0 0 3px rgba(51, 78, 104, 0.15);
}

.form textarea {
  resize: vertical;
}

.form input[type='file'] {
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px dashed rgba(15, 23, 42, 0.2);
  background-color: rgba(248, 250, 252, 0.6);
}

.form input[type='file']::file-selector-button {
  padding: 0.5rem 0.9rem;
  margin-right: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: linear-gradient(120deg, rgba(212, 221, 234, 0.9), rgba(248, 250, 252, 0.95));
  color: #102a43;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form input[type='file']::file-selector-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.18);
}

.form-hint {
  font-size: 0.85rem;
  color: #627d98;
  font-weight: 500;
}

.photo-previews {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-top: 0.75rem;
}

.photo-previews[hidden] {
  display: none;
}

.photo-preview {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(248, 250, 252, 0.72);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

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

.photo-preview figcaption {
  margin: 0;
  padding: 0.4rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #102a43;
  background: rgba(248, 250, 252, 0.92);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.form-section {
  background: rgba(16, 42, 67, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}

.form-section h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: #102a43;
}

.form button[type='submit'] {
  justify-self: flex-start;
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.form-actions .btn {
  margin: 0;
}

#agent-listings-section {
  margin-top: 1.5rem;
}

.card__body--stacked {
  display: grid;
  gap: 1.75rem;
}

.card__body--stacked > .form,
.card__body--stacked > .form-section {
  width: min(100%, 760px);
  margin: 0 auto;
}

.card__body--stacked > .form-section.form-section--results {
  width: min(100%, 960px);
}

.card__body--stacked > .card__filters--public {
  width: min(100%, 800px);
}

.form-section__header {
  display: grid;
  gap: 0.35rem;
}

.form-section__header p {
  margin: 0;
  font-size: 0.95rem;
  color: #486581;
}

.form-section--intro {
  background: transparent;
  border: none;
  padding: 0;
}

.listing-results__grid {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  margin-top: 1rem;
  padding-top: 1.25rem;
  display: grid;
  gap: 1.5rem;
}

.form-section__description {
  margin: 0;
  color: #486581;
  font-size: 0.95rem;
}

.btn {
  align-self: flex-start;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background-color: #d4ddea;
  color: #102a43;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn.primary {
  background: linear-gradient(120deg, #0b7285, #1c92d2);
  color: #f8fafc;
  box-shadow: 0 12px 24px rgba(28, 146, 210, 0.3);
}

.btn--ghost {
  background-color: rgba(248, 250, 252, 0.12);
  color: #f8fafc;
  border: 1px solid rgba(248, 250, 252, 0.45);
  box-shadow: none;
}

.btn--ghost:hover {
  background-color: rgba(248, 250, 252, 0.24);
  color: #f8fafc;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.14);
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.listing-grid {
  display: grid;
  gap: 1.5rem;
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  min-width: 0;
}

.listing-grid--manage {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.listing {
  background: linear-gradient(180deg, rgba(16, 42, 67, 0.05), #ffffff);
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  height: 100%;
}

.card--listings .listing-grid {
  margin-top: 1.5rem;
}

.card--listings .card__helper {
  margin-top: 2rem;
}

.listing__image {
  margin: 0;
  aspect-ratio: 4 / 3;
  height: auto;
  overflow: hidden;
  background: #cbd2d9;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

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

.listing__content {
  padding: 1.25rem 1.5rem 1.5rem;
  display: grid;
  gap: 0.75rem;
  flex: 1;
}

.listing__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.listing__title {
  margin: 0;
  font-size: 1.25rem;
  color: #102a43;
}

.listing__price {
  font-weight: 700;
  color: #0b7285;
  white-space: nowrap;
}

.listing__meta {
  margin: 0;
  color: #334e68;
  font-size: 0.95rem;
}

.listing__description {
  margin: 0;
  color: #486581;
  line-height: 1.5;
}

.listing__contact {
  display: grid;
  gap: 0.75rem;
}

.conversation-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-items: center;
  padding: 2rem 1.5rem;
}

.conversation-modal.conversation-modal--open {
  display: grid;
}

.conversation-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.conversation-modal__dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  width: min(960px, 96vw);
  max-height: min(90vh, 720px);
  height: min(90vh, 720px);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.conversation-modal__sidebar {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border-right: 1px solid rgba(148, 163, 184, 0.3);
  min-height: 0;
}

.conversation-modal__sidebar-header {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.conversation-modal__sidebar-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #102a43;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.conversation-modal__sidebar-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.conversation-modal__empty {
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  color: #486581;
  line-height: 1.5;
}

.conversation-modal__list {
  display: flex;
  flex-direction: column;
}

.conversation-modal__list-item {
  appearance: none;
  border: none;
  background: transparent;
  text-align: left;
  padding: 0.85rem 1.5rem;
  display: grid;
  gap: 0.25rem;
  cursor: pointer;
  color: #102a43;
  border-left: 3px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.conversation-modal__list-item:hover,
.conversation-modal__list-item:focus-visible {
  outline: none;
  background: rgba(148, 163, 184, 0.15);
}

.conversation-modal__list-item.is-active {
  background: rgba(13, 148, 136, 0.16);
  border-left-color: #0b7285;
}

.conversation-modal__list-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
}

.conversation-modal__list-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(71, 85, 105, 0.85);
}

.conversation-modal__list-item-snippet {
  font-size: 0.85rem;
  color: #486581;
  margin: 0;
  line-height: 1.4;
}

.conversation-modal__list-item--compose {
  background: rgba(148, 163, 184, 0.12);
  border-left-color: rgba(148, 163, 184, 0.4);
}

.conversation-modal__content {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 1rem;
  padding: 1.5rem;
  min-height: 0;
  overflow: hidden;
}

.conversation-modal__close {
  appearance: none;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: #334e68;
  cursor: pointer;
}

.conversation-modal__close:hover,
.conversation-modal__close:focus {
  color: #0b7285;
}

.conversation-modal__body {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), #ffffff);
  overflow-y: auto;
}

.conversation-modal__placeholder {
  margin: 0;
  font-size: 0.95rem;
  color: #486581;
  line-height: 1.6;
}

.conversation__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: #486581;
}

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

.conversation-modal__content .conversation__thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.conversation-modal__content .conversation__actions {
  justify-content: flex-end;
}

.conversation-modal__content .conversation__status {
  font-size: 0.85rem;
}

.conversation__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.conversation__title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: #102a43;
}

.conversation__thread {
  display: grid;
  gap: 0.9rem;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.conversation__thread:empty::before {
  content: 'No messages yet. Send a note to get the conversation started.';
  display: block;
  color: #486581;
  font-size: 0.95rem;
  line-height: 1.5;
}

.conversation__message {
  background: rgba(16, 42, 67, 0.08);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  display: grid;
  gap: 0.35rem;
  color: #102a43;
}

.conversation__message--outgoing {
  background: #102a43;
  color: #f8fafc;
  justify-self: end;
}

.conversation__sender {
  font-weight: 600;
  font-size: 0.9rem;
}

.conversation__body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.conversation__meta {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(16, 42, 67, 0.65);
}

.conversation__message--outgoing .conversation__meta {
  color: rgba(248, 250, 252, 0.7);
}

.conversation__form {
  display: grid;
  gap: 0.75rem;
}

.conversation__form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  padding: 0.75rem;
  font: inherit;
  resize: vertical;
  min-height: 90px;
}

.conversation__form textarea:focus {
  outline: none;
  border-color: #0b7285;
  box-shadow: 0 0 0 3px rgba(11, 114, 133, 0.15);
}

.conversation__form textarea:disabled {
  background: #e7edf3;
  border-color: rgba(148, 163, 184, 0.4);
  color: #7b8794;
  cursor: not-allowed;
}

.conversation__helper {
  margin: 0;
  font-size: 0.85rem;
  color: #627d98;
}

.conversation__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.conversation__status {
  margin: 0;
  font-size: 0.9rem;
  color: #486581;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.1);
  display: none;
}

.conversation__form + .conversation__status {
  margin-top: 0.75rem;
}

.conversation__status:not([hidden]) {
  display: block;
}

.conversation__status--success {
  color: #2b8a3e;
  background: rgba(43, 138, 62, 0.12);
  border-color: rgba(43, 138, 62, 0.3);
}

.conversation__status--error {
  color: #c92a2a;
  background: rgba(201, 42, 42, 0.12);
  border-color: rgba(201, 42, 42, 0.3);
}

.conversation-list {
  display: grid;
  gap: 1rem;
}

.conversation-list--summary {
  gap: 1.25rem;
}

.conversation-card {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 1.25rem;
  display: grid;
  gap: 0.75rem;
  background: #ffffff;
}

.conversation-summary {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 1.2rem;
  background: #ffffff;
  display: grid;
  gap: 0.65rem;
}

.conversation-summary__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.conversation-summary__title {
  margin: 0;
  font-size: 1.05rem;
  color: #102a43;
}

.conversation-summary__time {
  font-size: 0.85rem;
  color: #486581;
}

.conversation-summary__meta {
  margin: 0;
  font-size: 0.9rem;
  color: #486581;
}

.conversation-summary__preview {
  margin: 0;
  color: #243b53;
  line-height: 1.5;
}

.conversation-summary__actions {
  display: flex;
  justify-content: flex-end;
}

.conversation-summary__actions .btn {
  min-width: 140px;
}

body.conversation-modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .conversation-modal__dialog {
    width: min(760px, 96vw);
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .conversation-modal {
    padding: 1.5rem 1rem;
  }

  .conversation-modal__dialog {
    width: 100%;
    height: auto;
    max-height: 92vh;
    grid-template-columns: minmax(0, 1fr);
  }

  .conversation-modal__sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  }

  .conversation-modal__sidebar-body {
    max-height: 220px;
  }

  .conversation-modal__content {
    padding: 1.25rem;
  }

  .conversation-modal__close {
    font-size: 1.25rem;
  }

  .conversation-modal__content .conversation__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
}

.conversation-card__header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: baseline;
}

.conversation-card__title {
  margin: 0;
  font-size: 1.05rem;
  color: #102a43;
}

.conversation-card__subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: #486581;
}

.conversation-card .conversation__thread {
  max-height: 260px;
}

.listing__status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.listing__status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: rgba(11, 114, 133, 0.12);
  color: #0b7285;
}

.listing__status-badge[data-status='pending'] {
  background-color: rgba(247, 144, 9, 0.15);
  color: #b7791f;
}

.listing__status-badge[data-status='sold'] {
  background-color: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.listing__status-actions {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.listing__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.listing__actions .btn,
.listing__status-actions .btn {
  margin: 0;
}

.listing__agent {
  margin: 0;
  font-style: italic;
  color: #243b53;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.listing__contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.6rem 1.3rem;
  border-radius: 12px;
  background-color: rgba(11, 114, 133, 0.1);
  border: 1px solid rgba(11, 114, 133, 0.28);
  color: #0b7285;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.listing__contact-link:hover,
.listing__contact-link:focus-visible {
  background-color: rgba(11, 114, 133, 0.16);
  color: #09586a;
  border-color: rgba(11, 114, 133, 0.38);
}

.btn--small {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 12px;
}

.btn--danger {
  background: rgba(200, 30, 30, 0.1);
  color: #9b1c1c;
  border: 1px solid rgba(200, 30, 30, 0.25);
  box-shadow: none;
}

.btn--danger:hover {
  box-shadow: 0 12px 24px rgba(200, 30, 30, 0.18);
  background: rgba(200, 30, 30, 0.18);
}

.saved-search-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.saved-search {
  background: rgba(16, 42, 67, 0.05);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.saved-search__info {
  display: grid;
  gap: 0.2rem;
}

.saved-search__name {
  margin: 0;
  font-weight: 600;
  color: #102a43;
}

.saved-search__meta {
  margin: 0;
  font-size: 0.9rem;
  color: #486581;
}

.empty-state {
  background: rgba(16, 42, 67, 0.08);
  padding: 1.25rem;
  border-radius: 12px;
  text-align: center;
  color: #334e68;
}

.alert {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-weight: 600;
}

.alert.error {
  background: rgba(214, 55, 67, 0.1);
  color: #c81e1e;
}

.alert.success {
  background: rgba(15, 111, 222, 0.12);
  color: #0b7285;
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    gap: 1.5rem;
    padding: 2.5rem 1.5rem 3rem;
  }

  .hero__status {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .container {
    margin-top: -2.5rem;
  }

  .card__body--stacked {
    gap: 1.5rem;
  }

  .card__body--stacked > .form,
  .card__body--stacked > .form-section {
    width: 100%;
  }

  .form--search .form-section {
    gap: 0.9rem;
  }

  .listing__content {
    padding: 1.25rem;
    gap: 0.65rem;
  }

  .listing__contact-link {
    width: 100%;
  }

  .card__heading {
    flex-direction: column;
    align-items: flex-start;
  }
}
