:root {
  --bg: #f3f4f9; --panel: #ffffff; --text: #13151d; --muted: #646b7d; --faint: #9aa1b2;
  --border: #e5e8f0; --hover: #f0f2f8; --code: #f0f2f8;
  --accent: #4f46e5; --on-accent: #ffffff;
  --accent-fg: var(--accent);
  --accent-soft: color-mix(in srgb, var(--accent) 10%, var(--panel));
  --accent-line: color-mix(in srgb, var(--accent) 28%, var(--border));
  --grad: linear-gradient(135deg, color-mix(in srgb, var(--accent) 78%, #fff), var(--accent) 52%, color-mix(in srgb, var(--accent) 68%, #000));
  --c2: #14b8a6; --c3: #f59e0b;
  --ok: #15803d; --ok-soft: #dcfce7; --warn: #b45309; --warn-soft: #fef3c7; --err: #dc2626; --err-soft: #fee2e2;
  --shadow: 0 1px 2px rgba(19, 21, 29, .05), 0 8px 24px -14px rgba(19, 21, 29, .14);
  --side-bg: linear-gradient(185deg, #14173a 0%, #0b0d1e 70%); --side-text: #aab0cc; --side-line: rgba(255, 255, 255, .08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0c12; --panel: #13161e; --text: #e8eaf0; --muted: #9aa1b2; --faint: #6c7385;
    --border: #232733; --hover: #1b1f2a; --code: #1b1f2a;
    --c2: #2dd4bf; --c3: #fbbf24; --accent-fg: color-mix(in srgb, var(--accent) 55%, #fff);
    --ok: #4ade80; --ok-soft: #10301d; --warn: #fbbf24; --warn-soft: #382c0c; --err: #f87171; --err-soft: #3b1616;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -16px rgba(0, 0, 0, .6);
    --side-bg: linear-gradient(185deg, #0d0f1d 0%, #07080f 70%);
  }
}
:root[data-theme="dark"] {
  --bg: #0a0c12; --panel: #13161e; --text: #e8eaf0; --muted: #9aa1b2; --faint: #6c7385;
  --border: #232733; --hover: #1b1f2a; --code: #1b1f2a;
  --c2: #2dd4bf; --c3: #fbbf24; --accent-fg: color-mix(in srgb, var(--accent) 55%, #fff);
  --ok: #4ade80; --ok-soft: #10301d; --warn: #fbbf24; --warn-soft: #382c0c; --err: #f87171; --err-soft: #3b1616;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -16px rgba(0, 0, 0, .6);
  --side-bg: linear-gradient(185deg, #0d0f1d 0%, #07080f 70%);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: -.003em; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--accent-fg); }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.02em; }
h1 { font-size: 24px; font-weight: 700; } h2 { font-size: 16px; font-weight: 650; } h3 { font-size: 14px; font-weight: 600; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
textarea { resize: vertical; min-height: 90px; }
input[type="color"] { padding: 2px; height: 38px; width: 64px; }
input[type="checkbox"] { width: auto; }
label { display: grid; gap: 5px; font-weight: 550; font-size: 13px; }
label small, .hint { color: var(--muted); font-weight: 400; font-size: 12px; }
code, .mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
[hidden] { display: none !important; }

/* ---------- botoes ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); cursor: pointer; font-weight: 550; white-space: nowrap; text-decoration: none; color: var(--text); transition: background .15s, transform .15s, box-shadow .15s, filter .15s; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.primary { background: var(--grad); border-color: transparent; color: var(--on-accent); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--accent) 90%, transparent); }
.btn.primary:hover { filter: brightness(1.07); background: var(--grad); }
.btn.danger { color: var(--err); }
.btn.small { padding: 5px 11px; font-size: 13px; border-radius: 9px; }
.btn.link { border: none; background: none; padding: 0; color: var(--accent-fg); }
.btn.light { background: rgba(255, 255, 255, .96); color: #14161d; border-color: transparent; }
.btn.light:hover { background: #fff; }
.btn.ghost-light { background: rgba(255, 255, 255, .14); color: var(--on-accent); border-color: rgba(255, 255, 255, .32); }
.btn.ghost-light:hover { background: rgba(255, 255, 255, .24); }

/* ---------- login ---------- */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 16px; background: radial-gradient(60% 50% at 15% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), radial-gradient(50% 45% at 100% 100%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 390px; background: var(--panel); border: 1px solid var(--border); border-radius: 22px; padding: 30px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 21px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-weight: 400; font-size: 12px; letter-spacing: 0; }
.brand-icon { width: 34px; height: 34px; object-fit: contain; flex: none; }
.logo { width: 34px; height: 34px; border-radius: 10px; font-size: 0; color: transparent; background: url('/static/icon.png') center / contain no-repeat; display: inline-block; vertical-align: middle; box-shadow: none; flex: none; }
.form-error { margin: 0; color: var(--err); background: var(--err-soft); padding: 8px 11px; border-radius: 10px; font-size: 13px; }

/* ---------- estrutura ---------- */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side-bg); color: var(--side-text); padding: 18px 14px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { color: #fff; padding: 4px 8px 20px; }
.side .brand small { color: var(--side-text); display: block; line-height: 1.1; margin-top: 2px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: #6d7396; padding: 16px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 11px; color: var(--side-text); text-decoration: none; font-weight: 550; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: color-mix(in srgb, var(--accent) 34%, transparent); color: #fff; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
.nav svg { width: 18px; height: 18px; flex: none; }
.side .foot { margin-top: auto; border-top: 1px solid var(--side-line); padding-top: 14px; display: grid; gap: 12px; }
.user-card { position: relative; display: flex; align-items: center; gap: 9px; padding: 8px 8px 8px 9px; border-radius: 15px; background: rgba(255, 255, 255, .05); }
.av { width: 38px; height: 38px; border-radius: 13px; background: var(--grad); color: var(--on-accent); display: grid; place-items: center; font-weight: 750; font-size: 16px; flex: none; box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--accent) 80%, transparent); }
.who-text { flex: 1; min-width: 0; display: grid; }
.who-text b { color: #fff; font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text span { color: var(--side-text); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gear { width: 31px; height: 31px; border-radius: 10px; border: none; background: transparent; color: var(--side-text); cursor: pointer; display: grid; place-items: center; flex: none; transition: background .15s, color .15s; }
.gear svg { width: 18px; height: 18px; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.gear:hover, .gear[aria-expanded="true"] { background: rgba(255, 255, 255, .11); color: #fff; }
#btnUser[aria-expanded="true"] svg { transform: rotate(75deg); }
.user-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 10px); z-index: 60; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 17px; box-shadow: 0 22px 50px -14px rgba(0, 0, 0, .55); padding: 6px; animation: popIn .2s cubic-bezier(.2, .8, .2, 1); }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.pop-head { display: flex; align-items: center; gap: 11px; padding: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.pop-head .av { width: 40px; height: 40px; }
.pop-head div { min-width: 0; display: grid; } .pop-head b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-head small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-pop button[role="menuitem"] { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 11px; border: none; background: none; border-radius: 11px; cursor: pointer; color: var(--text); font-size: 13.5px; font-weight: 550; text-align: left; transition: background .12s; }
.user-pop button[role="menuitem"]:hover, .user-pop button[role="menuitem"]:focus-visible { background: var(--hover); outline: none; }
.user-pop button svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.user-pop button.danger, .user-pop button.danger svg { color: var(--err); }
.user-pop hr { border: none; border-top: 1px solid var(--border); margin: 4px 6px; }
.side .btn { background: rgba(255, 255, 255, .07); border-color: transparent; color: #dfe2f2; }
.side .btn:hover { background: rgba(255, 255, 255, .14); }
main { padding: 26px clamp(16px, 2.4vw, 56px) 56px; min-width: 0; width: 100%; }  /* ocupa toda a largura disponivel */
#view { animation: viewIn .4s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.mobile-bar { display: none; }
.banner { display: flex; align-items: center; gap: 10px; padding: 11px 15px; margin-bottom: 16px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 550; flex-wrap: wrap; }
.banner .btn { margin-left: auto; }
.banner.ctx { background: var(--accent-soft); color: var(--accent-fg); }

/* ---------- cartoes e grades ---------- */
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid > * { margin-bottom: 0 !important; }
.two-one { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.two, .half { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card, .panel { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.panel { margin-bottom: 16px; }
.card-head, .panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head p, .panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.panel-head p b { color: var(--text); font-weight: 650; }
.muted { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty.small { padding: 18px 8px; font-size: 13px; }

/* ---------- boas-vindas ---------- */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 22px; padding: 26px 30px; margin-bottom: 18px; border-radius: 24px; background: var(--grad); color: var(--on-accent); box-shadow: 0 24px 50px -26px color-mix(in srgb, var(--accent) 85%, transparent); flex-wrap: wrap; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 68%); pointer-events: none; }
.hero::before { width: 360px; height: 360px; right: -80px; top: -160px; }
.hero::after { width: 260px; height: 260px; left: 28%; bottom: -170px; opacity: .6; }
.hero > * { position: relative; z-index: 1; }
.hero-orb { position: relative; width: 66px; height: 66px; border-radius: 22px; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .34); display: grid; place-items: center; font-size: 28px; font-weight: 750; flex: none; backdrop-filter: blur(6px); }
.hero-orb svg { width: 30px; height: 30px; }
.hero-orb i { position: absolute; right: -4px; bottom: -4px; width: 15px; height: 15px; border-radius: 50%; background: #22c55e; border: 3px solid color-mix(in srgb, var(--accent) 80%, #000); animation: live 2.2s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 100% { box-shadow: 0 0 0 11px rgba(34, 197, 94, 0); } }
.hero-text { flex: 1; min-width: 240px; }
.hero h1 { font-size: 27px; color: inherit; }
.hero p { margin: 6px 0 0; opacity: .92; font-size: 15px; }
.hero p b { font-weight: 700; }
.hero-chips { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.hero-chips span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; background: rgba(255, 255, 255, .16); font-size: 12.5px; font-weight: 550; }
.hero-chips svg { width: 14px; height: 14px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- indicadores ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 18px 18px 16px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s; }
.kpi:hover { transform: translateY(-3px); border-color: var(--accent-line); box-shadow: 0 16px 34px -18px color-mix(in srgb, var(--accent) 45%, transparent); }
.kpi-top { display: flex; align-items: center; gap: 9px; }
.kpi-ic { width: 34px; height: 34px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-fg); display: grid; place-items: center; flex: none; }
.kpi-ic svg { width: 18px; height: 18px; }
.kpi-label { color: var(--muted); font-size: 13px; font-weight: 550; line-height: 1.25; }
.kpi .delta { margin-left: auto; }
.kpi-val { margin-top: 12px; font-size: 31px; font-weight: 720; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-sub { margin-top: 5px; color: var(--muted); font-size: 12.5px; padding-right: 76px; min-height: 2.6em; }
.kpi-spark { position: absolute; right: 14px; bottom: 14px; width: 72px; height: 34px; }
.spark { width: 100%; height: 100%; display: block; overflow: visible; }
.sp-line { stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.delta.up { background: var(--ok-soft); color: var(--ok); } .delta.down { background: var(--err-soft); color: var(--err); }
.delta.flat { background: var(--hover); color: var(--muted); } .delta.new { background: var(--accent-soft); color: var(--accent-fg); }

/* ---------- graficos ---------- */
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--hover); gap: 2px; }
.seg button { border: none; background: none; padding: 5px 12px; border-radius: 8px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.seg button.on { background: var(--panel); color: var(--accent-fg); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.chart-legend { display: flex; gap: 16px; margin: -4px 0 6px; font-size: 12px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.lg-solid { width: 18px; height: 3px; border-radius: 3px; background: var(--accent); }
.lg-dash { width: 18px; height: 0; border-top: 2px dashed var(--faint); }
.chart { min-height: 200px; }
.chart svg { display: block; overflow: visible; }
.c-grid { stroke: var(--border); stroke-width: 1; }
.c-axis { fill: var(--faint); font-size: 11px; }
.c-line { stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
.c-prev { stroke: var(--faint); stroke-width: 1.8; stroke-dasharray: 5 5; opacity: .85; }
.c-dot { stroke: var(--panel); stroke-width: 2.5; }
.c-pulse { fill: none; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ping 2.2s ease-out infinite; }
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(3.2); opacity: 0; } }
.c-cross { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 3 3; }
.c-hover { fill: var(--panel); stroke-width: 2.6; }
.c-bar { opacity: .9; transition: opacity .15s, filter .15s; } .c-bar:hover { opacity: 1; filter: brightness(1.12); }
.ctip { position: fixed; z-index: 90; display: none; pointer-events: none; background: var(--text); color: var(--bg); padding: 9px 12px; border-radius: 11px; font-size: 12.5px; line-height: 1.35; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .4); max-width: 260px; }
.ctip b { display: block; font-size: 11.5px; opacity: .65; font-weight: 550; text-transform: capitalize; }
.ctip div { font-size: 17px; font-weight: 700; } .ctip span { font-size: 12px; opacity: .65; font-weight: 450; }
.ctip small { display: block; opacity: .7; margin-top: 3px; }
.donut-host { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; min-height: 150px; }
.donut { width: 156px; height: 156px; flex: none; overflow: visible; }
.d-track { fill: none; stroke: var(--hover); stroke-width: 14; }
.d-seg { fill: none; stroke-width: 14; cursor: pointer; transition: stroke-width .15s; } .d-seg:hover { stroke-width: 17; }
.d-value { font-size: 21px; font-weight: 720; fill: var(--text); } .d-sub { font-size: 8.5px; fill: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 9px; } .legend i { width: 10px; height: 10px; border-radius: 4px; flex: none; }
.legend b { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; }
.ring-host { display: grid; place-items: center; margin: 2px 0 8px; }
.ring { width: 172px; height: 172px; overflow: visible; }
.r-track { fill: none; stroke: var(--hover); stroke-width: 12; }
.r-prog { fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round; }
.ring.warn .r-prog { stroke: var(--c3); } .ring.err .r-prog { stroke: var(--err); }
.r-value { font-size: 31px; font-weight: 740; fill: var(--text); } .r-sub { font-size: 10.5px; fill: var(--muted); }
.plan-list { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 2px; }
.plan-list li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.plan-list li:last-child { border: none; } .plan-list span { color: var(--muted); } .plan-list b { font-variant-numeric: tabular-nums; }
.plan-note { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-size: 12.5px; line-height: 1.4; }
.plan-note.warn { background: var(--warn-soft); color: var(--warn); }
.plan-note svg, .alert svg, .good svg, .mini-stat svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.heat .hl { font-size: 10px; color: var(--faint); white-space: nowrap; } .heat .hd { font-size: 11.5px; color: var(--muted); }
.hc { height: clamp(24px, 1.7vw, 38px); border-radius: 6px; background: color-mix(in srgb, var(--accent) var(--k, 0%), var(--hover)); animation: pop .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 13ms); }
.hc.z { opacity: .65; } .hc:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
@keyframes pop { from { opacity: 0; transform: scale(.35); } }
.hbars { display: grid; }
.hb { display: grid; grid-template-columns: 96px 1fr 36px; gap: 10px; align-items: center; margin: 8px 0; font-size: 13.5px; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; } .hb b { text-align: right; font-variant-numeric: tabular-nums; }
.hb-t { height: 10px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.hb-t i { display: block; width: 0; height: 100%; border-radius: 99px; background: var(--grad); transition: width 1s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d); }
.mini-stat { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 11px 13px; border-radius: 12px; background: var(--accent-soft); color: var(--text); font-size: 13px; }
.mini-stat svg { color: var(--accent-fg); }

/* ---------- listas ---------- */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.feed-item { display: flex; align-items: center; gap: 12px; padding: 9px 8px; margin: 0 -8px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.feed-item:hover { background: var(--hover); }
.feed-av, .chip-av { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; flex: none; background: color-mix(in srgb, var(--c, var(--accent)) 16%, var(--panel)); color: var(--c, var(--accent)); }
.chip-av { width: 30px; height: 30px; border-radius: 10px; display: inline-grid; vertical-align: middle; margin-right: 10px; }
.feed-main { flex: 1; min-width: 0; display: grid; }
.feed-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13.5px; }
.feed-main small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed time { color: var(--faint); font-size: 12px; white-space: nowrap; }
.gap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gap-list li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 14px; transition: border-color .15s, background .15s; }
.gap-list li:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.gap-n { min-width: 34px; text-align: center; padding: 2px 8px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: 12.5px; }
.gap-q { flex: 1; min-width: 0; font-weight: 550; overflow-wrap: anywhere; } .gap-list small { color: var(--faint); white-space: nowrap; }
.good { display: flex; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--ok-soft); color: var(--ok); font-weight: 550; }
.alerts { display: grid; gap: 8px; margin-bottom: 16px; } .alerts:empty { display: none; }
.alert { display: flex; align-items: center; gap: 11px; padding: 11px 15px; border-radius: 14px; font-size: 13.5px; }
.alert.info { background: var(--accent-soft); color: var(--accent-fg); } .alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.danger { background: var(--err-soft); color: var(--err); } .alert.muted { background: var(--hover); color: var(--muted); }
.alert[data-go] { cursor: pointer; } .alert[data-go]:hover { filter: brightness(.97); }
.alert b { font-weight: 700; }

/* ---------- tabelas ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--hover); } tr.click.sel td { background: var(--accent-soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 550; background: var(--hover); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); } .badge.accent { background: var(--accent-soft); color: var(--accent-fg); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: clamp(240px, 30vw, 680px); }
.use { display: flex; justify-content: space-between; font-size: 12.5px; } .use em { font-style: normal; color: var(--muted); }
.bar { height: 6px; background: var(--hover); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.bar.warn i { background: var(--c3); } .bar.err i { background: var(--err); }
.row-spark { width: 92px; height: 30px; }

/* ---------- formularios e outros ---------- */
.form { display: grid; gap: 14px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.saved { color: var(--ok); font-size: 13px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 550; }
.drop { border: 1.5px dashed var(--border); border-radius: 16px; padding: 28px; text-align: center; color: var(--muted); cursor: pointer; transition: all .15s; }
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-fg); }
.drop b { color: var(--text); }
.job { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; font-size: 13px; }
.copy-box { display: flex; gap: 8px; align-items: stretch; }
.copy-box code { flex: 1; background: var(--code); border-radius: 10px; padding: 10px 13px; overflow-x: auto; white-space: nowrap; min-width: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 70vh; overflow-y: auto; padding-right: 4px; }
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 16px; overflow-wrap: anywhere; }
.bubble .txt { white-space: pre-wrap; }
.bubble.user { align-self: flex-end; background: var(--accent-soft); border: 1px solid var(--accent-line); } .bubble.assistant { align-self: flex-start; background: var(--hover); }
.bubble .when { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.bubble details { margin-top: 6px; font-size: 12px; color: var(--muted); white-space: normal; } .bubble details li { margin: 2px 0; }
.bubble a { color: var(--accent-fg); word-break: break-word; }
/* ---------- janelas (modais) ---------- */
dialog { padding: 0; border: 1px solid var(--border); border-radius: 24px; background: var(--panel); color: var(--text); width: min(580px, calc(100vw - 24px)); max-height: calc(100vh - 28px); box-shadow: 0 46px 100px -24px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .12); overflow: hidden; }
dialog.wide { width: min(820px, calc(100vw - 24px)); }
dialog.mini { width: min(460px, calc(100vw - 24px)); }
dialog[open] { display: flex; flex-direction: column; animation: modalIn .3s cubic-bezier(.2, .9, .3, 1.08); }
dialog > form { display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 28px); }
dialog::backdrop { background: radial-gradient(60% 50% at 50% 28%, color-mix(in srgb, var(--accent) 24%, rgba(8, 10, 22, .55)), rgba(8, 10, 22, .66)); backdrop-filter: blur(6px); animation: fadeIn .25s ease both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.96); } }
@keyframes fadeIn { from { opacity: 0; } }
.m-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px 18px 24px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, var(--panel)), var(--panel)); }
.m-ic { width: 44px; height: 44px; border-radius: 15px; flex: none; display: grid; place-items: center; background: var(--grad); color: var(--on-accent); box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--accent) 90%, transparent); }
.m-ic svg { width: 21px; height: 21px; }
.m-ic.danger { background: linear-gradient(135deg, #f87171, #b91c1c); color: #fff; box-shadow: 0 10px 22px -10px rgba(220, 38, 38, .8); }
.m-title { min-width: 0; flex: 1; }
.m-title h2 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-title p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.m-x { flex: none; width: 34px; height: 34px; border: none; border-radius: 50%; background: var(--hover); color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: background .15s, color .15s, transform .2s; }
.m-x svg { width: 16px; height: 16px; } .m-x:hover { background: var(--border); color: var(--text); transform: rotate(90deg); }
.m-body { padding: 22px 24px; overflow-y: auto; min-height: 0; }
.m-body > p { margin: 0 0 14px; color: var(--muted); }
.m-body > p b { color: var(--text); }
.m-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--hover) 60%, var(--panel)); }
.m-err { flex: 1; margin-right: 6px; padding: 8px 12px; border-radius: 10px; background: var(--err-soft); color: var(--err); font-size: 13px; font-weight: 550; }
.m-err[hidden] { display: none; }
.btn.danger-solid { background: linear-gradient(135deg, #ef4444, #b91c1c); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -10px rgba(220, 38, 38, .9); }
.btn.danger-solid:hover { background: linear-gradient(135deg, #ef4444, #b91c1c); filter: brightness(1.08); }
/* secoes dentro dos modais */
.m-sec { display: grid; gap: 12px; }
.m-sec + .m-sec { margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--border); }
.m-sec > h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.switch:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.switch > span { display: grid; gap: 2px; } .switch b { font-weight: 650; }
.switch input { appearance: none; -webkit-appearance: none; flex: none; width: 44px; height: 26px; padding: 0; border: none; border-radius: 99px; background: var(--border); position: relative; cursor: pointer; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .3); transition: transform .22s cubic-bezier(.2, .9, .3, 1.2); }
.switch input:checked { background: var(--grad); } .switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; }
.urow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; }
.urow .chip-av { margin: 0; flex: none; width: 36px; height: 36px; border-radius: 12px; }
.u-main { flex: 1; min-width: 0; display: grid; } .u-main b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-main small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.addu { border: 1px dashed var(--accent-line); border-radius: 14px; padding: 2px 14px; transition: background .15s; }
details.addu[open] { background: var(--accent-soft); border-style: solid; padding-bottom: 14px; }
details.addu summary { cursor: pointer; padding: 11px 0; font-weight: 650; color: var(--accent-fg); list-style: none; display: flex; align-items: center; gap: 8px; }
details.addu summary::-webkit-details-marker { display: none; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--err) 35%, var(--border)); background: color-mix(in srgb, var(--err) 6%, var(--panel)); border-radius: 14px; }
.danger-zone div { display: grid; gap: 2px; } .danger-zone b { color: var(--err); font-weight: 650; } .danger-zone small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 600px) {
  dialog[open] { margin: auto 8px 8px; width: calc(100vw - 16px); max-height: calc(100vh - 16px); border-radius: 22px; }
  .m-head { padding: 16px 16px 14px 18px; } .m-body { padding: 18px; } .m-foot { padding: 12px 18px; }
  .danger-zone { flex-direction: column; align-items: stretch; }
}
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 12px; z-index: 100; font-weight: 550; max-width: calc(100vw - 32px); animation: viewIn .25s both; }
.toast.err { background: var(--err); color: #fff; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; color: var(--muted); font-size: 13px; }
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; } .toolbar input { max-width: 320px; } .toolbar select { width: auto; }
.results { display: grid; gap: 8px; margin-top: 12px; }
.result { border: 1px solid var(--border); border-radius: 12px; padding: 10px 13px; font-size: 13px; }
.result p { margin: 4px 0 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- carregando ---------- */
.skel { background: linear-gradient(90deg, var(--hover) 25%, color-mix(in srgb, var(--hover) 55%, var(--panel)) 50%, var(--hover) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 16px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* telas grandes: mais colunas de cards e formularios que nao esticam demais */
@media (min-width: 1100px) { .narrow-left { grid-template-columns: minmax(0, 780px) minmax(0, 1fr); } }
@media (min-width: 1900px) { .kpi-val { font-size: 34px; } .hero { padding: 32px 38px; } .hero h1 { font-size: 30px; } }
@media (max-width: 1200px) { .three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .two-one, .split, .half, .two, .three { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 40; transform: translateX(-100%); transition: transform .22s; }
  .app.menu-open .side { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .5); }
  .mobile-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
  main { padding: 16px 14px 44px; }
  .hero { padding: 20px; gap: 16px; } .hero h1 { font-size: 22px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; } .kpi-val { font-size: 25px; } .kpi-sub { padding-right: 0; } .kpi-spark { display: none; } .kpi .delta { display: none; }
  .form .row2 { grid-template-columns: 1fr; } .copy-box { flex-direction: column; }
  .hc { height: 13px; border-radius: 3px; } .heat { gap: 2px; grid-template-columns: 28px repeat(24, minmax(0, 1fr)); }
  .hb { grid-template-columns: 80px 1fr 30px; } .gap-list li { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }


/* ---------- login ---------- */
body.login-body { background: var(--bg); }
.login-shell { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); min-height: 100vh; }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: clamp(28px, 4vw, 56px); color: #fff; background: linear-gradient(155deg, #1b1f4d 0%, #0d1030 55%, #090b20 100%); isolation: isolate; }
.login-art::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(55% 45% at 85% 8%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%), radial-gradient(50% 45% at 5% 95%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%); }
.login-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1.2px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(70% 60% at 50% 50%, #000, transparent 85%); mask-image: radial-gradient(70% 60% at 50% 50%, #000, transparent 85%); }
.art-orb { position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .55; animation: drift 14s ease-in-out infinite alternate; }
.art-orb.o1 { width: 340px; height: 340px; right: -90px; top: 18%; background: color-mix(in srgb, var(--accent) 70%, #fff); }
.art-orb.o2 { width: 260px; height: 260px; left: -60px; bottom: 6%; background: #14b8a6; opacity: .28; animation-duration: 18s; }
@keyframes drift { to { transform: translate(-40px, 30px) scale(1.12); } }
.login-art .brand { color: #fff; font-size: 19px; }
.login-art .brand small { color: #aab0d6; display: block; line-height: 1.1; margin-top: 2px; }
.art-body { display: grid; gap: 22px; max-width: 560px; }
.art-body h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; letter-spacing: -.035em; font-weight: 740; }
.art-body h2 em { font-style: normal; background: linear-gradient(90deg, #fff, color-mix(in srgb, var(--accent) 35%, #fff)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.art-body > p { margin: 0; color: #b9bfe0; font-size: 16px; max-width: 46ch; }
.art-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.art-features li { display: flex; align-items: center; gap: 12px; color: #dfe3fb; font-size: 14.5px; }
.art-features i { width: 28px; height: 28px; border-radius: 9px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); display: grid; place-items: center; flex: none; }
.art-features svg { width: 15px; height: 15px; }
.scene { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 14px; align-items: center; min-height: 270px; }
.glass { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 20px; backdrop-filter: blur(12px); box-shadow: 0 24px 50px -22px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .12); }
.chat { display: flex; flex-direction: column; height: 266px; overflow: hidden; }
.ch-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); font-size: 13.5px; }
.ch-av { width: 28px; height: 28px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; font-weight: 750; font-size: 13px; }
.ch-head em { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-size: 11.5px; color: #9fe8c0; }
.ch-head em i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; animation: live 2.2s ease-out infinite; }
.ch-body { flex: 1; display: flex; flex-direction: column; gap: 9px; padding: 14px; overflow: hidden; transition: opacity .4s, transform .4s; }
.ch-body.out { opacity: 0; transform: translateY(-8px); }
.bb { max-width: 88%; padding: 9px 13px; border-radius: 16px; font-size: 13px; line-height: 1.45; animation: bbIn .35s cubic-bezier(.2, .8, .2, 1) both; }
.bb.user { align-self: flex-end; background: var(--grad); color: var(--on-accent); border-bottom-right-radius: 5px; }
.bb.bot { align-self: flex-start; background: rgba(255, 255, 255, .94); color: #14161d; border-bottom-left-radius: 5px; }
@keyframes bbIn { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.wd { animation: wdIn .3s ease both; } @keyframes wdIn { from { opacity: 0; filter: blur(3px); } }
.tp { display: inline-flex; gap: 4px; align-items: center; height: 16px; }
.tp i { width: 6px; height: 6px; border-radius: 50%; background: #6b7080; animation: bounce 1.1s infinite ease-in-out; }
.tp i:nth-child(2) { animation-delay: .15s; } .tp i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 70%, 100% { transform: translateY(0); opacity: .4; } 35% { transform: translateY(-4px); opacity: 1; } }
.brain { position: relative; display: grid; justify-items: center; }
.brain svg { width: 100%; max-width: 310px; height: auto; display: block; overflow: visible; }
.ln { stroke: url(#lnG); stroke-width: 1.4; stroke-dasharray: 3 5; }
.nb { fill: rgba(255, 255, 255, .09); stroke: rgba(255, 255, 255, .22); stroke-width: 1.2; transition: fill .3s, stroke .3s; }
.node { animation: nodeBreath 4.5s ease-in-out infinite; animation-delay: var(--d); transform-box: fill-box; transform-origin: center; }
@keyframes nodeBreath { 50% { transform: translateY(-3px); } }
.ni path { fill: none; stroke: #e6e9ff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nt { fill: #b9bfe6; font-size: 10.5px; font-weight: 600; paint-order: stroke; stroke: #0d1030; stroke-width: 3px; }
.node.scan .nb { fill: rgba(255, 255, 255, .24); stroke: #fff; } .node.dim { opacity: .45; }
.node.hit .nb { fill: color-mix(in srgb, var(--accent) 55%, #fff); stroke: #fff; filter: drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 80%, #fff)); }
.node.hit .ni path { stroke: #1d2070; } .node.hit .nt { fill: #fff; }
.ck { opacity: 0; transform-box: fill-box; transition: opacity .3s; } .ck circle { fill: #34d399; } .ck path { fill: none; stroke: #04261a; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.node.hit .ck { opacity: 1; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.pu { fill: #fff; filter: drop-shadow(0 0 7px #fff); } .pu-halo { fill: color-mix(in srgb, var(--accent) 65%, #fff); opacity: .5; filter: blur(5px); }
.orb .halo { fill: color-mix(in srgb, var(--accent) 75%, #fff); opacity: .35; filter: blur(16px); animation: haloPulse 3.2s ease-in-out infinite; transform-origin: 150px 150px; }
@keyframes haloPulse { 50% { transform: scale(1.18); opacity: .55; } }
.orb .ring { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 1.3; transform-origin: 150px 150px; }
.orb .r1 { stroke-dasharray: 5 9; animation: spinA 14s linear infinite; } .orb .r2 { stroke-dasharray: 1.5 7; stroke: rgba(255, 255, 255, .3); animation: spinA 22s linear infinite reverse; }
.think .orb .r1 { animation-duration: 3.2s; } .think .orb .r2 { animation-duration: 5s; }
.orb .core { transform-origin: 150px 150px; animation: coreBreath 3.6s ease-in-out infinite; }
.think .orb .core { animation: coreThink .9s ease-in-out infinite; }
@keyframes coreBreath { 50% { transform: scale(1.05); } } @keyframes coreThink { 50% { transform: scale(1.14); } }
@keyframes spinA { to { transform: rotate(360deg); } }
.orb .spark { transform-box: fill-box; transform-origin: center; }
.stat { margin-top: -4px; display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); font-size: 12px; font-weight: 600; color: #d6dafc; text-align: center; transition: background .3s, color .3s; }
.stat i { width: 8px; height: 8px; border-radius: 50%; background: #8b92bd; flex: none; }
.stat[data-mode="think"] i { background: #a5b4fc; animation: live 1.2s ease-out infinite; }
.stat[data-mode="done"] { color: #b6f5d2; } .stat[data-mode="done"] i { background: #34d399; }
.stat[data-mode="warn"] { color: #fde2a8; } .stat[data-mode="warn"] i { background: #fbbf24; }
@media (max-height: 880px) { .art-features { display: none; } }
@media (max-height: 740px) { .art-body > p { display: none; } .scene { min-height: 230px; } .chat { height: 230px; } }
@media (max-width: 1250px) { .scene { grid-template-columns: 1fr; } .brain { display: none; } .chat { height: 220px; } }
.art-foot { color: #8b92bd; font-size: 12.5px; }
.login-main { position: relative; display: grid; place-items: center; padding: 28px 20px; background: radial-gradient(60% 40% at 100% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%), var(--bg); }
.login-top { position: absolute; top: 18px; right: 20px; }
.login-top .btn { padding: 8px 12px; } .login-top .btn svg { width: 17px; height: 17px; }
.login-box { width: 100%; max-width: 410px; display: flex; flex-direction: column; align-items: center; gap: 22px; z-index: 1; animation: viewIn .5s cubic-bezier(.2, .8, .2, 1) both; }
.login-header-logo { display: flex; justify-content: center; align-items: center; padding: 4px 0; }
.login-logo { height: 52px; width: auto; max-width: 220px; object-fit: contain; display: block; filter: drop-shadow(0 2px 8px rgba(0,0,0,.08)); }
.logo-dark { display: none !important; }
.logo-light { display: block !important; }
[data-theme="dark"] .logo-dark { display: block !important; }
[data-theme="dark"] .logo-light { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-dark { display: block !important; }
  :root:not([data-theme="light"]) .logo-light { display: none !important; }
}
.login-card { width: 100%; display: grid; gap: 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 24px; padding: clamp(24px, 4vw, 36px); box-shadow: var(--shadow); }
.login-card.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.login-card .mobile-brand { display: none; }
.login-card h1 { font-size: 24px; }
.login-card .lead { margin: 4px 0 0; color: var(--muted); }
.field { position: relative; display: grid; gap: 6px; }
.field > .lab { font-weight: 600; font-size: 13px; }
.field .ctl { position: relative; display: block; }
.field .ctl > svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--faint); pointer-events: none; transition: color .15s; }
.field .ctl input { padding: 12px 42px 12px 42px; border-radius: 12px; font-size: 15px; }
.field .ctl:focus-within > svg { color: var(--accent-fg); }
.field .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: none; border-radius: 9px; background: none; color: var(--faint); cursor: pointer; display: grid; place-items: center; }
.field .eye:hover { background: var(--hover); color: var(--text); } .field .eye svg { width: 18px; height: 18px; }
.caps { margin: -4px 0 0; font-size: 12.5px; color: var(--warn); display: none; } .caps.on { display: block; }
.login-card .go { width: 100%; padding: 13px 16px; font-size: 15px; border-radius: 12px; }
.login-card .go .spin { width: 17px; height: 17px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--on-accent) 35%, transparent); border-top-color: var(--on-accent); animation: spin .7s linear infinite; display: none; }
.login-card .go.busy .spin { display: inline-block; } .login-card .go.busy svg { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-note { text-align: center; color: var(--faint); font-size: 12.5px; margin: 0; }
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-card .mobile-brand { display: flex; }
  .login-main { align-content: center; }
}
@media (prefers-reduced-motion: reduce) { .art-orb, .node, .orb *, .ch-head em i, .stat i { animation: none !important; } }
.form > .m-sec + .m-sec { margin-top: 0; }
details.addu summary svg { width: 18px; height: 18px; flex: none; }


/* ---------- base de conhecimento ---------- */
.kpi-val.txt { font-size: 22px; letter-spacing: -.02em; padding-top: 5px; }
.add-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.addcard { display: flex; flex-direction: column; gap: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); min-width: 0; transition: border-color .2s; }
.addcard:hover { border-color: var(--accent-line); }
.ac-top { display: flex; gap: 13px; align-items: flex-start; }
.ac-ic { width: 44px; height: 44px; border-radius: 15px; background: var(--accent-soft); color: var(--accent-fg); display: grid; place-items: center; flex: none; border: 1px solid var(--accent-line); }
.ac-ic svg { width: 21px; height: 21px; }
.ac-top h2 { font-size: 15.5px; } .ac-top p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.dz { flex: 1; min-height: 156px; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; padding: 22px 16px; border: 1.5px dashed var(--accent-line); border-radius: 16px; background: var(--accent-soft); color: var(--muted); cursor: pointer; transition: border-color .2s, background .2s, transform .2s; outline: none; }
.dz:hover, .dz:focus-visible, .dz.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); transform: translateY(-1px); }
.dz-ic { width: 48px; height: 48px; border-radius: 50%; background: var(--panel); color: var(--accent-fg); display: grid; place-items: center; box-shadow: var(--shadow); margin-bottom: 4px; animation: floaty 3.2s ease-in-out infinite; }
.dz-ic svg { width: 22px; height: 22px; } .dz.over .dz-ic { animation-duration: .9s; }
@keyframes floaty { 50% { transform: translateY(-5px); } }
.dz b { color: var(--text); font-size: 14.5px; } .dz small { font-size: 12.5px; }
.dz.busy { pointer-events: none; opacity: .6; }
.fmt { display: flex; flex-wrap: wrap; gap: 5px; } .fmt span { padding: 1px 7px; border-radius: 6px; background: var(--hover); font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.up-list { display: grid; gap: 6px; } .up-list:empty { display: none; }
.up-item { display: flex; gap: 9px; align-items: flex-start; padding: 8px 11px; border-radius: 11px; background: var(--hover); font-size: 12.5px; animation: viewIn .3s both; overflow-wrap: anywhere; }
.up-item svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.up-item.ok { background: var(--ok-soft); color: var(--ok); } .up-item.err { background: var(--err-soft); color: var(--err); } .up-item.busy { color: var(--muted); }
.spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: spin .7s linear infinite; flex: none; }
.wide-seg { display: grid; grid-template-columns: 1fr 1fr; } .wide-seg button { padding: 7px 8px; }
.tpl { display: flex; flex-wrap: wrap; gap: 8px; }
.tpl button { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent-fg); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .15s, transform .15s; }
.tpl button:hover { background: color-mix(in srgb, var(--accent) 16%, var(--panel)); transform: translateY(-1px); }
.kb-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.kb-search { position: relative; flex: 1; min-width: 220px; display: block; }
.kb-search svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.kb-search input { padding-left: 39px; border-radius: 12px; }
.kb-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.kb-chips button { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.kb-chips button em { font-style: normal; margin-left: 4px; opacity: .7; }
.kb-chips button:hover { border-color: var(--accent-line); } .kb-chips button.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-fg); }
.doc-list { display: grid; gap: 8px; }
.doc-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 16px; transition: border-color .15s, background .15s; animation: rowIn .4s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 28ms); }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } }
.doc-row:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.ftype { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 11px; font-weight: 800; letter-spacing: .03em; background: color-mix(in srgb, var(--c) 14%, var(--panel)); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.ftype svg { width: 22px; height: 22px; }
.dr-main { min-width: 0; display: grid; gap: 1px; } .dr-main b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-main small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dr-main small a { color: var(--muted); }
.dr-meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.doc-row time { color: var(--faint); font-size: 12px; white-space: nowrap; }
.dr-act { display: flex; gap: 6px; } .dr-act .btn svg { width: 15px; height: 15px; }
.kb-empty { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 38px 16px; color: var(--muted); }
.kb-empty > svg { width: 44px; height: 44px; color: var(--accent-fg); opacity: .55; margin-bottom: 6px; } .kb-empty b { color: var(--text); font-size: 15px; }
.kb-empty p { margin: 0; max-width: 46ch; } .kb-empty.small { padding: 22px 12px; gap: 10px; }
.jobs { display: grid; gap: 10px; }
.job2 { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; flex-wrap: wrap; }
.job2.running { border-color: var(--accent-line); background: var(--accent-soft); } .job2.err { border-color: color-mix(in srgb, var(--err) 35%, var(--border)); }
.j-ic { width: 40px; height: 40px; border-radius: 13px; background: var(--panel); color: var(--accent-fg); display: grid; place-items: center; flex: none; border: 1px solid var(--accent-line); }
.j-ic svg { width: 19px; height: 19px; } .job2.running .j-ic svg { animation: spin 3s linear infinite; }
.j-main { flex: 1; min-width: 200px; display: grid; gap: 3px; } .j-main b { font-size: 14px; max-width: 100%; } .j-main small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jprog { height: 6px; border-radius: 99px; background: var(--hover); overflow: hidden; margin-top: 4px; }
.jprog i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.job2.running .jprog i { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #fff), var(--accent)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.job2.err .jprog i { background: var(--err); }
.j-stat { text-align: center; min-width: 64px; display: grid; } .j-stat b { font-size: 18px; font-variant-numeric: tabular-nums; } .j-stat small { color: var(--muted); font-size: 11.5px; }
.j-end { min-width: 84px; display: flex; justify-content: flex-end; }
.ask-box { display: flex; gap: 10px; } .ask-box .kb-search input { padding-top: 12px; padding-bottom: 12px; font-size: 15px; }
.results { display: grid; gap: 10px; margin-top: 14px; }
.res-card { border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; display: grid; gap: 8px; animation: rowIn .35s both; transition: border-color .15s; } .res-card:hover { border-color: var(--accent-line); }
.res-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .res-top b { font-size: 14px; }
.res-card p { margin: 0; color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.res-card mark { background: color-mix(in srgb, var(--c3) 38%, transparent); color: var(--text); border-radius: 4px; padding: 0 2px; }
.rel { display: inline-flex; align-items: center; gap: 10px; } .rel-bar { width: 84px; height: 6px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.rel-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
@media (max-width: 1350px) { .add-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .add-grid > :last-child { grid-column: 1 / -1; } }
@media (max-width: 900px) {
  .add-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-row { grid-template-columns: auto minmax(0, 1fr); } .dr-meta { grid-column: 2; justify-content: flex-start; } .doc-row time { grid-column: 2; } .dr-act { grid-column: 1 / -1; }
  .ask-box { flex-direction: column; } .j-stat { min-width: 52px; }
}


/* ---------- atendimentos (caixa de entrada) ---------- */
.inbox { display: grid; grid-template-columns: minmax(340px, 460px) minmax(0, 1fr); gap: 16px; align-items: start; }
.inbox > .panel { margin-bottom: 0; }
.inbox-list { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.inb-top { display: flex; gap: 8px; } .inb-top select { width: auto; flex: none; border-radius: 12px; }
.inb-filters { display: grid; gap: 8px; }
.conv-list { overflow-y: auto; max-height: calc(100vh - 340px); min-height: 220px; margin: 0 -6px; padding: 0 6px; display: grid; gap: 3px; align-content: start; outline: none; }
.conv-day { position: sticky; top: 0; z-index: 1; padding: 10px 6px 5px; background: var(--panel); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.conv { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 11px 12px; text-align: left; border: 1px solid transparent; border-radius: 14px; background: none; color: inherit; cursor: pointer; transition: background .12s, border-color .12s; }
.conv:hover { background: var(--hover); } .conv.sel { background: var(--accent-soft); border-color: var(--accent-line); }
.cv-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) 15%, var(--panel)); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); }
.cv-ic svg { width: 18px; height: 18px; } .cv-ic.big { width: 46px; height: 46px; border-radius: 15px; } .cv-ic.big svg { width: 21px; height: 21px; }
.cv-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cv-main b { font-size: 13.5px; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.cv-main small { color: var(--muted); font-size: 12px; }
.cv-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 3px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 650; background: var(--hover); color: var(--muted); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); } .tag.warn { background: var(--warn-soft); color: var(--warn); } .tag.accent { background: var(--accent-soft); color: var(--accent-fg); }
.conv time { color: var(--faint); font-size: 11.5px; white-space: nowrap; padding-top: 2px; }
.inbox-list .pager { justify-content: space-between; margin-top: 2px; } .inbox-list .pager .btn svg { width: 15px; height: 15px; }
.inbox-detail { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 32px); min-height: 320px; padding: 20px; }
.dt-head { display: flex; align-items: center; gap: 14px; }
.dt-title { flex: 1; min-width: 0; } .dt-title h2 { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dt-title p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.d-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.d-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; background: var(--hover); color: var(--muted); font-size: 12px; font-weight: 550; }
.d-chip svg { width: 14px; height: 14px; } .d-chip.ok { background: var(--ok-soft); color: var(--ok); }
.tthread { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 8px 6px 6px 0; border-top: 1px solid var(--border); }
.tm { display: flex; flex-direction: column; gap: 3px; max-width: 92%; animation: rowIn .35s both; }
.tm.user { align-self: flex-end; align-items: flex-end; max-width: 80%; }
.tm.user .tb { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 18px 18px 6px 18px; padding: 10px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tm.bot { flex-direction: row; align-self: flex-start; gap: 11px; }
.tav { width: 30px; height: 30px; border-radius: 10px; background: var(--grad); color: var(--on-accent); display: grid; place-items: center; font-weight: 750; font-size: 13px; flex: none; margin-top: 1px; }
.tbw { min-width: 0; display: grid; gap: 5px; } .tm.bot .tb { white-space: pre-wrap; overflow-wrap: anywhere; padding-top: 3px; }
.tm time { font-size: 11px; color: var(--faint); } .tb a { color: var(--accent-fg); word-break: break-word; }
.tmeta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
details.srcs { font-size: 12.5px; color: var(--muted); } details.srcs summary { cursor: pointer; } details.srcs ul { margin: 4px 0 0; padding-left: 18px; } details.srcs a { color: var(--accent-fg); }
@media (max-width: 1000px) { .inbox { grid-template-columns: minmax(0, 1fr); } .inbox-detail { position: static; max-height: none; } .conv-list { max-height: 55vh; } }
.inbox-detail { scroll-margin-top: 64px; }


/* ---------- assistente ---------- */
.asst { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; align-items: start; }
.asst-form { display: grid; gap: 16px; min-width: 0; } .asst-form > .panel { margin: 0; }
.lab-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.count { font-style: normal; font-size: 12px; color: var(--faint); font-weight: 500; font-variant-numeric: tabular-nums; }
.field { display: grid; gap: 6px; } .field > .lab-row { font-weight: 550; font-size: 13px; }
.swatches { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.sw { width: 32px; height: 32px; border-radius: 11px; border: 2px solid transparent; background: var(--c); cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); transition: transform .15s, border-color .15s; }
.sw:hover { transform: scale(1.1); } .sw.on { border-color: var(--panel); outline: 2px solid var(--text); outline-offset: 0; transform: scale(1.08); }
.sw-custom { position: relative; width: 32px; height: 32px; border-radius: 11px; overflow: hidden; cursor: pointer; display: grid; place-items: center; border: 2px dashed var(--border); background: var(--panel); color: var(--muted); transition: transform .15s, border-color .15s; }
.sw-custom:hover { border-color: var(--accent); transform: scale(1.1); }
.sw-custom.on { border: 2px solid var(--panel); background: var(--c); color: #fff; outline: 2px solid var(--text); transform: scale(1.08); }
.sw-custom input { position: absolute; inset: -6px; width: 44px; height: 44px; opacity: 0; cursor: pointer; padding: 0; border: 0; }
.sw-custom svg { width: 15px; height: 15px; pointer-events: none; }
details.rules summary { cursor: pointer; font-weight: 650; display: flex; align-items: center; gap: 9px; list-style: none; } details.rules summary::-webkit-details-marker { display: none; }
details.rules summary svg { width: 18px; height: 18px; color: var(--ok); } details.rules summary .hint { font-weight: 400; }
details.rules ul { margin: 12px 0 6px; padding-left: 22px; color: var(--muted); display: grid; gap: 5px; } details.rules a { color: var(--accent-fg); }
.savebar { position: sticky; bottom: 14px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--border); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .4); transition: border-color .2s; }
.savebar.dirty { border-color: var(--accent-line); }
.sb-state { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); } .sb-state svg { width: 17px; height: 17px; color: var(--ok); }
.savebar.dirty .sb-state { color: var(--text); } .dot-warn { width: 9px; height: 9px; border-radius: 50%; background: var(--c3); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c3) 25%, transparent); }
.sb-btns { display: flex; gap: 8px; }
.asst-preview { position: sticky; top: 16px; display: grid; gap: 12px; }
.pv-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); } .pv-label svg { width: 15px; height: 15px; color: var(--accent-fg); }
.pv { --brand: #2563eb; --on-brand: #fff; background: var(--panel); border: 1px solid var(--border); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); }
.pv-head { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 10%, var(--panel)), var(--panel)); }
.pv-av { width: 40px; height: 40px; border-radius: 14px; flex: none; display: grid; place-items: center; font-weight: 750; color: var(--on-brand); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 78%, #fff), var(--brand) 55%, color-mix(in srgb, var(--brand) 68%, #000)); transition: background .25s; }
.pv-av.sm { width: 26px; height: 26px; border-radius: 9px; font-size: 12px; }
.pv-head div { min-width: 0; display: grid; } .pv-head b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pv-head small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pv-head small i { font-style: normal; color: var(--ok); }
.pv-body { padding: 18px 16px; display: grid; gap: 14px; align-content: start; min-height: 270px; background: radial-gradient(70% 50% at 100% 0%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 70%); }
.pv-bot { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; } .pv-bot p { margin: 0; padding-top: 2px; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.pv-ex { color: var(--faint); font-size: 11.5px; }
.pv-user { justify-self: end; max-width: 78%; padding: 9px 14px; border-radius: 17px 17px 5px 17px; font-size: 13.5px; background: color-mix(in srgb, var(--brand) 11%, var(--panel)); border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--border)); }
.pv-comp { margin: 0 14px 14px; padding: 6px 6px 6px 16px; border: 1px solid var(--border); border-radius: 24px; display: flex; align-items: center; justify-content: space-between; color: var(--faint); font-size: 13px; }
.pv-send { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--on-brand); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 78%, #fff), var(--brand) 55%, color-mix(in srgb, var(--brand) 68%, #000)); } .pv-send svg { width: 17px; height: 17px; }
.pv-widget { --brand: #2563eb; --on-brand: #fff; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 18px; background: var(--panel); }
.pv-fab { width: 46px; height: 46px; border-radius: 16px; flex: none; display: grid; place-items: center; color: var(--on-brand); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 78%, #fff), var(--brand) 55%, color-mix(in srgb, var(--brand) 68%, #000)); box-shadow: 0 10px 22px -8px var(--brand); } .pv-fab svg { width: 22px; height: 22px; }
.pv-widget div { display: grid; } .pv-widget small { color: var(--muted); font-size: 12px; }

/* ---------- instalacao ---------- */
.ready { border: 1px solid var(--border); border-radius: 20px; padding: 18px 20px; margin-bottom: 16px; background: var(--panel); box-shadow: var(--shadow); display: grid; gap: 14px; }
.ready.ok { border-color: color-mix(in srgb, var(--ok) 35%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, var(--ok) 7%, var(--panel)), var(--panel)); }
.ready.warn { border-color: color-mix(in srgb, var(--c3) 45%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, var(--c3) 9%, var(--panel)), var(--panel)); }
.rd-head { display: flex; align-items: center; gap: 14px; } .rd-head h2 { font-size: 17px; } .rd-head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.rd-ic { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; flex: none; background: var(--ok-soft); color: var(--ok); } .rd-ic svg { width: 22px; height: 22px; }
.ready.warn .rd-ic { background: var(--warn-soft); color: var(--warn); }
.rd-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.rd-list li { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 14px; background: color-mix(in srgb, var(--hover) 70%, var(--panel)); }
.rd-list li > span { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); } .rd-list li.bad > span { background: var(--warn-soft); color: var(--warn); } .rd-list li > span svg { width: 14px; height: 14px; }
.rd-list li div { flex: 1; min-width: 0; display: grid; } .rd-list b { font-size: 13.5px; } .rd-list small { color: var(--muted); font-size: 12px; }
.inst-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; } .inst-grid > .panel { margin: 0; }
.step { display: grid; gap: 16px; align-content: start; }
.step-head { display: flex; gap: 14px; align-items: flex-start; } .step-head h2 { font-size: 16px; } .step-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.step-n { width: 34px; height: 34px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 800; background: var(--grad); color: var(--on-accent); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--accent) 90%, transparent); }
.qr-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.qr { width: 168px; height: 168px; flex: none; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: #fff; display: grid; place-items: center; text-align: center; padding: 0; box-shadow: var(--shadow); } .qr svg { width: 100%; height: 100%; display: block; }
.qr-side { flex: 1; min-width: 200px; display: grid; gap: 8px; } .qr-side p { margin: 0; color: var(--muted); font-size: 13px; } .qr-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-weight: 550; font-size: 13.5px; }
.code-box { border-radius: 16px; overflow: hidden; background: #0f1222; color: #d9defa; border: 1px solid #1d2140; }
.code-top { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; background: rgba(255, 255, 255, .05); font-size: 12px; color: #9aa3d6; }
.code-top button { display: inline-flex; align-items: center; gap: 6px; border: none; border-radius: 8px; padding: 5px 10px; background: rgba(255, 255, 255, .1); color: #e6e9ff; cursor: pointer; font-size: 12px; font-weight: 600; } .code-top button:hover { background: rgba(255, 255, 255, .18); } .code-top svg { width: 14px; height: 14px; }
.code-box pre { margin: 0; padding: 14px; font: 12.5px/1.6 ui-monospace, "Cascadia Code", Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
.plat-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.plat-tabs button { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; } .plat-tabs button:hover { border-color: var(--accent-line); } .plat-tabs button.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-fg); }
.plat-body { padding: 13px 15px; border-radius: 14px; background: var(--hover); font-size: 13.5px; line-height: 1.55; color: var(--muted); } .plat-body b { color: var(--text); } .plat-body code { background: var(--panel); padding: 1px 6px; border-radius: 5px; }
.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tip { padding: 16px; border: 1px solid var(--border); border-radius: 16px; display: grid; gap: 6px; align-content: start; transition: border-color .15s, transform .15s; } .tip:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.tip-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-fg); } .tip-ic svg { width: 19px; height: 19px; }
.tip b { font-size: 14px; margin-top: 4px; } .tip p { margin: 0; color: var(--muted); font-size: 13px; }
@media (max-width: 1100px) { .asst { grid-template-columns: minmax(0, 1fr); } .asst-preview { position: static; order: -1; } .inst-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .savebar { flex-direction: column; align-items: stretch; } .sb-btns .btn { flex: 1; } .qr { width: 150px; height: 150px; } }


