/*
 * HONNE Core 0.15
 * Visual system refresh. Loaded after all page styles so every operational
 * screen shares the same language without changing its data or behaviour.
 */

:root {
  color-scheme: light;
  --black: #f5f5f5;
  --panel: #ffffff;
  --raised: #ffffff;
  --white: #171717;
  --muted: #717171;
  --line: #e2e2e2;
  --line-strong: #c8c8c8;
  --core-bg: #f5f5f5;
  --core-surface: #ffffff;
  --core-raised: #f9f9f9;
  --core-text: #171717;
  --core-muted: #717171;
  --core-line: #e2e2e2;
  --core-accent: #ffed51;
  --honne-forest: #212121;
  --honne-forest-deep: #171717;
  --honne-mint: #f0f0f0;
  --honne-lime: #ffed51;
  --honne-sand: #f4ecd9;
  --honne-ink: #171717;
  --honne-subtle: #f9f9f9;
  --honne-shadow: 0 14px 38px rgba(30, 30, 30, .08);
  --honne-shadow-small: 0 5px 16px rgba(30, 30, 30, .07);
  font-size: 16px;
}

html { background: var(--core-bg); }
body {
  min-width: 320px;
  background: var(--core-bg);
  color: var(--honne-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: -.01em;
}
body::selection { background: #ffed51; color: #171717; }
a { color: inherit; }
button, input, select, textarea { font-family: inherit; }
button { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease; }
button:not(:disabled):active { transform: translateY(1px); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(153, 153, 153, .38);
  outline-offset: 3px;
}

/* Application frame and navigation */
.app-shell { grid-template-columns: 272px minmax(0, 1fr); background: var(--core-bg); }
.sidebar {
  width: 272px;
  height: 100dvh;
  padding: 23px 14px 16px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, .11);
  background:
    radial-gradient(circle at 15% 0, rgba(255, 237, 81, .18), transparent 31%),
    linear-gradient(165deg, var(--honne-forest) 0%, var(--honne-forest-deep) 100%);
  box-shadow: 10px 0 30px rgba(23, 23, 23, .07);
}
.sidebar .panel-brand {
  min-height: 64px;
  margin: 0 5px 17px;
  padding: 11px 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 15px;
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}
.sidebar .panel-brand img {
  width: 35px;
  height: 35px;
  margin-right: 9px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  /* The supplied mark is white on black. Screen blends the black away
     without replacing or distorting the Honne artwork. */
  mix-blend-mode: screen;
  object-fit: cover;
}
.sidebar .panel-brand span { color: #fff; font-size: 16px; font-weight: 760; letter-spacing: .12em; }
.sidebar .panel-brand b {
  margin-left: 7px;
  padding-left: 8px;
  border-left-color: rgba(255, 255, 255, .24);
  color: #ffed51;
  font-size: 9px;
  letter-spacing: .16em;
}
.sidebar-nav { margin-top: 0; }
.sidebar-nav p {
  margin: 24px 12px 8px;
  color: rgba(238, 238, 238, .55);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .15em;
}
.sidebar-nav a, .sidebar-nav button {
  min-height: 43px;
  margin: 2px 0;
  padding: 0 12px;
  border-radius: 10px;
  color: rgba(247, 247, 247, .77);
  font-size: 13px;
  font-weight: 550;
}
.sidebar-nav a:hover, .sidebar-nav button:not(:disabled):hover {
  background: rgba(255, 255, 255, .095);
  color: #fff;
}
.sidebar-nav a.is-active {
  background: var(--honne-lime);
  color: #171717;
  box-shadow: 0 8px 18px rgba(15, 15, 15, .24);
}
.sidebar-nav a.is-active .nav-icon { color: #262626; }
.sidebar .nav-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  color: #ffed51;
  font-size: 0;
  flex: 0 0 20px;
}
.sidebar .nav-icon svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-nav small { color: rgba(238, 238, 238, .48); font-size: 9px; }
.sidebar-notifications { position: relative; margin: auto 5px 0; padding: 14px 0 0; border-top: 0; }
.sidebar-notifications::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 198, 103, .64), transparent);
  content: "";
}
.sidebar-notifications button {
  min-height: 44px;
  padding: 0 11px;
  border-radius: 10px;
  color: #f3f3f3;
  font-size: 12px;
  font-weight: 600;
}
.sidebar-notifications button:hover, .sidebar-notifications button[aria-expanded="true"] { background: rgba(255,255,255,.10); color: #fff; }
.sidebar-notifications b { background: var(--honne-lime); color: #171717; font-size: 10px; font-weight: 800; }
.sidebar-footer { margin: 8px 5px 0; padding: 11px 9px 5px; border: 0; color: rgba(238, 238, 238, .53); font-size: 10px; letter-spacing: .04em; text-transform: none; }
.connection-dot { background: var(--honne-lime); box-shadow: 0 0 0 4px rgba(255, 237, 81, .12); }

.main-content {
  grid-column: 2;
  max-width: 1720px;
  padding: 38px clamp(26px, 4vw, 72px) 84px;
  background:
    radial-gradient(circle at 92% 2%, rgba(255, 237, 81, .20), transparent 23rem),
    radial-gradient(circle at 36% -10%, rgba(233, 233, 233, .62), transparent 32rem),
    var(--core-bg);
}
.topbar {
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 30px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--core-line);
}
.topbar h1, .page-header h1, .record-view-topbar h1, .map-topbar h1 {
  margin: 6px 0 7px;
  color: var(--honne-ink);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 720;
  letter-spacing: -.055em;
  line-height: 1.07;
}
.topbar p:not(.section-label), .map-topbar > div > p:last-child, .record-view-topbar > div > p:last-child { color: var(--core-muted); font-size: 14px; line-height: 1.6; }
.section-label, .eyebrow { color: #717171; font-size: 10px; font-weight: 800; letter-spacing: .15em; }

/* Account controls and global action language */
.account-area { gap: 10px; }
.account-copy { padding-right: 3px; }
.account-copy strong { color: var(--honne-ink); font-size: 13px; }
.account-copy span { color: var(--core-muted); font-size: 11px; }
.account-avatar { width: 42px; height: 42px; border-color: #cecece; background: var(--honne-mint); color: var(--honne-forest); font-weight: 800; }
.logout-button, .secondary-action, .secondary-button, .draft-button, .cancel-edit, .clear-filters, .preproperty-toolbar > button, .property-toolbar > button, .map-toolbar > button {
  min-height: 42px;
  border: 1px solid #d4d4d4;
  border-radius: 10px;
  background: #fff;
  color: #2a2a2a;
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 2px 6px rgba(30, 30, 30, .03);
}
.logout-button:hover, .secondary-action:hover, .secondary-button:hover, .draft-button:hover, .clear-filters:hover, .preproperty-toolbar > button:hover, .property-toolbar > button:hover, .map-toolbar > button:hover { border-color: #a3a3a3; background: #fafafa; color: #171717; }
.primary-action, .publish-button, .new-property-button, .new-preproperty, .submit-button, .save-button, .consent-card button[type=submit], .consent-card form > button {
  min-height: 44px;
  border: 1px solid var(--honne-forest);
  border-radius: 10px;
  background: var(--honne-forest);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  box-shadow: 0 7px 15px rgba(33, 33, 33, .16);
}
.primary-action:hover, .publish-button:hover, .new-property-button:hover, .new-preproperty:hover, .submit-button:hover, .save-button:hover, .consent-card button[type=submit]:hover, .consent-card form > button:hover {
  border-color: #171717;
  background: #1a1a1a;
  box-shadow: 0 10px 20px rgba(33, 33, 33, .20);
  transform: translateY(-1px);
}
.danger-button, .danger-action, .core-actions .danger { border-radius: 10px; }

/* Shared cards, filters, fields and dialogs */
.management-card, .agents-card, .properties-card, .property-list-card, .preproperty-card, .form-section, .editor-section, .pre-section, .profile-card, .core-card, .view-section, .analytics-chart, .analytics-metrics article, .integration-card, .next-step-card, .map-toolbar, .map-stage {
  border: 1px solid var(--core-line);
  border-radius: 16px;
  background: rgba(255,255,255,.93);
  box-shadow: var(--honne-shadow-small);
}
.form-section, .editor-section, .pre-section, .core-card { padding: 28px; }
.management-card, .agents-card, .properties-card, .property-list-card, .preproperty-card { overflow: hidden; }
.management-toolbar, .property-toolbar, .preproperty-toolbar, .map-toolbar, .filter-bar, .filters, .pre-filters {
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--core-line);
  background: #fafafa;
}
.management-toolbar input, .property-toolbar input, .preproperty-toolbar input, .map-toolbar input { background: #fff; }
main :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea), dialog :is(input:not([type=checkbox]):not([type=radio]), select, textarea) {
  min-height: 44px;
  border: 1px solid #d4d4d4;
  border-radius: 10px;
  background: #fff;
  color: var(--honne-ink);
  box-shadow: 0 1px 1px rgba(23, 23, 23,.02);
}
main :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea):hover, dialog :is(input:not([type=checkbox]):not([type=radio]), select, textarea):hover { border-color: #bbbbbb; }
main :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea):focus, dialog :is(input:not([type=checkbox]):not([type=radio]), select, textarea):focus { border-color: #8a8a8a; box-shadow: 0 0 0 4px rgba(153, 153, 153,.13); outline: 0; }
input::placeholder, textarea::placeholder { color: #829285; }
main label, dialog label { color: #2b2b2b; font-size: 12px; font-weight: 700; }
main label span, dialog label span { color: #4e4e4e; font-size: 12px; font-weight: 700; }
main label small, dialog label small { color: #6d7d71; }
input[type=checkbox], input[type=radio] { accent-color: #5e5e5e; }
input[type=file]::file-selector-button { border-color: #bbbbbb; border-radius: 8px; background: #f4f4f4; color: #2c2c2c; font-weight: 700; }

.section-heading { align-items: start; padding-bottom: 18px; border-bottom: 1px solid #eaeaea; }
.section-heading > span, .section-number { color: #707070; font-weight: 800; }
.section-heading h2, .form-section h2, .editor-section h2, .pre-section h2 { color: var(--honne-ink); font-size: 20px; font-weight: 720; letter-spacing: -.025em; }
.section-heading p, .form-section p, .editor-section p, .pre-section p { color: var(--core-muted); }
.field-grid, .form-grid, .core-grid { gap: 18px; }
.field-grid label > span, .textarea-field > span { color: #4e4e4e; font-size: 12px; }
.field-grid input, .field-grid select, .field-grid textarea, .textarea-field textarea, .pre-grid :is(input, select, textarea), .process-row :is(input, select, textarea), .attachment-editor input { border-color: #d4d4d4; border-radius: 10px; background: #fff; color: var(--honne-ink); }
.field-grid input:focus, .field-grid select:focus, .field-grid textarea:focus, .textarea-field textarea:focus { border-color: #8a8a8a; box-shadow: 0 0 0 4px rgba(153, 153, 153,.13); }
.field-grid small, .textarea-field small, .pre-grid small, dialog small { color: #718073; }
.record-choice label > span { min-height: 108px; border-color: #dddddd; border-radius: 13px; background: #fcfcfc; }
.record-choice b { color: var(--honne-ink); font-size: 14px; }
.record-choice small { color: var(--core-muted); font-size: 12px; }
.record-choice input:checked + span { border-color: #979797; background: #f6f6f6; box-shadow: inset 0 0 0 1px #a0a0a0, 0 5px 14px rgba(89, 89, 89,.08); }
.code-preview, .pre-code { border-color: #dddddd; border-radius: 13px; background: linear-gradient(110deg, #f9f9f9, #fff); }
.code-preview strong, .pre-code strong { color: #4f4f4f; }
.common-areas, .coordinate-field, .valuation-price-field { border-color: #dddddd; border-radius: 12px; background: #fcfcfc; }
.inheritance-notice, .property-guidance { border-left-color: #9d9d9d; border-radius: 0 10px 10px 0; background: #f5f5f5; color: #5f5f5f; }
.image-uploader { min-height: 126px; border-color: #bcbcbc; border-radius: 13px; background: repeating-linear-gradient(135deg, #fcfcfc 0 10px, #f8f8f8 10px 20px); }
.image-uploader strong { color: #2e2e2e; }
.gallery-item, .video-item { border-color: #dddddd; border-radius: 11px; background: #f4f4f4; }

dialog, .management-dialog, #capture-dialog, .photo-dialog {
  border: 1px solid #dedede;
  border-radius: 18px;
  background: #fff;
  color: var(--honne-ink);
  box-shadow: 0 28px 85px rgba(20, 20, 20, .28);
}
dialog::backdrop, #capture-dialog::backdrop, .photo-dialog::backdrop { background: rgba(20, 20, 20, .42); backdrop-filter: blur(6px); }
dialog header, .management-dialog header, #capture-dialog header { border-bottom-color: #e7e7e7; background: #fcfcfc; }
dialog header h2, .management-dialog h2, #capture-dialog h2 { color: var(--honne-ink); }
dialog header button, .dialog-close, #capture-dialog header button { border-color: #dadada; background: #fff; color: #4b4b4b; }
dialog footer, .management-dialog footer, #capture-dialog footer { border-top-color: #e7e7e7; background: #fcfcfc; }
.inline-message, .panel-message, .page-message, .view-message { color: #6a6a6a; font-size: 12px; }
.inline-message[data-state=error], .panel-message[data-state=error], .page-message[data-state=error], .view-message[data-state=error] { color: #ba4c45; }
.inline-message[data-state=success], .panel-message[data-state=success], .page-message[data-state=success], .view-message[data-state=success] { color: #5e5e5e; }

/* Tables become calm, scannable data surfaces on desktop. */
.management-card table, .agents-table, .properties-table, .preproperty-card table { background: #fff; }
.management-card th, .agents-table th, .properties-table th, .preproperty-card th {
  padding: 15px 18px;
  border-bottom: 1px solid #e5e5e5;
  background: #fafafa;
  color: #6a6a6a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .105em;
}
.management-card td, .agents-table td, .properties-table td, .preproperty-card td { padding: 18px; border-bottom-color: #ececec; color: #4c4c4c; font-size: 13px; }
.management-card tbody tr, .agents-table tbody tr, .properties-table tbody tr, .preproperty-card tbody tr { transition: background .16s ease; }
.management-card tbody tr:hover, .agents-table tbody tr:hover, .properties-table tbody tr:hover, .preproperty-card tbody tr:hover { background: #f8f8f8; }
.property-identity strong, .agent-identity, .pre-card h2, .pre-card strong { color: var(--honne-ink); }
.property-thumb { border-color: #dddddd; border-radius: 9px; background: #f1f1f1; }
.state-pill, .status-pill, .agent-status, .current-state, .pre-status, .profile-status, .core-badge {
  border-color: #d2d2d2;
  border-radius: 99px;
  background: #f8f8f8;
  color: #5a5a5a;
  font-weight: 750;
}
.state-pill[data-state=caida], .pre-status[data-state=caida] { border-color: #efc2be; background: #fff4f2; color: #a8443d; }
.state-pill[data-state=borrador] { border-color: #ead7a2; background: #fffbed; color: #8a6817; }
.inventory-tabs, .preproperty-tabs, .directory-tabs { overflow: hidden; border-color: #e2e2e2; border-radius: 14px; background: #fff; box-shadow: var(--honne-shadow-small); }
.inventory-tabs a, .preproperty-tabs a, .directory-tabs button { min-height: 80px; border-color: #e8e8e8; color: #7b7b7b; }
.inventory-tabs strong, .preproperty-tabs strong { color: #303030; font-weight: 720; }
.inventory-tabs a.is-active, .preproperty-tabs a.is-active, .directory-tabs button[aria-selected="true"] { background: #f6f6f6; color: #242424; box-shadow: inset 0 -3px #959595; }
.property-list-card, .preproperty-card { margin-top: 22px; }
.search-box, .preproperty-toolbar > label, .map-search { min-height: 44px; border-color: #d4d4d4; border-radius: 10px; background: #fff; color: #757575; }
.property-toolbar select, .preproperty-toolbar select, .map-toolbar select { min-height: 44px; border-color: #d4d4d4; border-radius: 10px; background: #fff; color: #2a2a2a; }
.prefix-filter summary, .agent-filter summary { min-height: 44px; border-color: #d4d4d4; border-radius: 10px; background: #fff; color: #2a2a2a; }
.prefix-filter > div, .agent-filter > div { border-color: #d4d4d4; border-radius: 12px; background: #fff; box-shadow: var(--honne-shadow); }
.row-menu summary, .record-actions summary, .pre-actions summary { border-color: #d4d4d4; border-radius: 9px; background: #fff; color: #4e4e4e; }
.row-menu > div, .record-actions > div, .pre-actions > div { border-color: #dedede; border-radius: 12px; background: #fff; box-shadow: var(--honne-shadow); }
.row-menu a, .row-menu button, .record-actions button, .pre-actions a, .pre-actions button { color: #4e4e4e; }
.row-menu a:hover, .row-menu button:hover, .record-actions button:hover, .pre-actions a:hover, .pre-actions button:hover { background: #f6f6f6; color: #212121; }
.properties-empty, .pre-empty, .management-empty, .agents-empty { color: #757575; }

/* Dashboard and analytic language */
.welcome-block { max-width: 860px; padding: clamp(34px, 5vw, 66px) 0 32px; }
.welcome-block h2 { color: #171717; font-size: clamp(36px, 4.7vw, 62px); font-weight: 740; letter-spacing: -.068em; }
.welcome-block h2 span { color: #656565; }
.welcome-block > p:last-child { max-width: 630px; color: #6f6f6f; font-size: 15px; }
.analytics-toolbar, .analytics-metrics { border: 0 !important; background: transparent !important; box-shadow: none !important; }
.analytics-toolbar > div h2 { color: var(--honne-ink); font-size: 23px; letter-spacing: -.035em; }
.analytics-metrics { gap: 14px !important; }
.analytics-metrics article { min-height: 150px; padding: 22px; }
.analytics-metrics article:nth-child(1) { background: linear-gradient(145deg, #ffffff, #f6f6f6); }
.analytics-metrics article:nth-child(2) { background: linear-gradient(145deg, #ffffff, #f4f5ff); }
.analytics-metrics article:nth-child(3) { background: linear-gradient(145deg, #ffffff, #fdf8ed); }
.analytics-metrics article:nth-child(4) { background: linear-gradient(145deg, #ffffff, #f8f8f8); }
.analytics-metrics strong, .metrics strong { color: #323232; font-size: 34px; font-weight: 750; }
.analytics-metrics span, .analytics-metrics p, .analytics-metrics small, .metrics span, .metrics small { color: #707070; }
.analytics-chart, .chart-card { border-color: #e2e2e2; border-radius: 16px; background: #fff; box-shadow: var(--honne-shadow-small); }
.next-step-card { grid-template-columns: 40px minmax(0, 1fr) auto; background: #fff; }
.next-step-card h3 { color: var(--honne-ink); font-size: 17px; }
.next-step-card p:last-child { color: var(--core-muted); }
.card-index { color: #7b7b7b; font-weight: 800; }

/* Detail, document and map screens */
.record-view-topbar, .map-topbar { padding-bottom: 24px; border-bottom: 1px solid var(--core-line); }
.record-view-topbar .back-link, .property-topbar .back-link { color: #6f6f6f; font-weight: 650; }
.record-overview { overflow: hidden; border-color: #e2e2e2; border-radius: 16px; background: #fff; box-shadow: var(--honne-shadow-small); }
.overview-item { border-color: #e8e8e8; }
.overview-item span, .detail-item span { color: #787878; }
.overview-item strong, .detail-item strong { color: var(--honne-ink); }
.record-side { gap: 16px; }
.view-section { padding: 0; overflow: hidden; }
.view-section header { padding: 18px 20px; border-bottom-color: #e9e9e9; background: #fcfcfc; }
.view-section h2 { color: var(--honne-ink); font-size: 17px; }
.detail-grid { padding: 0 2px; }
.detail-item { border-bottom-color: #ececec; }
.attachment-tab, .example-link { border-color: #e6e6e6; background: #fff; }
.attachment-tab:hover, .example-link:hover { background: #f8f8f8; }
.empty-note { color: #728274; }
.map-toolbar { margin: 20px 0 14px; }
.map-stage { overflow: hidden; min-height: 480px; }
.map-legend { border-color: #d9d9d9; border-radius: 12px; background: rgba(255,255,255,.96); box-shadow: var(--honne-shadow); }
.map-legend p { color: #4b4b4b; }
.map-legend small { color: #707070; }
.map-loading, .map-error { background: #fafafa; color: #2c2c2c; }

/* Integrations and consent are first class screens too. */
.integration-card { overflow: hidden; background: #fff; }
.integration-card > summary { min-height: 92px; padding: 21px 24px; }
.integration-card > summary:hover { background: #fbfbfb; }
.integration-card > summary b { color: var(--honne-ink); font-size: 16px; }
.integration-card > summary small { color: var(--core-muted); }
.service-icon { border-radius: 13px; background: #f3f3f3; color: #585858; }
.integration-state { border: 1px solid #d5d5d5; border-radius: 99px; background: #f9f9f9; color: #636363; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.integration-body { border-top-color: #e6e6e6; background: #fcfcfc; }
.integration-intro h2, .form-heading h3 { color: var(--honne-ink); }
.integration-intro p, .form-heading p { color: var(--core-muted); }
.source-badge, .connected-panel, .custom-fields-card, .batch-geocode { border-color: #dedede; border-radius: 13px; background: #fff; }
.source-badge strong { color: #525252; }
.secure-label { border-color: #cbcbcb; background: #f7f7f7; color: #636363; }

/* Sign-in and external owner consent get the same calm, premium presentation. */
.login-shell { background: #f5f5f5; }
.brand-panel {
  border: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(255, 237, 81,.28), transparent 24%),
    linear-gradient(145deg, #2b2b2b, #181818 65%);
}
.form-panel { background: #f9f9f9; }
.form-panel::before { background: radial-gradient(circle at 90% 12%, rgba(255, 237, 81,.26), transparent 24%); }
.brand-message h1, .form-heading h2 { color: var(--honne-ink); }
.brand-message h1 { color: #fff; }
.brand-message h1 span, .brand-copy, .brand-footer { color: #d8d8d8; }
.field-control { min-height: 54px; border-color: #d4d4d4; border-radius: 11px; background: #fff; color: #6d6d6d; }
.field-control:focus-within { border-color: #8a8a8a; background: #fff; box-shadow: 0 0 0 4px rgba(153, 153, 153,.13); }
.field-control input { color: var(--honne-ink); }
.submit-button { background: var(--honne-forest); color: #fff; }
.consent-page { background: radial-gradient(circle at 84% 4%, #ebebeb, transparent 27rem), #f4f4f4; }
.consent-card { border-color: #dcdcdc; border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: var(--honne-shadow); }
.consent-card h1, .consent-card h2 { color: var(--honne-ink); }
.consent-card > p { color: var(--core-muted); }
.consent-card input:not([type=checkbox]) { border-color: #d4d4d4; border-radius: 10px; background: #fff; color: var(--honne-ink); }
.terms-text { border-color: #dedede; border-radius: 12px; background: #fafafa; color: #2a2a2a; }

.notification-panel { left: 294px; border-color: #dddddd; border-radius: 16px; background: #fff; box-shadow: var(--honne-shadow); }
.notification-panel > header, .notification-toolbar { border-bottom-color: #e9e9e9; background: #fcfcfc; }
.notification-panel > header span, .notification-toolbar small { color: #787878; }
.notification-panel h2, .notification-item strong { color: var(--honne-ink); }
.notification-item { border-bottom-color: #ececec; background: #f9f9f9; color: var(--honne-ink); }
.notification-item.is-read { background: #fff; }
.notification-item:hover { background: #f5f5f5; }
.notification-item p { color: #6a6a6a; }
.notification-item small { color: #7d8d7f; }
.notification-toolbar button:disabled { opacity: .45; cursor: default; }
.notification-error { display: grid; min-height: 200px; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; }
.notification-error p { margin: 0; color: #5b5953; font-size: 13px; line-height: 1.5; }
.notification-error button { min-width: 124px; min-height: 44px; padding: 0 18px; border: 1px solid #c6a456; border-radius: 10px; background: #e8c667; color: #211b0d; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.notification-error button:focus-visible { outline: 2px solid #8b6a20; outline-offset: 2px; }

/* Mobile is a distinct layout, not a squeezed desktop table. */
@media (max-width: 1000px) {
  .app-shell { display: block; }
  .main-content { padding: 24px 20px calc(106px + env(safe-area-inset-bottom)); }
  .sidebar { width: min(312px, 88vw); padding: 18px 14px max(18px, env(safe-area-inset-bottom)); box-shadow: 16px 0 48px rgba(19, 19, 19, .32); }
  .mobile-topbar {
    display: flex;
    min-height: 66px;
    align-items: center;
    padding: calc(10px + env(safe-area-inset-top)) 17px 10px;
    border-bottom: 1px solid #dedede;
    background: rgba(251, 251, 251,.91);
    color: var(--honne-ink);
    box-shadow: 0 4px 16px rgba(30, 30, 30,.06);
    backdrop-filter: blur(16px);
  }
  .mobile-topbar button { width: 40px; height: 40px; border-color: #d4d4d4; border-radius: 11px; background: #fff; color: #2f2f2f; }
  .mobile-topbar strong { color: #252525; font-size: 13px; letter-spacing: .16em; }
  .sidebar-close { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.09); color: #fff; }
  .topbar { margin-top: 6px; }
  .notification-panel { top: calc(78px + env(safe-area-inset-top)); right: 12px; left: 12px; width: auto; }
  .property-footer { right: 0; left: 0; min-height: 72px; padding: 12px 20px max(12px, env(safe-area-inset-bottom)); border-top-color: #dddddd; background: rgba(255,255,255,.96); box-shadow: 0 -9px 28px rgba(30, 30, 30,.08); }
}

@media (max-width: 680px) {
  body { font-size: 14px; }
  .main-content { padding: 18px 14px calc(102px + env(safe-area-inset-bottom)); }
  .topbar { gap: 16px; margin-bottom: 18px; padding-bottom: 18px; }
  .topbar h1, .page-header h1, .record-view-topbar h1, .map-topbar h1 { font-size: 31px; }
  .topbar p:not(.section-label), .map-topbar > div > p:last-child { font-size: 13px; }
  .topbar > .primary-action, .topbar > .new-property-button, .topbar > .new-preproperty { width: 100%; justify-content: center; }
  .account-copy, .logout-button { display: none; }
  .management-card, .agents-card, .properties-card, .property-list-card, .preproperty-card, .form-section, .editor-section, .pre-section, .core-card, .view-section, .integration-card, .analytics-chart { border-radius: 14px; }
  .management-toolbar, .property-toolbar, .preproperty-toolbar, .map-toolbar { padding: 12px; }
  .management-card tr, .agents-table tr, .properties-table tr, .preproperty-card tr {
    gap: 13px 14px;
    padding: 17px !important;
    border-bottom-color: #e8e8e8;
    background: #fff;
  }
  .management-card td:before, .agents-table td:before, .properties-table td:before, .preproperty-card td:before { color: #7a7a7a; font-weight: 800; letter-spacing: .09em; }
  .management-actions, .agent-row-actions { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .management-actions button, .agent-row-actions button { width: 100%; }
  .inventory-tabs, .preproperty-tabs { display: grid; grid-template-columns: 1fr; }
  .inventory-tabs a, .preproperty-tabs a { min-height: 62px; padding: 15px 17px; border-right: 0; border-bottom: 1px solid #e6e6e6; }
  .inventory-tabs a:last-child, .preproperty-tabs a:last-child { border-bottom: 0; }
  .form-section, .editor-section, .pre-section, .core-card { padding: 19px; }
  .section-heading { grid-template-columns: 1fr; gap: 6px; margin-bottom: 20px; }
  .section-heading > span { display: none; }
  .section-heading h2, .form-section h2, .editor-section h2, .pre-section h2 { font-size: 19px; }
  .field-grid, .form-grid, .core-grid { gap: 15px; }
  .record-choice { grid-template-columns: 1fr; }
  .record-choice label > span { min-height: 86px; }
  .common-areas > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .property-guidance { margin: 18px 0 14px; }
  .image-gallery { grid-template-columns: repeat(2, 1fr); }
  .property-footer { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .property-footer > div { display: grid; grid-template-columns: 1fr 1fr; }
  .property-footer .publish-button, .property-footer .draft-button { width: 100%; }
  .record-overview { grid-template-columns: 1fr; }
  .overview-item { border-right: 0 !important; border-bottom: 1px solid #eaeaea; }
  .record-view-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .record-view-actions .state-pill { grid-column: 1 / -1; width: max-content; }
  .view-section header { padding: 16px; }
  .detail-item { min-height: 0; padding: 14px; }
  .map-stage { min-height: 62dvh; }
  .map-legend { width: min(226px, calc(100% - 24px)); }
  .integration-card > summary { grid-template-columns: 42px minmax(0, 1fr); padding: 17px; }
  .integration-card > summary .integration-state { grid-column: 2; margin: 0; justify-self: start; }
  .integration-body { padding: 17px; }
  .consent-page { padding: 18px 12px; }
  .consent-card { margin: 0 auto; padding: 24px 20px; border-radius: 17px; }
  .consent-card h1 { font-size: 29px; }
  dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); }
  dialog header, dialog .dialog-body { padding: 17px; }
  dialog footer { padding: 14px 17px; }
}

@media (max-width: 430px) {
  .main-content { padding-inline: 11px; }
  .mobile-topbar { padding-right: 12px; padding-left: 12px; }
  .topbar h1, .page-header h1, .record-view-topbar h1, .map-topbar h1 { font-size: 28px; }
  .management-actions, .agent-row-actions { grid-template-columns: 1fr; }
  .common-areas > div { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Final overrides for controls originally styled by individual legacy screens. */
#analytics-filters input,
#analytics-filters button,
.agent-filter > summary,
.agent-filter > div,
.preproperty-toolbar :is(input, select, button),
.property-toolbar :is(input, select, button),
.map-toolbar :is(input, select, button),
.credentials-form :is(input, select, textarea),
.profile-field :is(input, select, textarea),
.agent-fields :is(input, select, textarea),
.field-dialog :is(input, select, textarea),
.attachment-form :is(input, select, textarea),
.pre-grid :is(input, select, textarea),
.property-form :is(input, select, textarea) {
  border-color: #d4d4d4;
  background: #fff;
  color: var(--honne-ink);
  box-shadow: none;
  color-scheme: light;
}

#analytics-filters input::placeholder,
.preproperty-toolbar input::placeholder,
.property-toolbar input::placeholder,
.map-toolbar input::placeholder { color: #829184; }

#analytics-filters button[type="submit"] {
  border-color: var(--honne-lime);
  background: var(--honne-lime);
  color: #171717;
  font-weight: 800;
}

#analytics-filters button:not([type="submit"]),
.agent-filter > summary,
.map-toolbar button,
.preproperty-toolbar button,
.property-toolbar button { color: #515151; }

#analytics-filters button:hover,
.agent-filter > summary:hover,
.map-toolbar button:hover,
.preproperty-toolbar button:hover,
.property-toolbar button:hover { background: #f6f6f6; }

.agent-filter > div { border-color: #d4d4d4; box-shadow: var(--honne-shadow-small); }
.agent-filter label { color: #525252; }
.agent-filter label:hover { background: #f6f6f6; }
.chart-grid-line { stroke: #e1e1e1; }
.chart-axis-label, .chart-empty { fill: #7c7c7c; color: #7c7c7c; }
.chart-path { stroke: #626262; }
.chart-point { fill: #ffed51; stroke: #313131; }
.chart-tooltip { border-color: #d8d8d8; background: #232323; color: #fff; box-shadow: var(--honne-shadow); }
.bar-track { fill: #f1f1f1; }
.bar-fill { fill: #6a6a6a; }
.metric-card, .analytics-card { border-color: #e3e3e3; background: #fff; box-shadow: var(--honne-shadow-small); }
.metric-card small, .analytics-card small { color: #7a7a7a; }

/* Directory, profile and integration sub-components retain the same hierarchy. */
.management-dialog, .field-dialog { background: #fff; color: var(--honne-ink); }
.management-fields :is(input, select, textarea),
.team-options label,
.profile-card :is(input, select, textarea),
.custom-field-row,
.connection-summary,
.sync-progress,
.sync-actions,
.copy-field button,
.core-list article,
.core-rows > article,
.core-file-form,
.batch-summary span {
  border-color: #dddddd;
  background: #fff;
  color: var(--honne-ink);
}
.management-fields span, .agent-fields span, .profile-card label > span,
.team-field legend, .team-options small, .connection-summary span,
.sync-progress small, .sync-actions span, .custom-field-row small,
.core-list p, .core-rows p, .batch-summary span { color: #7a7a7a; }
.management-card strong, .agents-card td strong, .management-card td strong,
.custom-field-row strong, .connection-summary strong, .core-list h3,
.core-rows h3, .batch-summary strong { color: var(--honne-ink); }
.document-readiness { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.document-readiness:empty, #documentos-core .core-alert:empty { display: none; }
.document-source-message:empty { display: none; }
.document-source-message { margin: 0; color: var(--core-muted); font-size: 13px; line-height: 1.5; }
.record-flow { display: flex; align-items: center; gap: 8px; overflow-x: auto; margin: 14px 0 20px; padding: 5px 2px 11px; scrollbar-width: thin; white-space: nowrap; }
.record-flow strong { flex: none; padding: 9px 8px 9px 0; color: var(--honne-ink); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.record-flow a { display: inline-flex; align-items: center; flex: none; min-height: 48px; padding: 9px 13px; border: 1px solid #d9d9d9; border-radius: 999px; background: #fbfbfb; color: #303030; font-size: 13px; font-weight: 600; text-decoration: none; }
.record-flow a:hover, .record-flow a:focus-visible { border-color: #9c9c9c; background: #f1f1f1; color: #212121; }
.record-flow + form > section, #documentos-core { scroll-margin-top: 85px; }
.document-checklist { min-width: 0; padding: 16px 18px; border: 1px solid #dedede; border-radius: 12px; background: #f9f9f9; color: #292929; }
.document-checklist strong { display: block; margin-bottom: 8px; }
.document-checklist ul { margin: 0 0 10px; padding-left: 19px; line-height: 1.55; }
.document-checklist li + li { margin-top: 5px; }
.document-checklist a, .document-checklist button { display: inline-block; margin: 5px 10px 0 0; padding: 8px 10px; border: 1px solid #b4b4b4; border-radius: 8px; background: #fff; color: #4d4d4d; font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; }
.document-checklist a:hover, .document-checklist button:hover { background: #f0f0f0; }
#documentos-core .core-actions button:disabled { opacity: 1; cursor: not-allowed; border-color: #d1cfc8; background: #e8e7e3; color: #585753; }
html[data-theme="dark"] #documentos-core .core-actions button:disabled { border-color: #4d4d4d; background: #303030; color: #c5c5c5; }
#documentos-core .core-alert { border-left-color: #ba852b; background: #fff5e7; color: #654711; }
.document-result { max-height: 30vh; overflow: auto; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 12px; }
@media (max-width: 700px) { .document-readiness { grid-template-columns: minmax(0, 1fr); } }
.agent-avatar { border-color: #cccccc; background: #f4f4f4; color: #505050; }
.team-field { border-color: #dddddd; background: #fcfcfc; }
.team-options label:hover { border-color: #bdbdbd; background: #f5f5f5; }
.team-badge { color: #616161 !important; }
.agents-summary { overflow: hidden; border-color: #e2e2e2; background: #fff; box-shadow: var(--honne-shadow-small); }
.agents-summary > div { border-color: #e8e8e8; }
.agents-summary strong { color: var(--honne-ink); }
.agents-summary span, .agents-summary p { color: #787878; }
.agents-toolbar { border-bottom-color: #e5e5e5; background: #fafafa; }
.agents-toolbar :is(input, select) { border-color: #d4d4d4; border-radius: 10px; background: #fff; color: var(--honne-ink); }
.role-pill, .agent-state { border-color: #d6d6d6; background: #f8f8f8; color: #5c5c5c; }
.agent-state[data-state=inactivo] { border-color: #e3c6c2; background: #fff6f4; color: #9c534c; }
.connection-summary a, .guide-text a, .core-list a { color: #5e5e5e; }
.custom-field-row { border-radius: 10px; }
.field-actions button, .copy-field button { border-color: #d6d6d6; color: #515151; }
.field-actions button:hover, .copy-field button:hover { background: #f5f5f5; }
.field-status { border-color: #d6d6d6; background: #f8f8f8; color: #616161; }
.field-status[data-active=false] { color: #7d887f; }
.batch-summary { border-color: #dedede; background: #fff; }
.batch-summary strong { color: #4f4f4f; }

/* Small controls, menus and status elements that previously used hard-coded dark values. */
.property-identity span, .location-cell strong, .location-cell span, .record-kind,
.pre-card p, .pre-card small, .properties-empty p, .pre-empty p,
.profile-card p, .profile-meta, .empty-note, .autosave-status { color: #777777; }
.search-box input, .property-toolbar select, .preproperty-toolbar select,
.map-toolbar select { color: var(--honne-ink); }
.prefix-filter label, .prefix-filter p { color: #5c5c5c; }
.prefix-filter label:hover { background: #f6f6f6; }
.code-preview span, .pre-code span, .inheritance-notice, .valuation-price-field > small,
.media-subtitle, .examples-heading, .examples-heading a, .example-row span,
.video-item footer, .property-footer a { color: #717171; }
.example-row, .attachment-editor, .process-row, .document-row, .core-file-form,
.core-rows > article { border-color: #e1e1e1; background: #fff; }
.example-row strong, .image-uploader strong { color: var(--honne-ink); }
.examples-heading a { border-color: #d6d6d6; border-radius: 9px; }
.property-guidance strong { color: #5b5b5b; }
.image-uploader span, .media-subtitle { color: #7a7a7a; }
.gallery-item:first-child:before, .gallery-item button { background: rgba(33, 33, 33,.88); color: #fff; }
.video-item footer { background: #fcfcfc; }
.current-state[data-state=activa] { color: #606060; }
.current-state[data-state=cerrada], .current-state[data-state=archivada] { color: #68766c; }
.current-state[data-state=caida] { color: #a94d46; }

@media (max-width: 680px) {
  #analytics-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: 100%;
  }
  #analytics-filters > label, .agent-filter { grid-column: auto; min-width: 0; width: 100%; }
  #analytics-filters button { width: 100%; }
}

@media (max-width: 430px) {
  #analytics-filters { gap: 9px; }
}

/* The appearance selector lives with the personal account, not in a global settings screen. */
.appearance-card {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(220px, .75fr) minmax(0, 1.35fr);
  gap: 28px;
  align-items: start;
  padding: 26px 30px;
  border: 1px solid #e2e2e2;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--honne-shadow-small);
}
.appearance-card h3 { margin: 6px 0 8px; color: var(--honne-ink); font-size: 18px; letter-spacing: -.025em; }
.appearance-card > div > p:last-child { margin: 0; color: #777777; line-height: 1.55; }
.appearance-card > .inline-message { grid-column: 1 / -1; margin: -12px 0 0; }
.theme-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; }
.theme-choice legend { grid-column: 1 / -1; margin-bottom: 3px; color: #6a6a6a; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.theme-choice label { position: relative; min-width: 0; cursor: pointer; }
.theme-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.theme-option {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 11px;
  row-gap: 3px;
  min-height: 110px;
  padding: 17px;
  border: 1px solid #dedede;
  border-radius: 13px;
  background: #fcfcfc;
  color: var(--honne-ink);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}
.theme-option:hover { border-color: #bcbcbc; background: #f9f9f9; transform: translateY(-1px); }
.theme-option i { display: grid; grid-row: 1 / span 2; width: 36px; height: 36px; place-items: center; border-radius: 11px; background: #f0f0f0; color: #5e5e5e; font-size: 19px; font-style: normal; }
.theme-option--dark i { background: #232323; color: #ffed51; }
.theme-option b { align-self: end; font-size: 14px; }
.theme-option small { align-self: start; color: #7b7b7b; font-size: 12px; line-height: 1.35; }
.theme-choice input:checked + .theme-option { border-color: #898989; background: #f6f6f6; box-shadow: inset 0 0 0 1px #9b9b9b, 0 6px 15px rgba(79, 79, 79,.08); }
.theme-choice input:focus-visible + .theme-option { outline: 3px solid rgba(153, 153, 153,.38); outline-offset: 3px; }

/* Complete dark variant — purpose-built, not an inverted light mode. */
html[data-theme="dark"] {
  color-scheme: dark;
  --black: #0f0f0f;
  --panel: #141414;
  --raised: #181818;
  --white: #f4f4f4;
  --muted: #a8a8a8;
  --line: #2b2b2b;
  --line-strong: #5b5b5b;
  --core-bg: #0f0f0f;
  --core-surface: #141414;
  --core-raised: #181818;
  --core-text: #f4f4f4;
  --core-muted: #a8a8a8;
  --core-line: #2b2b2b;
  --honne-ink: #f4f4f4;
  --honne-subtle: #101010;
  --honne-shadow: 0 18px 44px rgba(0,0,0,.26);
  --honne-shadow-small: 0 6px 18px rgba(0,0,0,.19);
}
html[data-theme="dark"] body { background: #0f0f0f; color: #f4f4f4; }
html[data-theme="dark"] .main-content {
  background: radial-gradient(circle at 88% 1%, rgba(148, 148, 148,.16), transparent 24rem), radial-gradient(circle at 20% -8%, rgba(44, 44, 44,.34), transparent 29rem), #0f0f0f;
}
html[data-theme="dark"] .mobile-topbar { border-color: #2b2b2b; background: rgba(16, 16, 16,.93); color: #f4f4f4; }
html[data-theme="dark"] .mobile-topbar button { border-color: #575757; background: #161616; color: #e8e8e8; }
html[data-theme="dark"] .mobile-topbar strong { color: #f4f4f4; }
html[data-theme="dark"] .topbar, html[data-theme="dark"] .record-view-topbar, html[data-theme="dark"] .map-topbar { border-color: #2b2b2b; }
html[data-theme="dark"] .topbar h1, html[data-theme="dark"] .page-header h1, html[data-theme="dark"] .record-view-topbar h1, html[data-theme="dark"] .map-topbar h1,
html[data-theme="dark"] .welcome-block h2, html[data-theme="dark"] .analytics-toolbar > div h2,
html[data-theme="dark"] .section-heading h2, html[data-theme="dark"] .form-section h2, html[data-theme="dark"] .editor-section h2, html[data-theme="dark"] .pre-section h2,
html[data-theme="dark"] .property-identity strong, html[data-theme="dark"] .pre-card h2, html[data-theme="dark"] .pre-card strong { color: #f6f6f6; }
html[data-theme="dark"] .topbar p:not(.section-label), html[data-theme="dark"] .map-topbar > div > p:last-child,
html[data-theme="dark"] .record-view-topbar > div > p:last-child, html[data-theme="dark"] .welcome-block > p:last-child,
html[data-theme="dark"] .analytics-toolbar > div > p:last-child, html[data-theme="dark"] .section-heading p,
html[data-theme="dark"] .form-section p, html[data-theme="dark"] .editor-section p, html[data-theme="dark"] .pre-section p { color: #acacac; }
html[data-theme="dark"] .section-label, html[data-theme="dark"] .eyebrow { color: #ffed51; }

html[data-theme="dark"] :is(.management-card, .agents-card, .properties-card, .property-list-card, .preproperty-card, .form-section, .editor-section, .pre-section, .profile-card, .core-card, .view-section, .analytics-chart, .analytics-metrics article, .integration-card, .next-step-card, .map-toolbar, .map-stage, .record-overview, .appearance-card, .metric-card, .analytics-card, .chart-card, .source-badge, .connected-panel, .custom-fields-card, .batch-geocode, .agents-summary) {
  border-color: #2b2b2b;
  background: #141414;
  box-shadow: var(--honne-shadow-small);
}
html[data-theme="dark"] :is(.management-toolbar, .property-toolbar, .preproperty-toolbar, .map-toolbar, .filter-bar, .filters, .pre-filters, .agents-toolbar, .view-section header, .notification-panel > header, .notification-toolbar, dialog header, dialog footer, .management-dialog header, .management-dialog footer) { border-color: #2b2b2b; background: #101010; }
html[data-theme="dark"] :is(.management-card table, .agents-table, .properties-table, .preproperty-card table, .record-overview, .code-preview, .pre-code, .common-areas, .coordinate-field, .valuation-price-field, .record-choice label > span, .example-row, .attachment-editor, .process-row, .document-row, .core-file-form, .core-rows > article, .team-field, .connection-summary, .sync-progress, .sync-actions, .custom-field-row, .batch-summary, .batch-summary span, .theme-option) { border-color: #2b2b2b; background: #151515; color: #f4f4f4; }
html[data-theme="dark"] :is(.management-card th, .agents-table th, .properties-table th, .preproperty-card th, .inventory-tabs, .preproperty-tabs, .directory-tabs, .inventory-tabs a, .preproperty-tabs a, .directory-tabs button, .overview-item, .view-section header, .video-item footer) { border-color: #2b2b2b; background: #101010; color: #b7b7b7; }
html[data-theme="dark"] .inventory-tabs a.is-active, html[data-theme="dark"] .preproperty-tabs a.is-active, html[data-theme="dark"] .directory-tabs button[aria-selected="true"] { background: #202020; color: #eeeeee; box-shadow: inset 0 -3px #ffed51; }
html[data-theme="dark"] :is(main, dialog) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea),
html[data-theme="dark"] :is(#analytics-filters input, #analytics-filters button, .agent-filter > summary, .agent-filter > div, .preproperty-toolbar :is(input, select, button), .property-toolbar :is(input, select, button), .map-toolbar :is(input, select, button), .credentials-form :is(input, select, textarea), .profile-field :is(input, select, textarea), .agent-fields :is(input, select, textarea), .management-fields :is(input, select, textarea), .field-dialog :is(input, select, textarea), .attachment-form :is(input, select, textarea), .pre-grid :is(input, select, textarea), .property-form :is(input, select, textarea), .team-options label, .copy-field button) {
  border-color: #575757;
  background: #0f0f0f;
  color: #f3f3f3;
  color-scheme: dark;
}
html[data-theme="dark"] :is(main, dialog) :is(input, select, textarea)::placeholder { color: #909090; }
html[data-theme="dark"] :is(main, dialog) label, html[data-theme="dark"] :is(main, dialog) label span,
html[data-theme="dark"] :is(.management-fields span, .agent-fields span, .profile-card label > span, .field-grid label > span, .textarea-field > span) { color: #d2d2d2; }
html[data-theme="dark"] :is(main, dialog) label small, html[data-theme="dark"] :is(.field-grid small, .textarea-field small, .pre-grid small, .management-fields small, .agent-fields small, .profile-field small) { color: #9d9d9d; }
html[data-theme="dark"] .primary-action, html[data-theme="dark"] .publish-button, html[data-theme="dark"] .new-property-button, html[data-theme="dark"] .new-preproperty, html[data-theme="dark"] .submit-button, html[data-theme="dark"] .save-button, html[data-theme="dark"] .consent-card button[type=submit], html[data-theme="dark"] .consent-card form > button, html[data-theme="dark"] #analytics-filters button[type="submit"] { border-color: #ffed51; background: #ffed51; color: #171717; }
html[data-theme="dark"] :is(.logout-button, .secondary-action, .secondary-button, .draft-button, .cancel-edit, .clear-filters, .preproperty-toolbar > button, .property-toolbar > button, .map-toolbar > button, #analytics-filters button:not([type="submit"])) { border-color: #595959; background: #161616; color: #e5e5e5; }
html[data-theme="dark"] :is(.logout-button, .secondary-action, .secondary-button, .draft-button, .cancel-edit, .clear-filters, .preproperty-toolbar > button, .property-toolbar > button, .map-toolbar > button, #analytics-filters button:not([type="submit"])):hover { border-color: #8e8e8e; background: #1f1f1f; color: #fff; }
html[data-theme="dark"] :is(.state-pill, .status-pill, .agent-status, .current-state, .pre-status, .profile-status, .core-badge, .role-pill, .agent-state, .field-status, .integration-state) { border-color: #595959; background: #191919; color: #ffed51; }
/* Integration accordions must not inherit the light theme's white hover/body. */
html[data-theme="dark"] .integration-card > summary { background: #141414; color: #f4f4f4; }
html[data-theme="dark"] .integration-card > summary:is(:hover, :focus-visible),
html[data-theme="dark"] .integration-card[open] > summary { background: #1e1e1e; color: #f6f6f6; }
html[data-theme="dark"] .integration-card > summary b,
html[data-theme="dark"] .integration-intro h2,
html[data-theme="dark"] .integration-body .form-heading h3 { color: #f6f6f6; }
html[data-theme="dark"] .integration-card > summary small,
html[data-theme="dark"] .integration-intro p,
html[data-theme="dark"] .integration-body .form-heading p,
html[data-theme="dark"] .source-badge small { color: #b6b6b6; }
html[data-theme="dark"] .integration-body { border-top-color: #2b2b2b; background: #101010; color: #f4f4f4; }
html[data-theme="dark"] .integration-body details { border-color: #515151; background: #141414; }
html[data-theme="dark"] .integration-body details summary { color: #f4f4f4; }
html[data-theme="dark"] .secure-label { border-color: #606060; background: #1d1d1d; color: #ffed51; }
html[data-theme="dark"] .document-checklist { border-color: #595959; background: #191919; color: #e6e6e6; }
html[data-theme="dark"] .record-flow strong { color: #d4d4d4; }
html[data-theme="dark"] .record-flow a { border-color: #515151; background: #191919; color: #e7e7e7; }
html[data-theme="dark"] .record-flow a:hover, html[data-theme="dark"] .record-flow a:focus-visible { border-color: #adadad; background: #272727; color: #fff; }
html[data-theme="dark"] .document-checklist a, html[data-theme="dark"] .document-checklist button { border-color: #717171; background: #222222; color: #e7e7e7; }
html[data-theme="dark"] .document-checklist a:hover, html[data-theme="dark"] .document-checklist button:hover { background: #2c2c2c; }
html[data-theme="dark"] #documentos-core .core-alert { border-left-color: #d6ba78; background: #302d22; color: #f3dfb8; }
html[data-theme="dark"] :is(.row-menu > div, .record-actions > div, .pre-actions > div, .prefix-filter > div, .agent-filter > div, .notification-panel, dialog, .management-dialog, .field-dialog, .photo-dialog) { border-color: #515151; background: #141414; color: #f4f4f4; box-shadow: var(--honne-shadow); }
html[data-theme="dark"] :is(.row-menu a, .row-menu button, .record-actions button, .pre-actions a, .pre-actions button, .prefix-filter label, .agent-filter label, .field-actions button, .copy-field button) { color: #dddddd; }
html[data-theme="dark"] :is(.row-menu a, .row-menu button, .record-actions button, .pre-actions a, .pre-actions button, .prefix-filter label, .agent-filter label, .field-actions button, .copy-field button):hover { background: #222222; color: #fff; }
html[data-theme="dark"] .analytics-metrics article:nth-child(1) { background: linear-gradient(145deg, #141414, #1d1d1d); }
html[data-theme="dark"] .analytics-metrics article:nth-child(2) { background: linear-gradient(145deg, #141414, #202938); }
html[data-theme="dark"] .analytics-metrics article:nth-child(3) { background: linear-gradient(145deg, #141414, #332d1d); }
html[data-theme="dark"] .analytics-metrics article:nth-child(4) { background: linear-gradient(145deg, #141414, #1d1d1d); }
html[data-theme="dark"] :is(.analytics-metrics strong, .metrics strong, .metric-card strong, .analytics-card strong, .chart-card h3, .next-step-card h3, .view-section h2, .overview-item strong, .detail-item strong, .source-badge strong, .batch-summary strong, .appearance-card h3) { color: #f4f4f4; }
html[data-theme="dark"] :is(.analytics-metrics span, .analytics-metrics p, .analytics-metrics small, .metrics span, .metrics small, .metric-card small, .analytics-card small, .chart-axis-label, .chart-empty, .chart-legend, .bar-row span, .detail-item span, .overview-item span, .notification-panel > header span, .notification-toolbar small, .appearance-card > div > p:last-child, .theme-option small) { color: #aaaaaa; fill: #aaaaaa; }
html[data-theme="dark"] .chart-grid-line { stroke: #2c2c2c; }
html[data-theme="dark"] .chart-path { stroke: #ffed51; }
html[data-theme="dark"] .chart-point { fill: #141414; stroke: #ffed51; }
html[data-theme="dark"] .bar-track { background: #232323; fill: #232323; }
html[data-theme="dark"] .bar-fill { background: #aeaeae; fill: #aeaeae; }
html[data-theme="dark"] .chart-tooltip { border-color: #606060; background: #0f0f0f; color: #f4f4f4; }
html[data-theme="dark"] .notification-item { border-color: #2c2c2c; background: #1a1a1a; color: #f4f4f4; }
html[data-theme="dark"] .notification-item.is-read { background: #141414; }
html[data-theme="dark"] .notification-item:hover { background: #232323; }
html[data-theme="dark"] .notification-item p, html[data-theme="dark"] .notification-item small { color: #b0b0b0; }
html[data-theme="dark"] .notification-error p { color: #c1bbb0; }
html[data-theme="dark"] .profile-photo { border-color: #5c5c5c; background: radial-gradient(circle at 35% 25%, #2a2a2a, #101010 68%); }
html[data-theme="dark"] .profile-photo span { color: #e3e3e3; }
html[data-theme="dark"] .appearance-card { background: #141414; }
html[data-theme="dark"] .theme-option:hover { border-color: #8d8d8d; background: #1f1f1f; }
html[data-theme="dark"] .theme-option--light i { background: #2e2e2e; color: #ffed51; }
html[data-theme="dark"] .theme-choice input:checked + .theme-option { border-color: #adadad; background: #222222; box-shadow: inset 0 0 0 1px #adadad, 0 6px 15px rgba(0,0,0,.22); }
html[data-theme="dark"] .login-shell { background: #0f0f0f; }
html[data-theme="dark"] .form-panel { background: #101010; }
html[data-theme="dark"] .form-panel::before { background: radial-gradient(circle at 90% 12%, rgba(255, 237, 81,.18), transparent 24%); }
html[data-theme="dark"] .form-heading h2 { color: #f4f4f4; }
html[data-theme="dark"] .field-control { border-color: #575757; background: #0f0f0f; }
html[data-theme="dark"] .field-control input { color: #f4f4f4; }

/* Clear first-use guidance and a single location-confirmation path in both forms. */
.record-workflow { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.record-workflow span { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 12px; border: 1px solid var(--core-line); border-radius: 999px; background: var(--core-surface); color: var(--core-muted); font-size: 12px; line-height: 1.3; }
.record-workflow b { display: grid; flex: none; width: 21px; height: 21px; place-items: center; border-radius: 50%; background: #efefef; color: #4e4e4e; font-size: 11px; }
.owner-field > span { display: block; margin-bottom: 8px; color: var(--core-text); font-size: 13px; font-weight: 650; }
.location-review { min-width: 0; }
.location-review .coordinate-intro { margin: 2px 0 13px; color: var(--core-muted); font-size: 13px; line-height: 1.5; }
.location-review-status { padding: 11px 13px; border: 1px solid var(--core-line); border-radius: 9px; background: var(--core-raised); color: var(--core-muted); font-size: 13px; line-height: 1.45; }
.location-review-status[data-state="verified"] { border-color: #bbbbbb; background: #f5f5f5; color: #505050; }
.location-review-status[data-state="pending"] { border-color: #dbc7a0; background: #fff8e9; color: #805a1c; }
.pre-grid .location-review .verify-location, .field-grid .location-review .verify-location { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; min-height: 44px; margin-top: 10px; padding: 5px 0; color: var(--core-text); font-size: 13px; font-weight: 650; cursor: pointer; }
.pre-grid .location-review .verify-location input, .field-grid .location-review .verify-location input { flex: none; width: 19px; height: 19px; min-height: 19px; margin: 0; accent-color: #6a6a6a; }
.pre-grid .location-review .verify-location input:disabled, .field-grid .location-review .verify-location input:disabled { cursor: not-allowed; }
.pre-grid .location-review .verify-location.is-disabled, .field-grid .location-review .verify-location.is-disabled { opacity: .62; cursor: not-allowed; }
.pre-grid .location-review .verify-location span, .field-grid .location-review .verify-location span { margin: 0; color: inherit; font-size: inherit; font-weight: inherit; }
.location-review-help { display: block; max-width: 780px; margin: 0 0 13px; color: var(--core-muted); font-size: 12px; line-height: 1.5; }
.coordinate-manual { border-top: 1px solid var(--core-line); margin-top: 12px; padding-top: 11px; }
.coordinate-manual > summary { width: fit-content; color: #5b5b5b; font-size: 13px; font-weight: 650; cursor: pointer; }
.coordinate-manual[open] > summary { margin-bottom: 13px; }
.pre-grid .coordinate-manual .coordinate-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#pre-technical-group #expediente-tecnico { margin: 23px 0 0; padding: 22px 0 0; border: 0; border-top: 1px solid var(--core-line); border-radius: 0; background: transparent; box-shadow: none; }
#pre-technical-group #expediente-tecnico h2 { margin-bottom: 7px; font-size: 17px; }
#pre-technical-group #expediente-tecnico > p { margin: 0 0 17px; }
.preproperty-footer { position: sticky; z-index: 8; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 13px 18px calc(13px + env(safe-area-inset-bottom)); border: 1px solid var(--core-line); border-radius: 12px 12px 0 0; background: rgba(252, 252, 252,.96); box-shadow: 0 -8px 26px rgba(27, 27, 27,.08); backdrop-filter: blur(12px); }
.preproperty-footer span { color: var(--core-muted); font-size: 12px; line-height: 1.4; }
.preproperty-footer button { flex: none; }
html[data-theme="dark"] .record-workflow b { background: #282828; color: #e7e7e7; }
html[data-theme="dark"] .location-review-status[data-state="verified"] { border-color: #6d6d6d; background: #1f1f1f; color: #ffed51; }
html[data-theme="dark"] .location-review-status[data-state="pending"] { border-color: #806940; background: #302a1c; color: #efd8a4; }
html[data-theme="dark"] .coordinate-manual > summary { color: #ffed51; }
html[data-theme="dark"] .preproperty-footer { background: rgba(16, 16, 16,.96); box-shadow: 0 -8px 26px rgba(0,0,0,.22); }
@media (max-width: 700px) {
  .record-workflow { display: grid; grid-template-columns: minmax(0, 1fr); overflow: visible; padding-bottom: 0; }
  .record-workflow span { width: 100%; white-space: normal; }
  .pre-grid .coordinate-manual .coordinate-pair { grid-template-columns: minmax(0, 1fr); }
  .preproperty-footer { left: 0; right: 0; margin-inline: -14px; border-radius: 0; }
  .preproperty-footer span { display: none; }
  .preproperty-footer button { width: 100%; }
  .preproperty-topbar #save-pre, .property-header-actions .draft-button, .property-header-actions .publish-button { display: none; }
  .property-content { padding-bottom: 185px; }
  .property-footer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; padding: 9px 12px calc(9px + env(safe-area-inset-bottom)); }
  .property-footer .inline-message:empty { display: none; }
  .property-footer > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; width: 100%; }
  .property-footer > div .cancel-edit { grid-column: 1 / -1; justify-self: start; min-height: 28px; }
  .property-footer > div .draft-button { display: block; }
  .property-footer > div :is(.draft-button, .publish-button) { width: 100%; min-height: 44px; padding: 7px; white-space: normal; line-height: 1.2; }
}

/* Location lookup stays readable in both themes; Google results are proposals,
   and the explicit review checkbox confirms a second, independent check. */
.address-autocomplete, .pre-map-tools { border: 1px solid var(--core-line); border-radius: 14px; background: var(--core-raised); color: var(--core-text); }
.address-autocomplete[hidden], .pre-map-tools[hidden], .property-map-panel[hidden] { display: none !important; }
.address-autocomplete small, .pre-map-tools small { color: var(--core-muted); font-size: 12px; line-height: 1.5; }
.address-autocomplete > div > span, .pre-map-tools strong { color: var(--core-text); }
#address-autocomplete-host gmp-place-autocomplete, #pre-address-autocomplete-host gmp-place-autocomplete { display: block; width: 100%; min-height: 44px; color-scheme: light; }
.property-map-panel, .pre-map-tools details { border-color: var(--core-line); border-radius: 12px; background: var(--core-surface); color: var(--core-text); overflow: hidden; }
.property-map-panel summary small, .property-map-panel summary strong, .map-location-footer span { color: var(--core-muted); }
.map-location-footer, .address-proposal { border-color: var(--core-line); background: var(--core-raised); }
.address-proposal strong { color: var(--core-text); overflow-wrap: anywhere; }
.pre-map-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px; padding: 16px; }
.pre-map-tools > div { min-width: 0; }
.pre-map-tools strong { display: block; margin-bottom: 8px; }
.pre-map-tools details { grid-column: 1 / -1; }
.pre-map-tools summary { cursor: pointer; padding: 13px 15px; font-weight: 650; }
.pre-map-canvas { height: 340px; min-height: 240px; width: 100%; border-top: 1px solid var(--core-line); }
#pre-location-quality { font-weight: 650; }
html[data-theme="dark"] .address-autocomplete, html[data-theme="dark"] .pre-map-tools, html[data-theme="dark"] .property-map-panel, html[data-theme="dark"] .pre-map-tools details { border-color: #515151; background: #141414; color: #f4f4f4; }
html[data-theme="dark"] .address-autocomplete > div > span, html[data-theme="dark"] .pre-map-tools strong, html[data-theme="dark"] .address-proposal strong { color: #f4f4f4; }
html[data-theme="dark"] .address-autocomplete small, html[data-theme="dark"] .pre-map-tools small, html[data-theme="dark"] .property-map-panel summary small, html[data-theme="dark"] .property-map-panel summary strong { color: #b7b7b7; }
html[data-theme="dark"] #address-autocomplete-host gmp-place-autocomplete, html[data-theme="dark"] #pre-address-autocomplete-host gmp-place-autocomplete { color-scheme: dark; }
html[data-theme="dark"] .map-location-footer, html[data-theme="dark"] .address-proposal { border-color: #515151; background: #101010; }
@media (max-width: 700px) { .pre-map-tools { grid-template-columns: 1fr; } .pre-map-tools > button { width: 100%; } .pre-map-canvas { height: 300px; } }

@media (max-width: 680px) {
  .appearance-card { grid-template-columns: 1fr; gap: 19px; padding: 21px; }
  .appearance-card > .inline-message { grid-column: auto; margin: -6px 0 0; }
  .theme-choice { grid-template-columns: 1fr; }
}

/* 0.17 interface QA: one control surface, readable data, and compact navigation. */
.inventory-tabs a, .preproperty-tabs a, .directory-tabs button {
  min-height: 56px;
  padding: 13px 17px;
  align-items: center;
}
.inventory-tabs strong, .preproperty-tabs strong { font-size: 16px; font-weight: 750; }
.property-toolbar, .preproperty-toolbar { align-items: stretch; }
.search-box, .preproperty-toolbar > label { min-width: 0; overflow: hidden; }
.search-box input, .preproperty-toolbar > label input {
  min-width: 0;
  min-height: 42px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.search-box input:is(:hover, :focus), .preproperty-toolbar > label input:is(:hover, :focus) {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.search-box:focus-within, .preproperty-toolbar > label:focus-within {
  border-color: #8a8a8a;
  box-shadow: 0 0 0 4px rgba(153, 153, 153,.13);
}
#owner-reconcile {
  min-height: 40px;
  margin-top: 14px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--core-surface);
  color: var(--core-text);
  font: inherit;
  cursor: pointer;
}
#owner-reconcile:hover { border-color: #9b9b9b; background: var(--core-raised); }
.preproperty-card td strong { color: var(--honne-ink); }
.profile-fields, .profile-field, .core-phone { min-width: 0; }
.core-phone { grid-template-columns: minmax(110px, 42%) minmax(0, 1fr); }
.core-phone :is(select, input) { min-width: 0; max-width: 100%; }

html[data-theme="dark"] .search-box,
html[data-theme="dark"] .preproperty-toolbar > label,
html[data-theme="dark"] .map-search,
html[data-theme="dark"] .prefix-filter > summary,
html[data-theme="dark"] .agent-filter > summary {
  border-color: #575757;
  background: #0f0f0f;
  color: #d8d8d8;
}
html[data-theme="dark"] .search-box input,
html[data-theme="dark"] .preproperty-toolbar > label input,
html[data-theme="dark"] .search-box input:is(:hover, :focus),
html[data-theme="dark"] .preproperty-toolbar > label input:is(:hover, :focus) {
  border: 0 !important;
  background: transparent !important;
  color: #f4f4f4;
  box-shadow: none !important;
}
html[data-theme="dark"] .search-box:focus-within,
html[data-theme="dark"] .preproperty-toolbar > label:focus-within { border-color: #adadad; box-shadow: 0 0 0 4px rgba(173, 173, 173,.17); }
html[data-theme="dark"] .agent-filter > summary:hover,
html[data-theme="dark"] .prefix-filter > summary:hover { border-color: #8e8e8e; background: #1f1f1f; color: #fff; }
html[data-theme="dark"] .inventory-tabs strong,
html[data-theme="dark"] .preproperty-tabs strong { color: #ffed51; }
html[data-theme="dark"] .inventory-tabs a.is-active strong,
html[data-theme="dark"] .preproperty-tabs a.is-active strong { color: #eeeeee; }
html[data-theme="dark"] .welcome-block h2 span { color: #ffed51; }
html[data-theme="dark"] #analytics-filters span,
html[data-theme="dark"] #analytics-filters label span,
html[data-theme="dark"] .agent-filter label span { color: #c6c6c6; }
html[data-theme="dark"] :is(.property-identity span, .location-cell strong, .location-cell span, .record-kind, .pre-card p, .pre-card small, .profile-meta, .empty-note, .autosave-status, .media-subtitle, .example-row span, .video-item footer, .property-footer a) { color: #b6b6b6; }

html[data-theme="dark"] :is(.management-card, .agents-table, .properties-table, .preproperty-card) td {
  border-bottom-color: #2b2b2b;
  color: #d1d1d1;
}
html[data-theme="dark"] :is(.management-card, .agents-table, .properties-table, .preproperty-card) td small,
html[data-theme="dark"] :is(.management-card, .agents-table, .properties-table, .preproperty-card) td .muted { color: #b6b6b6; }
html[data-theme="dark"] :is(.management-card, .agents-table, .properties-table, .preproperty-card) td strong { color: #f5f5f5; }
html[data-theme="dark"] :is(.management-card, .agents-table, .properties-table, .preproperty-card) tbody tr:is(:hover, :focus-within) { background: #212121; }
html[data-theme="dark"] .preproperty-card .pre-state { border-color: #686868; background: #212121; color: #e7e7e7; }
html[data-theme="dark"] .preproperty-card .progress-line { background: #464646; }
html[data-theme="dark"] .preproperty-card .progress-line i { background: #ffed51; }
html[data-theme="dark"] .agent-avatar { border-color: #676767; background: #242424; color: #ededed; }
html[data-theme="dark"] .management-card small,
html[data-theme="dark"] .agents-summary p,
html[data-theme="dark"] .properties-empty p,
html[data-theme="dark"] .pre-empty p { color: #b6b6b6; }

html[data-theme="dark"] #documentos-core .core-list article,
html[data-theme="dark"] .core-list article {
  border-color: #4e4e4e;
  background: #1a1a1a;
  color: #f4f4f4;
}
html[data-theme="dark"] .core-list article h3 { color: #f5f5f5; }
html[data-theme="dark"] .core-list article p { color: #c6c6c6; }
html[data-theme="dark"] .core-list article a { color: #ffed51; }
.document-legal-requirements { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 310px); gap: 12px 24px; align-items: start; margin: 18px 0 4px; padding: 18px; border: 1px solid var(--core-line); border-radius: 12px; background: var(--core-surface); }
.document-legal-requirements strong { display: block; margin-bottom: 5px; }
.document-legal-requirements p { margin: 0; color: var(--core-muted); font-size: 13px; line-height: 1.5; }
.document-legal-requirements label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; }
.document-legal-requirements select, .document-legal-requirements input[type="file"] { width: 100%; min-width: 0; }
.document-requirement-status:empty { display: none; }
.document-legal-requirements .document-requirement-status, .document-power-upload { grid-column: 1 / -1; }
.document-power-upload { display: grid; gap: 9px; padding: 16px; border: 1px solid var(--core-line); border-radius: 10px; }
.document-power-upload[hidden] { display: none; }
.document-power-upload button { justify-self: start; min-height: 48px; padding: 9px 15px; }
html[data-theme="dark"] .document-legal-requirements, html[data-theme="dark"] .document-power-upload { border-color: #4e4e4e; background: #1a1a1a; color: #f4f4f4; }
@media (max-width: 700px) { .document-legal-requirements { grid-template-columns: minmax(0, 1fr); } }
.document-cost-confirmation { display: flex; align-items: flex-start; gap: 10px; min-height: 48px; margin: 18px 0; line-height: 1.5; }
.document-cost-confirmation input { flex: 0 0 22px; width: 22px; height: 22px; margin-top: 2px; accent-color: var(--core-accent); }
html[data-theme="dark"] .property-footer { border-top-color: #4e4e4e; background: rgba(16, 16, 16,.97); color: #f4f4f4; }
html[data-theme="dark"] #owner-reconcile { border-color: #595959; background: #161616; color: #e5e5e5; }
html[data-theme="dark"] #owner-reconcile:hover { border-color: #8e8e8e; background: #1f1f1f; color: #fff; }

@media (min-width: 1101px) and (max-width: 1450px) {
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .photo-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 24px; align-items: center; text-align: left; }
  .profile-photo { grid-row: 1 / 4; width: 140px; margin: 0; }
  .photo-actions { max-width: 350px; margin-top: 7px; }
}
@media (max-width: 680px) {
  .inventory-tabs, .preproperty-tabs { display: flex; overflow-x: auto; }
  .inventory-tabs a, .preproperty-tabs a { flex: 1 0 auto; min-width: 0; min-height: 54px; padding: 12px; border-bottom: 0; border-right: 1px solid var(--core-line); }
  .inventory-tabs a:last-child, .preproperty-tabs a:last-child { border-right: 0; }
  .inventory-tabs strong, .preproperty-tabs strong { font-size: 14px; }
  html[data-theme="dark"] :is(.management-card, .agents-table, .properties-table, .preproperty-card) tbody tr {
    border-bottom-color: #2b2b2b;
    background: #181818;
  }
  html[data-theme="dark"] :is(.management-card, .agents-table, .properties-table, .preproperty-card) tbody tr:is(:hover, :focus-within) { background: #242424; }
  html[data-theme="dark"] :is(.management-card, .agents-table, .properties-table, .preproperty-card) td::before { color: #b7b7b7; }
}

/* Brand focus and control states are yellow in both appearance modes. */
.brand-panel { color: #ffffff; }
.form-panel .field-group label, .form-panel .label-row { color: #303030; }
.form-panel .label-row a, .form-panel .remember-control { color: #555555; }
.form-panel .submit-button { border-color: #ffed51; background: #ffed51; color: #111111; }
.form-panel .submit-button:hover:not(:disabled) { border-color: #e6d13d; background: #e6d13d; color: #111111; }
.mobile-brand .brand-logo { filter: none; }
html[data-theme="dark"] .form-panel .field-group label,
html[data-theme="dark"] .form-panel .label-row,
html[data-theme="dark"] .form-panel .label-row a,
html[data-theme="dark"] .form-panel .remember-control { color: #d9d9d9; }
html[data-theme="dark"] .mobile-brand .brand-logo { filter: invert(1); }
.sidebar .panel-brand img { filter: invert(1); }
html[data-theme="dark"] .core-dialog-card header img,
html[data-theme="dark"] .consent-logo { filter: invert(1); }
:root { --core-accent: #ffed51; --honne-lime: #ffed51; }
html[data-theme="dark"] { --core-accent: #ffed51; --honne-lime: #ffed51; }
:is(button, a, input, select, textarea, summary):focus-visible { outline-color: #d9c83d; }
html[data-theme="dark"] :is(button, a, input, select, textarea, summary):focus-visible { outline-color: #ffed51; }
input[type="checkbox"], input[type="radio"] { accent-color: #a28e00; }
html[data-theme="dark"] input[type="checkbox"],
html[data-theme="dark"] input[type="radio"] { accent-color: #ffed51; }

/* Navegación 2026: la portada es Mi CORE; las vistas existentes siguen
   disponibles sin duplicar Borradores y Archivadas en la barra lateral. */
:root { --honne-gold: #e8c667; }
.app-shell { grid-template-columns: 250px minmax(0, 1fr); }
.sidebar {
  width: 250px;
  padding: 22px 15px 16px;
  border-right: 1px solid rgba(255,255,255,.09);
  background: linear-gradient(170deg, #191919, #101010 65%, #181715);
  box-shadow: 8px 0 28px rgba(11,11,11,.08);
}
.sidebar .panel-brand {
  min-height: 57px;
  margin: 0 3px 4px;
  padding: 7px 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.sidebar .panel-brand img { width: 38px; height: 38px; margin-right: 7px; }
.sidebar .panel-brand span { font-size: 17px; letter-spacing: .22em; }
.sidebar .panel-brand b { color: var(--honne-gold); }
.sidebar-nav { margin-top: 11px; }
.sidebar-nav a,
.sidebar-nav button { min-height: 44px; margin: 2px 0; color: #d5d3ce; }
.sidebar-nav a:hover,
.sidebar-nav button:not(:disabled):hover { background: rgba(232,198,103,.12); color: #fff; }
.sidebar-nav a.is-active { background: linear-gradient(90deg,#f4d875,#e8c667); color: #181613; box-shadow: 0 6px 18px rgba(232,198,103,.18); }
.sidebar-nav a.is-active .nav-icon { color: #181613; }
.sidebar-nav a[href="mi-core.html"] { margin: 3px 0 19px; min-height: 46px; }
.sidebar-nav p { color: #a8a59d; }
.sidebar .nav-icon { color: var(--honne-gold); }
.sidebar .nav-icon svg { width: 19px; height: 19px; }
.sidebar-group { margin: 0 0 8px; }
.sidebar-nav .sidebar-group-toggle {
  display: flex;
  width: 100%;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 4px;
  padding: 5px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #a8a59d;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .15em;
  text-align: left;
  cursor: pointer;
}
.sidebar-nav .sidebar-group-toggle:hover,
.sidebar-nav .sidebar-group-toggle:focus-visible { background: rgba(232,198,103,.12); color: #fff; }
.sidebar-group-toggle svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.sidebar-group-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.sidebar-group-links[hidden] { display: none; }
.sidebar-group-links { display: block; }
.connection-dot { background: var(--honne-gold); box-shadow: 0 0 0 4px rgba(232,198,103,.13); }
@media (max-width: 1000px) {
  .app-shell { display: block; }
  .sidebar { width: min(310px, 86vw); }
}

/* 0.20 — the operational screens share the visual standard of Mi CORE.
   Scoped to the legacy shell so the new home and community layouts remain intact. */
:root {
  --core-premium-gold: #e8c667;
  --core-premium-border: #ddd8ca;
  --core-premium-surface: #fffefa;
  --core-premium-muted: #67645f;
  --core-premium-shadow: 0 18px 50px rgba(30, 25, 15, .075);
}
html[data-theme="dark"] {
  --core-premium-border: #3b3830;
  --core-premium-surface: #191919;
  --core-premium-muted: #bdb8ac;
  --core-premium-shadow: 0 20px 52px rgba(0, 0, 0, .2);
}
.main-content { --core-header-image: url("public/hero-administrativos-20260928.png"); }
.main-content:not(.home-content):not(.community-page) {
  max-width: none;
  min-width: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(232, 198, 103, .19), transparent 30rem),
    linear-gradient(135deg, #f9f8f5, #f1f0eb 72%, #f8f7f3);
}
html[data-theme="dark"] .main-content:not(.home-content):not(.community-page) {
  background:
    radial-gradient(circle at 100% 0%, rgba(232, 198, 103, .075), transparent 31rem),
    linear-gradient(135deg, #111110, #0d0d0d 72%, #151412);
}
.preproperties-content,
.preproperty-content { --core-header-image: url("public/hero-prepropiedades-20260928.png"); }
.properties-content,
.property-content,
.record-view-content { --core-header-image: url("public/hero-propiedades-20260928.png"); }
.agents-content { --core-header-image: url("public/hero-agentes-20260928.png"); }
.sidebar[data-active="propietarios"] + .management-content { --core-header-image: url("public/hero-propietarios-20260928.png"); }
.sidebar[data-active="administrativos"] + .management-content { --core-header-image: url("public/hero-administrativos-20260928.png"); }
.integrations-content { --core-header-image: url("public/hero-integraciones-20260928.png"); }
.map-content { --core-header-image: url("public/lima-costa-verde-dia.jpg"); }
.profile-content { --core-header-image: url("public/hero-perfil-20260928.png"); }
.statistics-content { --core-header-image: url("public/hero-estadisticas-20260928.png"); }
.main-content:not(.home-content):not(.community-page) > :is(.topbar, .record-view-topbar, .map-topbar) {
  position: relative;
  isolation: isolate;
  min-height: clamp(184px, 17vw, 232px);
  margin-bottom: clamp(22px, 3vw, 34px);
  padding: clamp(24px, 3.2vw, 43px);
  overflow: hidden;
  border: 1px solid #3a3529;
  border-radius: 20px;
  background-image:
    linear-gradient(90deg, rgba(14, 13, 12, .94), rgba(14, 13, 12, .7) 52%, rgba(14, 13, 12, .25)),
    var(--core-header-image);
  background-position: center, center 54%;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: 0 18px 43px rgba(20, 17, 13, .15);
  color: #f9f6ed;
}
html[data-theme="dark"] .main-content:not(.home-content):not(.community-page) > :is(.topbar, .record-view-topbar, .map-topbar) {
  background-image:
    linear-gradient(90deg, rgba(8, 8, 8, .96), rgba(8, 8, 8, .78) 52%, rgba(8, 8, 8, .42)),
    var(--core-header-image);
}
html body .preproperty-content .preproperty-topbar {
  min-height: clamp(184px, 17vw, 232px);
  background-image:
    linear-gradient(90deg, rgba(14, 13, 12, .94), rgba(14, 13, 12, .7) 52%, rgba(14, 13, 12, .25)),
    var(--core-header-image);
  background-position: center, center 54%;
  background-size: cover;
  background-repeat: no-repeat;
}
html[data-theme="dark"] body .preproperty-content .preproperty-topbar {
  background-image:
    linear-gradient(90deg, rgba(8, 8, 8, .96), rgba(8, 8, 8, .78) 52%, rgba(8, 8, 8, .42)),
    var(--core-header-image);
}
.main-content:not(.home-content):not(.community-page) > :is(.topbar, .record-view-topbar, .map-topbar)::before {
  position: absolute;
  z-index: -1;
  top: 0;
  left: clamp(24px, 3.2vw, 43px);
  width: 51px;
  height: 3px;
  background: var(--core-premium-gold);
  content: "";
}
.main-content:not(.home-content):not(.community-page) > :is(.topbar, .record-view-topbar, .map-topbar) :is(h1, .account-copy strong) {
  color: #fff;
}
.main-content:not(.home-content):not(.community-page) > :is(.topbar, .record-view-topbar, .map-topbar) :is(.section-label, .eyebrow) {
  color: var(--core-premium-gold);
}
.main-content:not(.home-content):not(.community-page) > :is(.topbar, .record-view-topbar, .map-topbar) :is(p:not(.section-label), .account-copy span, .back-link) {
  color: #d9d4c9;
}
.main-content:not(.home-content):not(.community-page) > :is(.topbar, .record-view-topbar, .map-topbar) .logout-button {
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.08);
  color: #fff;
}
.main-content:not(.home-content):not(.community-page) > :is(.topbar, .record-view-topbar, .map-topbar) .logout-button:hover {
  border-color: var(--core-premium-gold);
  background: rgba(232,198,103,.16);
  color: #fff;
}
.main-content:not(.home-content):not(.community-page) > :is(.topbar, .record-view-topbar, .map-topbar) :is(.primary-action, .new-property-button, .new-preproperty, .publish-button) {
  border-color: var(--core-premium-gold);
  background: var(--core-premium-gold);
  color: #171511;
  box-shadow: 0 8px 20px rgba(232,198,103,.16);
}
.main-content:not(.home-content):not(.community-page) > :is(.topbar, .record-view-topbar, .map-topbar) :is(.primary-action, .new-property-button, .new-preproperty, .publish-button):hover {
  border-color: #f3dc91;
  background: #f3dc91;
  color: #171511;
}
.main-content:not(.home-content):not(.community-page) :is(.management-card, .agents-card, .properties-card, .property-list-card, .preproperty-card, .form-section, .editor-section, .pre-section, .profile-card, .core-card, .view-section, .integration-card, .next-step-card, .map-toolbar, .map-stage, .record-overview, .appearance-card, .chart-card, .photo-card, .details-card) {
  border-color: var(--core-premium-border);
  border-radius: 18px;
  box-shadow: var(--core-premium-shadow);
}
html:not([data-theme="dark"]) .main-content:not(.home-content):not(.community-page) :is(.management-card, .agents-card, .properties-card, .property-list-card, .preproperty-card, .form-section, .editor-section, .pre-section, .profile-card, .core-card, .view-section, .integration-card, .next-step-card, .map-toolbar, .map-stage, .record-overview, .appearance-card, .chart-card, .photo-card, .details-card) {
  background-color: var(--core-premium-surface);
}
html[data-theme="dark"] .main-content:not(.home-content):not(.community-page) :is(.management-card, .agents-card, .properties-card, .property-list-card, .preproperty-card, .form-section, .editor-section, .pre-section, .profile-card, .core-card, .view-section, .integration-card, .next-step-card, .map-toolbar, .map-stage, .record-overview, .appearance-card, .chart-card, .photo-card, .details-card) {
  background-color: var(--core-premium-surface);
}
.main-content:not(.home-content):not(.community-page) :is(.section-heading, .details-heading, .chart-card > header) {
  border-color: var(--core-premium-border);
}
.main-content:not(.home-content):not(.community-page) :is(.primary-action, .publish-button, .new-property-button, .new-preproperty, .save-button, .submit-button, .secondary-action, .secondary-button, .logout-button) {
  border-radius: 10px;
}
.main-content:not(.home-content):not(.community-page) :is(input, select, textarea, button):focus-visible {
  outline: 3px solid rgba(232, 198, 103, .65);
  outline-offset: 2px;
}

/* Statistics: a restrained editorial hero and clearly grouped indicators. */
.statistics-content .welcome-block {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 245px;
  max-width: none;
  margin-bottom: 28px;
  padding: clamp(27px, 4vw, 50px);
  overflow: hidden;
  border: 1px solid #524732;
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(14,13,12,.94), rgba(14,13,12,.66) 62%, rgba(14,13,12,.18)),
    url("public/honne-interior-ilustracion.png") center 53% / cover;
  box-shadow: 0 18px 46px rgba(19,16,11,.14);
}
.statistics-content .welcome-block::before {
  position: absolute;
  top: 0;
  left: clamp(27px, 4vw, 50px);
  width: 50px;
  height: 3px;
  background: var(--core-premium-gold);
  content: "";
}
.statistics-content .welcome-block .section-label { color: var(--core-premium-gold); }
.statistics-content .welcome-block h2,
html[data-theme="dark"] .statistics-content .welcome-block h2 { max-width: 920px; margin: 9px 0 10px; color: #fff; font-size: clamp(30px, 3.8vw, 55px); line-height: 1.08; }
.statistics-content .welcome-block h2 span,
html[data-theme="dark"] .statistics-content .welcome-block h2 span { color: #f4d875; }
.statistics-content .welcome-block > p:last-child,
html[data-theme="dark"] .statistics-content .welcome-block > p:last-child { max-width: 620px; margin: 0; color: #e1ddd4; font-size: 14px; }
.statistics-content .analytics-toolbar {
  gap: 24px;
  align-items: end;
  margin: 0 0 18px;
  padding: 0;
}
.statistics-content .analytics-toolbar h2 { margin-top: 5px; font-size: clamp(22px, 2vw, 29px); font-weight: 700; }
.statistics-content .analytics-toolbar > div > p:last-child { color: var(--core-premium-muted); font-size: 13px; }
.statistics-content #analytics-filters :is(input, button, summary) {
  border-radius: 9px;
  border-color: var(--core-premium-border);
  background: var(--core-premium-surface);
  color: var(--core-text);
  font-size: 12px;
}
.statistics-content #analytics-filters input { color-scheme: light; }
html[data-theme="dark"] .statistics-content #analytics-filters input { color-scheme: dark; }
.statistics-content #analytics-filters button[type="submit"] {
  border-color: var(--core-premium-gold);
  background: var(--core-premium-gold);
  color: #181511;
  font-weight: 800;
}
.statistics-content .analytics-metrics { gap: 14px; }
.statistics-content .analytics-metrics article {
  position: relative;
  min-height: 150px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--core-premium-border) !important;
  border-radius: 16px;
  background: var(--core-premium-surface);
  box-shadow: var(--core-premium-shadow);
}
.statistics-content .analytics-metrics article::before {
  position: absolute;
  top: 0;
  left: 22px;
  width: 35px;
  height: 3px;
  background: var(--core-premium-gold);
  content: "";
}
.statistics-content .analytics-metrics strong { color: var(--core-text); font-size: clamp(31px, 3vw, 40px); }
.statistics-content .analytics-metrics :is(span, small) { color: var(--core-premium-muted); }
.statistics-content .chart-card { padding: clamp(19px, 2vw, 28px); }
.statistics-content .chart-card h3 { color: var(--core-text); font-size: 18px; font-weight: 700; }
.statistics-content .bar-track { height: 8px; border-radius: 100px; background: #eae7df; }
.statistics-content .bar-fill { border-radius: inherit; background: #b89a4f; }
.statistics-content .bar-row:nth-child(even) .bar-fill { background: #242220; }
html[data-theme="dark"] .statistics-content .bar-track { background: #2c2a25; }
html[data-theme="dark"] .statistics-content .bar-row:nth-child(even) .bar-fill { background: #ddd5c6; }
.statistics-content .bar-row strong,
.statistics-content .bar-row span { color: var(--core-premium-muted); }

/* Profile: the photograph, account form and appearance switch read as one flow. */
.profile-content .profile-intro {
  max-width: none;
  margin: 0 0 22px;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid var(--core-premium-border);
  border-radius: 18px;
  background: linear-gradient(105deg, var(--core-premium-surface), rgba(232,198,103,.15));
  box-shadow: var(--core-premium-shadow);
}
.profile-content .profile-intro h2 { color: var(--core-text); font-size: clamp(28px, 3vw, 40px); font-weight: 720; line-height: 1.14; }
.profile-content .profile-intro > p:last-child { margin-top: 10px; color: var(--core-premium-muted); font-size: 14px; }
.profile-content .photo-card,
.profile-content .details-card { padding: clamp(22px, 2.4vw, 32px); }
.profile-content .photo-card { background: linear-gradient(165deg, var(--core-premium-surface), rgba(232,198,103,.075)); }
.profile-content .photo-copy h3,
.profile-content .details-heading h3 { color: var(--core-text); font-size: 19px; font-weight: 720; }
.profile-content .photo-copy > p:last-child,
.profile-content .profile-field small,
.profile-content .profile-metadata span { color: var(--core-premium-muted); }
.profile-content .profile-photo { border: 3px solid var(--core-premium-gold); box-shadow: 0 14px 30px rgba(25,22,15,.18); }
.profile-content .profile-field label { color: var(--core-text); font-size: 12px; }
.profile-content .profile-field input[readonly] { background: #f3f1eb; color: #77736c; }
html[data-theme="dark"] .profile-content .profile-field input[readonly] { background: #22211e; color: #b0aaa0; }
.profile-content .profile-metadata { border-color: var(--core-premium-border); }
.profile-content .profile-metadata div + div { border-color: var(--core-premium-border); }
.profile-content .profile-metadata strong { color: var(--core-text); font-size: 13px; }
.profile-content .profile-status { border-color: var(--core-premium-border); color: var(--core-text); }
.profile-content .profile-status i { background: var(--core-premium-gold); }
.profile-content .appearance-card { grid-template-columns: minmax(210px, .75fr) minmax(0, 1.35fr); padding: clamp(22px, 2.4vw, 32px); }
.profile-content .appearance-card h3 { font-size: 20px; }
.profile-content .theme-option { border-radius: 13px; }
.profile-content .theme-choice input:checked + .theme-option { border-color: #b49852; box-shadow: inset 0 0 0 1px #b49852, 0 8px 18px rgba(30,25,15,.09); }
html[data-theme="dark"] .profile-content .theme-choice input:checked + .theme-option { border-color: var(--core-premium-gold); box-shadow: inset 0 0 0 1px var(--core-premium-gold); }
.profile-content .delete-photo-action { border-radius: 10px; }

/* Public consent form uses the same brand materials without exposing internal UI. */
.consent-page {
  background:
    radial-gradient(circle at 90% 0, rgba(232,198,103,.18), transparent 34rem),
    linear-gradient(145deg, #f7f6f2, #eae8e1);
}
.consent-card {
  position: relative;
  overflow: hidden;
  max-width: 760px;
  border: 1px solid var(--core-premium-border);
  border-radius: 20px;
  background: var(--core-premium-surface);
  box-shadow: 0 25px 65px rgba(26,20,9,.12);
}
.consent-card::before { position: absolute; inset: 0 0 auto; height: 5px; background: var(--core-premium-gold); content: ""; }
.consent-card .eyebrow { color: #85703c; }
.consent-card h1 { font-size: clamp(30px, 3vw, 42px); letter-spacing: -.04em; }
.consent-card form > button { border-color: var(--core-premium-gold); background: var(--core-premium-gold); color: #16130c; }
.consent-card form > button:hover { border-color: #d5b453; background: #d5b453; color: #16130c; }
.consent-card .terms-text { border-color: var(--core-premium-border); background: #f7f5ee; }
html[data-theme="dark"] .consent-page { background: radial-gradient(circle at 90% 0, rgba(232,198,103,.08), transparent 34rem), #10100f; }
html[data-theme="dark"] .consent-card { background: #191919; }
html[data-theme="dark"] .consent-card .terms-text { background: #22211e; color: #e7e2d8; }

@media (max-width: 1100px) {
  .profile-content .appearance-card { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .main-content:not(.home-content):not(.community-page) > :is(.topbar, .record-view-topbar, .map-topbar) {
    min-height: 0;
    margin-top: 4px;
    padding: 21px;
    border-radius: 15px;
  }
  .main-content:not(.home-content):not(.community-page) > :is(.topbar, .record-view-topbar, .map-topbar)::before { left: 21px; }
  .statistics-content .welcome-block { min-height: 250px; padding: 26px 22px; border-radius: 15px; background-position: 61% center; }
  .statistics-content .welcome-block::before { left: 22px; }
  .statistics-content .analytics-toolbar { align-items: stretch; }
  .statistics-content .analytics-metrics { grid-template-columns: minmax(0, 1fr); }
  .statistics-content .analytics-metrics article { min-height: 126px; }
  .profile-content .profile-intro { padding: 22px; }
  .profile-content .photo-card,
  .profile-content .details-card,
  .profile-content .appearance-card { padding: 20px; }
}
