/* Conceito: parede de galeria. Muito ar, imagens grandes com legenda técnica em mono;
   o backoffice é uma mesa de luz organizada. Um único acento: azul ultramar. */
:root {
  --bg: #F2F3F1; --surface: #FFFFFF; --sunk: #E8EAE6; --ink: #15171A; --ink2: #3A3E44; --muted: #5F646C; --line: #D8DBD5; --line2: #C5C9C2;
  --accent: #2438C9; --accent-ink: #FFFFFF; --accent-soft: #E4E7FA;
  --ok: #1D7A4C; --ok-soft: #E1F2E8; --warn: #9A5B00; --warn-soft: #FBEFD9; --bad: #B3261E; --bad-soft: #F9E1DE; --info: #2F5E8A; --info-soft: #E2ECF5;
  --strip: #15171A; --strip-ink: #E9EAEC;
  --f-display: "Bodoni Moda", Didot, "Bodoni 72", Georgia, serif;
  --f-body: Manrope, "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 6px; --shadow: 0 1px 2px rgba(20,22,26,.06), 0 8px 24px rgba(20,22,26,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #101113; --surface: #17191C; --sunk: #1D2023; --ink: #ECEDEE; --ink2: #C9CCD0; --muted: #9AA0A8; --line: #2A2D31; --line2: #3A3E44;
  --accent: #8C99FF; --accent-ink: #0D1030; --accent-soft: #23284A;
  --ok: #5CC995; --ok-soft: #15301F; --warn: #E5A84A; --warn-soft: #33270F; --bad: #F08A80; --bad-soft: #3A1916; --info: #8DB8E2; --info-soft: #172634;
  --strip: #050607; --strip-ink: #D9DADD; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #101113; --surface: #17191C; --sunk: #1D2023; --ink: #ECEDEE; --ink2: #C9CCD0; --muted: #9AA0A8; --line: #2A2D31; --line2: #3A3E44;
  --accent: #8C99FF; --accent-ink: #0D1030; --accent-soft: #23284A;
  --ok: #5CC995; --ok-soft: #15301F; --warn: #E5A84A; --warn-soft: #33270F; --bad: #F08A80; --bad-soft: #3A1916; --info: #8DB8E2; --info-soft: #172634;
  --strip: #050607; --strip-ink: #D9DADD; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark }
* { box-sizing: border-box }
html, body { margin: 0 }
img { max-width: 100% }
[hidden] { display: none !important }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased }
a { color: inherit }
h1, h2, h3 { text-wrap: balance; margin: 0 }
button, input, select, textarea { font: inherit; color: inherit }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.mono { font-family: var(--f-mono); font-size: .82em; letter-spacing: .01em }
.tnum { font-variant-numeric: tabular-nums }
.muted { color: var(--muted) }
.eyebrow { font-family: var(--f-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted) }
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: 20px }
@media (max-width: 520px) { .wrap { padding-inline: 16px } }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap }
.between { justify-content: space-between }
.stack { display: grid; gap: 14px }
.grow { flex: 1; min-width: 0 }

/* faixa do apresentador */
.strip { background: var(--strip); color: var(--strip-ink); font-size: 13px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50 }
.strip .wrap { display: flex; gap: 10px 18px; align-items: center; flex-wrap: wrap; padding-block: 7px }
.strip .tag { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; border: 1px solid #ffffff40; padding: 2px 8px; border-radius: 99px; white-space: nowrap }
.envs { display: flex; gap: 2px; background: #ffffff14; border-radius: 99px; padding: 2px }
.envs button { border: 0; background: none; color: var(--strip-ink); padding: 4px 12px; border-radius: 99px; cursor: pointer; font-size: 13px; font-weight: 600 }
.envs button[aria-pressed="true"] { background: #fff; color: #15171A }
.strip select { background: #ffffff14; border: 1px solid #ffffff2a; color: var(--strip-ink); border-radius: 6px; padding: 3px 6px; font-size: 13px }
.strip select option { color: #15171A }
.strip .clock { font-family: var(--f-mono); font-size: 12px; opacity: .85; white-space: nowrap }
.strip label { min-width: 0; max-width: 100% }
.strip select { max-width: 100%; min-width: 0 }
@media (max-width: 640px) { .strip .clock { text-align: left !important; flex-basis: 100% } .strip label { flex-basis: 100%; flex-wrap: nowrap } .strip label select { flex: 1; width: auto } }

/* botões, chips e status */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); padding: 9px 16px; border-radius: var(--r); cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s }
.btn:hover { border-color: var(--ink2) }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent) }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--bg) }
.btn-ghost { background: none; border-color: transparent; padding-inline: 8px }
.btn-ghost:hover { border-color: var(--line2) }
.btn-sm { padding: 5px 10px; font-size: 13px }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)) }
.btn[disabled] { opacity: .45; cursor: not-allowed }
.b { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; background: var(--sunk); color: var(--ink2) }
.b::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85 }
.b-ok { background: var(--ok-soft); color: var(--ok) } .b-warn { background: var(--warn-soft); color: var(--warn) } .b-bad { background: var(--bad-soft); color: var(--bad) } .b-info { background: var(--info-soft); color: var(--info) } .b-acc { background: var(--accent-soft); color: var(--accent) }
.chip { border: 1px solid var(--line2); background: var(--surface); border-radius: 99px; padding: 5px 12px; font-size: 13px; cursor: pointer; font-weight: 500 }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg) }
.help { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line2); background: var(--surface); font-size: 12px; font-weight: 700; cursor: pointer; color: var(--muted); padding: 0; flex: none }

