/* SmartHome content only; the workspace shell owns global navigation. */

#cq-smart-home[hidden], #cq-cc-standard-overview[hidden] { display: none !important; }
body[data-workspace-mode="smarthome"] .cq-command-center[data-tab="overview"] > .cq-cc-hero { display: none; }
body[data-workspace-mode="turnkey"] .cq-sm-nav-growth { display: none; }
.cq-sm-nav-growth { display: flex; flex-direction: column; gap: 3px; }
.cq-sm-nav-growth button { white-space: normal; }
.cq-sm-nav-growth button.active { background: #e8f5ed; color: #087f5b; }
.cq-sm-preview-note { background: #fff6dd; border: 1px solid #ead7a3; border-radius: 10px; color: #735a1c; font-size: 12px; line-height: 1.55; margin: 12px; padding: 12px 14px; }
.cq-sm-preview-note p { margin: 0; }
.cq-sm-preview-note button { background: #fff; border: 1px solid #c7b16f; border-radius: 7px; color: #584714; cursor: pointer; font-size: 12px; font-weight: 700; margin-top: 9px; min-height: 44px; padding: 8px 12px; }
body[data-workspace-mode="smarthome"].role-owner :is(.theme-switcher-pill, .role-switcher-box, .branch-badge, #btn-mode-warroom, #btn-open-ai-consult, .floating-ai-consult-widget, .btn-topbar-affiliate, .btn-topbar-wealth) { display: none !important; }

#cq-smart-home {
    --sm-ink: #173c36;
    --sm-muted: #435b53;
    --sm-teal: #126956;
    --sm-teal-soft: #eaf4ed;
    --sm-line: #d7e5da;
    --sm-paper: #fffdf8;
    --sm-sand: #f5f1e7;
    color: var(--sm-ink);
    padding: 22px 26px 20px;
}
#cq-smart-home *, #cq-smart-home *::before, #cq-smart-home *::after { box-sizing: border-box; }
#cq-smart-home [hidden] { display: none !important; }
#cq-smart-home section { min-width: 0; scroll-margin-top: 20px; }
#cq-smart-home button, #cq-smart-home textarea, #cq-smart-home a { font: inherit; }
#cq-smart-home button, #cq-smart-home a { -webkit-tap-highlight-color: transparent; }
#cq-smart-home button { cursor: pointer; }
#cq-smart-home a { color: inherit; text-decoration: none; }
#cq-smart-home :is(button, a, textarea, input):focus-visible { outline: 3px solid #96bbaa; outline-offset: 3px; }
#cq-smart-home .cq-sm-hero { align-items: center; display: flex; gap: 16px; justify-content: space-between; margin: 0 0 16px; }
#cq-smart-home .cq-sm-eyebrow { color: var(--sm-muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; line-height: 1.5; margin: 0 0 5px; }
#cq-smart-home .cq-sm-hero h3 { color: var(--sm-ink); font-size: clamp(22px, 2.5vw, 31px); font-weight: 800; letter-spacing: -.035em; line-height: 1.15; margin: 0; max-width: 580px; }
#cq-smart-home .cq-sm-primary { align-items: center; background: var(--sm-teal); border: 1px solid var(--sm-teal); border-radius: 10px; color: #fff; display: inline-flex; font-size: 12px; font-weight: 800; gap: 18px; justify-content: space-between; min-height: 44px; padding: 11px 15px; }
#cq-smart-home .cq-sm-primary:hover { background: #0c5847; border-color: #0c5847; }
#cq-smart-home .cq-sm-primary:disabled { cursor: wait; opacity: .6; }
#cq-smart-home .cq-sm-primary > span { font-size: 18px; line-height: 1; }
#cq-smart-home .cq-sm-rhythm { border-bottom: 1px solid var(--sm-line); display: flex; gap: 24px; margin-bottom: 16px; }
#cq-smart-home .cq-sm-rhythm a { align-items: center; border-bottom: 2px solid transparent; color: var(--sm-muted); display: flex; font-size: 12px; font-weight: 700; gap: 6px; min-height: 44px; padding: 0 0 11px; }
#cq-smart-home .cq-sm-rhythm a:first-child { border-bottom-color: var(--sm-teal); color: var(--sm-teal); }
#cq-smart-home .cq-sm-rhythm a:hover { color: var(--sm-teal); }
#cq-smart-home .cq-sm-rhythm a > span { color: #435b53; font-size: 11px; font-weight: 600; }
#cq-smart-home .cq-sm-section-head { align-items: flex-start; display: flex; gap: 12px; justify-content: space-between; margin-bottom: 15px; }
#cq-smart-home .cq-sm-section-head h4 { color: var(--sm-ink); font-size: 17px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; margin: 0; }
#cq-smart-home .cq-sm-section-head-compact { align-items: baseline; flex-wrap: wrap; gap: 5px 12px; margin-bottom: 10px; }
#cq-smart-home .cq-sm-section-head-compact h4 { font-size: 12px; font-weight: 700; letter-spacing: 0; }
#cq-smart-home .cq-sm-date { color: var(--sm-muted); font-size: 11.5px; line-height: 1.4; }
#cq-smart-home .cq-sm-drive, #cq-smart-home .cq-sm-monitor { background: rgba(255,255,255,.72); border: 1px solid var(--sm-line); border-radius: 16px; margin: 0 0 16px; padding: 17px 19px; }
#cq-smart-home .cq-sm-drive-head { align-items: flex-start; display: flex; gap: 14px; justify-content: space-between; }
#cq-smart-home .cq-sm-drive-head h4 { color: var(--sm-ink); font-size: 16px; margin: 0; }
#cq-smart-home .cq-sm-drive-intro { color: var(--sm-muted); font-size: 12px; line-height: 1.5; margin: 5px 0 0; max-width: 720px; }
#cq-smart-home .cq-sm-drive-status, #cq-smart-home .cq-sm-monitor-status { background: #f2f5ef; border: 1px solid #dae5d8; border-radius: 7px; color: #354a3e; flex: 0 0 auto; font-size: 11px; font-weight: 800; line-height: 1.4; padding: 6px 10px; }
#cq-smart-home .cq-sm-drive-status[data-state="ready"] { background: #e8f3eb; border-color: #cee3d3; color: #326a49; }
#cq-smart-home .cq-sm-drive-status[data-state="target"] { background: #fff5dd; border-color: #ecdbaa; color: #80601e; }
#cq-smart-home .cq-sm-drive-options { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 13px; }
#cq-smart-home .cq-sm-drive-options button { background: #fff; border: 1px solid var(--sm-line); border-radius: 10px; color: var(--sm-ink); cursor: pointer; min-height: 68px; padding: 10px 11px; text-align: left; }
#cq-smart-home .cq-sm-drive-options button:hover, #cq-smart-home .cq-sm-drive-options button[aria-pressed="true"] { background: var(--sm-teal-soft); border-color: #98c4a5; }
#cq-smart-home .cq-sm-drive-options button[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--sm-teal); }
#cq-smart-home .cq-sm-drive-options strong, #cq-smart-home .cq-sm-drive-options span { display: block; }
#cq-smart-home .cq-sm-drive-options strong { font-size: 13px; line-height: 1.35; }
#cq-smart-home .cq-sm-drive-options span { color: var(--sm-muted); font-size: 11.5px; line-height: 1.45; margin-top: 4px; }
#cq-smart-home .cq-sm-automation-state { border-top: 1px dashed #dce7dc; color: var(--sm-muted); font-size: 11.5px; line-height: 1.5; margin: 12px 0 0; padding-top: 9px; }
#cq-smart-home .cq-sm-autopilot-readiness { background: #fff8e8; border: 1px solid #ecdbaa; border-radius: 10px; margin-top: 11px; padding: 11px 13px; }
#cq-smart-home .cq-sm-autopilot-readiness[hidden] { display: none !important; }
#cq-smart-home .cq-sm-autopilot-readiness h5, #cq-smart-home .cq-sm-risk-wrap h5 { color: var(--sm-ink); font-size: 11px; margin: 0 0 4px; }
#cq-smart-home .cq-sm-autopilot-readiness p { color: #6b4d10; font-size: 11.5px; font-weight: 800; line-height: 1.5; margin: 0 0 6px; }
#cq-smart-home .cq-sm-autopilot-readiness ul { color: #5c4109; font-size: 11.5px; line-height: 1.55; margin: 0; padding-left: 18px; }
#cq-smart-home .cq-sm-monitor { background: #fbfcf8; }
#cq-smart-home .cq-sm-monitor .cq-sm-section-head { align-items: baseline; margin-bottom: 11px; }
#cq-smart-home .cq-sm-monitor-status { font-size: 9px; font-weight: 700; }
#cq-smart-home .cq-sm-monitor-note { color: var(--sm-muted); font-size: 10px; line-height: 1.5; margin: -2px 0 12px; }
#cq-smart-home .cq-sm-system-map { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
#cq-smart-home .cq-sm-system-card { background: #fff; border: 1px solid #e0e9df; border-radius: 9px; min-width: 0; padding: 10px; }
#cq-smart-home .cq-sm-system-card > span { color: #769080; display: block; font-size: 9px; font-weight: 800; letter-spacing: .03em; }
#cq-smart-home .cq-sm-system-card > strong { display: block; font-size: 12px; line-height: 1.35; margin: 4px 0; overflow-wrap: anywhere; }
#cq-smart-home .cq-sm-system-card > small { color: var(--sm-muted); display: block; font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
#cq-smart-home .cq-sm-system-card[data-state="ready"] { border-color: #cce3d2; }
#cq-smart-home .cq-sm-system-card[data-state="warning"] { border-color: #ead8aa; }
#cq-smart-home .cq-sm-system-card[data-state="unknown"] { border-color: #dce2dc; }
#cq-smart-home .cq-sm-risk-wrap { border-top: 1px dashed #dce7dc; margin-top: 12px; padding-top: 10px; }
#cq-smart-home .cq-sm-risk-list:empty::after { color: var(--sm-muted); content: "Chưa có cảnh báo từ dữ liệu đã đọc."; display: block; font-size: 10px; line-height: 1.5; }
#cq-smart-home .cq-sm-risk { background: #fff6e7; border: 1px solid #ecdbb0; border-radius: 8px; color: #72591d; font-size: 10px; line-height: 1.5; margin-top: 6px; padding: 8px 9px; }
#cq-smart-home .cq-sm-risk strong { display: block; font-size: 10px; margin-bottom: 2px; }
#cq-smart-home .cq-sm-metrics { display: grid; gap: 9px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
#cq-smart-home .cq-sm-metric { background: rgba(255,255,255,.88); border: 1px solid var(--sm-line); border-radius: 12px; min-width: 0; padding: 13px 14px; }
#cq-smart-home .cq-sm-metric-main { background: var(--sm-teal-soft); border-color: #c8ddcd; }
#cq-smart-home .cq-sm-metric-source { background: var(--sm-sand); border-color: #e5ded0; }
#cq-smart-home .cq-sm-metric > span { color: var(--sm-muted); display: block; font-size: 11px; font-weight: 700; line-height: 1.4; }
#cq-smart-home .cq-sm-metric > strong { display: block; font-size: clamp(17px, 1.8vw, 24px); font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -.035em; line-height: 1.25; margin: 6px 0 4px; overflow-wrap: anywhere; }
#cq-smart-home .cq-sm-metric-main > strong { color: var(--sm-teal); }
#cq-smart-home .cq-sm-metric > small { color: var(--sm-muted); display: block; font-size: 9px; line-height: 1.5; }
#cq-smart-home .cq-sm-workflow, #cq-smart-home .cq-sm-bottom-grid { align-items: start; display: grid; gap: 16px; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
#cq-smart-home[data-drive-mode="manual"] .cq-sm-workflow { grid-template-columns: minmax(0, 1fr); }
#cq-smart-home[data-drive-mode="manual"] .cq-sm-hero > .cq-sm-primary,
#cq-smart-home[data-drive-mode="manual"] .cq-sm-rhythm a[href="#cq-sm-ai"] { display: none; }
#cq-smart-home .cq-sm-panel { background: #fff; border: 1px solid var(--sm-line); border-radius: 16px; min-width: 0; padding: 19px; }
#cq-smart-home .cq-sm-priorities { border-top: 3px solid var(--sm-teal); padding-top: 17px; }
#cq-smart-home .cq-sm-section-mark { color: var(--sm-teal); font-size: 23px; line-height: 1; }
#cq-smart-home .cq-sm-actions { display: grid; gap: 9px; }
#cq-smart-home .cq-sm-actions:empty::after { color: var(--sm-muted); content: "Đang đọc các việc cần chú ý…"; font-size: 12px; line-height: 1.5; padding: 6px 0; }
#cq-smart-home :is(.cq-sm-action, .cq-sm-actions > article) { background: #f7f9f5; border: 1px solid #e4ebe1; border-radius: 10px; padding: 12px; }
#cq-smart-home :is(.cq-sm-action, .cq-sm-actions > article):first-child { background: #f8f3e8; border-color: #e8dcc1; }
#cq-smart-home :is(.cq-sm-action, .cq-sm-actions > article) :is(h3, h4, h5, strong) { display: block; font-size: 13px; font-weight: 800; line-height: 1.4; margin: 0 0 4px; }
#cq-smart-home :is(.cq-sm-action, .cq-sm-actions > article) p { color: var(--sm-muted); font-size: 11px; line-height: 1.5; margin: 4px 0; }
#cq-smart-home :is(.cq-sm-action, .cq-sm-actions > article) button { margin-top: 7px; }
#cq-smart-home .cq-sm-ai { background: linear-gradient(145deg, #edf6ee, #fcf9ef); }
#cq-smart-home .cq-sm-ai-mark { align-items: center; background: #fff; border: 1px solid #d0e2d3; border-radius: 9px; color: var(--sm-teal); display: flex; flex: 0 0 35px; font-size: 11px; font-weight: 900; height: 35px; justify-content: center; }
#cq-smart-home .cq-sm-question-form { display: grid; gap: 8px; }
#cq-smart-home .cq-sm-question-form label { color: var(--sm-ink); font-size: 11px; font-weight: 700; }
#cq-smart-home .cq-sm-question-form textarea { background: #fff; border: 1px solid #c8dacf; border-radius: 10px; color: var(--sm-ink); font-size: 13px; line-height: 1.5; min-height: 78px; padding: 11px 12px; resize: vertical; width: 100%; }
#cq-smart-home .cq-sm-question-form textarea::placeholder { color: #788b80; }
#cq-smart-home .cq-sm-question-form .cq-sm-primary { justify-self: stretch; margin-top: 2px; }
#cq-smart-home .cq-sm-note { color: var(--sm-muted); font-size: 10px; line-height: 1.5; margin: 9px 0 0; }
#cq-smart-home #cq-sm-question-status:empty { display: none; }
#cq-smart-home .cq-sm-team { margin: 27px 0 20px; }
#cq-smart-home .cq-sm-text-button { background: transparent; border: 0; color: var(--sm-teal); flex-shrink: 0; font-size: 11px; font-weight: 800; line-height: 1.4; min-height: 44px; padding: 0; text-align: left; }
#cq-smart-home .cq-sm-text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
#cq-smart-home .cq-sm-agents { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
#cq-smart-home .cq-sm-agents:empty::after { color: var(--sm-muted); content: "Đang kiểm tra dữ liệu cho từng nhóm công việc…"; font-size: 12px; grid-column: 1 / -1; line-height: 1.5; }
#cq-smart-home :is(.cq-sm-agent, .cq-sm-agents > article) { background: #fff; border: 1px solid var(--sm-line); border-radius: 13px; display: flex; flex-direction: column; min-width: 0; padding: 16px; }
#cq-smart-home :is(.cq-sm-agent, .cq-sm-agents > article) :is(h3, h4, h5) { font-size: 14px; font-weight: 800; line-height: 1.35; margin: 11px 0 7px; }
#cq-smart-home :is(.cq-sm-agent, .cq-sm-agents > article) p { color: var(--sm-muted); font-size: 11px; line-height: 1.5; margin: 0 0 10px; overflow-wrap: anywhere; }
#cq-smart-home :is(.cq-sm-agent, .cq-sm-agents > article) > strong { font-size: 14px; line-height: 1.4; margin: 7px 0; }
#cq-smart-home .cq-sm-agent-kicker { align-items: center; display: flex; flex-wrap: wrap; gap: 7px; justify-content: space-between; }
#cq-smart-home .cq-sm-agent-kicker > span:first-child:not(.cq-sm-status) { color: #7b9187; font-size: 10px; font-weight: 800; }
#cq-smart-home .cq-sm-agent-fact { background: #f5f8f2; border-radius: 7px; color: var(--sm-ink); font-size: 11px; line-height: 1.5; margin: 0 0 12px; overflow-wrap: anywhere; padding: 9px; }
#cq-smart-home .cq-sm-agent-actions { display: grid; gap: 6px; margin-top: auto; }
#cq-smart-home .cq-sm-status { align-self: flex-start; background: #f2f2ed; border: 1px solid #e2e3da; border-radius: 5px; color: #637365; display: inline-flex; font-size: 9px; font-weight: 800; line-height: 1.4; padding: 4px 6px; }
#cq-smart-home .cq-sm-status.has-data, #cq-smart-home .cq-sm-status[data-state="ready"] { background: #e8f3eb; border-color: #cee3d3; color: #326a49; }
#cq-smart-home .cq-sm-status.needs-data, #cq-smart-home .cq-sm-status[data-state="partial"] { background: #fff5dd; border-color: #ecdbaa; color: #80601e; }
#cq-smart-home .cq-sm-status.disabled, #cq-smart-home .cq-sm-status[data-state="off"] { background: #f1f2f0; color: #69746c; }
#cq-smart-home .cq-sm-evidence { color: var(--sm-muted); display: block; font-size: 10px; line-height: 1.5; margin: 5px 0 12px; overflow-wrap: anywhere; }
#cq-smart-home :is(.cq-sm-next, .cq-sm-link, .cq-sm-actions button, .cq-sm-agents button) { align-items: center; background: #fff; border: 1px solid #cbdccf; border-radius: 8px; color: var(--sm-teal); display: inline-flex; font-size: 11px; font-weight: 800; justify-content: space-between; line-height: 1.4; min-height: 44px; padding: 9px 11px; text-align: left; }
#cq-smart-home :is(.cq-sm-next, .cq-sm-link, .cq-sm-actions button, .cq-sm-agents button):hover { background: var(--sm-teal-soft); border-color: #9fbea9; }
#cq-smart-home :is(.cq-sm-agent, .cq-sm-agents > article) > button { margin-top: auto; width: 100%; }
#cq-smart-home .cq-sm-bottom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#cq-smart-home .cq-sm-tasks:empty::after { color: var(--sm-muted); content: "Đang đọc công việc trong ngày…"; font-size: 12px; line-height: 1.5; }
#cq-smart-home .cq-sm-task-meta { color: var(--sm-muted); font-size: 10px; line-height: 1.5; margin: 0 0 4px; }
#cq-smart-home .cq-sm-task-meta:empty { display: none; }
#cq-smart-home .cq-sm-task, #cq-smart-home .cq-sm-tasks .cq-cc-task { align-items: center; border-bottom: 1px solid #e8eee5; display: flex; gap: 10px; min-height: 52px; padding: 10px 0; }
#cq-smart-home .cq-sm-task:last-child, #cq-smart-home .cq-sm-tasks .cq-cc-task:last-child { border-bottom: 0; }
#cq-smart-home .cq-sm-tasks input[type="checkbox"] { accent-color: var(--sm-teal); flex: 0 0 18px; height: 18px; margin: 0; width: 18px; }
#cq-smart-home .cq-sm-task strong { display: block; font-size: 12px; font-weight: 700; line-height: 1.5; }
#cq-smart-home .cq-sm-task small { color: var(--sm-muted); display: block; font-size: 10px; line-height: 1.5; }
#cq-smart-home .cq-sm-task-copy { flex: 1; min-width: 0; }
#cq-smart-home .cq-sm-task-copy > span { color: var(--sm-muted); display: block; font-size: 10px; line-height: 1.5; margin-top: 3px; }
#cq-smart-home .cq-sm-task-state { background: #f2f5ee; border-radius: 5px; color: #697b67; flex: 0 0 auto; font-size: 9px; font-weight: 700; padding: 4px 6px; }
#cq-smart-home .cq-sm-shortcuts { display: grid; gap: 0 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#cq-smart-home .cq-sm-shortcuts button { align-items: center; background: transparent; border: 0; border-bottom: 1px solid #e8eee5; color: var(--sm-ink); display: flex; font-size: 11px; font-weight: 700; gap: 6px; justify-content: space-between; line-height: 1.4; min-height: 47px; padding: 10px 0; text-align: left; }
#cq-smart-home .cq-sm-shortcuts button > span:last-child { color: #7d9786; font-size: 16px; }
#cq-smart-home .cq-sm-shortcuts button:hover { color: var(--sm-teal); }
#cq-smart-home .cq-sm-shortcuts button:nth-last-child(-n+2) { border-bottom: 0; }
#cq-smart-home .cq-sm-source-section { align-items: baseline; border-top: 1px dashed #d5e1d5; display: flex; gap: 10px; margin-top: 20px; padding-top: 12px; }
#cq-smart-home .cq-sm-source-section h4 { color: var(--sm-muted); flex-shrink: 0; font-size: 10px; font-weight: 800; line-height: 1.5; margin: 0; }
#cq-smart-home .cq-sm-source-state { color: var(--sm-muted); font-size: 10px; line-height: 1.6; margin: 0; overflow-wrap: anywhere; }
#cq-smart-home .cq-cc-empty { color: var(--sm-muted); font-size: 11px; line-height: 1.6; padding: 5px 0; }
#cq-smart-home .cq-sm-growth { margin: 25px 0 20px; }
#cq-smart-home .cq-sm-growth-head { margin-bottom: 13px; }
#cq-smart-home .cq-sm-growth-intro { color: var(--sm-muted); font-size: 11px; line-height: 1.5; margin: 5px 0 0; max-width: 700px; }
#cq-smart-home .cq-sm-growth-grid { display: grid; gap: 11px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
#cq-smart-home .cq-sm-growth-card { background: #fff; border: 1px solid var(--sm-line); border-radius: 13px; display: flex; flex-direction: column; min-height: 196px; min-width: 0; padding: 15px; }
#cq-smart-home .cq-sm-growth-card:hover { border-color: #a9c6b1; box-shadow: 0 7px 18px rgba(23,60,54,.06); }
#cq-smart-home .cq-sm-growth-card.is-preview { background: #fcfaf3; border-color: #e7dec6; }
#cq-smart-home .cq-sm-growth-topline { align-items: center; display: flex; gap: 7px; justify-content: space-between; min-height: 20px; }
#cq-smart-home .cq-sm-growth-index { color: #789084; font-size: 10px; font-variant-numeric: tabular-nums; }
#cq-smart-home .cq-sm-growth-type { color: #6d8277; font-size: 9px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
#cq-smart-home .cq-sm-growth-preview { background: #fff1cf; border: 1px solid #ead8a5; border-radius: 5px; color: #80601e; font-size: 9px; font-weight: 800; line-height: 1.3; padding: 4px 6px; }
#cq-smart-home .cq-sm-growth-card h5 { color: var(--sm-ink); font-size: 14px; font-weight: 800; line-height: 1.35; margin: 14px 0 6px; overflow-wrap: anywhere; }
#cq-smart-home .cq-sm-growth-card h5 span { color: var(--sm-muted); display: block; font-size: 10px; font-weight: 700; margin-top: 2px; }
#cq-smart-home .cq-sm-growth-card p { color: var(--sm-muted); font-size: 11px; line-height: 1.5; margin: 0 0 12px; overflow-wrap: anywhere; }
#cq-smart-home .cq-sm-growth-action { align-items: center; background: transparent; border: 1px solid #cbdccf; border-radius: 8px; color: var(--sm-teal); display: inline-flex; font-size: 11px; font-weight: 800; justify-content: space-between; line-height: 1.4; margin-top: auto; min-height: 44px; padding: 9px 11px; text-align: left; width: 100%; }
#cq-smart-home .cq-sm-growth-action:hover { background: var(--sm-teal-soft); border-color: #9fbea9; }
#cq-smart-home .cq-sm-growth-action > span { font-size: 16px; line-height: 1; }

@media (max-width: 1100px) {
    #cq-smart-home .cq-sm-agents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #cq-smart-home .cq-sm-growth-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    body:is(.role-owner,.role-manager) .topbar-center { display: flex !important; flex: 0 1 auto !important; max-width: 206px !important; min-width: 0 !important; }
    body:is(.role-owner,.role-manager) .workspace-mode-selector-pill { max-width: 206px !important; padding: 2px !important; gap: 2px !important; }
    body:is(.role-owner,.role-manager) .topbar-left { flex: 0 0 auto !important; min-width: 0 !important; }
    body:is(.role-owner,.role-manager) .topbar-right { flex: 0 0 auto !important; max-width: 38px !important; margin-left: 0 !important; overflow: visible !important; }
    body:is(.role-owner,.role-manager) .topbar { gap: 5px !important; padding: 0 8px !important; }
    body:is(.role-owner,.role-manager) #topbar-user-badge { display: flex !important; width: 36px !important; padding: 0 !important; }
    body:is(.role-owner,.role-manager) #topbar-user-badge :is(.user-name-mini,.user-role-mini,.dropdown-arrow) { display: none !important; }
    body:is(.role-owner,.role-manager) :is(.theme-switcher-pill,.role-switcher-box,#btn-mode-warroom,#btn-open-ai-consult,#btn-app-drawer) { display: none !important; }
    body:is(.role-owner,.role-manager) .ws-mode-btn { font-size: 10px !important; min-height: 40px !important; padding: 5px 6px !important; gap: 2px !important; }
    body:is(.role-owner,.role-manager) .ws-mode-icon { display: none !important; }
    body:is(.role-owner,.role-manager) .ws-mode-text { display: inline !important; }
    #cq-smart-home .cq-sm-workflow, #cq-smart-home .cq-sm-bottom-grid { grid-template-columns: minmax(0, 1fr); }
    #cq-smart-home .cq-sm-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #cq-smart-home .cq-sm-hero > .cq-sm-primary { font-size: 11px; gap: 10px; }
}
@media (max-width: 560px) {
    #cq-smart-home .cq-sm-drive, #cq-smart-home .cq-sm-monitor { border-radius: 12px; padding: 13px 12px; }
    #cq-smart-home .cq-sm-drive-head { display: block; }
    #cq-smart-home .cq-sm-drive-status { display: inline-flex; margin-top: 8px; }
    #cq-smart-home .cq-sm-drive-head h4 { font-size: 14px; }
    #cq-smart-home .cq-sm-drive-options { gap: 6px; grid-template-columns: minmax(0, 1fr); }
    #cq-smart-home .cq-sm-drive-options button { align-items: center; display: grid; gap: 10px; grid-template-columns: 100px minmax(0, 1fr); min-height: 56px; padding: 9px 10px; }
    #cq-smart-home .cq-sm-drive-options strong { font-size: 12px; }
    #cq-smart-home .cq-sm-drive-options span { font-size: 11px; margin: 0; }
    #cq-smart-home .cq-sm-monitor .cq-sm-section-head { display: block; }
    #cq-smart-home .cq-sm-monitor-status { display: inline-flex; margin-top: 7px; }
    #cq-smart-home .cq-sm-system-map { grid-template-columns: minmax(0, 1fr); gap: 7px; }
    #cq-smart-home .cq-sm-system-card > span { font-size: 10px; }
    #cq-smart-home .cq-sm-system-card > small { font-size: 11px; line-height: 1.5; }
    #cq-smart-home { padding: 15px 14px 17px; }
    #cq-smart-home .cq-sm-hero { align-items: flex-start; gap: 10px; margin-bottom: 7px; }
    #cq-smart-home .cq-sm-hero h3 { font-size: 23px; line-height: 1.15; max-width: 270px; }
    #cq-smart-home .cq-sm-hero > .cq-sm-primary { display: none; }
    #cq-smart-home .cq-sm-eyebrow { font-size: 9px; margin-bottom: 3px; }
    #cq-smart-home .cq-sm-rhythm { gap: 0; justify-content: space-between; margin-bottom: 11px; }
    #cq-smart-home .cq-sm-rhythm a { font-size: 10px; gap: 0; padding-bottom: 7px; }
    #cq-smart-home .cq-sm-rhythm a > span { display: none; }
    #cq-smart-home .cq-sm-section-head-compact { margin-bottom: 7px; }
    #cq-smart-home .cq-sm-section-head-compact h4 { font-size: 11px; }
    #cq-smart-home .cq-sm-date { font-size: 9px; }
    #cq-smart-home .cq-sm-metrics { gap: 7px; margin-bottom: 13px; }
    #cq-smart-home .cq-sm-metric { border-radius: 10px; padding: 9px 10px; }
    #cq-smart-home .cq-sm-metric > span { font-size: 10px; }
    #cq-smart-home .cq-sm-metric > strong { font-size: 19px; margin: 3px 0; }
    #cq-smart-home .cq-sm-metric > small { font-size: 8px; }
    #cq-smart-home .cq-sm-workflow, #cq-smart-home .cq-sm-bottom-grid { gap: 12px; }
    #cq-smart-home .cq-sm-panel { border-radius: 13px; padding: 15px; }
    #cq-smart-home .cq-sm-priorities { padding-top: 13px; }
    #cq-smart-home .cq-sm-section-head { gap: 8px; margin-bottom: 10px; }
    #cq-smart-home .cq-sm-section-head h4 { font-size: 16px; }
    #cq-smart-home .cq-sm-team { margin: 21px 0 14px; }
    #cq-smart-home .cq-sm-growth { margin: 19px 0 14px; }
    #cq-smart-home .cq-sm-growth-grid { gap: 9px; grid-template-columns: minmax(0, 1fr); }
    #cq-smart-home .cq-sm-growth-card { min-height: 0; padding: 14px; }
    #cq-smart-home .cq-sm-growth-card h5 { margin-top: 10px; }
    #cq-smart-home .cq-sm-team > .cq-sm-section-head { align-items: center; }
    #cq-smart-home .cq-sm-team > .cq-sm-section-head > .cq-sm-text-button { flex: 0 0 77px; font-size: 10px; text-align: right; }
    #cq-smart-home .cq-sm-agents { gap: 9px; grid-template-columns: minmax(0, 1fr); }
    #cq-smart-home :is(.cq-sm-agent, .cq-sm-agents > article) { padding: 14px; }
    #cq-smart-home :is(.cq-sm-agent, .cq-sm-agents > article) :is(h3, h4, h5) { margin-top: 7px; }
    #cq-smart-home .cq-sm-question-form textarea { font-size: 16px; min-height: 89px; }
    #cq-smart-home .cq-sm-source-section { display: block; margin-top: 16px; }
    #cq-smart-home .cq-sm-source-section h4 { margin-bottom: 4px; }
    #cq-smart-home .cq-sm-task-panel .cq-sm-section-head, #cq-smart-home .cq-sm-shortcut-panel .cq-sm-section-head { align-items: center; }
    #cq-smart-home .cq-sm-task-panel .cq-sm-section-head h4, #cq-smart-home .cq-sm-shortcut-panel .cq-sm-section-head h4 { font-size: 14px; }
    #cq-smart-home .cq-sm-task-panel .cq-sm-text-button { font-size: 10px; }
}

/* Guest owner entry. Visibility is toggled by the SmartHome controller. */
#cq-sm-entry[hidden] { display: none !important; }
#cq-sm-entry {
    --entry-ink: #173c36;
    --entry-muted: #61756d;
    --entry-teal: #126956;
    --entry-line: #d7e5da;
    --entry-cream: #fbf8f0;
    background: linear-gradient(135deg, #fffdf8 0%, #eef6ef 100%);
    border: 1px solid var(--entry-line);
    border-radius: 22px;
    color: var(--entry-ink);
    margin: 24px auto;
    max-width: 1060px;
    overflow: hidden;
    width: calc(100% - 48px);
}
#cq-sm-entry *, #cq-sm-entry *::before, #cq-sm-entry *::after { box-sizing: border-box; }
#cq-sm-entry a { text-decoration: none; }
#cq-sm-entry .cq-sm-entry-inner { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); padding: clamp(28px, 5vw, 58px); }
#cq-sm-entry .cq-sm-entry-copy { max-width: 590px; }
#cq-sm-entry .cq-sm-entry-kicker { color: var(--entry-teal); font-size: 10px; font-weight: 900; letter-spacing: .09em; margin: 0 0 12px; text-transform: uppercase; }
#cq-sm-entry h2 { color: var(--entry-ink); font-size: clamp(28px, 4.3vw, 48px); letter-spacing: -.045em; line-height: 1.06; margin: 0; max-width: 570px; }
#cq-sm-entry .cq-sm-entry-lead { color: var(--entry-muted); font-size: 14px; line-height: 1.65; margin: 16px 0 22px; max-width: 520px; }
#cq-sm-entry .cq-sm-entry-actions { align-items: stretch; display: flex; flex-wrap: wrap; gap: 9px; }
#cq-sm-entry .cq-sm-entry-login, #cq-sm-entry .cq-sm-entry-preview { align-items: center; border-radius: 10px; display: inline-flex; font-size: 12px; font-weight: 800; gap: 16px; justify-content: space-between; line-height: 1.4; min-height: 46px; padding: 11px 14px; }
#cq-sm-entry .cq-sm-entry-login { background: var(--entry-teal); border: 1px solid var(--entry-teal); color: #fff; }
#cq-sm-entry .cq-sm-entry-login:hover { background: #0c5847; border-color: #0c5847; }
#cq-sm-entry .cq-sm-entry-preview { background: rgba(255,255,255,.55); border: 1px solid #b9d1be; color: var(--entry-teal); cursor: pointer; }
#cq-sm-entry .cq-sm-entry-preview:hover { background: #fff; border-color: var(--entry-teal); }
#cq-sm-entry .cq-sm-entry-login > span, #cq-sm-entry .cq-sm-entry-preview > span { font-size: 17px; line-height: 1; }
#cq-sm-entry .cq-sm-entry-note { color: var(--entry-muted); font-size: 10px; line-height: 1.55; margin: 13px 0 0; }
#cq-sm-entry .cq-sm-entry-rhythm { align-self: center; display: grid; gap: 10px; }
#cq-sm-entry .cq-sm-entry-rhythm article { background: rgba(255,255,255,.78); border: 1px solid var(--entry-line); border-radius: 12px; padding: 15px 16px; }
#cq-sm-entry .cq-sm-entry-number { color: #789084; display: block; font-size: 10px; line-height: 1.4; margin-bottom: 7px; }
#cq-sm-entry .cq-sm-entry-rhythm strong { display: block; font-size: 15px; line-height: 1.35; }
#cq-sm-entry .cq-sm-entry-rhythm p { color: var(--entry-muted); font-size: 11px; line-height: 1.55; margin: 4px 0 0; }
#cq-sm-entry :is(a, button):focus-visible { outline: 3px solid #96bbaa; outline-offset: 3px; }

/* When the controller presents the owner entry to an unauthenticated visitor,
   remove the customer/demo panes so the first view has one clear next action. */
body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) #main-smarthome-workspace {
    background: var(--bg, #f6f8f5);
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
}
body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) #main-smarthome-workspace > #ops-sync-banner,
body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) #main-smarthome-workspace > .view-pane,
body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) #main-smarthome-workspace > .mobile-bottom-nav { display: none !important; }
body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) .workspace-mode-selector-pill,
body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) .branch-badge,
body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) .role-switcher-box,
body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) .theme-switcher-pill,
body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) #btn-open-ai-consult,
body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) .btn-topbar-affiliate,
body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) .btn-topbar-wealth,
body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) .floating-ai-consult-widget,
body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) .btn-app-drawer { display: none !important; }
body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) .topbar { min-height: 56px; }