/* ---------- assistente: icone do botao e pre-visualizacao do site ---------- */
.ico-grid { --brand: #2563eb; --on-brand: #fff; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ico-opt { display: grid; justify-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--panel); cursor: pointer; color: var(--muted); font-size: 11.5px; font-weight: 600; transition: border-color .15s, background .15s, transform .15s; }
.ico-opt:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.ico-opt.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--panel)); color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.ico-sw { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; color: var(--on-brand); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 78%, #fff), var(--brand) 55%, color-mix(in srgb, var(--brand) 68%, #000)); box-shadow: 0 9px 20px -9px var(--brand); transition: background .25s; }
.ico-sw svg { width: 22px; height: 22px; }
.asst-preview { max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 2px; }
.pv-pair { display: grid; gap: 10px; }
.pv-cap { font-size: 12px; font-weight: 650; color: var(--muted); margin-top: 2px; }
.pv-body { min-height: 190px; }
.sitepv { --brand: #2563eb; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--panel); box-shadow: var(--shadow); }
.sp-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--hover); border-bottom: 1px solid var(--border); }
.sp-dots { display: inline-flex; gap: 4px; } .sp-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.sp-url { flex: 1; text-align: center; font-size: 11px; color: var(--muted); background: var(--panel); border-radius: 99px; padding: 2px 10px; }
.sp-page { position: relative; height: 214px; padding: 14px 16px; overflow: hidden; display: grid; gap: 12px; align-content: start; }
.sp-nav { display: flex; justify-content: space-between; align-items: center; } .sp-nav b { width: 64px; height: 11px; border-radius: 99px; background: color-mix(in srgb, var(--brand) 60%, var(--border)); transition: background .25s; }
.sp-nav span { display: flex; gap: 8px; } .sp-nav i { width: 28px; height: 6px; border-radius: 99px; background: var(--border); }
.sp-hero { display: grid; gap: 7px; padding: 6px 0; } .sp-hero span { height: 9px; border-radius: 99px; background: var(--hover); }
.sp-hero .l1 { width: 72%; height: 14px; background: var(--border); } .sp-hero .l2 { width: 56%; } .sp-hero .l3 { width: 40%; }
.sp-btn { display: block; width: 88px; height: 24px; border-radius: 9px; margin-top: 4px; background: color-mix(in srgb, var(--brand) 72%, var(--border)); transition: background .25s; }
.sp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .sp-cards i { height: 54px; border-radius: 10px; background: var(--hover); border: 1px solid var(--border); }
.sitepv .pv-fab { --on-brand: #fff; position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 16px; animation: fabPop .6s cubic-bezier(.2, 1.4, .4, 1) both; }
.sitepv .pv-fab svg { width: 21px; height: 21px; }
.sitepv .pv-fab::after { content: ""; position: absolute; inset: -5px; border-radius: 20px; border: 1.5px solid color-mix(in srgb, var(--brand) 55%, transparent); animation: fabHalo 2.8s ease-out infinite; }
@keyframes fabPop { from { transform: scale(.4); opacity: 0; } } @keyframes fabHalo { from { transform: scale(.92); opacity: .9; } to { transform: scale(1.4); opacity: 0; } }
.pv-actions { display: flex; gap: 10px; flex-wrap: wrap; } .pv-actions .btn { flex: 1; min-width: 150px; }
@media (max-width: 1100px) { .asst-preview { max-height: none; overflow: visible; } }
@media (max-width: 600px) { .ico-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.pv-open { width: 100%; }


/* ---------- custos ---------- */
.chart-legend.wrap { flex-wrap: wrap; row-gap: 6px; } .lg-dot { width: 10px; height: 10px; border-radius: 4px; display: inline-block; }
.recon-eq { display: flex; align-items: stretch; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.rq { flex: 1; min-width: 190px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; display: grid; gap: 3px; background: color-mix(in srgb, var(--hover) 60%, var(--panel)); }
.rq small { color: var(--muted); font-size: 12.5px; } .rq b { font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rq.out { border-color: color-mix(in srgb, var(--c3) 45%, var(--border)); background: color-mix(in srgb, var(--c3) 9%, var(--panel)); }
.rq-op { align-self: center; font-size: 22px; color: var(--faint); font-weight: 300; }
.switch.mini { padding: 8px 12px; gap: 12px; border-radius: 12px; } .switch.mini b { font-size: 12.5px; }
.switch.mini input { width: 38px; height: 22px; } .switch.mini input::after { width: 16px; height: 16px; } .switch.mini input:checked::after { transform: translateX(16px); }
.model-list { display: grid; gap: 8px; margin-top: 14px; }
.ml { display: flex; align-items: center; gap: 10px; font-size: 13px; } .ml i { width: 10px; height: 10px; border-radius: 4px; flex: none; }
.ml span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; } .ml em { font-style: normal; color: var(--muted); font-size: 12px; } .ml b { font-variant-numeric: tabular-nums; }

.wide-seg3 { display: grid; grid-template-columns: repeat(3, 1fr); } .wide-seg3 button { padding: 7px 6px; }

/* loja virtual */
.st-plat { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.st-plat button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; }
.st-plat button svg { width: 17px; height: 17px; } .st-plat button small { color: var(--muted); font-weight: 400; }
.st-plat button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.st-plat button:disabled { opacity: .55; cursor: default; }
.st-form { max-width: 720px; } .st-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } @media (max-width: 640px) { .st-keys { grid-template-columns: 1fr; } }
.st-help { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; } .st-help summary { cursor: pointer; font-weight: 550; } .st-help ol { margin: 10px 0 6px; padding-left: 20px; line-height: 1.6; color: var(--muted); }
.st-ok { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--accent-line); border-radius: 14px; margin-bottom: 14px; } .st-ok small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.18); flex: none; }
.st-res { display: grid; gap: 8px; margin-top: 12px; } .st-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; }
.st-item img, .st-noimg { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: var(--hover); flex: none; } .st-main { flex: 1; min-width: 0; } .st-main b { display: block; } .st-main small { color: var(--muted); }
.st-price { text-align: right; white-space: nowrap; } .st-price s { color: var(--muted); font-size: 12px; } .err-t { color: #ef4444; }

.st-one { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.st-link { background: none; border: none; padding: 4px 2px; color: var(--accent-fg, var(--accent)); font: inherit; font-weight: 550; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.st-manual { display: grid; gap: 14px; } .st-manual[hidden] { display: none; }

/* base de conhecimento: secoes */
.sec-label { display: flex; align-items: baseline; gap: 10px 12px; flex-wrap: wrap; margin: 26px 0 12px; } .sec-label:first-of-type { margin-top: 4px; }
.sec-label h2 { font-size: 17px; margin: 0; } .sec-label > span { color: var(--muted); font-size: 13px; }
.sec-label .pill-live { color: var(--accent-fg); background: var(--accent-soft); border: 1px solid var(--accent-line); padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.st-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; } @media (max-width: 860px) { .st-wrap { grid-template-columns: 1fr; } }
.st-info { display: grid; gap: 10px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 16px; background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.st-info ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .st-info li { display: flex; align-items: center; gap: 9px; } .st-info li svg { width: 17px; height: 17px; color: var(--accent-fg); flex: none; }
.st-notice { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--accent-line); background: var(--accent-soft); font-size: 13.5px; line-height: 1.5; }
.st-form { max-width: none; }

/* base de conhecimento: quatro cartoes que abrem janelas */
.kb-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.actcard { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; padding: 20px; border: 1px solid var(--border); border-radius: 20px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; box-shadow: var(--shadow); transition: border-color .2s, transform .2s, box-shadow .2s; }
.actcard:hover, .actcard:focus-visible { border-color: var(--accent); transform: translateY(-3px); outline: none; }
.actcard .ac-ic { margin-bottom: 6px; } .actcard b { font-size: 16px; } .actcard p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; flex: 1; }
.ac-tag { margin-top: 6px; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); font-size: 12px; font-weight: 600; }
.ac-tag.live { color: var(--accent-fg); background: var(--accent-soft); border-color: var(--accent-line); } .ac-tag.live.on { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.ac-go { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--accent-fg); font-weight: 650; font-size: 13.5px; } .ac-go svg { width: 15px; height: 15px; transition: transform .2s; }
.actcard:hover .ac-go svg { transform: translateX(4px); }
@media (max-width: 1250px) { .kb-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } } @media (max-width: 640px) { .kb-actions { grid-template-columns: minmax(0, 1fr); } }
.dz.big { min-height: 230px; }
.st-ok .btn { margin-left: auto; }