/* formulários */
.field { display: grid; gap: 5px; min-width: 0 }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink2) }
.field small { color: var(--muted); font-size: 12px }
.inp { width: 100%; border: 1px solid var(--line2); background: var(--surface); border-radius: var(--r); padding: 9px 11px; min-width: 0 }
.inp:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft) }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px }

/* superfícies */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px; min-width: 0 }
.card h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px }
.notice { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 10px 14px; border-radius: 0 6px 6px 0; font-size: 14px }
.notice.bad { border-color: var(--bad); background: var(--bad-soft) } .notice.ok { border-color: var(--ok); background: var(--ok-soft) } .notice.info { border-color: var(--info); background: var(--info-soft) }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); border: 1px dashed var(--line2); border-radius: 8px }

/* tabelas */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface) }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--sunk); white-space: nowrap }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle }
.tbl tr:last-child td { border-bottom: 0 }
.tbl tr.click { cursor: pointer } .tbl tr.click:hover td { background: var(--sunk) }
.tbl .r { text-align: right } .thumb { width: 54px; height: 36px; object-fit: cover; border-radius: 3px; background: var(--sunk); display: block }

/* ---------- LOJA ---------- */
.s-head { background: var(--surface); border-bottom: 1px solid var(--line) }
.s-head .wrap { display: flex; align-items: center; gap: 22px; padding-block: 14px; flex-wrap: wrap }
.logo { font-family: var(--f-display); font-weight: 700; font-size: 26px; letter-spacing: .06em; text-decoration: none; line-height: 1; cursor: pointer; background: none; border: 0; padding: 0 }
.logo i { font-weight: 400; letter-spacing: 0 }
.s-nav { display: flex; gap: 18px; flex-wrap: wrap }
.s-nav button { background: none; border: 0; padding: 4px 0; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink2); border-bottom: 2px solid transparent }
.s-nav button:hover, .s-nav button[aria-current="true"] { color: var(--ink); border-color: var(--ink) }
.search { display: flex; align-items: center; border: 1px solid var(--line2); border-radius: 99px; padding: 2px 4px 2px 14px; background: var(--bg); flex: 1; min-width: 180px; max-width: 360px }
.search input { border: 0; background: none; outline: none; padding: 7px 4px; flex: 1; min-width: 0 }
.cart-btn { position: relative }
.cart-btn .n { position: absolute; top: -6px; right: -6px; background: var(--accent); color: var(--accent-ink); border-radius: 99px; font-size: 11px; font-weight: 700; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px }
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 0; background: var(--ink); color: #F3F3F1; border-radius: 0 }
.hero img { width: 100%; height: 100%; min-height: 360px; max-height: 520px; object-fit: cover; display: block }
.hero .copy { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; gap: 16px }
.hero h1 { font-family: var(--f-display); font-weight: 500; font-size: clamp(34px, 4.4vw, 58px); line-height: 1.02; letter-spacing: -.01em }
.hero h1 em { font-style: italic; font-weight: 400 }
.hero p { color: #C9CBCF; max-width: 46ch }
.hero .eyebrow { color: #A8ABB1 }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr } .hero img { min-height: 240px } .hero .copy { padding: 28px 20px } }
.sec { padding-block: 44px 8px }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap }
.sec-h h2 { font-family: var(--f-display); font-weight: 500; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.01em }
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px 20px }
.work { cursor: pointer; display: grid; gap: 8px; background: none; border: 0; padding: 0; text-align: left; min-width: 0 }
.work .ph { position: relative; aspect-ratio: 3/2; background: var(--sunk); overflow: hidden; border-radius: 2px }
.work .ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease }
.work:hover .ph img { transform: scale(1.03) }
.work .t { font-weight: 600; font-size: 14.5px; line-height: 1.3 }
.work .m { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted) }
.play { position: absolute; left: 10px; bottom: 10px; background: rgba(10,12,16,.72); color: #fff; font-family: var(--f-mono); font-size: 11px; padding: 3px 8px 3px 6px; border-radius: 3px; display: flex; gap: 6px; align-items: center }
.play::before { content: ""; border-left: 8px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent }
.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px }
.colcard { position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: 3px; cursor: pointer; border: 0; padding: 0; background: var(--ink); text-align: left }
.colcard img { width: 100%; height: 100%; object-fit: cover; opacity: .82; display: block }
.colcard div { position: absolute; inset: auto 0 0 0; padding: 16px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)) }
.colcard b { font-family: var(--f-display); font-size: 24px; font-weight: 500; display: block; line-height: 1.1 }
.mags { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px }
.mag img { aspect-ratio: 460/600; width: 100%; object-fit: cover; box-shadow: var(--shadow); background: var(--sunk); display: block }
.frame { background: #F7F6F2; padding: 9%; border: 10px solid #1B1B1D; box-shadow: var(--shadow); aspect-ratio: 4/3.4; display: grid; place-items: center }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block }
.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 32px; padding-block: 28px }
@media (max-width: 860px) { .catalog { grid-template-columns: 1fr } }
.filters { display: grid; gap: 18px; align-content: start }
.filters .grp { display: grid; gap: 6px }
.filters .grp b { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted) }
.filters label { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer }
.pdp { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; padding-block: 30px }
@media (max-width: 900px) { .pdp { grid-template-columns: 1fr; gap: 24px } }
.pdp .stage { background: #0E0F11; display: grid; place-items: center; border-radius: 2px; overflow: hidden; position: relative }
.pdp .stage img { width: 100%; display: block }
.pdp h1 { font-family: var(--f-display); font-weight: 500; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05 }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 13.5px; margin: 0 }
.specs dt { color: var(--muted) } .specs dd { margin: 0; font-family: var(--f-mono); font-size: 12.5px; align-self: center }
.config { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 20px; display: grid; gap: 16px }
.opt { display: grid; gap: 7px }
.opt > b { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted) }
.seg { display: flex; flex-wrap: wrap; gap: 6px }
.seg button { border: 1px solid var(--line2); background: var(--surface); border-radius: 5px; padding: 6px 12px; cursor: pointer; font-size: 13.5px; font-weight: 500 }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink) }
.seg button[data-blocked="1"] { text-decoration: line-through; color: var(--muted) }
.price-line { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; gap: 10px; flex-wrap: wrap }
.price-line .v { font-family: var(--f-display); font-size: 34px; font-weight: 600 }
.breakdown { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted) }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px }
.steps span { font-size: 13px; padding: 6px 12px; border-radius: 99px; background: var(--sunk); color: var(--muted); font-weight: 600 }
.steps span.on { background: var(--ink); color: var(--bg) } .steps span.done { background: var(--ok-soft); color: var(--ok) }
.checkout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; padding-block: 28px; align-items: start }
@media (max-width: 900px) { .checkout { grid-template-columns: 1fr } }
.summary { position: sticky; top: 64px }
.line-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding-block: 12px; border-bottom: 1px solid var(--line) }
.line-item img { width: 64px; height: 44px; object-fit: cover; border-radius: 2px; background: var(--sunk) }
.paybox { display: grid; gap: 10px }
.radio-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line2); border-radius: 8px; padding: 12px 14px; cursor: pointer; background: var(--surface) }
.radio-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.qr { width: 150px; height: 150px; image-rendering: pixelated; background: #fff; padding: 8px; border: 1px solid var(--line) }
.s-foot { margin-top: 64px; border-top: 1px solid var(--line); padding-block: 28px; color: var(--muted); font-size: 13px }

/* ---------- PORTAL ---------- */
.p-head { background: var(--surface); border-bottom: 1px solid var(--line) }
.p-head .wrap { padding-block: 20px 0; display: grid; gap: 14px }
.p-head h1 { font-family: var(--f-display); font-weight: 500; font-size: 32px }
.tabs { display: flex; gap: 4px; overflow-x: auto }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--muted); white-space: nowrap }
.tabs button[aria-current="true"] { color: var(--ink); border-color: var(--accent) }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: grid; gap: 4px; text-align: left; cursor: default; min-width: 0 }
button.kpi { cursor: pointer } button.kpi:hover { border-color: var(--ink2) }
.kpi .l { font-size: 12.5px; color: var(--muted); font-weight: 600 }
.kpi .v { font-size: clamp(18px, 4.6vw, 25px); overflow-wrap: anywhere; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.15 }
.kpi .s { font-size: 12px; color: var(--muted) }
.kpi.warn { border-left: 3px solid var(--warn) } .kpi.bad { border-left: 3px solid var(--bad) } .kpi.ok { border-left: 3px solid var(--ok) }
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px } @media (max-width: 900px) { .two { grid-template-columns: 1fr } }
.list { display: grid } .list > * { padding-block: 10px; border-bottom: 1px solid var(--line) } .list > *:last-child { border-bottom: 0 }

