/* Pontual: base neutra, dourado da marca em detalhes e verde para ações de corte. */
:root {
  color-scheme:light;
  --bg:#f5f6f4; --surface:#fff; --surface-soft:#f8faf8; --ink:#26302b;
  --line:#e1e6e1; --muted:#65736b; --gold:#a79d67; --gold-soft:#f3f0df;
  --primary:#26332d; --on-primary:#fff; --action:#326752; --action-hover:#25503f;
  --navy:var(--ink); --teal:#3b6955; --orange:var(--gold);
  --scroll-track:#eef1eb; --scroll-thumb:#b2bcb1; --focus:#81723c; --shadow:0 4px 22px #25342b05;
  color:var(--ink); background:var(--bg);
}
:root[data-theme=dark] {
  color-scheme:dark;
  --bg:#111715; --surface:#1b2420; --surface-soft:#202c25; --ink:#edf2ee;
  --line:#344139; --muted:#a6b5aa; --gold:#bdb17a; --gold-soft:#383828;
  --primary:#dce8df; --on-primary:#1a2a20; --action:#36694f; --action-hover:#427e5e;
  --teal:#a2cbb2; --scroll-track:#162019; --scroll-thumb:#53665a;
  --focus:#bdb17a; --shadow:0 4px 22px #00000012;
}
body { background:var(--bg); color:var(--ink); }
* { scrollbar-width:thin; scrollbar-color:var(--scroll-thumb) var(--scroll-track); }
*::-webkit-scrollbar { width:10px; height:10px; }
*::-webkit-scrollbar-track { background:var(--scroll-track); border-radius:12px; }
*::-webkit-scrollbar-thumb { background:var(--scroll-thumb); border:2px solid var(--scroll-track); border-radius:12px; }
*::-webkit-scrollbar-thumb:hover { background:var(--gold); }
*::-webkit-scrollbar-corner { background:var(--scroll-track); }
::selection { background:#a79d6745; color:var(--ink); }
button { background:var(--surface); color:var(--ink); border-color:var(--line); border-radius:8px; transition:background-color .15s,border-color .15s; }
button:hover { background:var(--surface-soft); border-color:var(--gold); }
button.primary { background:var(--primary); border-color:var(--primary); color:var(--on-primary); }
button.primary:hover { background:var(--ink); color:var(--on-primary); border-color:var(--ink); }
button#optimize, button#refine-plan { background:var(--action); border-color:var(--action); color:#fff; }
button#optimize:hover, button#refine-plan:hover { background:var(--action-hover); border-color:var(--action-hover); }
button.danger { color:#ac4343; }
[data-theme=dark] button.danger { color:#f0a6a6; }
input,select,textarea { background:var(--surface); color:var(--ink); border-color:var(--line); border-radius:8px; }
input::placeholder,textarea::placeholder { color:var(--muted); opacity:1; }
input:focus,select:focus,textarea:focus { border-color:var(--gold); }
label { color:var(--ink); }
.muted,small { color:var(--muted); }
.shell { grid-template-columns:232px minmax(0,1fr); }
.sidebar { background:var(--surface); color:var(--ink); border-right:1px solid var(--line); gap:25px; padding:30px 18px 22px; }
.sidebar .logo { max-width:180px; margin:4px 4px 2px; }
.sidebar small { color:var(--muted); }
.sidebar nav { gap:6px; }
.sidebar nav button { display:flex; align-items:center; gap:11px; color:var(--muted); font-size:.94rem; font-weight:500; padding:11px 12px; border:1px solid transparent; border-left:1px solid transparent; }
.sidebar nav button:hover { color:var(--ink); background:var(--surface-soft); }
.sidebar nav button.active { color:var(--ink); background:var(--gold-soft); border:1px solid transparent; box-shadow:inset 3px 0 var(--gold); }
.sidebar nav button.active .ui-icon { color:var(--gold); }
.sidebar .bottom { padding-top:20px; border-top:1px solid var(--line); }
.sidebar .bottom button { color:var(--ink); background:var(--surface); border-color:var(--line); margin-top:10px; width:100%; }
.ui-icon { flex:none; vertical-align:middle; }
.main { padding:32px clamp(18px,3vw,44px); }
.eyebrow { color:var(--muted); font-size:10px; letter-spacing:.16em; margin-bottom:6px; }
.topbar h1 { font-size:clamp(1.65rem,2.3vw,2.15rem); font-weight:650; letter-spacing:-.04em; }
.topbar { margin-bottom:26px; }
.topbar-actions { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:10px; }
.tag { color:var(--teal); background:var(--surface-soft); border:1px solid var(--line); font-size:11px; font-weight:550; border-radius:6px; }
.tag.warn { background:#faf0d9; color:#795719; border-color:#ead7a8; }
[data-theme=dark] .tag.warn { background:#3b3121; color:#e4c47b; border-color:#695632; }
.stats { gap:16px; }
.stat { position:relative; padding:20px; background:var(--surface); border-color:var(--line); border-radius:12px; box-shadow:var(--shadow); }
.stat strong { font-size:1.9rem; margin-top:12px; font-weight:650; font-variant-numeric:tabular-nums; }
.stat-mark { position:absolute; top:20px; right:18px; color:var(--gold); }
.stat .muted { display:block; padding-right:26px; font-size:.85rem; }
.card { background:var(--surface); border-color:var(--line); box-shadow:var(--shadow); border-radius:12px; }
.card h2 { font-weight:650; font-size:1.12rem; letter-spacing:-.02em; }
.card .row.between { gap:16px; margin-bottom:18px; }
table { color:var(--ink); }
th { background:var(--surface-soft); color:var(--muted); font-size:10px; font-weight:600; letter-spacing:.055em; }
td,th { border-color:var(--line); padding-block:14px; }
tbody tr:hover { background:var(--surface-soft); }
td button { font-size:.85rem; }
.notice { background:#f7f3e5; color:#625631; border-left-color:var(--gold); border-radius:0 8px 8px 0; }
.success-note { background:#e9f5ee; color:#28503a; }
[data-theme=dark] .success-note { background:#203c2b; color:#b3d8bf; }
[data-theme=dark] .notice { background:#302e20; color:#dbcfab; }
.error { background:#fff0f0; color:#a62e32; }
[data-theme=dark] .error { background:#3b2327; color:#f4b4b8; }
.filebox,.access-notice { background:var(--surface-soft); color:var(--ink); border-color:var(--gold); }
.inspector { background:var(--surface-soft); color:var(--ink); }
.canvas { background:#e8ede7; }
[data-theme=dark] .canvas { background:#29372e; }
.canvas-panel.is-expanded { background:var(--surface); }
.report-preview>summary { background:var(--surface); color:var(--ink); border-color:var(--line); }
.thickness-badge { color:var(--teal); background:var(--surface-soft); border-color:var(--line); }
dialog { background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:14px; box-shadow:0 24px 80px #101b1a25; }
dialog::backdrop { background:#101b1a65; backdrop-filter:blur(3px); }
#toast { background:var(--primary); color:var(--on-primary); box-shadow:0 8px 30px #0002; }
.auth { background:var(--bg); }
.auth-hero { background:#e8eee8; color:var(--ink); border-right:1px solid var(--line); }
[data-theme=dark] .auth-hero { background:#19251d; }
.auth-hero .brand-line { gap:20px; }
.brand-line .logo { max-width:300px; }
.product-status { color:var(--muted); border-color:var(--line); }
.hero-body h1 { font-size:clamp(2.3rem,4.2vw,4rem); font-weight:650; letter-spacing:-.055em; }
.hero-body p { color:var(--muted); }
.sample-panel { border-color:#b3bca7; padding:8px; gap:5px; border-radius:8px; }
.sample-panel i { border-color:#a4b2a2; background:#7f9b85; border-radius:3px; }
.sample-panel i:first-child { background:#a79d67; border-color:#a79d67; }
.sample-panel i:nth-child(2) { background:repeating-linear-gradient(135deg,transparent 0 8px,#a7b6a7 8px 9px); }
.sample-panel i:nth-child(3) { background:#c4cdd6; border-color:#a7b5c4; }
[data-theme=dark] .sample-panel i:nth-child(3) { background:#46586b; border-color:#64768a; }
.demo-link { color:var(--teal); font-size:.87rem; }
.auth-box { position:relative; padding-top:86px; }
.auth-box form { width:min(100%,420px); }
.access-theme { position:absolute; right:clamp(18px,3vw,40px); top:25px; }
.auth-box a,.legal-page a { color:var(--teal); }
.eye[aria-pressed=true] { color:var(--teal); background:var(--surface-soft); }
.google-entry { border-color:var(--line); background:var(--surface); }
.field-message { color:#a63838; }
[data-theme=dark] .field-message { color:#f0a6a6; }
.theme-toggle { padding:8px 11px; color:var(--ink); min-height:38px; }
.theme-toggle>span { display:flex; align-items:center; gap:7px; font-size:.82rem; }
.theme-toggle .theme-to-light { display:none; }
[data-theme=dark] .theme-toggle .theme-to-dark { display:none; }
[data-theme=dark] .theme-toggle .theme-to-light { display:flex; }
.cut-report { background:#fff; color:#243e50; }
.cut-report :is(small,.muted) { color:#53626a; }
.cut-report th,.cut-report tbody tr:hover { background:transparent; }
.cut-report td,.cut-report th { color:inherit; }
:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
[data-theme=dark] .length-rule.met small { color:#8cc4a4; }
@media (min-width:901px) { .sidebar { position:sticky; top:0; height:100svh; overflow-y:auto; } }
@media (max-width:900px) {
  .shell { grid-template-columns:minmax(0,1fr); }
  .sidebar { padding:18px; gap:10px; border-right:0; border-bottom:1px solid var(--line); }
  .sidebar .bottom { padding:0; border:0; }
  .sidebar .bottom button { margin:0; width:auto; }
  .sidebar nav button { padding:8px 10px; font-size:.87rem; gap:7px; }
  .auth-hero { border-right:0; border-bottom:1px solid var(--line); }
  .auth-hero h1 { font-size:clamp(1.5rem,4.2vw,2.1rem); }
  .auth-box { padding-top:84px; }
}
@media (max-width:620px) {
  .main { padding:22px 12px 30px; }
  .stats { gap:9px; }
  .stat { padding:14px 12px; }
  .stat strong { font-size:1.45rem; margin-top:9px; }
  .stat-mark { top:14px; right:10px; }
  .stat .muted { font-size:.77rem; }
  .topbar { flex-wrap:wrap; gap:14px; }
  .topbar-actions { justify-content:flex-start; }
  .card { padding:18px 12px; }
  .sidebar nav { gap:4px; }
  .sidebar nav .ui-icon { width:16px; height:16px; }
  .sidebar .logo { max-width:145px; }
  .auth-hero .brand-line .logo { max-width:230px; }
  .auth-hero .brand-line { gap:12px; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; scroll-behavior:auto!important; } }