/* janela da loja: uma coluna */
.st-top { display: grid; gap: 16px; margin-bottom: 18px; }
.st-benefits { display: flex; flex-wrap: wrap; gap: 8px; } .st-benefits span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 99px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 13px; font-weight: 550; }
.st-benefits svg { width: 15px; height: 15px; color: var(--accent-fg); flex: none; }
.st-plat-wrap { display: grid; gap: 8px; } .st-plat-wrap .st-plat { margin: 0; }
.st-plat button { padding: 8px 13px; font-size: 13.5px; }

/* campo de senha: olho e forca */
.pw { position: relative; display: block; } .pw input { padding-right: 46px; }
.pw-eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: none; border-radius: 10px; background: none; color: var(--faint); cursor: pointer; display: grid; place-items: center; }
.pw-eye:hover { background: var(--hover); color: var(--text); } .pw-eye svg { width: 19px; height: 19px; }
.pw-meter { display: flex; align-items: center; gap: 10px; min-height: 18px; --c: var(--border); }
.pw-bar { display: flex; gap: 5px; flex: 1; } .pw-bar i { flex: 1; height: 5px; border-radius: 99px; background: var(--border); transition: background .25s; }
.pw-label { font-size: 12.5px; min-width: 52px; text-align: right; color: var(--c); }
.pw-meter[data-level="1"] { --c: var(--err); } .pw-meter[data-level="2"] { --c: var(--warn); } .pw-meter[data-level="3"] { --c: #84cc16; } .pw-meter[data-level="4"] { --c: var(--ok); }
.pw-meter[data-level="1"] .pw-bar i:nth-child(-n+1), .pw-meter[data-level="2"] .pw-bar i:nth-child(-n+2), .pw-meter[data-level="3"] .pw-bar i:nth-child(-n+3), .pw-meter[data-level="4"] .pw-bar i { background: var(--c); }
.pw-req { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pw-req li { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); transition: color .2s; } .pw-req li svg { width: 14px; height: 14px; opacity: .35; transition: opacity .2s; }
.pw-req li.ok { color: var(--ok); } .pw-req li.ok svg { opacity: 1; }

/* anexos no historico */
.tatt { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tatt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; background: var(--hover); border: 1px solid var(--border); font-size: 12.5px; max-width: 100%; overflow-wrap: anywhere; }
.tatt-chip svg { width: 14px; height: 14px; flex: none; } .tatt-chip small { color: var(--muted); }

/* CRM kanban */
.crm-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; } .crm-bar .kb-search { flex: 1; min-width: 220px; max-width: 420px; }
.cnt { font-style: normal; margin-left: 4px; padding: 0 7px; border-radius: 99px; background: var(--accent); color: var(--on-accent, #fff); font-size: 11.5px; font-weight: 700; }
.kboard { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; scrollbar-width: thin; }
.kcol { flex: 0 0 290px; display: flex; flex-direction: column; max-height: calc(100vh - 250px); min-height: 200px; background: color-mix(in srgb, var(--c) 6%, var(--panel)); border: 1px solid var(--border); border-top: 3px solid var(--c); border-radius: 16px; }
.kcol > header { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; } .kcol > header b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kdot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.kcount { margin-left: auto; min-width: 24px; text-align: center; padding: 1px 8px; border-radius: 99px; background: var(--hover); color: var(--muted); font-size: 12px; font-weight: 700; }
.kkind { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; } .kkind.won { background: var(--ok-soft); color: var(--ok); } .kkind.lost { background: var(--err-soft); color: var(--err); }
.kcards { display: flex; flex-direction: column; gap: 8px; padding: 6px 10px 12px; overflow-y: auto; flex: 1; min-height: 90px; border-radius: 0 0 14px 14px; transition: background .15s; scrollbar-width: thin; }
.kcards.over { background: color-mix(in srgb, var(--c) 12%, transparent); }
.kcard { display: grid; gap: 5px; padding: 11px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; cursor: grab; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; outline: none; }
.kcard:hover, .kcard:focus-visible { border-color: var(--c, var(--accent)); transform: translateY(-1px); } .kcol .kcard:hover, .kcol .kcard:focus-visible { border-color: var(--c); }
.kcard.dragging { opacity: .45; cursor: grabbing; } .kcard.locked { border-left: 3px solid var(--muted); }
.kc-t { font-size: 13.5px; line-height: 1.3; overflow-wrap: anywhere; } .kc-s { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.kc-m { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 11.5px; color: var(--muted); } .kc-m span { display: inline-flex; align-items: center; gap: 4px; } .kc-m svg { width: 12px; height: 12px; }
.kc-ago { margin-left: auto; } .kc-lock svg { width: 13px; height: 13px; }
.kc-ai, .kc-new { font-weight: 700; padding: 0 6px; border-radius: 6px; font-size: 10.5px; } .kc-ai { background: var(--accent-soft); color: var(--accent-fg); } .kc-new { background: var(--warn-soft); color: var(--warn); }
.kghost { height: 54px; border: 2px dashed var(--accent); border-radius: 12px; background: var(--accent-soft); flex: none; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.tpl-card { display: grid; gap: 8px; align-content: start; text-align: left; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; transition: border-color .2s, transform .2s; }
.tpl-card:hover { border-color: var(--accent); transform: translateY(-2px); } .tpl-card b { font-size: 16px; } .tpl-card small { color: var(--muted); }
.tpl-flow { display: flex; flex-wrap: wrap; gap: 6px; } .tpl-flow i { font-style: normal; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--hover); border: 1px solid var(--border); }
.crm-sum { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-weight: 550; }
.k-ai { display: grid; gap: 4px; align-content: end; } .k-reason { display: flex; gap: 6px; align-items: flex-start; margin: 0; } .k-reason svg { width: 15px; height: 15px; flex: none; color: var(--accent-fg); margin-top: 2px; }
.ev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 220px; overflow-y: auto; }
.ev-list li { display: grid; gap: 1px; padding-left: 12px; border-left: 2px solid var(--border); } .ev-list .ev-w { font-weight: 550; font-size: 13.5px; } .ev-list small { color: var(--muted); } .ev-list p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.slist { display: grid; gap: 12px; margin-bottom: 12px; }
.srow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.s-color { width: 44px; height: 44px; padding: 3px; border-radius: 12px; cursor: pointer; } .s-main { display: grid; gap: 8px; min-width: 0; } .s-line { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 8px; }
.s-desc { min-height: 56px; font-size: 13px; } .s-btns { display: grid; gap: 6px; grid-template-columns: repeat(3, auto); }
@media (max-width: 640px) { .srow { grid-template-columns: 44px minmax(0, 1fr); } .s-btns { grid-column: 1 / -1; justify-content: end; } .s-line { grid-template-columns: 1fr; } .kcol { flex-basis: 260px; } }

/* identificacao do cliente (Assistente) e conversas do card (CRM) */
.ident-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } @media (max-width: 900px) { .ident-opts { grid-template-columns: 1fr; } }
.ident-opt { display: grid; gap: 6px; align-content: start; text-align: left; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.ident-opt:hover { border-color: var(--accent-line); } .ident-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.ident-opt b { font-size: 14px; } .ident-opt em { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: var(--on-accent, #fff); margin-left: 4px; }
.ident-opt small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.conv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .conv-list li { display: grid; gap: 1px; padding-left: 12px; border-left: 2px solid var(--border); } .conv-list small { color: var(--muted); }
.kc-back { font-weight: 700; color: var(--accent-fg); }

/* faixa do dashboard: letras brancas (o botao "Abrir chat" continua claro, com letra escura) */
.hero { background: linear-gradient(var(--hero-shade, transparent), var(--hero-shade, transparent)), var(--grad); }
/* contatos */
.ct-row { cursor: pointer; } .ct-row:hover td, .ct-row:focus-visible td { background: var(--hover); } .ct-row:focus-visible { outline: none; }
.ct-more { display: flex; justify-content: center; margin-top: 14px; }

/* janelas do CRM: card e contato */
.cm { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; } @media (max-width: 780px) { .cm { grid-template-columns: 1fr; } }
.cm-col { display: grid; gap: 14px; min-width: 0; }
.cm-box { display: grid; gap: 12px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 18px; background: var(--panel); }
.cm-box > h3 { margin: 0; display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); } .cm-box > h3 svg { width: 14px; height: 14px; color: var(--accent-fg); }
.cm-box .hint { display: flex; align-items: flex-start; gap: 6px; margin: 0; } .cm-box .hint svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.cm-box .form { gap: 10px; }
.stepper { display: flex; flex-wrap: wrap; gap: 8px; }
.fstep { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.fstep i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.fstep:hover { border-color: var(--c); color: var(--text); }
.fstep.on { background: color-mix(in srgb, var(--c) 16%, var(--panel)); border-color: var(--c); color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 14%, transparent); }
.cm-box.ai { background: var(--accent-soft); border-color: var(--accent-line); }
.ai-sum { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.45; } .ai-why { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.ai-conf { display: flex; align-items: center; gap: 10px; } .ai-conf small { color: var(--muted); white-space: nowrap; }
.conf { flex: 1; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 16%, var(--border)); overflow: hidden; } .conf i { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.tl { list-style: none; margin: 0; padding: 0 0 0 7px; display: grid; gap: 14px; max-height: 300px; overflow-y: auto; border-left: 2px solid var(--border); scrollbar-width: thin; }
.tl li { position: relative; padding-left: 16px; } .tl li::before { content: ""; position: absolute; left: -13px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--faint)); border: 2px solid var(--panel); box-sizing: content-box; }
.tl-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; font-weight: 600; font-size: 13.5px; } .tl-h small { color: var(--muted); font-weight: 400; font-size: 12px; }
.tl p { margin: 3px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.cm-who { display: flex; align-items: center; gap: 13px; }
.cm-av { width: 48px; height: 48px; border-radius: 16px; background: var(--grad); color: var(--on-accent); display: grid; place-items: center; font-weight: 750; font-size: 20px; flex: none; box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.cm-who-t { display: grid; gap: 1px; min-width: 0; } .cm-who-t b { overflow-wrap: anywhere; } .cm-who-t small { color: var(--muted); font-size: 12.5px; }
.cm-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; } .cm-stats b { color: var(--text); font-size: 16px; }
.btn.wa { justify-self: start; }
.cv-list, .op-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 260px; overflow-y: auto; scrollbar-width: thin; }
.cv-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.cv-list li > div { display: grid; gap: 1px; min-width: 0; } .cv-list b { font-size: 13.5px; } .cv-list small { color: var(--muted); font-size: 12px; } .cv-list p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.op-list li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-left: 3px solid var(--c); border-radius: 12px; background: var(--bg); } .op-list p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); } .op-list small { color: var(--muted); font-size: 12px; }
.op-stage { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; font-size: 13.5px; } .op-stage i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.ct-act { white-space: nowrap; text-align: right; } .ct-act-h { width: 92px; }
.icon-btn { width: 34px; height: 34px; border: none; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; transition: background .15s, color .15s; } .icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover, .icon-btn:focus-visible { background: var(--hover); color: var(--text); outline: none; } .icon-btn.danger:hover, .icon-btn.danger:focus-visible { background: var(--err-soft); color: var(--err); }