/* ---------- BACKOFFICE ---------- */
.adm { display: grid; grid-template-columns: 236px 1fr; min-height: calc(100vh - 44px) }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; display: grid; gap: 2px; align-content: start; position: sticky; top: 44px; height: calc(100vh - 44px); overflow-y: auto }
.side .brand { font-family: var(--f-display); font-weight: 700; font-size: 19px; letter-spacing: .05em; padding: 4px 10px 14px }
.side .brand small { display: block; font-family: var(--f-mono); font-weight: 400; font-size: 10.5px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; margin-top: 4px }
.side button { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink2) }
.side button:hover { background: var(--sunk) }
.side button[aria-current="true"] { background: var(--accent-soft); color: var(--accent) }
.side .sep { height: 1px; background: var(--line); margin: 8px 6px }
.side .cnt { font-size: 11px; font-weight: 700; background: var(--bad); color: #fff; border-radius: 99px; padding: 0 6px }
.main { padding: 24px 28px 60px; min-width: 0; display: grid; gap: 18px; align-content: start }
.main > .hd { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap }
.main h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em }
@media (max-width: 900px) { .adm { grid-template-columns: 1fr } .side { position: static; height: auto; display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px } .side .brand, .side .sep { display: none } .side button { white-space: nowrap } .main { padding: 18px 16px 48px } }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }
.toolbar .inp { width: auto; min-width: 140px; padding: 7px 10px }
.chart { width: 100%; height: auto; display: block }
.chart text { fill: var(--muted); font-family: var(--f-mono); font-size: 10.5px }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 4px 12px; align-items: center; font-size: 13px }
.hbar .bar { grid-column: 1 / -1; height: 6px; background: var(--sunk); border-radius: 3px; overflow: hidden; margin-bottom: 8px }
.hbar .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px }
.alert-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 6px; font-size: 14px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); text-align: left; width: 100% }
.alert-row:hover { border-color: var(--ink2) }
.sev { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none }
.sev.bad { background: var(--bad) } .sev.warn { background: var(--warn) } .sev.info { background: var(--info) } .sev.ok { background: var(--ok) }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px }
.cal .dh { font-size: 11px; color: var(--muted); text-align: center; text-transform: uppercase; letter-spacing: .06em }
.cal .d { min-height: 74px; border: 1px solid var(--line); border-radius: 5px; padding: 5px; background: var(--surface); font-size: 11.5px; display: grid; align-content: start; gap: 3px; min-width: 0 }
.cal .d.off { background: none; border-style: dashed; opacity: .45 }
.cal .d.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent) }
.cal .ev { background: var(--warn-soft); color: var(--warn); border-radius: 3px; padding: 1px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; border: 0; text-align: left; font-size: 11px; font-weight: 600 }
.cal .ev.x { background: var(--accent-soft); color: var(--accent) }
.timeline { position: relative; height: 30px; background: var(--sunk); border-radius: 4px; margin-block: 4px }
.timeline .seg2 { position: absolute; top: 4px; height: 22px; border-radius: 3px; font-size: 10.5px; color: #fff; padding: 3px 6px; overflow: hidden; white-space: nowrap; font-weight: 600 }
.timeline .nowl { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--bad) }
.integ { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px }

