/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@15.5.25_@types+node@22.20.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/.pnpm/next@15.5.25_@types+node@22.20.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
:root,
[data-theme='night'] {
  color-scheme: dark;
  --bg: #0b0d12;
  --surface: #10131a;
  --surface-2: #151923;
  --surface-active: #182033;
  --border: #222733;
  --border-strong: #3a4254;
  --text: #e8ecf4;
  --text-2: #c5cde0;
  --muted: #9aa4b8;
  --accent: #4c7cf0;
  --accent-hover: #5d89f2;
  --accent-muted: #24365f;
  --link: #7aa2f7;
  --on-accent: #ffffff;
  --ok: #7dd3a0;
  --ok-bg: #101a14;
  --ok-border: #2d4a32;
  --warn: #e8c96a;
  --warn-bg: #1a1810;
  --warn-border: #3a3520;
  --danger: #ffb4bd;
  --danger-bg: #2a1518;
  --danger-border: #5a2a31;
}

[data-theme='day'] {
  color-scheme: light;
  --bg: #f3eee6;
  --surface: #fffdf9;
  --surface-2: #f7f1e8;
  --surface-active: #efe4d2;
  --border: #dccfbc;
  --border-strong: #c4b49a;
  --text: #1c1914;
  --text-2: #3f3a32;
  --muted: #7a7268;
  --accent: #2f5d4a;
  --accent-hover: #3b735c;
  --accent-muted: #d7e4dc;
  --link: #2a5278;
  --on-accent: #fffdf9;
  --ok: #2f6b45;
  --ok-bg: #e5f0e8;
  --ok-border: #9bbfa6;
  --warn: #8a6a16;
  --warn-bg: #f6ecd0;
  --warn-border: #d4c08a;
  --danger: #9b2f3a;
  --danger-bg: #f6e4e6;
  --danger-border: #d4a0a6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
}

.sidebar h1 {
  font-size: 18px;
  margin: 0 0 8px;
}

.conversation-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  flex: 1 1;
}