/* abas da janela do card */
.mtabs { display: flex; gap: 4px; margin-bottom: 16px; padding: 4px; border-radius: 14px; background: var(--hover); overflow-x: auto; scrollbar-width: none; }
.mtab { flex: 1; min-width: max-content; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border: none; border-radius: 10px; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.mtab:hover { color: var(--text); } .mtab.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow); } .mtab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mtab em { font-style: normal; font-size: 11.5px; font-weight: 700; min-width: 20px; padding: 1px 6px; border-radius: 99px; background: var(--border); color: var(--muted); } .mtab.on em { background: var(--accent-soft); color: var(--accent-fg); }
.mpanel { display: grid; gap: 14px; align-content: start; min-height: 320px; animation: viewIn .2s both; } .mpanel[hidden] { display: none; }
.cv-list.tall, .tl.tall { max-height: 360px; }

/* cor do icone do botao e teste do botao no painel */
.sw.auto { background: linear-gradient(135deg, #ffffff 50%, #14161a 50%); border: 1px solid var(--border); }
.sw[data-c="#ffffff"] { border: 1px solid var(--border); }
.pv-hint { display: block; margin-top: 8px; line-height: 1.5; }
/* atendimentos: fundo discreto onde ficam as mensagens, para separar do restante do card */
.tthread { background: color-mix(in srgb, var(--accent) 5%, var(--bg)); border: 1px solid var(--border); border-radius: 16px; padding: 16px 14px 14px 16px; }

/* campos do cliente (CRM) */
.kc-fs { display: flex; flex-wrap: wrap; gap: 5px; } .kc-f { padding: 1px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-fg); font-size: 11.5px; font-weight: 650; }
.f-manual { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 6px; background: var(--hover); color: var(--muted); margin-left: 4px; }
.frow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.f-main { display: grid; gap: 8px; min-width: 0; } .f-line { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 8px; } .f-hint { min-height: 54px; font-size: 13px; }
.f-tpls { display: grid; gap: 10px; margin-bottom: 4px; }
@media (max-width: 640px) { .frow { grid-template-columns: 1fr; } .f-line { grid-template-columns: 1fr; } }
/* Copiloto */
.cp { display: grid; gap: 12px; grid-template-rows: minmax(0, 1fr) auto auto; }
.cp-page { min-height: calc(100vh - 220px); } .cp-modal { min-height: 440px; max-height: 70vh; }
.cp-thread { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; padding: 4px 4px 8px; min-height: 0; max-height: calc(100vh - 330px); scrollbar-width: thin; } .cp-modal .cp-thread { max-height: calc(70vh - 110px); }
.cp-msg { max-width: min(92%, 860px); } .cp-msg.me { align-self: flex-end; padding: 10px 15px; border-radius: 18px 18px 5px 18px; background: var(--accent-soft); border: 1px solid var(--accent-line); white-space: pre-wrap; overflow-wrap: anywhere; }
.cp-msg.bot { align-self: flex-start; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
.cp-av { width: 32px; height: 32px; border-radius: 11px; background: var(--grad); color: var(--on-accent); display: grid; place-items: center; } .cp-av svg { width: 17px; height: 17px; }
.cp-body { min-width: 0; display: grid; gap: 10px; padding-top: 4px; } .cp-body p { margin: 0; line-height: 1.55; overflow-wrap: anywhere; } .cp-done { color: var(--ok); font-weight: 600; }
.cp-ex { display: flex; flex-wrap: wrap; gap: 8px; } .cp-ex button { text-align: left; padding: 8px 13px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; transition: border-color .15s, background .15s; } .cp-ex button:hover { border-color: var(--accent); background: var(--accent-soft); }
.cp-tbl { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); } .cp-tbl table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cp-tbl th { text-align: left; padding: 9px 12px; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; } .cp-tbl td { padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; } .cp-tbl tr:last-child td { border-bottom: none; }
.cp-row { cursor: pointer; } .cp-row:hover td, .cp-row:focus-visible td { background: var(--hover); } .cp-row:focus-visible { outline: none; } .cp-row td:first-child { font-weight: 650; white-space: normal; min-width: 150px; }
.cp-act { text-align: right; } .cp-tools { display: flex; gap: 8px; } .cp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cp-compose { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px; border: 1px solid var(--border); border-radius: 22px; background: var(--panel); transition: border-color .15s, box-shadow .15s; } .cp-compose:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.cp-compose textarea { flex: 1; min-width: 0; border: none; outline: none; background: transparent; resize: none; font: inherit; color: inherit; padding: 9px 0; min-height: 40px; max-height: 120px; box-shadow: none; } .cp-compose textarea:focus { box-shadow: none; }
.cp-send { width: 42px; height: 42px; padding: 0; border-radius: 50%; display: grid; place-items: center; } .cp-send svg { width: 20px; height: 20px; } .cp-compose .icon-btn { width: 42px; height: 42px; border-radius: 50%; } .cp-compose .icon-btn svg { width: 21px; height: 21px; }
.cp-mic.rec { background: var(--err-soft); color: var(--err); animation: pulse 1.2s infinite; } @keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--err) 22%, transparent); } }
.cp-hint { text-align: center; } .cp-typing { display: inline-flex; gap: 5px; align-items: center; height: 22px; } .cp-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: cpb 1.1s infinite ease-in-out; } .cp-typing i:nth-child(2) { animation-delay: .15s; } .cp-typing i:nth-child(3) { animation-delay: .3s; } @keyframes cpb { 0%, 70%, 100% { transform: translateY(0); opacity: .35; } 35% { transform: translateY(-5px); opacity: 1; } }

