/* Mlink's existing navy / gold palette. Keep data, routes and controls intact. */
body[data-theme="blue"] {
  --crm-canvas:#F6F7F9;
  --crm-surface:#fff;
  --crm-surface-subtle:#EEF2F6;
  --crm-sidebar:#102A43;
  --crm-field:#F7F8FA;
  --crm-avatar-bg:#EEF2F6;
  --crm-text:#182230;
  --crm-text-muted:#667085;
  --crm-brand:#102A43;
  --crm-brand-hover:#183E5D;
  --crm-brand-pressed:#0B1F33;
  --crm-brand-soft:#F5EBDD;
  --crm-gold:#C6A15B;
  --crm-gold-ink:#765A27;
  --crm-ink-blue:#102A43;
  --crm-border:#E7EAF0;
  --crm-border-control:#B9C3CE;
  --crm-price:#C5533D;
  --crm-danger:#C5533D;
  --crm-danger-soft:#FBEDEA;
  --crm-success:#16825D;
  --crm-success-soft:#EAF5F0;
  --crm-info:#102A43;
  --crm-info-soft:#EEF2F6;
  --crm-warning:#765A27;
  --crm-warning-soft:#F5EBDD;
  --crm-grade-a:#B45309;
  --crm-grade-b:#226BA5;
  --crm-grade-c:#667085;
  --crm-grade-a-soft:#FFF0DF;
  --crm-grade-b-soft:#E5F0FB;
  --crm-grade-c-soft:#ECEFF3;
  --blue-grade-a:var(--crm-grade-a);
  --blue-grade-b:var(--crm-grade-b);
  --blue-grade-c:var(--crm-grade-c);
  --blue-card-light:linear-gradient(transparent,transparent);
  --crm-shadow-card:0 4px 14px rgb(16 42 67 / 5%);
  --crm-focus-ring:0 0 0 2px var(--crm-gold);
}
body[data-theme="blue"] .sidebar { background:var(--crm-sidebar);border-color:var(--crm-sidebar); }
body[data-theme="blue"] :is(.brand small,.sidebar-bottom,.nav-link) { color:#DCE4ED; }
body[data-theme="blue"] .nav-link>svg { color:var(--crm-gold); }
body[data-theme="blue"] .nav-link.active { color:var(--crm-brand);background:var(--crm-brand-soft);box-shadow:none; }
body[data-theme="blue"] .nav-link.active>svg { color:var(--crm-gold-ink); }
body[data-theme="blue"] .preview-bar { background:var(--crm-surface);border-color:var(--crm-border); }
body[data-theme="blue"] :is(.section,.blue-related,.resource-card,.community-card,.contact-card) { background:var(--crm-surface);background-image:none;border-color:var(--crm-border); }
body[data-theme="blue"] :is(.btn,.prop-owner) { background-image:none;box-shadow:none; }
body[data-theme="blue"] :is(.btn.secondary,.blue-back,.icon-btn[aria-label^="返回"],.blue-customer-phone,.local-data-button) { color:var(--crm-brand);background:var(--crm-surface-subtle);border-color:var(--crm-border);box-shadow:none; }
body[data-theme="blue"] :is(.search,.form-field input,.form-field textarea,.form-field select,.prop-sort select,.followup-composer textarea) { border-color:var(--crm-border-control);box-shadow:none; }
body[data-theme="blue"] :is(input,textarea) { caret-color:var(--crm-brand); }
body[data-theme="blue"] :is(.material-controls select,.material-fields input,.material-fields textarea,.cloud-login input) { color:var(--crm-text);border-color:var(--crm-border-control); }
body[data-theme="blue"] input { accent-color:var(--crm-brand); }
body[data-theme="blue"] ::selection { background:var(--crm-brand-soft);color:var(--crm-brand); }
body[data-theme="blue"] :focus-visible { outline-color:var(--crm-brand); }
body[data-theme="blue"] .sidebar :focus-visible { outline-color:var(--crm-gold); }
body[data-theme="blue"] :is(.field-grid dt,.community-fields dt,.contact-facts dt) { color:var(--crm-text-muted); }
body[data-theme="blue"] :is(.field-grid dd,.community-fields dd,.contact-facts dd) { color:var(--crm-text); }
body[data-theme="blue"] :is(.blue-room-badge,.property-tag) { color:var(--crm-gold-ink);background:var(--crm-brand-soft);border-color:#E6D3B0;box-shadow:none; }
body[data-theme="blue"] .property-tag { --tag-ink:var(--crm-gold-ink);--tag-bg:var(--crm-brand-soft);--tag-border:#E6D3B0; }
body[data-theme="blue"] :is(.blue-property-tax,.contact-phone) { color:var(--crm-brand); }
body[data-theme="blue"] .blue-property-tax>span { background:var(--crm-field);border-color:var(--crm-border); }
body[data-theme="blue"] :is(.blue-related-image,.community-card-cover,.contact-avatar,.resource-symbol) { color:var(--crm-brand);background:var(--crm-surface-subtle);border-color:var(--crm-border); }
body[data-theme="blue"] :is(.blue-property-notes,.contact-note,.community-fields) { border-color:var(--crm-border); }
/* ABC grades stay distinct within the navy / gold theme. */
body[data-theme="blue"] :is(.a,[data-rank="A"],.customer-preview-grade-a) { --grade-color:var(--crm-grade-a);--grade-soft:var(--crm-grade-a-soft); }
body[data-theme="blue"] :is(.b,[data-rank="B"],.customer-preview-grade-b) { --grade-color:var(--crm-grade-b);--grade-soft:var(--crm-grade-b-soft); }
body[data-theme="blue"] :is(.c,[data-rank="C"],.customer-preview-grade-c) { --grade-color:var(--crm-grade-c);--grade-soft:var(--crm-grade-c-soft); }
body[data-theme="blue"] .customer-preview-grade-a { --maintenance-surface:#F8D4B0; }
body[data-theme="blue"] .customer-preview-grade-b { --maintenance-surface:#C7DEF1; }
body[data-theme="blue"] .customer-preview-grade-c { --maintenance-surface:#D8DDE4; }
body[data-theme="blue"] .customer-preview-card { color:var(--crm-text);border-color:var(--grade-color); }
body[data-theme="blue"] .customer-preview-card :is(p,.avatar) { color:var(--crm-brand); }
body[data-theme="blue"] :is(.task-wrap,.blue-related-card,.blue-day-task) { --blue-card-ink:var(--crm-text); }
body[data-theme="blue"] :is(.task-wrap:not(.is-done),.blue-related-card[data-rank]:not([data-rank=""]),.blue-day-task:not(.done)) { background:var(--grade-soft);color:var(--crm-text);border-color:var(--grade-color); }
body[data-theme="blue"] .task-wrap:not(.is-done) .task-body { background:var(--grade-soft);border-left:3px solid var(--grade-color); }
body[data-theme="blue"] .task-wrap:not(.is-done) .task-grade { color:#fff;background:var(--grade-color); }
body[data-theme="blue"] .blue-day-task:not(.done) .blue-grade-dot { background:var(--grade-color); }
body[data-theme="blue"] .grade-indicator { border-color:var(--crm-gold); }
body[data-theme="blue"] .cloud-login { color:var(--crm-text);background:var(--crm-surface);border-color:var(--crm-border); }
body[data-theme="blue"] .cloud-login::backdrop { background:rgb(16 42 67 / 24%); }
body[data-theme="blue"] .cloud-login p { color:var(--crm-text-muted); }
body[data-theme="blue"] .cloud-login .form-error { color:var(--crm-danger); }
body[data-theme="blue"] .material-tool { color:var(--crm-brand);background:var(--crm-surface);border-color:var(--crm-border); }
body[data-theme="blue"] .material-tool>span { color:var(--crm-gold-ink);background:var(--crm-brand-soft); }
body[data-theme="blue"] .material-summary header>strong { color:var(--crm-price); }

/* Image, title, layout/area, existing room/school, then price and tags. */
body[data-theme="blue"] .prop-grid { grid-template-columns:repeat(auto-fill,minmax(224px,1fr));gap:12px;align-items:stretch; }
body[data-theme="blue"] .prop-card { display:flex;flex-direction:column;padding:6px;background:var(--crm-surface);color:var(--crm-text);border:1px solid var(--crm-border);border-radius:12px; }
body[data-theme="blue"] .prop-card[data-rank]:not([data-rank=""]) { --crm-text-muted:#536174;background:var(--grade-soft);border-color:var(--grade-color); }
body[data-theme="blue"] .prop-card .prop-cover { aspect-ratio:3/2;background:var(--crm-surface-subtle);color:var(--crm-brand);border:0;border-radius:8px;overflow:hidden; }
body[data-theme="blue"] .prop-card-info { display:flex;flex:1;flex-direction:column;padding:8px 4px 4px;background:transparent;color:var(--crm-text); }
body[data-theme="blue"] .prop-card-title { display:block; }
body[data-theme="blue"] .prop-card .prop-card-title strong { display:block;width:auto;font-size:16px;line-height:24px;font-weight:600;color:var(--crm-text);white-space:normal;overflow-wrap:anywhere; }
body[data-theme="blue"] .prop-card .prop-card-title :is(strong,.price) { color:var(--crm-text); }
body[data-theme="blue"] .prop-card .prop-card-info :is(.prop-card-facts,.prop-room,.prop-card-school) { color:var(--crm-text-muted);font-size:13px;line-height:20px; }
body[data-theme="blue"] .prop-card-inline { flex-wrap:wrap;gap:2px 8px;margin-top:4px; }
body[data-theme="blue"] .prop-card-inline>span { flex:0 1 auto;min-width:0;white-space:normal;overflow-wrap:anywhere; }
body[data-theme="blue"] .prop-card-inline>span:first-child { flex-basis:auto;overflow:visible; }
body[data-theme="blue"] .prop-room { margin:2px 0 0; }
body[data-theme="blue"] .prop-card-school { margin:2px 0 0; }
body[data-theme="blue"] .prop-card-school>span { white-space:normal;overflow-wrap:anywhere; }
body[data-theme="blue"] .prop-card-footer { display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;margin-top:auto;padding-top:6px; }
body[data-theme="blue"] .prop-card-footer .price { color:var(--crm-price);font-size:20px;line-height:28px;white-space:normal;overflow-wrap:anywhere; }
body[data-theme="blue"] .prop-card-footer .property-tags { margin:0; }
body[data-theme="blue"] .prop-card-footer .property-tag { padding:2px 5px;font-size:12px; }

/* Mlink detail order, using the original field and action markup once each. */
body[data-theme="blue"] .blue-property-info { display:flex;flex-direction:column;gap:16px;padding:16px;background:var(--crm-surface); }
body[data-theme="blue"] .blue-property-media { width:100%;align-self:auto; }
body[data-theme="blue"] .property-hero-stage { flex:none;aspect-ratio:16/9;min-height:0;max-height:420px;background:var(--crm-surface-subtle);border-radius:12px; }
body[data-theme="blue"] .property-hero-stage .blue-cover-open>img { object-fit:contain; }
body[data-theme="blue"] .property-hero-stage.is-empty { min-height:110px;max-height:none;aspect-ratio:auto;background:var(--crm-field);border-color:var(--crm-border-control); }
body[data-theme="blue"] .property-upload-space { color:var(--crm-brand);background:var(--crm-field);border-color:var(--crm-border-control); }
body[data-theme="blue"] .mobile-property-heading { display:grid;gap:10px;margin:0; }
body[data-theme="blue"] .blue-property-title { display:flex;flex-wrap:wrap;gap:8px; }
body[data-theme="blue"] .blue-property-title h1 { flex:1;min-width:0;font-size:22px;line-height:30px; }
body[data-theme="blue"] .blue-room-badge { font-weight:500;white-space:normal;overflow-wrap:anywhere;max-width:100%; }
body[data-theme="blue"] .blue-property-price-row { justify-content:space-between;gap:8px;margin:0; }
body[data-theme="blue"] .blue-property-price-row .prop-detail-actions { margin:0;gap:8px;flex-wrap:wrap; }
body[data-theme="blue"] .blue-property-body { display:block; }
body[data-theme="blue"] .blue-property-meta { display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 12px; }
body[data-theme="blue"] .blue-property-meta :is(.detail-sector,.blue-property-tax,.property-tags) { margin:0;order:0; }
body[data-theme="blue"] .blue-property-data .field-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px; }
body[data-theme="blue"] .blue-property-data .field-grid>div { min-width:0;grid-template-columns:56px minmax(0,1fr); }
body[data-theme="blue"] .blue-property-data .field-grid>.mobile-wide { grid-column:1/-1;order:1; }
body[data-theme="blue"] .blue-property-data .blue-property-notes { margin-top:12px;padding-top:12px;border-top:1px solid var(--crm-border); }
body[data-theme="blue"] .property-media-footer { display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding-top:12px;border-top:1px solid var(--crm-border);margin:0; }
body[data-theme="blue"] .property-media-footer .prop-owners { flex:1 1 280px;display:flex;flex-wrap:wrap;gap:8px;margin:0; }
body[data-theme="blue"] .property-media-footer .prop-owner { font-size:14px;padding:8px 10px; }
body[data-theme="blue"] .property-media-footer .blue-property-pager { position:static;display:flex;align-self:auto;gap:8px;margin:0 0 0 auto;padding:0; }
body[data-theme="blue"] .property-media-footer .blue-property-pager .btn { min-height:44px;font-size:14px; }
body[data-theme="blue"] :is(.blue-back,.prop-detail-actions .btn,.property-media-footer .btn,.property-media-footer .text-btn,.property-media-footer .prop-owner) { min-height:44px; }
body[data-theme="blue"] .blue-back { min-width:44px;width:44px;height:44px; }

@media (hover:hover) {
  body[data-theme="blue"] :is(.prop-card,.customer-preview-card,.community-card,.contact-card):hover { border-color:var(--crm-gold); }
  body[data-theme="blue"] .property-upload-space:hover { background:var(--crm-brand-soft); }
}
@media (max-width:767px) {
  body[data-theme="blue"] .prop-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
  body[data-theme="blue"] .prop-card .prop-card-title strong { font-size:15px;line-height:22px; }
  body[data-theme="blue"] .prop-toolbar :is(.grade,.btn,.search,.prop-sort select) { height:auto;min-height:44px; }
  body[data-theme="blue"] .blue-property-info { gap:12px;padding:12px; }
  body[data-theme="blue"] .blue-property-title h1 { font-size:18px;line-height:26px; }
  body[data-theme="blue"] .blue-room-badge { margin-left:52px;font-size:13px; }
  body[data-theme="blue"] .blue-property-price-row { flex-wrap:wrap; }
  body[data-theme="blue"] .blue-property-price-row .prop-field-price { font-size:24px;line-height:32px; }
  body[data-theme="blue"] .prop-detail-actions .btn { font-size:13px;padding:6px 10px; }
  body[data-theme="blue"] .blue-property-data .field-grid { gap:6px 8px; }
  body[data-theme="blue"] .blue-property-data .field-grid>div { grid-template-columns:52px minmax(0,1fr);gap:6px; }
  body[data-theme="blue"] .blue-property-data .field-grid :is(dt,dd) { font-size:13px;line-height:22px; }
  body[data-theme="blue"] .blue-property-notes p { font-size:14px;line-height:24px; }
  body[data-theme="blue"] .property-media-footer .blue-property-pager { width:100%;justify-content:space-between; }
  body[data-theme="blue"] .mobile-nav { background:var(--crm-surface); }
  body[data-theme="blue"] .mobile-nav::before { background:var(--crm-surface);border-color:var(--crm-border);box-shadow:0 -4px 16px rgb(16 42 67 / 6%); }
  body[data-theme="blue"] .mobile-nav a { color:var(--crm-text-muted); }
  body[data-theme="blue"] .mobile-nav a.active { color:var(--crm-brand);background:var(--crm-brand-soft);box-shadow:none; }
}
