/* v27: approved colored interface, with a darker canvas. Presentation only. */
:root{--bg:#f3f6fc;--card:#fff;--card-soft:#f0f5fd;--text:#17243b;--muted:#62748e;--line:#dbe4f1;--line-2:#c9d7eb;--border:var(--line);--brand:#346cf0;--brand-soft:#eaf0ff;--brand-ring:#3b82f630;--purple:#346cf0;--navy:#0a1424;--surface-hover:#e9f0ff;--primary-text:#fff;--sidebar-bg:#0a1424;--sidebar-text:#bbcae0;--sidebar-active:#173363;--accent-blue:#2775ef;--accent-cyan:#058aa8;--accent-green:#168354;--accent-amber:#ae710b;--accent-violet:#7850d7;--accent-pink:#c22f89;--accent-teal:#088b8e;--button-gradient:linear-gradient(115deg,#087ee6,#5056ee 72%,#6e43ec)}
:root[data-theme=dark]{--bg:#070c15;--card:#101b2c;--card-soft:#142238;--text:#edf4ff;--muted:#a0b3cf;--line:#243750;--line-2:#2b4262;--border:var(--line);--brand:#3984ff;--brand-soft:#162c50;--brand-ring:#3984ff38;--purple:#3984ff;--surface-hover:#1a2c48;--primary-text:#fff;--sidebar-bg:#091323;--sidebar-text:#c4d2e7;--sidebar-active:#16366b;--accent-blue:#48a2ff;--accent-cyan:#10cce8;--accent-green:#2bd5a0;--accent-amber:#ffbb35;--accent-violet:#a581ff;--accent-pink:#f154b8;--accent-teal:#18d3cf;--button-gradient:linear-gradient(115deg,#078cf8,#425fff 70%,#773fff)}
:root[data-theme] body.workspace,:root[data-theme] body.auth-page,:root[data-theme] body.editor-workspace{background:var(--bg);color:var(--text)}
:root[data-theme] .workspace-body{background:radial-gradient(ellipse 70% 340px at 45% 0,#1976ed0b,transparent 85%),var(--bg)}
:root[data-theme=dark] .workspace-body{background:radial-gradient(ellipse 65% 300px at 40% 0,#1245aa12,transparent 85%),var(--bg)}
:root[data-theme] .sidebar{background:var(--sidebar-bg);border-color:#21314b}
:root[data-theme] .sidebar .brand>.logo{color:#159bff}
:root[data-theme] .sidebar .app-nav a{color:var(--sidebar-text)}
:root[data-theme] .sidebar .app-nav a:hover{background:#3279ee12;color:#fff;border-color:#31507b}
:root[data-theme] .sidebar .app-nav a.active{background:linear-gradient(105deg,#163b7e,#203a858c);border-color:#315dc2;box-shadow:inset 3px 0 0 #589cff;color:#fff}
:root[data-theme] .sidebar .app-nav .nav-icon{color:#48a2ff}
:root[data-theme] .sidebar .app-nav [href="dashboard.php"] .nav-icon{color:#40b9ff}
:root[data-theme] .sidebar .app-nav [href="projects.php"] .nav-icon{color:#10d6e8}
:root[data-theme] .sidebar .app-nav [href="generator.php"] .nav-icon{color:#2ca5ff}
:root[data-theme] .sidebar .app-nav [href="documents.php"] .nav-icon{color:#ffbb35}
:root[data-theme] .sidebar .app-nav [href="factory.php"] .nav-icon{color:#b186ff}
:root[data-theme] .sidebar .app-nav [href="sms.php"] .nav-icon{color:#f154b8}
:root[data-theme] .sidebar .app-nav [href="domains.php"] .nav-icon{color:#0ed7d0}
:root[data-theme] .sidebar .app-nav [href="index.php"] .nav-icon{color:#4aaaff}
:root[data-theme] .sidebar .nav-group-services,:root[data-theme] .sidebar .private-note{border-color:#23354f}
:root[data-theme] .nav-label{color:#8ba6ca}
:root[data-theme] .sidebar .private-note>.icon{color:#56a8ff}
:root[data-theme] .topbar{background:var(--card);border-color:var(--line)}
:root[data-theme=dark] .topbar{background:#0c1626}
:root[data-theme] :is(body.workspace,body.auth-page,body.editor-workspace) :is(.primary,.btn-primary,.sms-buy,#panel-publish-site,#panel-publish-bottom,#btnConsultar){background:var(--button-gradient);color:#fff;border:1px solid #397aff;box-shadow:0 3px 11px #0759d61c}
:root[data-theme] :is(body.workspace,body.auth-page,body.editor-workspace) :is(.primary,.btn-primary,.sms-buy,#panel-publish-site,#panel-publish-bottom,#btnConsultar):hover{filter:brightness(1.1);border-color:#6ba4ff}
:root[data-theme] :is(body.workspace,body.auth-page) :is(.secondary,.ghost,.icon-button){background:var(--card-soft);color:var(--text);border-color:var(--line-2)}
:root[data-theme] :is(body.workspace,body.auth-page) :is(.secondary,.ghost,.icon-button):hover{background:var(--surface-hover);border-color:#518bdf}
:root[data-theme] :is(body.workspace,body.auth-page) .secondary{color:var(--accent-blue);border-color:#3b82f646}
:root[data-theme] :is(body.workspace,body.auth-page,body.editor-workspace) :is(a,button,summary):focus-visible{outline-color:#6aa6ff}
:root[data-theme] :is(body.workspace,body.auth-page,body.editor-workspace) :is(input,select,textarea):focus{border-color:#5297ff;outline-color:var(--brand-ring)}
:root[data-theme] :is(body.workspace,body.auth-page) :is(.text-link,.back-link,.domain-project a){color:var(--accent-blue)}
:root[data-theme] :is(body.workspace,body.auth-page) :is(.eyebrow,.caption){color:var(--muted)}
/* Each summary has a category accent; the counts remain live values. */
.metric-grid>.metric:nth-child(1){--metric-accent:var(--accent-blue);--metric-tint:#3984ff16}
.metric-grid>.metric:nth-child(2){--metric-accent:var(--accent-green);--metric-tint:#22c99816}
.metric-grid>.metric:nth-child(3){--metric-accent:var(--accent-amber);--metric-tint:#f6b32d16}
.metric-grid>.metric:nth-child(4){--metric-accent:var(--accent-violet);--metric-tint:#9363ed16}
:root[data-theme] .metric-grid>.metric{position:relative;overflow:hidden;background:linear-gradient(125deg,var(--metric-tint),transparent 75%),var(--card);border-color:var(--line);border-top:2px solid var(--metric-accent)}
:root[data-theme] .metric-grid>.metric .metric-top>.icon{width:37px;height:37px;padding:8px;border-radius:9px;box-sizing:border-box;background:var(--metric-tint);color:var(--metric-accent);border:1px solid var(--metric-tint);margin-top:-5px;margin-bottom:-5px}
:root[data-theme] .empty-symbol{background:var(--brand-soft);color:var(--accent-blue);border-color:#3984ff50}
:root[data-theme] .site-monogram{background:var(--brand-soft);color:var(--accent-blue);border-color:#3984ff40}
:root[data-theme] .connection-card .provider-logo{background:#8857ed19;color:var(--accent-violet);border-color:#9363ed40}
:root[data-theme] .connection-card .connection-row+.connection-row .provider-logo{background:#f6933019;color:#ed9b4a;border-color:#f6933040}
:root[data-theme] .connection-card .connection-dot.configured{background:#39d89d}
.quick-access-card:nth-child(1){--quick-accent:var(--accent-amber);--quick-tint:#f5ae2011;--quick-edge:#c58a2b60}
.quick-access-card:nth-child(2){--quick-accent:var(--accent-violet);--quick-tint:#9363ed14;--quick-edge:#9363ed60}
.quick-access-card:nth-child(3){--quick-accent:var(--accent-pink);--quick-tint:#f154b811;--quick-edge:#d1469c60}
:root[data-theme] .quick-access-grid>.quick-access-card{background:linear-gradient(110deg,var(--quick-tint),transparent),var(--card);border-color:var(--quick-edge);gap:13px;padding:19px 18px}
:root[data-theme] .quick-access-grid>.quick-access-card:hover{border-color:var(--quick-accent);background:linear-gradient(110deg,var(--quick-tint),var(--quick-tint)),var(--card)}
:root[data-theme] .quick-access-grid>.quick-access-card>.icon:first-child{width:42px;height:42px;padding:8px;box-sizing:border-box;border-radius:9px;flex-shrink:0;color:var(--quick-accent);background:var(--quick-tint)}
/* Consistent accents in collections, domains, factory, and connections. */
:root[data-theme] :is(.collection-nav>a.selected,.project-tabs a.selected){color:var(--accent-blue);border-color:var(--brand)}
:root[data-theme] .collection-nav a>span{background:var(--brand-soft);color:var(--accent-blue)}
:root[data-theme] .rotation-position{color:var(--accent-blue);background:var(--brand-soft);border-color:#3984ff50}
:root[data-theme] .rotation-next{border-color:#3984ff40;background:var(--brand-soft)}
:root[data-theme] .rotation-next strong,:root[data-theme] .address-preview output{color:var(--accent-blue)}
:root[data-theme] .host-logo{background:#9363ed18;color:var(--accent-violet);border-color:#9363ed40}
:root[data-theme] .cf-logo{background:#f6933018;color:#e9943c;border-color:#f6933040}
:root[data-theme] .factory-free{background:#9363ed18;color:var(--accent-violet);border:1px solid #9363ed35}
:root[data-theme] .factory-metrics>div{border-top:2px solid #4787ed80}
:root[data-theme] .factory-metrics>div:nth-child(2){border-top-color:#e8a93480}
:root[data-theme] .factory-metrics>div:nth-child(3){border-top-color:#9363ed80}
:root[data-theme] .factory-badges span:not(.factory-active){background:#9363ed18;color:var(--accent-violet)}
:root[data-theme] .factory-company{border-left:2px solid #9363ed65}
:root[data-theme] .sms-balance{background:#ec4aa718;color:var(--accent-pink)}
:root[data-theme] .sms-widget .sms-heading>strong{color:var(--text)}
:root[data-theme] .sms-countdown[data-state=waiting]{background:var(--brand-soft);color:var(--accent-blue);border-color:#3984ff45}
/* The editor is a separate same-origin document. Keep its UI on this palette. */
:root[data-theme] body.editor-workspace .step.on{background:var(--brand-soft);color:var(--accent-blue);border-color:#3984ff50}
:root[data-theme] body.editor-workspace :is(#panel-publication label,#panel-address,#panel-open-site,#document-link){color:var(--accent-blue)}
:root[data-theme] body.editor-workspace .section-title .dot{background:var(--accent-blue)}
:root[data-theme] body.editor-workspace .panel-domain-details>summary::marker{color:var(--accent-blue)}
:root[data-theme] body.editor-workspace .edit-name-btn{color:var(--accent-blue);border-color:#3984ff40}
:root[data-theme] body.editor-workspace .btn-light{background:var(--card-soft);color:var(--text);border-color:var(--line-2)}
:root[data-theme] body.editor-workspace #panel-publication-notice[data-state=working] .panel-notice-icon{border-top-color:var(--accent-blue)}
/* Keep destructive actions and SMS waiting/received semantics unchanged. */
:root[data-theme] :is(body.workspace,body.auth-page) .danger-button{background:#b33d50;color:#fff;border-color:#b33d50}
:root[data-theme] :is(body.workspace,body.auth-page) .site-actions .danger-link{background:transparent;border-color:#a34a6050}
@media(max-width:1200px){:root[data-theme] .quick-access-grid>.quick-access-card{padding:17px 14px;gap:10px}}
@media(max-width:760px){:root[data-theme] .quick-access-grid>.quick-access-card{padding:18px}:root[data-theme] .metric-grid>.metric .metric-top>.icon{width:32px;height:32px;padding:7px}}

:root[data-theme] body.editor-workspace .cnpj-lookup-actions #btnConsultar{background:var(--button-gradient);color:#fff}