/* Copiloto: modo voz (esfera) */
.cp-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cp-bar .btn { display: inline-flex; align-items: center; gap: 7px; } .cp-bar .btn svg { width: 16px; height: 16px; } .cp-bar .btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.cp-speak { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); cursor: pointer; } .cp-speak input { width: auto; accent-color: var(--accent); }
.cp-stage { position: relative; display: grid; place-items: center; border-radius: 22px; background: radial-gradient(120% 90% at 50% 0%, #1d1b44 0%, #0b0d1e 70%); height: clamp(220px, 38vh, 380px); overflow: hidden; }
.cp-orb { width: min(100%, 340px); height: calc(100% - 42px); max-height: 100%; cursor: pointer; outline: none; position: relative; margin-top: -26px; }
.cp-orb canvas { display: block; width: 100% !important; height: 100% !important; }
.cp-orb:focus-visible { box-shadow: 0 0 0 2px var(--accent); border-radius: 50%; }
.cp-ostatus { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #b8b4d6; font-size: 13.5px; letter-spacing: .02em; }
.cp.voice .cp-thread > .cp-msg:not(:last-child) { display: none; }
.cp.voice .cp-thread { max-height: 34vh; }
.cp.voice .cp-hint, .cp.voice .cp-ex { display: none; }
.cp.voice.cp-page { min-height: 0; }

/* abertura do app instalado */
.launcher { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent) 30%, var(--bg)) 0%, var(--bg) 65%); }
.ln-in { width: min(100%, 420px); display: grid; gap: 14px; }
.ln-brand { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.ln-in h1 { margin: 0; font-size: 34px; line-height: 1.1; } .ln-in p { margin: 0 0 8px; color: var(--muted); font-size: 16px; }
.ln-card { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 22px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform .15s, border-color .15s; }
.ln-card:active { transform: scale(.98); } .ln-card:hover, .ln-card:focus-visible { border-color: var(--accent); outline: none; }
.ln-card b { display: block; font-size: 18px; } .ln-card small { color: var(--muted); font-size: 13.5px; }
.ln-ic { width: 52px; height: 52px; flex: none; border-radius: 17px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); } .ln-ic svg { width: 26px; height: 26px; }
.ln-cp { background: var(--grad); color: var(--on-accent); border-color: transparent; } .ln-cp small { color: inherit; opacity: .85; } .ln-cp .ln-ic { background: rgba(255, 255, 255, .22); color: inherit; }
@media (max-width: 760px) {
  main:has(.cp.voice) .page-head { display: none; }
  .cp.voice .cp-stage { height: clamp(200px, 34vh, 320px); }
  .cp.voice .cp-thread { max-height: 30vh; }
  .cp.voice .cp-compose { position: sticky; bottom: 8px; box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .35); }
}
.cp-opts { display: inline-flex; gap: 14px; flex-wrap: wrap; } .cp:not(.voice) .cp-loopl { display: none; }
.ln-rem { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin-top: 4px; cursor: pointer; } .ln-rem input { width: auto; accent-color: var(--accent); }

