/* ZAPNORA — identidade visual (logo oficial)
   Cores: Zap Verde #16C93D (marca/ações) · Lima #7CF52A (destaque) · Noite #050B1E (fundo da marca) · Tinta #0F172A · Névoa #F5F7FB
   Tipografia: pilha do sistema (Segoe UI / SF / Roboto) — rápida, sem fonte externa (LGPD). */

:root {
    --zn-indigo: #16C93D; --zn-indigo-700: #0F9E2F; --zn-indigo-50: #EAFBEA; --zn-on-brand: #04130A; --zn-link: #0A7A2B; --zn-night: #050B1E;
    --zn-mint: #7CF52A; --zn-mint-700: #4FCB12; --zn-mint-50: #F1FDE6;
    --zn-ink: #0F172A; --zn-ink-2: #334155; --zn-muted: #64748B; --zn-line: #E2E8F0;
    --zn-bg: #F5F7FB; --zn-card: #FFFFFF;
    --zn-red: #DC2626; --zn-red-50: #FEF2F2; --zn-amber: #B45309; --zn-amber-50: #FFFBEB; --zn-green-50: #ECFDF5;
    --zn-grad: linear-gradient(135deg, #7CF52A 0%, #13D64A 100%);
    --zn-radius: 12px; --zn-radius-sm: 8px;
    --zn-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
    --zn-font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--zn-font); color: var(--zn-ink); background: var(--zn-bg); }
a { color: var(--zn-link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
img, svg { max-width: 100%; }
.muted { color: var(--zn-muted); }
.small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: Consolas, "SF Mono", monospace; font-size: .9em; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1rem; } .mb { margin-bottom: 1rem; } .mt-lg { margin-top: 2rem; }
.hidden { display: none !important; }

/* ---------- marca */
.brand { display: inline-flex; align-items: center; }
.brand img { height: 38px; width: auto; display: block; }
.brand:hover { text-decoration: none; }

/* ---------- botões e formulários */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .62rem 1.05rem; border-radius: var(--zn-radius-sm);
    border: 1px solid transparent; font: 600 .92rem var(--zn-font); cursor: pointer; text-decoration: none !important; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--zn-indigo); color: var(--zn-on-brand); }