@media (max-width: 760px) {
    #cq-sm-entry { border-radius: 16px; margin: 12px auto; width: calc(100% - 24px); }
    #cq-sm-entry .cq-sm-entry-inner { display: block; padding: 24px 19px 20px; }
    #cq-sm-entry h2 { font-size: 30px; max-width: 350px; }
    #cq-sm-entry .cq-sm-entry-lead { font-size: 13px; margin: 13px 0 18px; }
    #cq-sm-entry .cq-sm-entry-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
    #cq-sm-entry .cq-sm-entry-login, #cq-sm-entry .cq-sm-entry-preview { justify-content: space-between; width: 100%; }
    #cq-sm-entry .cq-sm-entry-rhythm { gap: 7px; margin-top: 25px; }
    #cq-sm-entry .cq-sm-entry-rhythm article { padding: 12px 13px; }
    #cq-sm-entry .cq-sm-entry-rhythm strong { font-size: 14px; }
    #cq-sm-entry .cq-sm-entry-rhythm p { font-size: 10px; }
    body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) .topbar { padding-left: 10px !important; padding-right: 10px !important; }
    body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) .topbar-left { gap: 6px !important; }
    body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) .topbar-right { margin-left: auto; }
    body[data-cq-owner-entry="true"]:not([data-cq-guest-preview="true"]) #main-smarthome-workspace { padding-bottom: env(safe-area-inset-bottom, 0px) !important; }
    body[data-workspace-mode="smarthome"].role-owner .theme-switcher-pill,
    body[data-workspace-mode="smarthome"].role-owner .role-switcher-box,
    body[data-workspace-mode="smarthome"].role-owner .btn-topbar-affiliate,
    body[data-workspace-mode="smarthome"].role-owner .btn-topbar-wealth,
    body[data-workspace-mode="smarthome"].role-owner #btn-open-ai-consult,
    body[data-workspace-mode="smarthome"].role-owner .owner-sidebar,
    body[data-workspace-mode="smarthome"].role-owner .mobile-bottom-nav { display: none !important; }
    body[data-workspace-mode="smarthome"].role-owner #main-smarthome-workspace,
    body[data-workspace-mode="smarthome"].role-owner #view-owner-dashboard { padding-bottom: env(safe-area-inset-bottom, 0px) !important; }
    body[data-workspace-mode="smarthome"].role-owner .owner-main-content { gap: 0 !important; padding: 8px !important; }
    body[data-workspace-mode="smarthome"].role-owner .cq-command-center { border-radius: 14px; box-shadow: none; }
    body[data-workspace-mode="smarthome"].role-owner .cq-command-center > .cq-cc-hero { display: none; }
    body[data-workspace-mode="smarthome"].role-owner .cq-cc-toolbar { display: grid; gap: 7px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; padding: 9px 12px; }
    body[data-workspace-mode="smarthome"].role-owner .cq-cc-toolbar #cq-cc-branch { font-size: 10px; grid-column: 1 / -1; line-height: 1.4; }
    body[data-workspace-mode="smarthome"].role-owner .cq-cc-toolbar > label,
    body[data-workspace-mode="smarthome"].role-owner .cq-cc-toolbar > [data-cc-period] { display: none; }
    body[data-workspace-mode="smarthome"].role-owner .cq-cc-toolbar .cq-cc-date { font-size: 11px; min-height: 44px; min-width: 0; padding: 7px; width: 100%; }
    body[data-workspace-mode="smarthome"].role-owner .cq-cc-toolbar #cq-cc-refresh { min-height: 44px; padding: 7px 10px; }
    body[data-workspace-mode="smarthome"].role-owner .cq-business-mode > .cq-cc-toolbar { display: none; }
    body[data-workspace-mode="smarthome"].role-owner .cq-cc-tabs { gap: 3px; padding: 3px 10px 0; }
    body[data-workspace-mode="smarthome"].role-owner .cq-cc-tabs button { font-size: 10px; min-height: 44px; padding: 9px 8px; }
    body[data-workspace-mode="smarthome"].role-owner .cq-cc-notice { font-size: 9px; padding: 5px 12px 0; }
    body[data-workspace-mode="smarthome"].role-owner .cq-cc-foot { font-size: 9px; gap: 4px; padding: 8px 12px; }
}

#cq-smart-home .cq-sm-view-options {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 13px;
    padding: 10px 14px;
    background: #f7faf7;
    border: 1px solid var(--sm-line);
    border-radius: 10px;
}
#cq-smart-home .cq-sm-view-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--sm-muted);
}
#cq-smart-home .cq-sm-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #bdd8c7;
    border-radius: 8px;
    color: var(--sm-teal);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    min-height: 44px;
    padding: 8px 16px;
    touch-action: manipulation;
    transition: all 0.2s ease;
}
#cq-smart-home .cq-sm-view-btn:hover, #cq-smart-home .cq-sm-view-btn:focus-visible {
    background: var(--sm-teal-soft);
    border-color: #98c4a5;
    outline: 3px solid #dca859;
    outline-offset: 2px;
}