/* esfera sem moldura: fundo transparente em qualquer tema */
.cp-stage { background: none !important; border-radius: 0; }
.cp-ostatus { color: var(--muted) !important; }
/* iPhone: campos com menos de 16px fazem o Safari dar zoom ao focar */
@media (max-width: 760px) {
  input, select, textarea, .cp-compose textarea { font-size: 16px !important; }
  html { -webkit-text-size-adjust: 100%; } body { overflow-x: hidden; }
  .app::after { content: ""; position: fixed; inset: 0; z-index: 35; background: rgba(8, 10, 24, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .app.menu-open::after { opacity: 1; pointer-events: auto; }
}

/* celular: tabelas viram cartoes empilhados (uma linha = um cartao) */
@media (max-width: 760px) {
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack thead { display: none; }
  table.stack tr { padding: 14px 4px; border-bottom: 1px solid var(--border); } table.stack tr:last-child { border-bottom: none; }
  table.stack td { border: none; padding: 5px 12px; min-width: 0 !important; display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: right; }
  table.stack td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 13px; text-align: left; flex: none; }
  table.stack td.st-name { display: block; text-align: left; font-size: 16px; } table.stack td.st-act { display: block; padding-top: 10px; }
  table.stack td.st-act .actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; } table.stack td.st-act .btn { flex: 1 1 auto; text-align: center; }
  table.stack td > div:not(.actions) { flex: 1; min-width: 0; } .page-head { flex-wrap: wrap; gap: 12px; } .page-head .actions { width: 100%; } .page-head .actions .btn { width: 100%; }
}
/* celular: nada pode alargar a pagina alem da tela (graficos, quadros, faixas largas rolam por dentro) */
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); } main { min-width: 0; max-width: 100vw; } main > * { min-width: 0; max-width: 100%; }
  .chart-wrap svg, .chart svg { max-width: 100%; height: auto; }
  .banner.ctx { flex-wrap: wrap; } .banner.ctx .btn { flex: none; }
  .inb-top { flex-wrap: wrap; } .inb-top > * { min-width: 0; max-width: 100%; } .inb-top select { width: 100%; }
}
/* esfera no tema claro: pontos claros somem no fundo branco, entao inverte o brilho mantendo as cores */
.cp-orb canvas { filter: brightness(.62) saturate(2.2) drop-shadow(0 0 .6px rgba(60, 50, 200, .55)); }
:root[data-theme="dark"] .cp-orb canvas { filter: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cp-orb canvas { filter: none; } }