.conversation-item {
  text-align: left;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: inherit;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

.conversation-item.active {
  border-color: var(--accent);
  background: var(--surface-active);
}

.conversation-item small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.main {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
}

.toolbar {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.toolbar select {
  background: var(--surface-2);
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.messages {
  overflow: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  max-width: 820px;
  padding: 12px 14px;
  border-radius: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.message.user {
  align-self: flex-end;
  background: var(--accent-muted);
}

.message.assistant {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.chat-markdown {
  white-space: normal;
  color: var(--text);
}

.chat-markdown > *:first-child {
  margin-top: 0;
}

.chat-markdown > *:last-child {
  margin-bottom: 0;
}

.chat-markdown h1,
.chat-markdown h2,
.chat-markdown h3,
.chat-markdown h4 {
  margin: 1.1em 0 0.45em;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.chat-markdown h1 {
  font-size: 1.25rem;
}

.chat-markdown h2 {
  font-size: 1.1rem;
}

.chat-markdown h3,
.chat-markdown h4 {
  font-size: 1rem;
}

.chat-markdown p,
.chat-markdown ul,
.chat-markdown ol,
.chat-markdown pre,
.chat-markdown blockquote,
.chat-markdown table {
  margin: 0.65em 0;
}

.chat-markdown ul,
.chat-markdown ol {
  padding-left: 1.25em;
}

.chat-markdown li {
  margin: 0.45em 0;
  line-height: 1.45;
}

.chat-markdown li + li {
  margin-top: 0.4em;
}

.chat-markdown strong {
  font-weight: 600;
  color: var(--text);
}

.chat-markdown a {
  color: var(--link);
}

.chat-markdown code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--bg);
}

.chat-markdown pre {
  overflow: auto;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.chat-markdown pre code {
  padding: 0;
  background: none;
}

.chat-markdown blockquote {
  margin-left: 0;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-2);
}

.chat-markdown table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.chat-markdown th,
.chat-markdown td {
  padding: 6px 10px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.chat-markdown th {
  background: var(--surface);
  color: var(--text-2);
  font-weight: 600;
}

.chat-markdown hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1em 0;
}

.message.system,
.message.error {
  align-self: center;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
}

.connection-banner {
  margin: 12px 16px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  line-height: 1.5;
}

.thinking-disclosure {
  margin: 0 0 10px;
}

.thinking-disclosure summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}

.thinking-disclosure summary::-webkit-details-marker {
  display: none;
}

.thinking-disclosure summary::before {
  content: '▸ ';
  color: var(--muted);
}

.thinking-disclosure[open] summary::before {
  content: '▾ ';
}

.thinking-disclosure[open] summary {
  margin-bottom: 6px;
}

.thinking-text {
  color: var(--muted);
  font-style: italic;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.45;
}

.tool-call {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px dashed var(--border);
  font-size: 13px;
  color: var(--text-2);
}

.composer {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.composer textarea {
  flex: 1 1;
  min-height: 72px;
  resize: vertical;
  background: var(--surface-2);
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.composer button {
  align-self: end;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
}

.composer button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.empty-state {
  color: var(--muted);
  padding: 24px;
}

.primary-btn,
.secondary-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}

.primary-btn {
  background: var(--accent);
  color: var(--on-accent);
}

.secondary-btn {
  background: var(--surface-2);
  color: inherit;
  border: 1px solid var(--border);
}

.status-pill {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

.dashboard {
  min-height: 100vh;
  padding: 24px 32px;
}

.app-shell {
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-shell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.app-shell-brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.app-shell-logo {
  font-size: 20px;
  font-weight: 600;
}

.app-shell-main {
  flex: 1 1;
  min-height: 0;
  padding: 24px 32px;
  overflow: auto;
}

.app-shell-main:has(.property-detail) {
  padding: 0;
  overflow: hidden;
}

.app-shell-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
}

.theme-toggle button {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 6px 12px;
  cursor: pointer;
}

.theme-toggle button.active {
  background: var(--accent);
  color: var(--on-accent);
}

.app-shell-settings {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.app-shell-settings:hover {
  color: var(--text);
  border-color: var(--accent);
}

.agent-switch-notice {
  margin: 0;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--warn);
  background: var(--warn-bg);
  border-bottom: 1px solid var(--border);
}

.memory-extract-notice {
  margin: 0;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--ok);
  background: var(--ok-bg);
  border-bottom: 1px solid var(--border);
}

.settings-page {
  max-width: 680px;
}

.settings-page > .settings-section {
  margin-bottom: 28px;
}

.settings-header h1 {
  margin: 8px 0 4px;
  font-size: 22px;
}

.settings-subtitle {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.5;
}

.settings-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--border);
}

.settings-tabs button {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.settings-tabs button.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.settings-section h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

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

.settings-section-head h2 {
  margin: 0;
}

.agent-status-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agent-status-item {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.agent-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-status-top strong {
  font-size: 14px;
}

.agent-status-pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
}

.agent-status-pill-ready {
  color: var(--ok);
  background: var(--ok-bg);
}

.agent-status-pill-needs_login {
  color: var(--warn);
  background: var(--warn-bg);
}

.agent-status-pill-not_installed {
  color: var(--muted);
  background: var(--surface-2);
}

.agent-status-meta,
.agent-status-caps,
.agent-status-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.agent-status-hint code {
  font-size: 11px;
  color: var(--text-2);
}

.settings-section label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}

.settings-section input,
.settings-section textarea {
  background: var(--surface-2);
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.settings-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.settings-checkbox {
  flex-direction: row !important;
  align-items: center;
  gap: 10px !important;
  color: var(--text-2) !important;
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-saved {
  color: var(--ok);
  font-size: 14px;
}

.settings-learned {
  margin-top: 12px;
}

.settings-learned-list {
  margin: 8px 0 12px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.add-property-menu {
  position: relative;
}

.add-property-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.add-property-dropdown button {
  background: transparent;
  border: none;
  color: inherit;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.add-property-dropdown button:hover {
  background: var(--surface-2);
}

.dashboard-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.dashboard-search {
  flex: 1 1;
  min-width: 200px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: inherit;
}

.dashboard-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.dashboard-sort select {
  background: var(--surface-2);
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.modal-field input {
  margin-top: 0;
}

.folder-input {
  margin-top: 16px;
  width: 100%;
}

.duplicate-notice {
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--warn-border);
}

.duplicate-notice p {
  margin: 0 0 12px;
  color: var(--warn);
}

.modal-error {
  margin-top: 16px;
}

.property-card-photos {
  color: var(--muted);
}

.property-card-comps {
  color: var(--muted);
}

.property-card-draft-hint {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--warn);
}

.property-detail {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-shell-main .property-detail {
  padding: 0;
  margin: 0;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 24px;
}

.dashboard-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
}

.dashboard-actions {
  display: flex;
  gap: 12px;
}

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

.property-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s;
}

.property-card:hover {
  border-color: var(--accent);
}

.property-card-cover {
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  overflow: hidden;
}

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

.property-card-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}

.property-card-body {
  padding: 14px 16px;
}

.property-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.property-card-header h3 {
  margin: 0;
  font-size: 16px;
}

.property-card-address {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.property-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
}

.status-badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.status-draft {
  color: var(--muted);
}

.status-active {
  color: var(--ok);
  border-color: var(--ok-border);
}

.status-sold {
  color: var(--danger);
  border-color: var(--danger-border);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal {
  width: min(520px, 92vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.modal h2 {
  margin: 0 0 8px;
}

.modal p {
  color: var(--muted);
  line-height: 1.5;
}

.modal input {
  width: 100%;
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: inherit;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.dashboard-empty {
  text-align: center;
  padding: 48px;
}

.property-detail-header {
  flex-shrink: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.empty-hint {
  color: var(--muted);
  margin-top: 8px;
}

.property-status-select {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: auto;
  min-width: 140px;
}

.property-status-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.property-status-select select {
  background: var(--surface-2);
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
}

.property-status-hint {
  font-size: 11px;
  color: var(--muted);
}

.property-detail-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.property-detail-title h1 {
  margin: 0;
  font-size: 22px;
}

.property-facts {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  color: var(--text-2);
}

.property-description {
  margin: 12px 0 0;
  color: var(--muted);
  max-width: 900px;
  line-height: 1.5;
}

.detail-status {
  display: inline-block;
  margin-top: 10px;
}

.property-detail-grid {
  flex: 1 1;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 1.2fr) minmax(240px, 0.9fr);
  min-height: 0;
}

.property-detail-body {
  flex: 1 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(360px, 1.15fr);
  overflow: hidden;
  border-top: 1px solid var(--border);
}

.property-agent-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid var(--border);
  background: var(--bg);
}

.property-detail-header-compact {
  padding-bottom: 16px;
}

.property-detail-heading h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.property-detail-address {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.property-facts-inline {
  margin-top: 10px;
}

.property-media-panel {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.property-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--border);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
}

.property-tabs button {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.property-tabs button.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.property-overview-empty {
  color: var(--muted);
  font-size: 14px;
}

.property-setup-panel {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.property-setup-title {
  margin: 0 0 6px;
  font-size: 18px;
}

.property-setup-lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.property-setup-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.property-setup-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.property-setup-card-wide {
  grid-column: 1 / -1;
}

.property-setup-card h3 {
  margin: 0;
  font-size: 15px;
}

.property-setup-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  flex: 1 1;
}

.property-setup-card code {
  font-size: 12px;
  color: var(--text-2);
}

.property-setup-card input[type='url'],
.property-setup-card input:not([type='file']) {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: inherit;
}

.property-setup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.property-setup-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.property-setup-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.property-setup-form input,
.property-setup-form textarea {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: inherit;
  font-size: 14px;
}

.property-setup-error {
  margin-top: 12px;
}

.property-overview {
  padding: 16px 20px 24px;
}

.property-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  grid-gap: 12px;
  gap: 12px;
  margin: 0 0 16px;
}

.property-facts-grid dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 4px;
}

.property-facts-grid dd {
  margin: 0;
  font-size: 15px;
  color: var(--text);
}

.property-zillow-link {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--link);
}

.property-overview-description h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text-2);
}

.property-overview-description p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.property-overview-description p.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-btn {
  background: none;
  border: none;
  color: var(--link);
  cursor: pointer;
  padding: 8px 0 0;
  font-size: 13px;
}

.property-overview-empty {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.photo-gallery-embedded {
  padding: 16px;
}

.comparables-panel-embedded {
  border-top: none;
  padding-top: 8px;
}

.property-chat-context {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.property-chat-context-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.property-chat-message-count {
  font-size: 11px;
  color: var(--muted);
}

.property-chat-context-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}

.property-chat-context strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
}

.property-chat-context-note {
  display: none;
}

.property-chat-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.property-actions {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.property-actions-embedded {
  border-top: none;
  padding: 16px 20px 24px;
}

.property-actions-title {
  margin: 0 0 4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.property-actions-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.property-actions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.property-action-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.property-action-body {
  flex: 1 1;
  min-width: 0;
}

.property-action-body strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.property-action-reason {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.property-action-meta {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.property-action-blocked {
  opacity: 0.55;
}

.property-action-done {
  border-color: var(--ok-border);
}

.property-action-locked {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  padding: 4px;
}

.property-agent-column .property-chat {
  flex: 1 1;
  min-height: 0;
  overflow: hidden;
}

.property-chat {
  display: flex;
  flex-direction: column;
  flex: 1 1;
  min-height: 0;
  overflow: hidden;
}

.property-chat-header {
  flex-shrink: 0;
  background: var(--bg);
}

.property-chat-header:empty {
  display: none;
}

.property-chat-body {
  position: relative;
  flex: 1 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.property-chat-body .property-messages {
  flex: 1 1;
  min-height: 0;
}

.chat-jump-latest {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 2;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--surface-active);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.chat-jump-latest:hover {
  background: var(--surface-active);
}

.message-expand-btn {
  display: block;
  margin-top: 10px;
  padding: 0;
  border: none;
  background: none;
  color: var(--link);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.property-chat-composer {
  flex-shrink: 0;
  background: var(--bg);
}

.property-chat-composer textarea {
  min-height: 56px;
  max-height: 120px;
}

.agent-composer {
  flex-shrink: 0;
  padding: 12px 14px 14px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.agent-composer-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.15s;
}

.agent-composer-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(76, 124, 240, 0.25);
}

.agent-composer-input {
  display: block;
  width: 100%;
  min-height: 42px;
  max-height: 120px;
  padding: 12px 14px 8px;
  border: none;
  background: transparent;
  color: inherit;
  resize: none;
  line-height: 1.45;
  outline: none;
}

.agent-composer-input::placeholder {
  color: var(--muted);
}

.agent-composer-input:disabled {
  opacity: 0.6;
}

.agent-composer-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 8px;
}

.agent-composer-pickers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.agent-picker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

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

.agent-picker select {
  max-width: 130px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
}

.agent-picker select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.agent-composer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.agent-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.agent-icon-btn:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.agent-icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.agent-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.agent-send-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

.agent-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.agent-send-stop {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--on-accent);
}

.agent-menu {
  position: relative;
}

.agent-menu-dropdown {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 180px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 5;
}

.agent-menu-dropdown button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.agent-menu-dropdown button:hover:not(:disabled) {
  background: var(--surface-2);
}

.agent-menu-dropdown button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.import-live-banner {
  flex-shrink: 0;
  margin: 12px 12px 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.import-live-banner strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.import-live-banner p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.import-live-banner em {
  font-style: normal;
  color: var(--text);
  font-weight: 600;
}

.agent-action-log {
  margin: 10px 0 0;
  padding: 0 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.agent-action-log li.current {
  color: var(--text);
}

.agent-activity-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
}

.agent-activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: agent-activity-pulse 1.4s ease-in-out infinite;
}

@keyframes agent-activity-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.agent-composer-status {
  margin: 8px 4px 0;
  font-size: 12px;
  color: var(--muted);
}

.property-column {
  min-height: 0;
  border-right: 1px solid var(--border);
  overflow: auto;
}

.property-column:last-child {
  border-right: none;
}

.photo-gallery {
  padding: 16px;
}

.photo-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.photo-tabs button {
  background: var(--surface-2);
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.photo-tabs button.active {
  border-color: var(--accent);
}

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

.photo-item {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
}

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

.photo-item-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  cursor: pointer;
  position: relative;
  background: transparent;
}

.photo-item-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.photo-item-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  max-width: calc(100% - 12px);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text);
  background: rgba(0, 0, 0, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}

.image-lightbox-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  pointer-events: none;
}

.image-lightbox-close,
.image-lightbox-nav,
.image-lightbox-footer,
.image-lightbox-stage,
.image-lightbox-img {
  pointer-events: auto;
}

.image-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: rgba(21, 25, 35, 0.85);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox-close:hover {
  background: rgba(34, 39, 51, 0.95);
}

.image-lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 44px;
  height: 56px;
  border: none;
  border-radius: 8px;
  background: rgba(21, 25, 35, 0.75);
  color: var(--text);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox-nav:hover {
  background: rgba(34, 39, 51, 0.9);
}

.image-lightbox-prev {
  left: 12px;
}

.image-lightbox-next {
  right: 12px;
}

.image-lightbox-stage {
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 56px 64px 0;
}

.image-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.image-lightbox-footer {
  flex-shrink: 0;
  padding: 12px 16px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.image-lightbox-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 14px;
}

.image-lightbox-counter {
  font-weight: 600;
}

.image-lightbox-filename {
  color: var(--muted);
  font-size: 13px;
}

.image-lightbox-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 640px;
}

.image-lightbox-role,
.image-lightbox-notes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.image-lightbox-role select,
.image-lightbox-notes input {
  min-width: 140px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: inherit;
  font-size: 13px;
}

.image-lightbox-notes input {
  min-width: 200px;
}

.image-lightbox-error {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 13px;
  text-align: center;
  width: 100%;
}

.comparables-panel {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.comparables-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.comparables-header h2 {
  margin: 0;
  font-size: 16px;
}

.comparables-hint {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.comps-intake {
  margin-bottom: 20px;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 13px;
}

.comp-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.comp-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.comp-form input,
.comp-form select,
.comp-form textarea {
  background: var(--surface-2);
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 14px;
}

.comp-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

.comps-empty {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.comps-error {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
}

.comp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comp-card {
  display: flex;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.comp-card-main {
  flex: 1 1;
  min-width: 0;
}

.comp-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.comp-card-title strong {
  font-size: 14px;
  line-height: 1.3;
}

.comp-status {
  font-size: 10px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.comp-status-active {
  background: var(--ok-bg);
  color: var(--ok);
}

.comp-status-pending {
  background: var(--warn-border);
  color: var(--warn);
}

.comp-status-sold {
  background: var(--surface-2);
  color: var(--text-2);
}

.comp-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-2);
}

.comp-notes {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.comp-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--link);
}

.comp-delete {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.comp-delete:hover {
  color: var(--danger);
}

.action-grid {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-grid h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.action-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface);
}

.action-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.action-card h3 {
  margin: 0;
  font-size: 15px;
}

.action-category {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}

.action-card p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.example-prompt {
  margin: 8px 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 13px;
  background: var(--surface);
}

.chat-toolbar-meta {
  font-size: 12px;
  color: var(--muted);
  margin-right: auto;
  white-space: nowrap;
}

.chat-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: none;
  align-items: center;
}

.chat-toolbar select {
  background: var(--surface-2);
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
}

.chat-history-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  overflow: auto;
  border-bottom: 1px solid var(--border);
}

.chat-history-tabs button {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: inherit;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.chat-history-tabs button.active {
  border-color: var(--accent);
}

.property-messages {
  min-height: 0;
  padding: 16px;
}

.property-messages .message {
  max-width: 100%;
}