/* chat */
.chat { display: grid; grid-template-rows: 1fr auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); height: 560px; max-height: 70vh; min-width: 0 }
.msgs { overflow-y: auto; padding: 16px; display: grid; gap: 12px; align-content: start }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.45 }
.msg.u { justify-self: end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 3px }
.msg.a { justify-self: start; background: var(--sunk); border-bottom-left-radius: 3px }
.msg .crit { display: block; margin-top: 8px; font-family: var(--f-mono); font-size: 11px; color: var(--muted) }
.msg .links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px }
.chat form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line) }
.sugs { display: flex; gap: 6px; flex-wrap: wrap }

/* modal e toast */
.overlay { position: fixed; inset: 0; background: rgba(10,12,16,.5); display: grid; place-items: center; z-index: 100; padding: 16px }
.modal { background: var(--surface); border-radius: 10px; max-width: 640px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.3); display: grid; gap: 14px }
.modal h2 { font-size: 20px }
.modal.wide { max-width: 860px }
.toasts { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); right: 18px; display: grid; gap: 8px; z-index: 120; max-width: min(420px, calc(100vw - 36px)) }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 8px; font-size: 14px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; justify-content: space-between; animation: tin .25s ease }
.toast.bad { background: var(--bad); color: #fff }
.toast button { background: none; border: 1px solid currentColor; color: inherit; border-radius: 5px; padding: 3px 8px; cursor: pointer; font-size: 12px; font-weight: 600 }
@keyframes tin { from { transform: translateY(8px); opacity: 0 } }
.spin { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .7s linear infinite; display: inline-block }
@keyframes sp { to { transform: rotate(360deg) } }
.cert { border: 1px solid var(--line2); padding: 22px; border-radius: 6px; background: var(--bg); display: grid; gap: 10px }
.cert h3 { font-family: var(--f-display); font-size: 24px; font-weight: 500 }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important } }
/* ---------- Central de Inteligência ---------- */
.ia-actor { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap }
.opps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px }
.opp { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--line2); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; align-content: start; min-width: 0 }
.opp.alta { border-top-color: var(--bad) } .opp.media { border-top-color: var(--warn) } .opp.baixa { border-top-color: var(--info) }
.opp .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums }
.opp dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; font-size: 13px } .opp dt { color: var(--muted) } .opp dd { margin: 0 }
.opp .why { font-size: 13px; color: var(--ink2); background: var(--sunk); border-radius: 6px; padding: 8px 10px }
.drawer-bg { position: fixed; inset: 0; background: rgba(10,12,16,.38); z-index: 60 }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(660px, 100%); background: var(--surface); border-left: 1px solid var(--line); z-index: 61; overflow-y: auto; padding: 22px 22px 48px; display: grid; gap: 18px; align-content: start; box-shadow: -12px 0 32px rgba(0,0,0,.14) }
.drawer h2 { margin: 2px 0 0; font-size: 20px }
.dsec { display: grid; gap: 8px; min-width: 0 }
.dsec > h4 { margin: 0; font-size: 11.5px; font-family: var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 14px }
.dsec > h4 i { font-style: normal; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px }
.conds { display: grid; gap: 7px } .cond { display: grid; grid-template-columns: 20px 1fr; gap: 8px; font-size: 13.5px; align-items: start }
.cond .ic { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; margin-top: 2px }
.cond .ic.ok { background: var(--ok-soft); color: var(--ok) } .cond .ic.no { background: var(--bad-soft); color: var(--bad) } .cond .ic.amb { background: var(--warn-soft); color: var(--warn) }
.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 4px 14px; font-size: 13.5px; margin: 0 } .kv dt { color: var(--muted) } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere }
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: stretch }
.blk { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: grid; gap: 8px; align-content: start; position: relative; font-size: 13px; min-width: 0 }
.blk .eyebrow { color: var(--accent) }
.blk:not(:last-child)::after { content: '→'; position: absolute; right: -13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; width: 12px; text-align: center }
.tl { display: grid } .tl > div { display: grid; grid-template-columns: 112px 1fr; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--line) }
.diff { display: grid; gap: 4px; font-size: 13px } .diff del { color: var(--bad) } .diff ins { color: var(--ok); text-decoration: none; font-weight: 600 }
@media (max-width: 980px) { .flow { grid-template-columns: 1fr } .blk:not(:last-child)::after { content: '↓'; right: auto; left: 50%; top: auto; bottom: -16px; transform: translateX(-50%) } }
@media (max-width: 560px) { .tl > div { grid-template-columns: 1fr; gap: 2px } .kv { grid-template-columns: 1fr } .kv dt { margin-top: 4px } .drawer { padding: 16px 16px 40px } }
.sx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 }
.sx { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; transition: opacity .2s }
.sx.pend { opacity: .45 } .sx .ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--sunk); color: var(--muted) }
.sx.run .ic { background: var(--accent-soft); color: var(--accent) } .sx.ok .ic { background: var(--ok-soft); color: var(--ok) } .sx.fail .ic { background: var(--bad-soft); color: var(--bad) }
.sxd { font-size: 13px; margin-top: 4px; display: grid; gap: 6px } .sx.fresh .sxd { animation: tin .25s ease-out }
/* ---------- Painéis configuráveis ---------- */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948 }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767 } }
:root[data-theme="dark"] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767 }
.pn-area { display: grid; gap: 12px; min-width: 0 }
.pn-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px }
.pn-lbl { font-size: 13px; color: var(--muted); font-weight: 600 }
.pn-dt { width: auto; padding: 5px 8px }
.pn-fchip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--ink); border-radius: 99px; padding: 3px 4px 3px 10px; font-size: 12.5px; font-weight: 600 }
.pn-fchip button { border: 0; background: transparent; color: var(--ink2); cursor: pointer; font-size: 15px; line-height: 1; width: 22px; height: 22px; border-radius: 50% }
.pn-fchip button:hover { background: var(--surface) }
.pn-per { font-size: 12px }
.pn-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px }
.pn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start }
.pn { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: grid; gap: 10px; align-content: start; min-width: 0 }
.pn-largo { grid-column: 1 / -1 }
.pn-hd { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start }
.pn-hd h3 { margin: 0; font-size: 14.5px; line-height: 1.3 }
.pn-cartao .pn-hd h3 { font-size: 12.5px; color: var(--muted); font-weight: 600 }
.pn-sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px }
.pn-acts { display: flex; gap: 4px; align-items: center; flex-shrink: 0 }
.pn-menu { border: 1px solid transparent; background: transparent; border-radius: 6px; width: 32px; height: 32px; cursor: pointer; color: var(--ink2); font-size: 18px; line-height: 1 }
.pn-menu:hover, .pn-menu:focus-visible { border-color: var(--line2); background: var(--sunk) }
.pn-bd { display: grid; gap: 6px; min-width: 0 }
.pn-v { font-size: clamp(19px, 4.6vw, 25px); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.15; overflow-wrap: anywhere }
.pn-d { font-size: 12px; color: var(--muted) } .pn-d.bom { color: var(--ok) } .pn-d.ruim { color: var(--bad) }
.pn-spark { width: 100%; max-width: 220px; height: 34px; display: block }
.pn-pie { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 14px; align-items: center }
.pn-pie svg { width: 100%; height: auto }
.pn-pie text { fill: var(--muted); font-family: var(--f-mono); font-size: 10.5px } .pn-pie text.pn-tot { fill: var(--ink); font-size: 11.5px; font-weight: 700 }
.pn-leg { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px }
.pn-leg li { display: flex; gap: 8px; align-items: center; min-width: 0 } .pn-leg li span.grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.pn-leg i { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0 }
.pn-add { border: 1.5px dashed var(--line2); background: transparent; border-radius: 8px; min-height: 120px; display: grid; place-content: center; gap: 2px; color: var(--ink2); cursor: pointer; font-weight: 600; font-size: 14px; padding: 16px }
.pn-add span { font-size: 28px; line-height: 1; color: var(--accent) } .pn-add small { color: var(--muted); font-weight: 500; font-size: 12px }
.pn-add:hover, .pn-add:focus-visible { border-color: var(--accent); background: var(--accent-soft) }
.pn-rec { font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap }
.pn-mlist { display: grid; gap: 8px }
.modal:has(.pn-builder) { max-width: 1080px }
.pn-builder { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start }
.pn-prev { position: sticky; top: 0; display: grid; gap: 8px; background: var(--sunk); border-radius: 8px; padding: 12px }
.pn-dets { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px }
.pn-det summary { cursor: pointer; font-size: 13.5px; padding: 4px 0 }
.pn-vals { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 12px; padding: 4px 0 8px; font-size: 13px; border: 0; margin: 0 }
.pn-vals legend { font-size: 13px; font-weight: 600; margin-bottom: 6px }
.pn-vals label { display: flex; gap: 6px; align-items: center; min-height: 28px }
@media (max-width: 900px) {
  .pn-grid { grid-template-columns: 1fr } .pn-builder { grid-template-columns: 1fr } .pn-prev { position: static }
  .pn-pie { grid-template-columns: 120px minmax(0, 1fr) } .pn-bar > .row:last-child { margin-left: 0 !important }
}
/* ---------- UX pacote A: menu, listas, painéis compactos e celular ---------- */
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0 }
.side .grp { display: grid; gap: 2px; margin-top: 10px }
.side .grp-t { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 4px 10px 2px }
.side button { justify-content: flex-start; min-height: 38px }
.side button .lbl { flex: 1; min-width: 0 }
.side button[aria-current="true"] { box-shadow: inset 3px 0 0 var(--accent) }
.side .cnt { display: inline-flex; align-items: center; gap: 5px; background: none; color: var(--muted); font-size: 12px; font-weight: 600; padding: 0; border-radius: 0; flex: none }
.side .cnt .lbl { flex: none }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0 }
.dot.bad { background: var(--bad) } .dot.warn { background: var(--warn) } .dot.info { background: var(--info) }
.side-pe { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 6px }
.side .usr { display: grid; gap: 4px; padding: 4px 10px; font-size: 11.5px; color: var(--muted); font-weight: 600 }
.side .usr select { padding: 6px 8px; font-size: 13px; width: 100% }
.side .side-rec { color: var(--muted); font-weight: 500; font-size: 13px }
@media (min-width: 901px) {
  .adm.rec { grid-template-columns: 64px 1fr }
  .adm.rec .side { padding-inline: 8px }
  .adm.rec .side .lbl, .adm.rec .side .grp-t, .adm.rec .side .usr { display: none }
  .adm.rec .side button { justify-content: center; padding: 9px 0; position: relative }
  .adm.rec .side .cnt { position: absolute; top: 7px; right: 9px }
  .adm.rec .side .brand { font-size: 0; padding: 4px 0 10px; text-align: center }
  .adm.rec .side .brand::before { content: "CS"; font-size: 16px; letter-spacing: .08em }
  .adm.rec .side .brand small { display: none }
}
@media (max-width: 900px) {
  .side .grp { display: contents } .side .grp-t, .side .side-rec { display: none }
  .side .side-pe { display: contents } .side .usr { padding: 0 6px; flex: none } .side .usr .lbl { display: none } .side .usr select { width: auto }
  .side button { min-height: 40px }
}
/* filtros com rótulo visível, colunas ordenáveis */
.toolbar { align-items: flex-end }
.tb-f { display: grid; gap: 3px; min-width: 0 }
.tb-f > span { font-size: 11.5px; font-weight: 600; color: var(--muted) }
.th-s { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: center }
.th-s span { color: var(--muted); font-size: .9em }
.th-s:hover { color: var(--accent) }
th.r .th-s { width: 100%; justify-content: flex-end }
th[aria-sort="ascending"] .th-s, th[aria-sort="descending"] .th-s { color: var(--accent) }
/* painéis compactos (telas de lista e Central) */
.pn-compacta .pn-cbar { display: grid; gap: 10px }
.pn-compacta .pn-cards { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px }
.pn-compacta .pn { padding: 10px 12px; gap: 4px }
.pn-compacta .pn-sub, .pn-compacta .pn-spark { display: none }
.pn-compacta .pn-v { font-size: 20px }
/* celular: ficha do cliente e página de produto sem rolagem lateral */
.specs4 { grid-template-columns: auto 1fr auto 1fr; gap: 6px 18px }
@media (max-width: 640px) { .specs4 { grid-template-columns: auto 1fr } }
.pdp > * { min-width: 0 }
.mag-big { max-width: 100%; height: auto }
@media (max-width: 900px) { .pdp { grid-template-columns: minmax(0, 1fr) } }
/* abas e conteúdo principal não alargam a página no celular (rolagem fica dentro da faixa de abas) */
.adm > .main { min-width: 0 }
.tabs { max-width: 100%; min-width: 0 }
.toolbar > .grow { flex: 1 0 auto }