/* Copiloto: botao de som e tela cheia no celular */
.cp-vol.off { color: var(--muted); }
@media (max-width: 760px) {
  main:has(.cp-page) { padding: 8px 10px 10px; }
  main:has(.cp-page) .page-head, main:has(.cp-page) .banner.ctx { display: none; }
  .cp-page { display: flex; flex-direction: column; gap: 8px; height: calc(100dvh - var(--bar-h, 64px) - 20px); min-height: 0; padding: 8px 10px; border-radius: 18px; }
  .cp-page .cp-stage { flex: none; height: 132px; margin: 0; }
  .cp-page .cp-orb { height: calc(100% - 26px); margin-top: -14px; }
  .cp-page .cp-ostatus { bottom: 0; font-size: 12.5px; }
  .cp-page .cp-thread { flex: 1; min-height: 0; max-height: none; }
  .cp-page .cp-hint { display: none; }
  .cp-page .cp-compose { flex: none; position: static; padding: 4px 4px 4px 12px; gap: 4px; }
  .cp-compose .icon-btn, .cp-send { width: 38px; height: 38px; }
}

/* Copiloto: tela de voz no celular (esfera central; o X volta ao chat) */
.cp-page { position: relative; }
.cp-voice { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 64px 18px 24px; background: var(--panel); border-radius: inherit; }
.cp-voice[hidden] { display: none; }
.cp-vtop { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; }
.cp-vtop .icon-btn { width: 44px; height: 44px; border-radius: 50%; } .cp-vtop .icon-btn svg { width: 22px; height: 22px; } .cp-vtop .off { color: var(--muted); }
.cp-voice .cp-orb { width: min(82vw, 340px); height: min(82vw, 340px); margin: 0; flex: none; }
.cp-voice .cp-ostatus { position: static; color: var(--muted) !important; font-size: 14px; }
.cp-cap { max-width: 460px; max-height: 24vh; overflow-y: auto; text-align: center; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; } .cp-cap.me { color: var(--muted); font-style: italic; }
.cp-capbtns { display: flex; gap: 10px; } .cp-capbtns:empty { display: none; }
@media (max-width: 760px) { .cp-page .cp-vol { display: none; } }