.btn-primary:hover { background: #12B036; }
.btn-mint { background: var(--zn-night); color: #fff; }
.btn-mint:hover { background: #111C3A; }
.btn-ghost { background: transparent; color: var(--zn-ink-2); border-color: var(--zn-line); }
.btn-ghost:hover { background: #fff; border-color: #CBD5E1; }
.btn-danger { background: var(--zn-red); color: #fff; }
.btn-danger:hover { background: #B91C1C; }
.btn-sm { padding: .38rem .7rem; font-size: .83rem; }
.btn-lg { padding: .85rem 1.4rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.armed { box-shadow: 0 0 0 3px rgba(220, 38, 38, .25); }

.form { display: grid; gap: 1rem; }
.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field { display: grid; gap: .35rem; }
.field > span, .label { font-weight: 600; font-size: .87rem; color: var(--zn-ink-2); }
.field small { color: var(--zn-muted); font-size: .8rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=tel], select, textarea {
    width: 100%; padding: .62rem .75rem; border: 1px solid #CBD5E1; border-radius: var(--zn-radius-sm); background: #fff;
    font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--zn-indigo); box-shadow: 0 0 0 3px rgba(22, 201, 61, .2); }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; align-items: flex-start; gap: .5rem; font-size: .92rem; }
.check input { margin-top: .25rem; accent-color: var(--zn-indigo); }
.checks { display: grid; gap: .45rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.input-group { position: relative; }
.input-group .toggle-pass { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--zn-muted); cursor: pointer; font-size: .8rem; padding: .3rem; }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
fieldset { border: 1px solid var(--zn-line); border-radius: var(--zn-radius); padding: 1rem 1.1rem 1.2rem; margin: 0; }
legend { font-weight: 700; padding: 0 .4rem; }

/* ---------- avisos */
.alert { padding: .75rem 1rem; border-radius: var(--zn-radius-sm); margin-bottom: 1rem; border: 1px solid; font-size: .93rem; }
.alert-error { background: var(--zn-red-50); border-color: #FECACA; color: #991B1B; }
.alert-ok { background: var(--zn-green-50); border-color: #A7F3D0; color: #065F46; }
.alert-warn { background: var(--zn-amber-50); border-color: #FDE68A; color: #92400E; }
.alert-info { background: #EFF6FF; border-color: #BFDBFE; color: #1E3A8A; }

/* ---------- cartões, tabelas, selos */
.card { background: var(--zn-card); border: 1px solid var(--zn-line); border-radius: var(--zn-radius); box-shadow: var(--zn-shadow); padding: 1.25rem; }
.card + .card { margin-top: 1rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-bottom: 1.25rem; }
.stat { background: var(--zn-card); border: 1px solid var(--zn-line); border-radius: var(--zn-radius); padding: 1rem 1.1rem; box-shadow: var(--zn-shadow); }
.stat .stat-label { color: var(--zn-muted); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .stat-value { font-size: 1.7rem; font-weight: 800; margin-top: .2rem; }
.stat .stat-sub { color: var(--zn-muted); font-size: .8rem; }
.stat--accent { background: var(--zn-night); color: #fff; border: 0; box-shadow: inset 0 -3px 0 var(--zn-indigo); }
.stat--accent .stat-label, .stat--accent .stat-sub { color: #9FE8AE; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--zn-muted); font-weight: 700; padding: .6rem .7rem; border-bottom: 1px solid var(--zn-line); white-space: nowrap; }
.table td { padding: .7rem; border-bottom: 1px solid var(--zn-line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #F8FDF8; }
.empty { text-align: center; color: var(--zn-muted); padding: 2rem 1rem; }

.badge { display: inline-block; padding: .16rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.badge-green { background: var(--zn-mint-50); color: #047857; }
.badge-indigo { background: #EFF6FF; color: #1D4ED8; }
.badge-amber { background: var(--zn-amber-50); color: var(--zn-amber); }
.badge-red { background: var(--zn-red-50); color: #B91C1C; }
.badge-gray { background: #F1F5F9; color: #475569; }

.meter { height: 8px; border-radius: 999px; background: #E2E8F0; overflow: hidden; margin-top: .4rem; }
.meter > i { display: block; height: 100%; background: var(--zn-grad); }
.meter > i.w-0 { width: 0 } /* larguras definidas pela classe w-N (CSP sem estilos inline) */

dl.info { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; font-size: .93rem; }
dl.info dt { color: var(--zn-muted); }
dl.info dd { margin: 0; word-break: break-word; }

/* ---------- painéis (Master e empresa) */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: var(--zn-night); color: #CBD5E1; padding: 1.1rem .8rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .brand { padding: .2rem .5rem 1.1rem; }
.sidebar .brand img { height: 34px; }
.side-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #64748B; padding: .9rem .7rem .35rem; }
.nav a { display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; border-radius: var(--zn-radius-sm); color: #CBD5E1; font-weight: 500; font-size: .93rem; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(22, 201, 61, .16); color: #fff; box-shadow: inset 3px 0 0 var(--zn-mint); }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav .soon { margin-left: auto; font-size: .65rem; background: rgba(255,255,255,.08); color: #94A3B8; padding: .05rem .4rem; border-radius: 999px; }
.side-foot { margin-top: auto; padding: .8rem .5rem 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .82rem; }
.side-foot .who { color: #fff; font-weight: 600; }
.side-foot form { margin-top: .5rem; }
.side-foot .btn-ghost { color: #CBD5E1; border-color: rgba(255,255,255,.15); width: 100%; }
.side-foot .btn-ghost:hover { background: rgba(255,255,255,.06); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.6rem; background: #fff; border-bottom: 1px solid var(--zn-line); position: sticky; top: 0; z-index: 5; }
.topbar h1 { font-size: 1.2rem; margin: 0; }
.topbar .crumb { color: var(--zn-muted); font-size: .82rem; }
.menu-btn { display: none; border: 1px solid var(--zn-line); background: #fff; border-radius: 8px; padding: .4rem .55rem; cursor: pointer; }
.content { padding: 1.5rem 1.6rem 3rem; max-width: 1280px; width: 100%; }
.assist-bar { background: #7C2D12; color: #FFEDD5; padding: .55rem 1.6rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: .9rem; }
.assist-bar .btn { background: #FFEDD5; color: #7C2D12; }

.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.toolbar form { display: flex; gap: .5rem; flex-wrap: wrap; }
.toolbar input[type=search] { min-width: 220px; }
.toolbar .spacer { flex: 1; }
.tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tabs a { padding: .35rem .8rem; border-radius: 999px; background: #fff; border: 1px solid var(--zn-line); color: var(--zn-ink-2); font-size: .85rem; font-weight: 600; }
.tabs a.active { background: var(--zn-night); color: #fff; border-color: var(--zn-night); }
.tabs a:hover { text-decoration: none; }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.actions form { margin: 0; }
.danger-zone { border-color: #FECACA; }
.danger-zone h3 { color: #B91C1C; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: .55rem 0; border-bottom: 1px solid var(--zn-line); display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; }
.list-plain li:last-child { border-bottom: 0; }
.log-line { display: grid; grid-template-columns: 120px 1fr; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--zn-line); font-size: .88rem; }
.log-line:last-child { border-bottom: 0; }

/* ---------- autenticação */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side { background: var(--zn-night); color: #E2E8F0; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -200px; border-radius: 50%; background: var(--zn-grad); opacity: .35; filter: blur(10px); }
.auth-side h2 { font-size: 2rem; color: #fff; max-width: 440px; position: relative; z-index: 1; }
.auth-side p { color: #94A3B8; max-width: 420px; position: relative; z-index: 1; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { font-size: 1.5rem; }
.auth-company { display: flex; align-items: center; gap: .7rem; padding: .7rem .85rem; background: #fff; border: 1px solid var(--zn-line); border-radius: var(--zn-radius); margin-bottom: 1.2rem; }
.auth-company .avatar { width: 38px; height: 38px; border-radius: 10px; background: var(--zn-indigo-50); color: var(--zn-link); display: grid; place-items: center; font-weight: 800; }

/* ---------- site */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(5, 11, 30, .96); backdrop-filter: saturate(1.5) blur(8px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.25rem; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.site-nav .brand img { height: 44px; }
.site-nav .links { display: flex; gap: 1.3rem; margin-left: auto; }
.site-nav .links a { color: #CBD5E1; font-weight: 600; font-size: .93rem; }
.site-nav .links a:hover { color: #fff; }
.site-header .btn-ghost { color: #E2E8F0; border-color: rgba(255, 255, 255, .2); }
.site-header .btn-ghost:hover { background: rgba(255, 255, 255, .06); }
.site-nav .cta { display: flex; gap: .6rem; }
.hero { padding: 5rem 0 4rem; background: radial-gradient(1000px 420px at 85% -10%, rgba(124, 245, 42, .18), transparent), radial-gradient(900px 480px at 0% 0%, rgba(22, 201, 61, .12), transparent); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.eyebrow { display: inline-block; padding: .3rem .75rem; border-radius: 999px; background: var(--zn-indigo-50); color: var(--zn-link); font-weight: 700; font-size: .8rem; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: #12B036; }
.hero p.lead { font-size: 1.12rem; color: var(--zn-ink-2); max-width: 560px; }
.hero .cta { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.5rem; }
.mock { background: #fff; border: 1px solid var(--zn-line); border-radius: 16px; box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .25); overflow: hidden; }
.mock-bar { display: flex; gap: .35rem; padding: .6rem .8rem; border-bottom: 1px solid var(--zn-line); background: #F8FAFC; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #E2E8F0; }
.mock-body { display: grid; grid-template-columns: 38% 1fr; min-height: 300px; }
.mock-list { border-right: 1px solid var(--zn-line); padding: .6rem; display: grid; gap: .45rem; align-content: start; }
.mock-item { display: flex; gap: .5rem; align-items: center; padding: .45rem; border-radius: 8px; }
.mock-item.on { background: var(--zn-indigo-50); }
.mock-av { width: 28px; height: 28px; border-radius: 50%; background: var(--zn-grad); flex: none; }
.mock-lines { flex: 1; display: grid; gap: .3rem; }
.mock-lines b, .mock-lines s { display: block; height: 7px; border-radius: 4px; background: #CBD5E1; text-decoration: none; }
.mock-lines b { width: 70%; } .mock-lines s { width: 45%; background: #E2E8F0; }
.mock-chat { padding: .9rem; display: grid; gap: .55rem; align-content: end; background: #F8FAFC; }
.bubble { max-width: 75%; padding: .5rem .7rem; border-radius: 12px; font-size: .78rem; }
.bubble.in { background: #fff; border: 1px solid var(--zn-line); }
.bubble.out { background: #D9FDD3; color: var(--zn-ink); justify-self: end; }
.section { padding: 4.5rem 0; }
.section-alt { background: #fff; border-top: 1px solid var(--zn-line); border-bottom: 1px solid var(--zn-line); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 2.5rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.features { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.feature { background: #fff; border: 1px solid var(--zn-line); border-radius: var(--zn-radius); padding: 1.3rem; }
.section-alt .feature { background: var(--zn-bg); }
.feature .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--zn-night); color: var(--zn-mint); margin-bottom: .8rem; }
.feature .ico svg { width: 22px; height: 22px; }
.steps { counter-reset: s; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { padding: 1.2rem; border-radius: var(--zn-radius); border: 1px dashed #A7E9B4; background: #fff; }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--zn-grad); color: var(--zn-on-brand); font-weight: 800; margin-bottom: .6rem; }
.plans { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.plan { background: #fff; border: 1px solid var(--zn-line); border-radius: 16px; padding: 1.5rem; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--zn-indigo); box-shadow: 0 20px 40px -20px rgba(22, 201, 61, .45); }
.plan .price { font-size: 2rem; font-weight: 800; margin: .4rem 0 .2rem; }
.plan .price small { font-size: .9rem; color: var(--zn-muted); font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 1rem 0 1.4rem; display: grid; gap: .45rem; font-size: .93rem; }
.plan li::before { content: "✓"; color: var(--zn-mint-700); font-weight: 800; margin-right: .45rem; }
.plan .btn { margin-top: auto; }
.faq { max-width: 780px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--zn-line); border-radius: var(--zn-radius); padding: .9rem 1.1rem; margin-bottom: .6rem; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: .7rem 0 0; color: var(--zn-ink-2); }
.cta-band { background: var(--zn-night); color: #fff; border-radius: 20px; padding: 3rem 2rem; text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: var(--zn-grad); opacity: .12; }
.cta-band > * { position: relative; }
.cta-band p { color: #CBD5E1; }
.site-footer { padding: 3rem 0 2rem; color: #94A3B8; font-size: .9rem; background: var(--zn-night); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 2fr 1fr 1fr; }
.footer-grid h4 { color: #fff; margin: 0 0 .6rem; font-size: .9rem; }
.footer-grid a { display: block; color: #94A3B8; padding: .15rem 0; }
.copy { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 2rem; padding-top: 1.2rem; }

.error-page { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 2rem 1rem; }
.error-page .code { font-size: 4.5rem; font-weight: 800; background: var(--zn-grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }

/* larguras de barra (0–100 em passos de 5) */
.w-0{width:0}.w-5{width:5%}.w-10{width:10%}.w-15{width:15%}.w-20{width:20%}.w-25{width:25%}.w-30{width:30%}.w-35{width:35%}.w-40{width:40%}.w-45{width:45%}.w-50{width:50%}.w-55{width:55%}.w-60{width:60%}.w-65{width:65%}.w-70{width:70%}.w-75{width:75%}.w-80{width:80%}.w-85{width:85%}.w-90{width:90%}.w-95{width:95%}.w-100{width:100%}

/* ---------- responsivo */
@media (max-width: 960px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
    .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .45); }
    .menu-btn { display: inline-flex; }
    .topbar, .content, .assist-bar { padding-left: 1rem; padding-right: 1rem; }
    .auth { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .hero-grid { grid-template-columns: 1fr; }
    .site-nav .links { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .site-nav .cta .btn-ghost { display: none; }
    .mock-body { grid-template-columns: 1fr; }
    .mock-list { display: none; }
    .stats { grid-template-columns: 1fr 1fr; }
    .log-line { grid-template-columns: 1fr; gap: .1rem; }
    dl.info { grid-template-columns: 1fr; gap: .1rem; }
    dl.info dd { margin-bottom: .5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* logo sobre fundo claro (login no celular, página de erro): chip azul-noite atrás */
.brand-chip { display: inline-flex; background: var(--zn-night); padding: .5rem .8rem; border-radius: 12px; margin-bottom: 1.2rem; }
.brand-chip img { height: 30px; width: auto; }
@media (min-width: 961px) { .auth-box .brand-chip { display: none; } }

/* WhatsApp: QR Code */
.qr-box { display: grid; place-items: center; gap: .6rem; min-height: 280px; padding: 1rem; border: 1px dashed var(--zn-line); border-radius: var(--zn-radius); background: #fff; margin-bottom: 1rem; text-align: center; }
.qr-box img { width: 264px; height: 264px; image-rendering: pixelated; }

/* ---------- central de atendimento (3 colunas) */
.content:has(.inbox) { max-width: none; padding: 0; }
.inbox { display: grid; grid-template-columns: 340px 1fr 300px; height: calc(100vh - 66px); background: #fff; border-top: 1px solid var(--zn-line); }
.inbox-list { border-right: 1px solid var(--zn-line); display: flex; flex-direction: column; min-height: 0; }
.inbox-tools { padding: .7rem; display: grid; gap: .45rem; border-bottom: 1px solid var(--zn-line); }
.inbox-tools input, .inbox-tools select { padding: .5rem .65rem; font-size: .88rem; }
.inbox-filters { display: flex; flex-wrap: wrap; gap: .3rem; padding: .55rem .7rem; border-bottom: 1px solid var(--zn-line); }
.inbox-filters button { border: 1px solid var(--zn-line); background: #fff; border-radius: 999px; padding: .22rem .6rem; font: 600 .75rem var(--zn-font); color: var(--zn-ink-2); cursor: pointer; }
.inbox-filters button.active { background: var(--zn-night); color: #fff; border-color: var(--zn-night); }
.inbox-filters b { color: var(--zn-link); }
.inbox-filters button.active b { color: var(--zn-mint); }
.inbox-convs { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.conv { padding: .7rem .8rem; border-bottom: 1px solid var(--zn-line); cursor: pointer; }
.conv:hover, .conv:focus { background: #F8FDF8; outline: none; }
.conv.active { background: var(--zn-indigo-50); box-shadow: inset 3px 0 0 var(--zn-indigo); }
.conv-top, .conv-line { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.conv-top strong { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-time { font-size: .72rem; color: var(--zn-muted); white-space: nowrap; }
.conv-prev { font-size: .84rem; color: var(--zn-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.unread .conv-prev { color: var(--zn-ink); font-weight: 600; }
.conv-badge { background: var(--zn-indigo); color: var(--zn-on-brand); border-radius: 999px; font-size: .7rem; padding: .05rem .45rem; }
.conv-meta { display: flex; flex-wrap: wrap; gap: .3rem; font-size: .72rem; color: var(--zn-muted); margin-top: .25rem; align-items: center; }
.conv-st { font-weight: 700; }
.st-open { color: #B45309; } .st-in_progress { color: var(--zn-link); } .st-pending { color: #7C3AED; } .st-closed { color: var(--zn-muted); }
.tag { display: inline-block; padding: .05rem .45rem; border-radius: 999px; background: #64748B; color: #fff; font-size: .7rem; font-weight: 700; }
.tag-picker { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag-btn { border: 0; cursor: pointer; opacity: .45; font-family: var(--zn-font); }
.tag-btn.on { opacity: 1; box-shadow: 0 0 0 2px var(--zn-ink); }

.inbox-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #EFEAE2; }
.inbox-empty { margin: auto; text-align: center; color: var(--zn-muted); }
.chat-head { display: flex; align-items: center; gap: .7rem; padding: .6rem .9rem; background: #fff; border-bottom: 1px solid var(--zn-line); }
.chat-who { display: grid; min-width: 0; flex: 1; }
.chat-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-actions { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.chat-back { display: none; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.msg { max-width: min(72%, 560px); padding: .45rem .65rem .3rem; border-radius: 10px; box-shadow: 0 1px 1px rgba(0,0,0,.08); font-size: .92rem; }
.msg-in { background: #fff; align-self: flex-start; border-top-left-radius: 2px; }
.msg-out { background: #D9FDD3; align-self: flex-end; border-top-right-radius: 2px; }
.msg-note { background: #FFF8DB; align-self: center; border: 1px dashed #E4C35A; max-width: 80%; }
.msg-sys { background: rgba(255,255,255,.75); align-self: center; font-size: .78rem; color: var(--zn-ink-2); box-shadow: none; }
.msg-from { font-size: .72rem; font-weight: 700; color: var(--zn-link); margin-bottom: .15rem; }
.msg-text { white-space: pre-wrap; word-break: break-word; }
.msg-img { max-width: 260px; max-height: 300px; border-radius: 6px; display: block; }
.msg audio { max-width: 260px; }
.msg-doc { display: inline-block; padding: .4rem .6rem; background: rgba(0,0,0,.05); border-radius: 6px; }
.msg-foot { display: flex; gap: .4rem; justify-content: flex-end; align-items: center; font-size: .68rem; color: var(--zn-muted); margin-top: .15rem; }
.msg-tick.tick-read { color: #2563EB; } .msg-tick.tick-failed { color: var(--zn-red); }
.msg-reply { border: 0; background: none; color: var(--zn-link); font-size: .68rem; cursor: pointer; padding: 0; opacity: 0; }
.msg:hover .msg-reply, .msg-reply:focus { opacity: 1; }
.chat-compose { background: #F0F2F5; padding: .55rem .7rem; border-top: 1px solid var(--zn-line); position: relative; }
.compose-row { display: flex; gap: .45rem; align-items: flex-end; }
.compose-row textarea { min-height: 42px; max-height: 160px; resize: none; flex: 1; }
.compose-attach { cursor: pointer; }
.compose-note { font-size: .78rem; white-space: nowrap; align-self: center; }
.compose-quote, .compose-file { display: flex; justify-content: space-between; gap: .5rem; background: #fff; border-left: 3px solid var(--zn-indigo); padding: .35rem .6rem; border-radius: 6px; margin-bottom: .4rem; font-size: .82rem; }
.compose-quote button, .compose-file button { border: 0; background: none; cursor: pointer; font-size: 1rem; }
.quick-list { position: absolute; bottom: 100%; left: .7rem; right: .7rem; list-style: none; margin: 0; padding: .3rem; background: #fff; border: 1px solid var(--zn-line); border-radius: 8px; box-shadow: var(--zn-shadow); max-height: 240px; overflow-y: auto; }
.quick-list li { padding: .4rem .5rem; border-radius: 6px; cursor: pointer; font-size: .85rem; }
.quick-list li:hover { background: var(--zn-indigo-50); }

.inbox-info { border-left: 1px solid var(--zn-line); overflow-y: auto; padding: .9rem; display: grid; gap: 1.1rem; align-content: start; }
.inbox-info h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--zn-muted); margin-bottom: .5rem; }
.inbox-info .form { gap: .55rem; }
.inbox-info input, .inbox-info select, .inbox-info textarea { padding: .45rem .6rem; font-size: .86rem; }

.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--zn-night); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 50; font-size: .9rem; box-shadow: var(--zn-shadow); }
.toast-erro { background: #991B1B; }

@media (max-width: 1200px) { .inbox { grid-template-columns: 300px 1fr; } .inbox-info { display: none; } }
@media (max-width: 760px) {
    .inbox { grid-template-columns: 1fr; height: calc(100vh - 60px); }
    .inbox .inbox-chat { display: none; }
    .inbox.chat-aberto .inbox-list { display: none; }
    .inbox.chat-aberto .inbox-chat { display: flex; }
    .chat-back { display: inline-flex; }
    .msg { max-width: 88%; }
}

.bar-row { display: grid; grid-template-columns: 80px 1fr 30px; gap: .5rem; align-items: center; margin: .2rem 0; }
.bar-row .meter { margin: 0; }