/* Assistente x Aparencia: a metade da outra tela fica escondida; o Assistente nao tem pre-visualizacao */
.asst [hidden] { display: none !important; }
.asst.solo { grid-template-columns: minmax(0, 860px); }

/* Precificacao (superadmin) */
.pc { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.pc-main { display: grid; gap: 16px; min-width: 0; } .pc-main > .panel { margin: 0; }
.pc-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.pc-ctl { display: grid; gap: 6px; align-content: start; } .pc-lab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; } .pc-lab output { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.pc-ctl input[type=range] { width: 100%; accent-color: var(--accent); padding: 0; }
.pc-mods { display: grid; gap: 8px; } .pc-tag { font-style: normal; font-weight: 600; font-size: 12px; color: var(--accent); margin-left: 6px; }
.pc-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; margin: 12px 0; } .pc-fields label { font-size: 12.5px; }
.pc-side { position: sticky; top: 16px; } .pc-sum { display: grid; gap: 12px; }
.pc-near { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.pc-price { display: flex; align-items: baseline; gap: 8px; } .pc-price b { font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; } .pc-price span { color: var(--muted); }
.pc-lines { display: grid; gap: 2px; max-height: 38vh; overflow-y: auto; border-top: 1px solid var(--border); padding-top: 8px; scrollbar-width: thin; }
.pc-line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13.5px; border-bottom: 1px dashed var(--border); } .pc-line b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-setup select { width: 100%; } .pc-cost { display: grid; gap: 4px; padding: 12px; border-radius: 12px; background: var(--hover); font-size: 13.5px; }
.pc-cost > div { display: flex; justify-content: space-between; gap: 10px; } .pc-cost small { color: var(--muted); } .pc-warn { color: var(--err); }
.pc-edit summary { cursor: pointer; font-weight: 650; display: flex; align-items: center; gap: 8px; } .pc-edit summary svg { width: 16px; height: 16px; }
@media (max-width: 1100px) { .pc { grid-template-columns: minmax(0, 1fr); } .pc-side { position: static; order: -1; } .pc-grid { grid-template-columns: minmax(0, 1fr); } }

/* Atendimentos: a pagina nunca rola na horizontal; so a lista e o detalhe rolam por dentro */
main:has(.inbox) { overflow-x: hidden; }
.inbox { min-width: 0; max-width: 100%; }
.inbox > .panel { min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.inbox-list .conv-list { overflow-x: auto; }
.inbox-detail { overflow-x: auto; }
.inbox.fit { align-items: stretch; }
.inbox.fit > .panel { height: 100%; max-height: none; min-height: 0; position: static; }
.inbox.fit .conv-list { flex: 1 1 auto; max-height: none; min-height: 0; }
.inbox.fit .inbox-detail { overflow: hidden; }
