/* =====================================================================
   DOMMUS · estilos base (mobile-first, sem dependências externas)
   ===================================================================== */
:root {
    --ink: #111214;
    --ink-2: #2a2c30;
    --paper: #f6f5f2;
    --card: #ffffff;
    --line: #e4e2dc;
    --muted: #6a6862;
    --focus: #2f6df6;

    --ok: #1c7a4b;
    --ok-bg: #e7f4ed;
    --warn: #8f5a00;
    --warn-bg: #fdf1d9;
    --fail: #b3261e;
    --fail-bg: #fcebe9;
    --info: #3b4a63;
    --info-bg: #eaeef5;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(17, 18, 20, .06), 0 8px 24px rgba(17, 18, 20, .06);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 5vw, 2.6rem); font-weight: 750; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: inherit; }

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
    border-radius: 6px;
}

.muted { color: var(--muted); }
.center { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: .75rem; }
.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 60ch; }
.hint { font-size: .85rem; color: var(--muted); margin: .35rem 0 0; }
.plain-list { margin: 0; padding-left: 1.1rem; }
.text-ok { color: var(--ok); } .text-warn { color: var(--warn); } .text-fail { color: var(--fail); }

/* ---------- Botões ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 44px; padding: .65rem 1.25rem;
    font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
    border: 1.5px solid transparent; border-radius: 999px;
    transition: transform .06s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-ghost-light:hover { background: #fff; color: var(--ink); }
.btn-sm { min-height: 36px; padding: .35rem .9rem; font-size: .9rem; }
.btn-lg { min-height: 52px; padding: .85rem 1.75rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Formulários ---------- */
.form { display: grid; gap: 1.1rem; margin-top: 1.25rem; }
.field label { display: block; font-weight: 650; margin-bottom: .35rem; font-size: .95rem; }
.input {
    width: 100%; min-height: 46px; padding: .6rem .9rem;
    font: inherit; color: var(--ink); background: #fff;
    border: 1.5px solid #c9c7c0; border-radius: var(--radius-sm);
}
.input:hover { border-color: #9c9a93; }
.input:focus { outline: 3px solid rgba(47, 109, 246, .35); border-color: var(--focus); }
.input-group { display: flex; gap: .5rem; align-items: stretch; }
.input-group .input { flex: 1; min-width: 0; }

/* ---------- Alertas ---------- */
.alert { padding: .85rem 1rem; border-radius: var(--radius-sm); margin: 0 0 1rem; border: 1px solid transparent; font-size: .95rem; }
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: #bfe0cd; }
.alert-error { background: var(--fail-bg); color: var(--fail); border-color: #f1c2be; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #cdd6e6; }
.alert-warning { background: var(--warn-bg); color: var(--warn); border-color: #efd9a6; }

/* ---------- Site público ---------- */
.site-header { padding: 1rem 1.25rem; display: flex; justify-content: center; }
.brand { display: inline-block; }
.brand-logo { height: 56px; width: auto; }
.brand-logo-lg { height: 84px; }
.brand-center { display: flex; justify-content: center; margin-bottom: 1rem; }
.site-main { max-width: 960px; margin: 0 auto; padding: 1rem 1.25rem 3rem; }
.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 1rem 2.5rem; }
.hero { padding: 2rem 0 2.5rem; text-align: center; }
.hero .lead { margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1.5rem; }
.narrow { max-width: 620px; margin: 2rem auto; }
.narrow.center .hero-actions, .narrow .hero-actions { justify-content: flex-start; }
.narrow.center { text-align: center; }
.narrow.center .lead { margin-left: auto; margin-right: auto; }

.section-title { text-align: center; margin: 1rem 0 1.5rem; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.steps-list li {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.25rem; box-shadow: var(--shadow);
}
.steps-list p { margin: 0; color: var(--muted); }
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%; margin-bottom: .6rem;
    background: var(--ink); color: #fff; font-weight: 700;
}

/* ---------- Login / instalador ---------- */
.page-auth { background: linear-gradient(180deg, #ecebe6 0%, var(--paper) 60%); }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; }
.auth-card {
    width: 100%; max-width: 440px; background: var(--card);
    border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
    padding: 1.75rem 1.5rem 2rem;
}
.auth-title { font-size: 1.5rem; text-align: center; margin-bottom: .25rem; }

/* ---------- Painel ---------- */
.page-admin { background: var(--paper); }
.admin-bar { background: var(--ink); color: #fff; }
.admin-bar-inner {
    max-width: 1100px; margin: 0 auto; padding: .6rem 1.25rem;
    display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem;
}
.admin-brand img { height: 40px; width: auto; }
.admin-nav { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.admin-nav a {
    color: #d8d7d2; text-decoration: none; padding: .45rem .8rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
}
.admin-nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.admin-nav a.is-active { color: var(--ink); background: #fff; }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.page-head { margin-bottom: 1.25rem; }
.page-head h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: .2rem; }

.cards { display: grid; gap: .9rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.5rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.stat-label { margin: 0; font-weight: 650; font-size: .92rem; }
.stat-value { margin: .15rem 0; font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; }
.stat-hint { margin: 0; color: var(--muted); font-size: .82rem; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.panel-narrow { max-width: 560px; }

.table-wrap { overflow-x: auto; }
table.diag { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.diag th, table.diag td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.diag tr:last-child th, table.diag tr:last-child td { border-bottom: 0; }
table.diag th { font-weight: 600; width: 34%; }
.diag-detail { color: var(--ink-2); word-break: break-word; }
.diag-compact { margin: 1rem 0 0; font-size: .85rem; }

.badge { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-fail { background: var(--fail-bg); color: var(--fail); }
.badge-info { background: var(--info-bg); color: var(--info); }

.debug { text-align: left; background: #1d1f23; color: #f0efe9; padding: 1rem; border-radius: var(--radius-sm); overflow-x: auto; font-size: .8rem; }

@media (min-width: 720px) {
    .cards { grid-template-columns: repeat(3, 1fr); }
    .steps-list { grid-template-columns: repeat(2, 1fr); }
    .auth-card { padding: 2rem 2rem 2.25rem; }
}
@media (min-width: 960px) {
    .steps-list { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* =====================================================================
   Formulário de pedido (Etapa 1)
   ===================================================================== */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.order-head { text-align: center; padding: .5rem 0 1rem; }
.order-head .lead { margin-left: auto; margin-right: auto; }
.order-app { max-width: 720px; margin: 0 auto; padding-bottom: 6rem; }
.order-help { font-size: .9rem; }

.progress { margin: 0 0 1rem; }
.progress-list { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; justify-content: space-between; }
.progress-list li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .25rem; color: var(--muted); font-size: .72rem; text-align: center; }
.progress-dot { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 700; background: #e4e2dc; color: var(--ink-2); }
.progress-list .is-current { color: var(--ink); font-weight: 700; }
.progress-list .is-current .progress-dot { background: var(--ink); color: #fff; }
.progress-list .is-done .progress-dot { background: var(--ok); color: #fff; }

.form-section { display: grid; gap: 1.1rem; }
.form-section > h2 { margin: 0; }
.form-section > p { margin: 0; }
.order-step { display: grid; gap: 1rem; }

textarea.input { min-height: 90px; resize: vertical; }
select.input { appearance: auto; }
.field.has-error .input { border-color: var(--fail); }
.field-error { color: var(--fail); font-size: .88rem; margin: .35rem 0 0; font-weight: 600; }
.field > label { margin-bottom: .45rem; }

.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { position: relative; cursor: pointer; flex: 0 1 auto; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; pointer-events: none; }
.choice-body { display: flex; flex-direction: column; gap: .1rem; min-height: 44px; justify-content: center; padding: .55rem 1rem; border: 1.5px solid #c9c7c0; border-radius: 999px; background: #fff; font-weight: 600; }
.choice input:checked + .choice-body { border-color: var(--ink); background: var(--ink); color: #fff; }
.choice input:focus-visible + .choice-body { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice-desc { font-size: .8rem; font-weight: 400; opacity: .8; }
.choices-cards { display: grid; grid-template-columns: 1fr; }
.choices-cards .choice-body { border-radius: var(--radius-sm); align-items: flex-start; }

.check { display: flex; align-items: flex-start; gap: .65rem; font-weight: 500; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: .1rem 0 0; flex: none; accent-color: var(--ink); }
.consents { display: grid; gap: .75rem; }

.stepper { display: inline-flex; align-items: center; gap: 1rem; }
.stepper .btn { min-width: 44px; font-size: 1.3rem; }
.stepper-value { min-width: 2ch; text-align: center; font-size: 1.6rem; font-weight: 800; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.chip { font: inherit; font-size: .85rem; padding: .3rem .75rem; border-radius: 999px; border: 1px dashed #9c9a93; background: #fff; cursor: pointer; }
.chip:hover { background: var(--ink); color: #fff; border-style: solid; }

.photo-picker { margin-bottom: .75rem; }
.photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.photo { margin: 0; display: grid; gap: .4rem; align-content: start; padding: .5rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #eee; }
.photo.is-primary { border-color: var(--ok); box-shadow: 0 0 0 2px var(--ok-bg); }
.photo-pending { min-height: 110px; align-content: center; text-align: center; }
.photo-pending.has-error { border-color: var(--fail); }
.photo-name { font-size: .8rem; word-break: break-all; }

.summary { margin: 0; display: grid; gap: .5rem; }
.sum-row { display: grid; gap: .1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.sum-row dt { font-weight: 700; font-size: .85rem; color: var(--muted); }
.sum-row dd { margin: 0; overflow-wrap: anywhere; }

.order-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    display: flex; justify-content: space-between; align-items: center; gap: .75rem;
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    background: rgba(246, 245, 242, .96); border-top: 1px solid var(--line); backdrop-filter: blur(6px);
}
.order-nav .btn-primary { flex: 1; max-width: 320px; margin-left: auto; }
.order-app.is-loading .order-nav, .order-app.is-loading .progress { visibility: hidden; }

.order-code { font-size: clamp(2rem, 8vw, 3rem); font-weight: 800; letter-spacing: .04em; margin: .25rem 0 1rem; }
.prose h2 { margin-top: 1.5rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .35rem; }

@media (min-width: 720px) {
    .photos { grid-template-columns: repeat(3, 1fr); }
    .choices-cards { grid-template-columns: repeat(2, 1fr); }
    .progress-list li { font-size: .85rem; flex-direction: row; justify-content: center; gap: .5rem; }
}

.notice-strong { color: var(--fail); text-transform: uppercase; font-weight: 800; letter-spacing: .02em; font-size: 1.1rem; line-height: 1.5; max-width: 34rem; margin: 0 auto 1rem; }
.narrow.center .hero-actions { justify-content: center; }

/* Botão principal da página inicial */
.btn-cta {
    min-height: 68px; padding: 1rem 2.6rem; font-size: 1.25rem; font-weight: 800; letter-spacing: .01em;
    box-shadow: 0 10px 28px rgba(17, 18, 20, .35); position: relative;
    transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(17, 18, 20, .42); }
.btn-cta::after {
    content: ""; position: absolute; inset: -6px; border-radius: 999px; border: 2px solid var(--ink);
    opacity: 0; animation: cta-pulse 2.4s ease-out infinite; pointer-events: none;
}
@keyframes cta-pulse { 0% { opacity: .5; transform: scale(.98); } 70%, 100% { opacity: 0; transform: scale(1.08); } }
.cta-note { margin: .9rem 0 0; font-size: .9rem; color: var(--muted); }
@media (max-width: 480px) { .btn-cta { width: 100%; padding-left: 1rem; padding-right: 1rem; } }
@media (prefers-reduced-motion: reduce) { .btn-cta::after { animation: none; } }

.date-selects { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: .5rem; }
.date-selects select.input { appearance: auto; }

/* ---------- Painel: pedidos ---------- */
.filters { display: grid; gap: .9rem; }
.filters-grid { display: grid; gap: .9rem; grid-template-columns: 1fr; }
.filters-actions { display: flex; gap: .5rem; }
.check-inline { display: flex; gap: .5rem; align-items: center; font-size: .92rem; }
.small { font-size: .82rem; }
.order-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .6rem; }
.order-row { display: grid; gap: .5rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); color: inherit; text-decoration: none; }
.order-row:hover { border-color: var(--ink); }
.ord-code { font-weight: 800; letter-spacing: .02em; font-size: 1rem; }
.order-main { display: grid; gap: .1rem; }
.order-side { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; }
.order-money { font-weight: 700; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1rem 0; }
.crumb { margin: 0 0 .5rem; }
.ord-head { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; }
.ord-head h1 { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.kvs { margin: 0; display: grid; gap: .55rem; }
.kv { display: grid; gap: .1rem; }
.kv dt { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6rem; margin-top: .75rem; }
.photo-grid a { position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--line); aspect-ratio: 1; background: #eee; }
.photo-grid a.is-primary { border-color: var(--ink); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tag { position: absolute; left: 4px; bottom: 4px; background: var(--ink); color: #fff; font-size: .68rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; }
.grid-2 { display: grid; gap: .9rem; grid-template-columns: 1fr; }
.quote-form h3, .quote-approve h3 { margin: 0; font-size: 1.05rem; }
.quote-total { margin: 0; font-size: 1.6rem; font-weight: 800; }
.inline-form { margin-top: 1rem; display: grid; gap: .5rem; }
.quote-approve { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.pl-list { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .55rem; font-size: .92rem; }
.timeline { list-style: none; margin: 1.25rem 0 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); display: grid; gap: .9rem; }
.timeline li { position: relative; display: grid; gap: .1rem; }
.timeline li::before { content: ""; position: absolute; left: -1.38rem; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.note { border-top: 1px solid var(--line); padding-top: .75rem; margin-top: .75rem; }
.note p.small { margin: 0 0 .2rem; }
.danger-zone { border-color: #f1c2be; }
.danger-zone summary { color: var(--fail); cursor: pointer; }
.btn-danger { background: var(--fail); color: #fff; }
.btn-danger:hover { background: #8f1d17; }
.recent { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.recent a { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; color: inherit; text-decoration: none; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.recent a:hover strong { text-decoration: underline; }
a.stat { color: inherit; text-decoration: none; display: block; }
a.stat:hover { border-color: var(--ink); }
@media (min-width: 640px) {
    .filters-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .order-row { grid-template-columns: 8.5rem 1fr auto; align-items: center; }
    .order-side { justify-content: flex-end; max-width: 22rem; }
    .kv { grid-template-columns: 12rem 1fr; gap: 1rem; }
}

/* ---------- Etapa 2 (cliente) ---------- */
.checkout { max-width: 680px; text-align: left; }
.checkout .lead { margin-left: 0; }
.co-char { display: flex; gap: .9rem; align-items: flex-start; border-top: 1px solid var(--line); padding-top: .9rem; margin-top: .9rem; }
.co-char img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); flex: none; }
.co-char .kvs { margin-top: .4rem; }
.co-values { width: 100%; border-collapse: collapse; }
.co-values th { text-align: left; font-weight: 600; padding: .4rem 0; }
.co-values td { text-align: right; padding: .4rem 0; }
.co-total th, .co-total td { border-top: 2px solid var(--ink); font-size: 1.25rem; font-weight: 800; padding-top: .7rem; }
.co-note { background: var(--info-bg); color: var(--info); border-radius: var(--radius-sm); padding: .75rem 1rem; margin: 1rem 0 0; }
.co-address { margin-top: 1rem; }
.co-address summary { display: inline-flex; cursor: pointer; list-style: none; }
.co-address summary::-webkit-details-marker { display: none; }
.co-address form { margin-top: 1rem; }
.checkout .check-inline { align-items: flex-start; font-size: 1rem; line-height: 1.4; }
.checkout .check-inline input { margin-top: .25rem; width: 1.15rem; height: 1.15rem; flex: none; }
.checkout .field label.check-inline { font-weight: 400; display: flex; }

/* ---------- Atualização automática ---------- */
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #c9c7c0; margin-left: .4rem; vertical-align: middle; }
.live-dot.is-on { background: var(--ok); }
.live-dot.is-off { background: var(--warn); }
.stat.flash { animation: stat-flash 1.6s ease-out; }
@keyframes stat-flash { 0% { box-shadow: 0 0 0 3px rgba(28, 122, 75, .55); } 100% { box-shadow: var(--shadow); } }
.new-orders { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.new-orders[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .stat.flash { animation: none; } }

/* protótipo (painel) */
.proto-thumb { display: grid; gap: .35rem; }
.proto-thumb a { position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--line); aspect-ratio: 1; background: #eee; }
.proto-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.h-sm { margin: 1rem 0 .4rem; font-size: 1rem; }

/* Equipe */
table.team-table th { width: auto; }
.team-actions { white-space: nowrap; }
.team-actions .inline-form { display: inline-block; margin: 0 .25rem 0 0; }
.team-cred { border-color: var(--ok); background: var(--ok-bg); }
.team-cred .input { font-family: ui-monospace, Menlo, Consolas, monospace; }
@media (max-width: 720px) {
    table.team-table thead { display: none; }
    table.team-table, table.team-table tbody, table.team-table tr, table.team-table td { display: block; width: 100%; }
    table.team-table tr { padding: .75rem 0; border-bottom: 1px solid var(--line); }
    table.team-table tr:last-child { border-bottom: 0; }
    table.team-table td { border: 0; padding: .15rem 0; }
    table.team-table td:first-child { font-weight: 700; }
    table.team-table .team-actions { padding-top: .5rem; white-space: normal; }
}

/* Orçamento: opções de frete */
.ship-rows { display: grid; gap: .5rem; margin: .25rem 0 .75rem; }
.ship-row { display: grid; grid-template-columns: 1fr; gap: .5rem; padding: .6rem; border: 1px solid var(--line); border-radius: 12px; }
.ship-row[hidden] { display: none; }
.ship-opts-list { margin: .35rem 0 0; padding-left: 1.1rem; font-size: .85rem; color: var(--ink-2); }
@media (min-width: 720px) { .ship-row { grid-template-columns: 2fr 1fr 1fr; } }

/* Frete: embalagens e cotação */
.pkg-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; align-items: center; }
.pkg-row .input:first-child { grid-column: 1 / -1; }
.pkg-actions { display: flex; gap: .5rem; margin-top: .4rem; }
.pkg-actions .inline-form { margin: 0; }
@media (min-width: 900px) { .pkg-row { grid-template-columns: 2fr repeat(4, 1fr) auto auto; } .pkg-row .input:first-child { grid-column: auto; } }
.ship-quote { display: grid; gap: .5rem; grid-template-columns: 1fr 1fr; align-items: end; }
.ship-quote .field { margin: 0; }
.ship-quote-wide { grid-column: 1 / -1; }
.ship-msg { margin: .5rem 0 0; font-size: .9rem; }
.ship-msg.is-ok { color: var(--ok); }
.ship-msg.is-err { color: var(--fail); }
@media (min-width: 720px) { .ship-quote { grid-template-columns: 2fr repeat(5, 1fr); } .ship-quote-wide { grid-column: auto; } }

/* utilitários (a CSP bloqueia style="" inline) */
.u-m0 { margin: 0; } .u-mb0 { margin-bottom: 0; } .u-mt-sm { margin-top: .6rem; } .u-mt-md { margin-top: .75rem; }
.u-h3 { margin-top: 1rem; font-size: 1rem; } .u-th-auto { width: auto; }

table.quotes-table th { width: auto; }
table.quotes-table td { vertical-align: top; }
table.quotes-table td:nth-child(4) { min-width: 15rem; }
table.quotes-table .ship-opts-list { margin: 0; padding-left: 1.1rem; }

/* Prazo para enviar o orçamento */
.sla { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; flex-wrap: wrap; }
.sla-meter { display: inline-flex; gap: 3px; flex: none; }
.sla-meter i { display: block; width: 14px; height: 10px; border-radius: 3px; background: #d9d6cf; }
.sla-ok .sla-meter i.on { background: var(--ok); }
.sla-warn .sla-meter i.on { background: #d99a1a; }
.sla-urgent .sla-meter i.on, .sla-late .sla-meter i.on { background: var(--fail); }
.sla-ok .sla-text strong { color: var(--ok); } .sla-warn .sla-text strong { color: var(--warn); }
.sla-urgent .sla-text strong, .sla-late .sla-text strong { color: var(--fail); }
.sla-banner { display: flex; gap: .5rem 1rem; align-items: center; flex-wrap: wrap; padding: .75rem 1rem; border-radius: 12px; margin-bottom: 1rem; border: 1px solid transparent; }
.sla-banner .sla { font-size: .95rem; }
.sla-banner-title { margin: 0; font-weight: 700; }
.sla-banner.sla-ok { background: var(--ok-bg); border-color: #bfe0cd; }
.sla-banner.sla-warn { background: var(--warn-bg); border-color: #efd9a6; }
.sla-banner.sla-urgent, .sla-banner.sla-late { background: var(--fail-bg); border-color: #f1c2be; }
.sla-summary { list-style: none; margin: .75rem 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.sla-chip { padding: .6rem .8rem; border-radius: 10px; font-size: .9rem; }
.sla-chip strong { font-size: 1.4rem; margin-right: .25rem; }
.sla-chip.sla-ok { background: var(--ok-bg); color: var(--ok); } .sla-chip.sla-warn { background: var(--warn-bg); color: var(--warn); }
.sla-chip.sla-urgent, .sla-chip.sla-late { background: var(--fail-bg); color: var(--fail); }
.sla-queue { list-style: none; margin: 0; padding: 0; }
.sla-queue li + li { border-top: 1px solid var(--line, #e7e4dd); }
.sla-queue a { display: flex; flex-wrap: wrap; gap: .25rem .9rem; align-items: center; padding: .6rem 0; color: inherit; text-decoration: none; }
.sla-name { flex: 1 1 8rem; min-width: 0; }
@media (min-width: 720px) { .sla-summary { grid-template-columns: repeat(4, 1fr); } }
.sla-prio { display: inline-block; padding: .1rem .5rem; border-radius: 999px; background: #1c1c1c; color: #fff; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.sla-prio-text, .sla-banner-prio { flex-basis: 100%; margin: 0; font-size: .85rem; color: var(--ink-2, #555); }
.sla-prio-note { margin: 0 0 .5rem; font-size: .9rem; }
.input-group select.input { flex: 0 0 5rem; }

.nav-badge { display: inline-block; min-width: 1.35rem; padding: 0 .4rem; margin-left: .4rem; border-radius: 999px; background: #c0392b; color: #fff; font-size: .75rem; font-weight: 700; line-height: 1.35rem; text-align: center; }
.nav-badge[hidden] { display: none; }
.attn-panel { border-left: 4px solid #c0392b; }
.attn-count { display: inline-block; min-width: 1.6rem; padding: 0 .5rem; border-radius: 999px; background: #c0392b; color: #fff; font-size: .85rem; text-align: center; vertical-align: middle; }
.attn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.attn-item a { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: center; padding: .65rem .85rem; border: 1px solid var(--line, #e3e3e3); border-radius: 12px; text-decoration: none; color: inherit; }
.attn-item a:hover, .attn-item a:focus-visible { border-color: #c0392b; }
.attn-chip { padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--info-bg, #e8f0fb); }
.attn-urgent .attn-chip { background: #fbe3e0; color: #8e2418; }
.attn-warn .attn-chip { background: var(--warn-bg, #fdf1d6); }
.attn-when { margin-left: auto; }
.attn-detail { flex-basis: 100%; font-size: .9rem; color: var(--muted, #555); }
.sla-banner[hidden] { display: none; }

.attn-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .85rem; padding: .6rem .9rem; margin-bottom: 1rem; border: 1px solid #efc9c4; border-left: 4px solid #c0392b; border-radius: 12px; background: #fff; color: inherit; text-decoration: none; }
.attn-strip:hover, .attn-strip:focus-visible { background: #fff6f5; }
.attn-strip-text { display: flex; flex-direction: column; flex: 1 1 14rem; line-height: 1.3; }
.attn-strip-go { font-weight: 700; font-size: .9rem; color: #8e2418; white-space: nowrap; }
.attn-ok { margin: 0 0 1rem; }
.attn-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.attn-filters a { padding: .35rem .8rem; border: 1px solid var(--line, #e3e3e3); border-radius: 999px; background: #fff; color: inherit; text-decoration: none; font-size: .9rem; }
.attn-filters a span { margin-left: .25rem; font-weight: 700; }
.attn-filters a.is-on { background: #1d1d1b; border-color: #1d1d1b; color: #fff; }

/* ---------- Menus do painel ---------- */
.admin-bar-inner { position: relative; }
.admin-nav { flex: 1 1 auto; }
.admin-menus { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.menu { position: relative; }
.menu > summary { list-style: none; display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; padding: .45rem .8rem; border-radius: 999px; color: #d8d7d2; font-weight: 600; font-size: .95rem; user-select: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover, .menu[open] > summary { color: #fff; background: rgba(255, 255, 255, .1); }
.menu > summary.is-active { color: var(--ink); background: #fff; }
.menu > summary:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.menu > summary .ico:last-child { opacity: .7; transition: transform .15s; }
.menu[open] > summary .ico:last-child { transform: rotate(180deg); }
.menu-panel { position: absolute; right: 0; top: calc(100% + .45rem); z-index: 60; min-width: 13.5rem; padding: .4rem; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(17, 18, 20, .18); }
.menu-title { margin: 0; padding: .45rem .65rem .3rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.menu-panel a, .menu-item { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .6rem .65rem; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-weight: 600; font-size: .95rem; text-align: left; text-decoration: none; cursor: pointer; }
.menu-panel a:hover, .menu-item:hover, .menu-panel a:focus-visible, .menu-item:focus-visible { background: var(--paper); }
.menu-panel a.is-active { background: var(--info-bg); }
.menu-panel .ico { color: var(--muted); flex: none; }
.menu-panel form { margin: .2rem 0 0; padding-top: .2rem; border-top: 1px solid var(--line); }
.menu-user-name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 719px) {
    .menu { position: static; }
    .menu-panel { right: 1.25rem; left: 1.25rem; top: 100%; }
    .menu-user-name { display: none; }
    .admin-nav { order: 3; flex-basis: 100%; }
    .admin-brand { margin-right: auto; }
}

/* ---------- Painel: cartões ---------- */
.dash-group { margin-bottom: 1.4rem; }
.dash-group-title { margin: 0 0 .6rem; font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.dash-group .cards { margin-bottom: 0; }
.stat { display: flex; align-items: flex-start; gap: .8rem; transition: transform .15s, box-shadow .15s, border-color .15s; }
a.stat:hover { transform: translateY(-2px); border-color: var(--tc, var(--ink)); box-shadow: 0 2px 4px rgba(17, 18, 20, .06), 0 12px 28px rgba(17, 18, 20, .09); }
.stat-ico { flex: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 12px; background: var(--tb, var(--info-bg)); color: var(--tc, var(--info)); }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-label { font-weight: 650; font-size: .92rem; }
.stat-value { margin: .1rem 0; font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat-hint { color: var(--muted); font-size: .82rem; }
.tone-blue   { --tc: #2f5fb3; --tb: #e8effa; }
.tone-violet { --tc: #6b4fb0; --tb: #f0ebfa; }
.tone-amber  { --tc: #a06a00; --tb: #fdf1d9; }
.tone-green  { --tc: #1c7a4b; --tb: #e7f4ed; }
.tone-teal   { --tc: #137a7a; --tb: #e2f4f3; }
.tone-orange { --tc: #b4531a; --tb: #fdece1; }
.tone-sky    { --tc: #1f78a8; --tb: #e4f2fa; }
.tone-rose   { --tc: #b0364a; --tb: #fbe9ec; }
.tone-gray   { --tc: #5f6368; --tb: #eeeeec; }
.dash .stat.flash { animation: stat-flash 1.6s ease-out; }
@media (prefers-reduced-motion: reduce) { a.stat:hover { transform: none; } }
@media (min-width: 720px) {
    .dash-group:nth-of-type(3) .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 719px) { .stat { padding: .85rem .9rem; } .stat-value { font-size: 1.7rem; } }

a.stat { display: flex; }
.attn-strip, .attn-ok { margin-bottom: 1.5rem; }
@media (min-width: 720px) { .cards[data-n="4"] { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards[data-n="4"] { grid-template-columns: repeat(4, 1fr); } }
.cards > .stat { min-width: 0; }
.stat-body { overflow-wrap: anywhere; }
@media (max-width: 719px) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    a.stat { flex-direction: column; gap: .5rem; }
}

.ship-panel .sla { display: inline-flex; }
.ship-how summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.ship-how ul { margin: .4rem 0 0; padding-left: 1.1rem; }

/* ---------- Quadros coloridos (página do pedido) ---------- */
.panel[class*="tint-"] { background: var(--pt); border-color: var(--pl); }
.panel[class*="tint-"] > h2 { display: flex; align-items: center; gap: .6rem; }
.panel[class*="tint-"] > h2::before { content: ""; flex: none; width: 5px; height: 1.15em; border-radius: 3px; background: var(--pc); }
.tint-blue   { --pt: #f5f8fd; --pl: #dde7f6; --pc: #2f5fb3; }
.tint-violet { --pt: #f8f5fd; --pl: #e6def5; --pc: #6b4fb0; }
.tint-amber  { --pt: #fffaf0; --pl: #f3e6c4; --pc: #a06a00; }
.tint-green  { --pt: #f4faf6; --pl: #d6eadd; --pc: #1c7a4b; }
.tint-teal   { --pt: #f2faf9; --pl: #d3ebe9; --pc: #137a7a; }
.tint-orange { --pt: #fff7f1; --pl: #f4dfd0; --pc: #b4531a; }
.tint-sky    { --pt: #f3f9fd; --pl: #d5e8f3; --pc: #1f78a8; }
.tint-rose   { --pt: #fdf5f6; --pl: #f3d9de; --pc: #b0364a; }
.tint-gray   { --pt: #f7f7f6; --pl: #e4e3df; --pc: #5f6368; }

/* ---------- Seletor de tema ---------- */
.theme-switch { padding-bottom: .35rem; margin-bottom: .2rem; border-bottom: 1px solid var(--line); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .9rem; margin-bottom: .15rem; }
.panel-head h2 { margin: 0; }
.period-seg { display: inline-flex; flex-wrap: wrap; gap: .25rem; }
.period-seg a { padding: .25rem .65rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .8rem; font-weight: 600; text-decoration: none; }
.period-seg a:hover { background: var(--paper); color: var(--ink); }
.period-seg a.is-on, .period-seg a.is-on:hover { background: var(--ink); border-color: var(--ink); color: var(--card); }
@media (max-width: 480px) { .period-seg { gap: .2rem; } .period-seg a { padding: .25rem .5rem; font-size: .76rem; } }
.theme-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem; padding: .15rem .35rem 0; }
.theme-seg button { display: inline-flex; flex-direction: column; align-items: center; gap: .15rem; padding: .45rem .2rem; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.theme-seg button:hover { background: var(--paper); color: var(--ink); }
.theme-seg button.is-on { background: var(--ink); border-color: var(--ink); color: var(--card); }

/* ---------- Tema escuro (só painel e login: o site do cliente não define data-theme) ---------- */
html[data-theme="dark"] { color-scheme: dark;
    --ink: #ecebe7; --ink-2: #cfcdc6; --paper: #131417; --card: #1c1e22; --line: #32353b; --muted: #a3a19a; --focus: #7aa2ff;
    --ok: #6fcf9a; --ok-bg: #1a2e24; --warn: #e8b653; --warn-bg: #33291a; --fail: #f4948d; --fail-bg: #3a2124; --info: #b3c0da; --info-bg: #222a38;
    --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 8px 24px rgba(0, 0, 0, .3);
}
html[data-theme="dark"] .tint-blue   { --pt: #1a2130; --pl: #2b3a55; --pc: #8fb0ee; }
html[data-theme="dark"] .tint-violet { --pt: #211d2f; --pl: #3a3156; --pc: #b9a2f0; }
html[data-theme="dark"] .tint-amber  { --pt: #272217; --pl: #473c22; --pc: #e8b653; }
html[data-theme="dark"] .tint-green  { --pt: #172620; --pl: #28463a; --pc: #6fcf9a; }
html[data-theme="dark"] .tint-teal   { --pt: #162626; --pl: #264544; --pc: #6fd0cc; }
html[data-theme="dark"] .tint-orange { --pt: #2a1f17; --pl: #4b3626; --pc: #f0a06a; }
html[data-theme="dark"] .tint-sky    { --pt: #172530; --pl: #28434f; --pc: #7cc3ea; }
html[data-theme="dark"] .tint-rose   { --pt: #2b1c20; --pl: #4e2f36; --pc: #f08fa0; }
html[data-theme="dark"] .tint-gray   { --pt: #1e2024; --pl: #34373d; --pc: #a3a8b0; }
html[data-theme="dark"] .tone-blue   { --tc: #8fb0ee; --tb: #1d2738; }
html[data-theme="dark"] .tone-violet { --tc: #b9a2f0; --tb: #261f38; }
html[data-theme="dark"] .tone-amber  { --tc: #e8b653; --tb: #33291a; }
html[data-theme="dark"] .tone-green  { --tc: #6fcf9a; --tb: #1a2e24; }
html[data-theme="dark"] .tone-teal   { --tc: #6fd0cc; --tb: #173030; }
html[data-theme="dark"] .tone-orange { --tc: #f0a06a; --tb: #35241a; }
html[data-theme="dark"] .tone-sky    { --tc: #7cc3ea; --tb: #172a36; }
html[data-theme="dark"] .tone-rose   { --tc: #f08fa0; --tb: #36202a; }
html[data-theme="dark"] .tone-gray   { --tc: #a3a8b0; --tb: #2a2c31; }
html[data-theme="dark"] .admin-bar { background: #0c0d0f; border-bottom: 1px solid #1f2125; }
html[data-theme="dark"] .btn-primary, html[data-theme="dark"] .btn-ghost:hover { background: #ecebe7; color: #111214; }
html[data-theme="dark"] .btn-primary:hover { background: #fff; }
html[data-theme="dark"] .btn-ghost { color: var(--ink); border-color: #6a6d74; }
html[data-theme="dark"] .btn-danger { background: #b3261e; color: #fff; }
html[data-theme="dark"] .input { background: #14151a; border-color: #4a4d54; color: var(--ink); }
html[data-theme="dark"] .input:hover { border-color: #6a6d74; }
html[data-theme="dark"] .input::placeholder { color: #7d7b75; }
html[data-theme="dark"] .alert-success { border-color: #2c5a43; }
html[data-theme="dark"] .alert-error { border-color: #6a3135; }
html[data-theme="dark"] .alert-info { border-color: #38435a; }
html[data-theme="dark"] .alert-warning { border-color: #594622; }
html[data-theme="dark"] .sla-banner.sla-ok { border-color: #2c5a43; }
html[data-theme="dark"] .sla-banner.sla-warn { border-color: #594622; }
html[data-theme="dark"] .sla-banner.sla-urgent, html[data-theme="dark"] .sla-banner.sla-late { border-color: #6a3135; }
html[data-theme="dark"] .danger-zone { border-color: #6a3135; }
html[data-theme="dark"] .sla-meter i { background: #3a3d43; }
html[data-theme="dark"] .sla-warn .sla-meter i.on { background: #e8b653; }
html[data-theme="dark"] .sla-prio { background: #3a3d43; color: var(--ink); }
html[data-theme="dark"] .photo, html[data-theme="dark"] .chip { background: var(--card); }
html[data-theme="dark"] .photo img, html[data-theme="dark"] .photo-grid a, html[data-theme="dark"] .proto-thumb a { background: #2a2c31; }
html[data-theme="dark"] .photo-tag { background: #ecebe7; color: #111214; }
html[data-theme="dark"] .progress-dot { background: #32353b; }
html[data-theme="dark"] .progress-list .is-current .progress-dot { background: #ecebe7; color: #111214; }
html[data-theme="dark"] .live-dot { background: #4a4d54; }
html[data-theme="dark"] .attn-urgent .attn-chip { background: #4a2326; color: #ffb4ac; }
html[data-theme="dark"] .attn-strip { background: var(--card); border-color: #5e3a37; }
html[data-theme="dark"] .attn-strip:hover, html[data-theme="dark"] .attn-strip:focus-visible { background: #2a1f20; }
html[data-theme="dark"] .attn-strip-go { color: #ff9d94; }
html[data-theme="dark"] .attn-filters a { background: var(--card); }
html[data-theme="dark"] .attn-filters a.is-on { background: #ecebe7; border-color: #ecebe7; color: #111214; }
html[data-theme="dark"] .menu-panel { background: var(--card); box-shadow: 0 12px 32px rgba(0, 0, 0, .55); }
html[data-theme="dark"] .menu-panel a:hover, html[data-theme="dark"] .menu-item:hover { background: #26282d; }
html[data-theme="dark"] .menu-panel a.is-active { background: var(--info-bg); }
html[data-theme="dark"] .theme-seg button:hover { background: #26282d; }
html[data-theme="dark"] .page-auth { background: linear-gradient(180deg, #0e0f11 0%, var(--paper) 60%); }
html[data-theme="dark"] a.stat:hover { box-shadow: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 28px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .stat-ico { color: var(--tc); }
html[data-theme="dark"] .admin-nav a.is-active, html[data-theme="dark"] .menu > summary.is-active { color: #111214; background: #ecebe7; }
.theme-seg button.is-on, .theme-seg button.is-on:hover, html[data-theme="dark"] .theme-seg button.is-on:hover { background: var(--ink); border-color: var(--ink); color: var(--card); }

/* =====================================================================
   Métricas (gráficos em HTML/CSS; cores da paleta de dataviz validada: azul único, tons ordenados no funil)
   ===================================================================== */
:root {
    --viz-1: #2a78d6; --viz-1-soft: #b7d3f6; --viz-track: #efeee9; --viz-hover: rgba(42, 120, 214, .08);
    --viz-o1: #86b6ef; --viz-o2: #5598e7; --viz-o3: #2a78d6; --viz-o4: #1c5cab;
    --viz-grid: #e1e0d9; --viz-axis: #c3c2b7; --viz-muted: #6a6862;
}
html[data-theme="dark"] {
    --viz-1: #3987e5; --viz-1-soft: #184f95; --viz-track: #26282d; --viz-hover: rgba(57, 135, 229, .14);
    --viz-o1: #184f95; --viz-o2: #256abf; --viz-o3: #3987e5; --viz-o4: #6da7ec;
    --viz-grid: #2c2c2a; --viz-axis: #383835; --viz-muted: #a5a39b;
}
.metrics-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: .75rem; }
.metrics-tabs { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.metrics-tabs a { padding: .4rem .95rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-weight: 650; text-decoration: none; background: var(--card); }
.metrics-tabs a:hover { color: var(--ink); border-color: var(--ink); }
.metrics-tabs a.is-on, .metrics-tabs a.is-on:hover { background: var(--ink); border-color: var(--ink); color: var(--card); }
.metrics-note { margin: 0 0 .9rem; }
.mtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1.25rem; }
.mtile { display: flex; flex-direction: column; gap: .15rem; min-width: 0; padding: .9rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; text-decoration: none; }
a.mtile:hover { border-color: var(--ink); }
.mtile-l { font-size: .82rem; font-weight: 650; color: var(--muted); }
.mtile-v { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.mtile-s { font-size: .8rem; color: var(--muted); line-height: 1.35; }
.mtile.is-hero { grid-column: 1 / -1; }
.mtile.is-hero .mtile-v { font-size: 3rem; }
.metrics-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1.25rem; }
.metrics-grid .panel { min-width: 0; }
.metrics-outcome { margin: .75rem 0 .25rem; }
.viz-empty { margin: .5rem 0; }
.viz-table { margin-top: .75rem; }
.viz-table summary { cursor: pointer; color: var(--muted); font-size: .82rem; }
.viz-table table { margin-top: .5rem; font-size: .85rem; }
.hbars, .funnel { list-style: none; margin: .5rem 0 0; padding: 0; }
.hbar, .funnel-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .6rem; align-items: center; padding: .35rem 0; border-radius: 6px; }
.hbar:hover, .funnel-row:hover { background: var(--viz-hover); }
.hbar-l { grid-column: 1 / -1; font-size: .9rem; line-height: 1.3; }
.hbar-t { position: relative; display: block; height: 12px; background: var(--viz-track); border-radius: 0 4px 4px 0; overflow: hidden; }
.hbar-f { position: absolute; left: 0; top: 0; bottom: 0; display: block; background: var(--viz-1); border-radius: 0 4px 4px 0; }
.hbar-f.is-soft { background: var(--viz-1-soft); }
.hbar-f.is-main { background: var(--viz-1); }
.fx-1 { background: var(--viz-o1); } .fx-2 { background: var(--viz-o2); } .fx-3 { background: var(--viz-o3); } .fx-4 { background: var(--viz-o4); }
.hbar-v { font-size: .88rem; font-weight: 650; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
@media (min-width: 560px) {
    .hbar, .funnel-row { grid-template-columns: minmax(7rem, 36%) minmax(0, 1fr) minmax(4.5rem, auto); gap: .6rem; }
    .hbar-l { grid-column: auto; }
}
.vcol { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .3rem .5rem; margin-top: .6rem; }
.vcol-y { display: flex; flex-direction: column; justify-content: space-between; height: 150px; text-align: right; font-size: .72rem; color: var(--viz-muted); font-variant-numeric: tabular-nums; line-height: 1; }
.vcol-plot { position: relative; height: 150px; }
.vcol-grid { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; }
.vcol-grid i { display: block; height: 1px; background: var(--viz-grid); }
.vcol-grid i:last-child { background: var(--viz-axis); }
.vcol-bars { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 100%; padding: 0 2px; }
.vcol-b { flex: 1 1 0; min-width: 2px; height: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 4px 4px 0 0; }
.vcol-b:hover { background: var(--viz-hover); }
.vcol-f { display: block; width: 100%; max-width: 24px; background: var(--viz-1); border-radius: 4px 4px 0 0; }
.vcol.is-few .vcol-bars { justify-content: space-around; }
.vcol.is-few .vcol-b { flex: 0 1 40px; }
.vcol-x { grid-column: 2; display: flex; justify-content: space-between; font-size: .72rem; color: var(--viz-muted); }
.meter { position: relative; display: block; height: 12px; background: var(--viz-track); border-radius: 0 4px 4px 0; overflow: hidden; }
.meter-f { position: absolute; left: 0; top: 0; bottom: 0; background: var(--viz-1); border-radius: 0 4px 4px 0; }
@media (min-width: 900px) {
    .mtiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .mtile { grid-column: span 1; }
    .mtile.is-hero { grid-column: span 2; }
    .mtile-v { font-size: 1.5rem; }
    .mtile.is-hero .mtile-v { font-size: 3rem; }
    .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metrics-wide { grid-column: 1 / -1; }
}
@media (min-width: 900px) and (max-width: 1100px) { .mtile-v { font-size: 1.3rem; } }
@media (prefers-reduced-motion: no-preference) { .hbar-f, .vcol-f { transition: filter .15s; } }
.hbar:hover .hbar-f, .vcol-b:hover .vcol-f { filter: brightness(1.1); }
/* larguras e alturas dos gráficos (a política de segurança do site não aceita estilo embutido) */
.w-0{width:0%}.w-1{width:1%}.w-2{width:2%}.w-3{width:3%}.w-4{width:4%}.w-5{width:5%}.w-6{width:6%}.w-7{width:7%}.w-8{width:8%}.w-9{width:9%}
.w-10{width:10%}.w-11{width:11%}.w-12{width:12%}.w-13{width:13%}.w-14{width:14%}.w-15{width:15%}.w-16{width:16%}.w-17{width:17%}.w-18{width:18%}.w-19{width:19%}
.w-20{width:20%}.w-21{width:21%}.w-22{width:22%}.w-23{width:23%}.w-24{width:24%}.w-25{width:25%}.w-26{width:26%}.w-27{width:27%}.w-28{width:28%}.w-29{width:29%}
.w-30{width:30%}.w-31{width:31%}.w-32{width:32%}.w-33{width:33%}.w-34{width:34%}.w-35{width:35%}.w-36{width:36%}.w-37{width:37%}.w-38{width:38%}.w-39{width:39%}
.w-40{width:40%}.w-41{width:41%}.w-42{width:42%}.w-43{width:43%}.w-44{width:44%}.w-45{width:45%}.w-46{width:46%}.w-47{width:47%}.w-48{width:48%}.w-49{width:49%}
.w-50{width:50%}.w-51{width:51%}.w-52{width:52%}.w-53{width:53%}.w-54{width:54%}.w-55{width:55%}.w-56{width:56%}.w-57{width:57%}.w-58{width:58%}.w-59{width:59%}
.w-60{width:60%}.w-61{width:61%}.w-62{width:62%}.w-63{width:63%}.w-64{width:64%}.w-65{width:65%}.w-66{width:66%}.w-67{width:67%}.w-68{width:68%}.w-69{width:69%}
.w-70{width:70%}.w-71{width:71%}.w-72{width:72%}.w-73{width:73%}.w-74{width:74%}.w-75{width:75%}.w-76{width:76%}.w-77{width:77%}.w-78{width:78%}.w-79{width:79%}
.w-80{width:80%}.w-81{width:81%}.w-82{width:82%}.w-83{width:83%}.w-84{width:84%}.w-85{width:85%}.w-86{width:86%}.w-87{width:87%}.w-88{width:88%}.w-89{width:89%}
.w-90{width:90%}.w-91{width:91%}.w-92{width:92%}.w-93{width:93%}.w-94{width:94%}.w-95{width:95%}.w-96{width:96%}.w-97{width:97%}.w-98{width:98%}.w-99{width:99%}
.w-100{width:100%}
.h-0{height:0%}.h-1{height:1%}.h-2{height:2%}.h-3{height:3%}.h-4{height:4%}.h-5{height:5%}.h-6{height:6%}.h-7{height:7%}.h-8{height:8%}.h-9{height:9%}
.h-10{height:10%}.h-11{height:11%}.h-12{height:12%}.h-13{height:13%}.h-14{height:14%}.h-15{height:15%}.h-16{height:16%}.h-17{height:17%}.h-18{height:18%}.h-19{height:19%}
.h-20{height:20%}.h-21{height:21%}.h-22{height:22%}.h-23{height:23%}.h-24{height:24%}.h-25{height:25%}.h-26{height:26%}.h-27{height:27%}.h-28{height:28%}.h-29{height:29%}
.h-30{height:30%}.h-31{height:31%}.h-32{height:32%}.h-33{height:33%}.h-34{height:34%}.h-35{height:35%}.h-36{height:36%}.h-37{height:37%}.h-38{height:38%}.h-39{height:39%}
.h-40{height:40%}.h-41{height:41%}.h-42{height:42%}.h-43{height:43%}.h-44{height:44%}.h-45{height:45%}.h-46{height:46%}.h-47{height:47%}.h-48{height:48%}.h-49{height:49%}
.h-50{height:50%}.h-51{height:51%}.h-52{height:52%}.h-53{height:53%}.h-54{height:54%}.h-55{height:55%}.h-56{height:56%}.h-57{height:57%}.h-58{height:58%}.h-59{height:59%}
.h-60{height:60%}.h-61{height:61%}.h-62{height:62%}.h-63{height:63%}.h-64{height:64%}.h-65{height:65%}.h-66{height:66%}.h-67{height:67%}.h-68{height:68%}.h-69{height:69%}
.h-70{height:70%}.h-71{height:71%}.h-72{height:72%}.h-73{height:73%}.h-74{height:74%}.h-75{height:75%}.h-76{height:76%}.h-77{height:77%}.h-78{height:78%}.h-79{height:79%}
.h-80{height:80%}.h-81{height:81%}.h-82{height:82%}.h-83{height:83%}.h-84{height:84%}.h-85{height:85%}.h-86{height:86%}.h-87{height:87%}.h-88{height:88%}.h-89{height:89%}
.h-90{height:90%}.h-91{height:91%}.h-92{height:92%}.h-93{height:93%}.h-94{height:94%}.h-95{height:95%}.h-96{height:96%}.h-97{height:97%}.h-98{height:98%}.h-99{height:99%}
.h-100{height:100%}

/* ---------- Métricas · Visão geral (resumo para acompanhar o negócio e mostrar a quem investe) ---------- */
.vhero { display: flex; flex-direction: column; gap: 1rem; margin-bottom: .9rem; padding: 1.4rem 1.3rem 1.2rem; border-radius: 20px; color: #fff; overflow: hidden;
    background: radial-gradient(120% 140% at 100% 0%, #3a8cf0 0%, rgba(58, 140, 240, 0) 55%), linear-gradient(135deg, #0d2342 0%, #17427a 100%);
    box-shadow: 0 12px 32px -14px rgba(13, 35, 66, .55); }
.vhero-main { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; min-width: 0; }
.vhero-eyebrow { font-size: .85rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }
.vhero-value { font-size: clamp(2.6rem, 11vw, 4.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.vhero-sub { font-size: .85rem; color: rgba(255, 255, 255, .78); line-height: 1.4; }
.vhero-spark { min-width: 0; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 64px; }
.spark-b { display: block; flex: 1 1 0; min-width: 2px; max-width: 14px; background: rgba(255, 255, 255, .8); border-radius: 3px 3px 0 0; }
.vhero .delta { background: rgba(255, 255, 255, .16); color: #fff; }
.vhero .delta-vs { color: rgba(255, 255, 255, .78); }
.vkpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1.25rem; }
.vkpi { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; min-width: 0; padding: 1rem 1.05rem; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--viz-1); border-radius: var(--radius); box-shadow: var(--shadow); }
.vkpi .mtile-v { font-size: 1.9rem; }
.delta-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .5rem; }
.delta { display: inline-flex; align-items: baseline; gap: .3rem; white-space: nowrap; padding: .12rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 750; line-height: 1.4; font-variant-numeric: tabular-nums; background: var(--viz-track); color: var(--muted); }
.delta.is-up { color: #17714a; background: rgba(23, 113, 74, .12); }
.delta.is-down { color: #a8402a; background: rgba(168, 64, 42, .12); }
.delta-vs { font-size: .78rem; font-weight: 500; color: var(--muted); }
html[data-theme="dark"] .delta.is-up { color: #6fd6a0; background: rgba(111, 214, 160, .14); }
html[data-theme="dark"] .delta.is-down { color: #f29a82; background: rgba(242, 154, 130, .14); }
.vlife-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: .6rem; }
.vlife-grid strong { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.vlife-grid span { font-size: .85rem; color: var(--muted); }
.vfoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin: .5rem 0 1.5rem; }
.vfoot p { margin: 0; flex: 1 1 18rem; }
@media (min-width: 720px) {
    .vhero { flex-direction: row; align-items: flex-end; justify-content: space-between; padding: 1.8rem 2rem 1.6rem; }
    .vhero-spark { flex: 0 1 46%; }
    .spark { height: 96px; }
    .vkpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .vlife-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media print {
    .admin-bar, .metrics-bar, .vfoot .btn, .admin-footer, .page-head p { display: none !important; }
    html, body { background: #fff !important; }
    .vhero, .vkpi, .panel { -webkit-print-color-adjust: exact; print-color-adjust: exact; break-inside: avoid; box-shadow: none; }
    .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metrics-wide { grid-column: 1 / -1; }
    .viz-table { display: none; }
}
.vhero .delta.is-up, .vhero .delta.is-down, html[data-theme="dark"] .vhero .delta.is-up, html[data-theme="dark"] .vhero .delta.is-down { color: #fff; background: rgba(255, 255, 255, .18); }
a.vkpi.is-link { color: inherit; text-decoration: none; }
a.vkpi.is-link:hover { border-color: var(--ink); border-top-color: var(--viz-1); }
.vkpi .mtile-s { margin-top: .1rem; }
.vkpi .mtile-v { white-space: nowrap; }
@media (max-width: 480px) { .vkpi .mtile-v { font-size: 1.6rem; } }
/* Lista de pedidos: situação do link do orçamento */
.link-badge { font-weight: 700; }
.link-badge.is-none { background: var(--viz-track); color: var(--muted); }
.link-badge.is-unread { background: #fdf0d5; color: #8a5a00; }
.link-badge.is-read { background: rgba(23, 113, 74, .12); color: #17714a; }
html[data-theme="dark"] .link-badge.is-unread { background: #3a2f14; color: #e8b653; }
html[data-theme="dark"] .link-badge.is-read { background: rgba(111, 214, 160, .14); color: #6fd6a0; }

/* ---------- Painel numa página só + páginas Comercial e Produção ---------- */
a.vhero.is-link { color: #fff; text-decoration: none; }
a.vhero.is-link:hover { box-shadow: 0 14px 34px -12px rgba(13, 35, 66, .7); }
.vhero-spark { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }
.vhero-spark .spark { align-self: stretch; }
.vhero-more { font-size: .85rem; font-weight: 700; color: rgba(255, 255, 255, .85); }
.dash-group-title { margin: 1.1rem 0 .55rem; }
.vkpis-need { margin-bottom: 1rem; }
.vkpi.need .mtile-v { font-size: 2.1rem; }
.vkpi.need.is-alert .mtile-v { color: #a8402a; }
.vkpi.need.is-alert { border-top-color: #c0392b; }
.vkpi.need.is-ok .mtile-v { color: #17714a; }
html[data-theme="dark"] .vkpi.need.is-alert .mtile-v { color: #f29a82; }
html[data-theme="dark"] .vkpi.need.is-ok .mtile-v { color: #6fd6a0; }
.dash-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1.25rem; align-items: start; }
.dash-col { min-width: 0; }
.panel-flush { margin-top: 0; }
.cards.cards-pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1.25rem; }
.stat.is-compact { padding: .75rem .85rem; }
.stat.is-compact .stat-body { display: flex; flex-direction: column; }
.stat.is-compact .stat-label { font-size: .85rem; }
.stat.is-compact .stat-value { margin: .1rem 0 0; font-size: 1.7rem; }
@media (min-width: 640px) { .cards.cards-pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 980px) {
    .vkpis-need { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .dash-cols { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}
a.stat.is-compact { flex-direction: column; align-items: flex-start; gap: .45rem; }
.stat.is-compact .stat-body { overflow-wrap: normal; word-break: normal; }
.stat.is-compact .stat-label { line-height: 1.25; }
.dash-col .recent a { flex-wrap: wrap; gap: .15rem .6rem; padding: .5rem 0; }
.dash-col .recent a > strong { flex: none; }
.dash-col .recent a > span:nth-of-type(1) { flex: 1 1 calc(100% - 9rem); min-width: 0; }
.dash-col .recent .badge, .dash-col .recent .small { flex: none; }
.dash-col .recent { grid-template-columns: minmax(0, 1fr); }
.dash-col .recent li { min-width: 0; }
.dash-col .panel .u-mb0 { margin-top: .9rem; }

/* ---------- Painel: pedidos por etapa ---------- */
.dash-title-n { margin-left: .4rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.lane-title { display: flex; align-items: baseline; gap: .5rem; margin: 1rem 0 .5rem; font-size: .78rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lane-title span { padding: 0 .5rem; border-radius: 999px; background: var(--viz-track); color: var(--ink); font-size: .76rem; letter-spacing: 0; }
.stages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .75rem; min-width: 0; padding: .75rem .95rem; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--tc, var(--line)); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.stage:hover { border-color: var(--tc, var(--ink)); box-shadow: 0 2px 4px rgba(17, 18, 20, .06), 0 10px 24px rgba(17, 18, 20, .08); transform: translateY(-1px); }
.stage .stat-ico { width: 2.2rem; height: 2.2rem; border-radius: 10px; }
.stage-main { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.stage-main .stat-label { font-size: .92rem; line-height: 1.2; }
.stage-n { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stage-meta { display: flex; flex-wrap: wrap; gap: 0 .8rem; font-size: .76rem; color: var(--muted); }
.stage-meta:empty { display: none; }
.stage.flash { animation: stat-flash 1.6s ease-out; }
@media (min-width: 980px) { .dash-cols { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } .stage-n { font-size: 2rem; } }
@media (prefers-reduced-motion: reduce) { .stage:hover { transform: none; } .stage.flash { animation: none; } }

/* ---------- Painel: quadro de pedidos por etapa (estilo kanban) ---------- */
.board-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem 1rem; margin: 1.4rem 0 .2rem; }
.board-head .dash-group-title { margin: 0; }
.board-sub { margin: 0; font-size: .85rem; color: var(--muted); }
.board-sub strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.board-all { margin-left: auto; font-size: .85rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.board-all:hover { text-decoration: underline; }
.board { display: flex; gap: .75rem; margin: 0 -16px; padding: 2px 16px 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.col { flex: 0 0 82%; scroll-snap-align: start; display: flex; flex-direction: column; gap: .55rem; min-width: 0; padding: .6rem; border-radius: 16px; background: var(--tb); border: 1px solid color-mix(in srgb, var(--tc) 14%, transparent); }
.col-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .15rem .25rem .25rem; color: inherit; text-decoration: none; }
.col-head .stat-ico { width: 2.1rem; height: 2.1rem; border-radius: 11px; background: var(--card); box-shadow: 0 1px 2px rgba(17, 18, 20, .08); }
.col-title { display: flex; flex-direction: column; min-width: 0; font-weight: 750; font-size: .95rem; line-height: 1.2; }
.col-title small { font-weight: 500; font-size: .72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-n { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--tc); font-variant-numeric: tabular-nums; }
.col-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.ocard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .55rem .65rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; box-shadow: 0 1px 2px rgba(17, 18, 20, .04); transition: transform .12s, box-shadow .12s, border-color .12s; }
.ocard:hover { transform: translateY(-1px); border-color: var(--tc); box-shadow: 0 6px 16px rgba(17, 18, 20, .10); }
.ocard-av { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--tb); color: var(--tc); font-size: .72rem; font-weight: 800; letter-spacing: .02em; }
.ocard-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ocard-main strong { font-size: .82rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ocard-main span { font-size: .72rem; color: var(--muted); }
.ocard-side { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ldot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--viz-axis); }
.ldot.is-read { background: #1c9a60; }
.ldot.is-unread { background: #e0a21a; }
.col-empty { margin: 0; padding: 1.1rem .5rem; text-align: center; font-size: .82rem; color: var(--muted); }
.col-more { margin-top: auto; padding: .35rem .25rem 0; font-size: .8rem; font-weight: 700; color: var(--tc); text-decoration: none; }
.col-more:hover { text-decoration: underline; }
.col.flash, .col-head.flash { animation: stat-flash 1.6s ease-out; }
.closed-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; margin: .9rem 0 1.5rem; font-size: .85rem; color: var(--muted); }
.closed-strip > span { font-size: .78rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.closed-strip a { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; }
.closed-strip a:hover { border-color: var(--tc); }
.closed-strip a strong { font-variant-numeric: tabular-nums; }
@media (min-width: 720px) {
    .board { margin: 0; padding: 0; overflow: visible; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .col { flex: none; }
}
@media (min-width: 1000px) { .board { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .ocard:hover { transform: none; } }
.col-empty { display: block; text-decoration: none; font-weight: 650; color: var(--tc); }
.closed-strip.is-quiet { margin-bottom: .2rem; }
.closed-strip.is-quiet a { background: transparent; border-style: dashed; color: var(--muted); font-weight: 550; }
/* pipeline + painel da etapa (v61b) */
.pipe { display: flex; flex-direction: column; gap: .8rem; margin-bottom: .9rem; }
.pipe-lane .lane-title { margin: 0 0 .4rem; }
.pipe-steps { display: flex; gap: .5rem; overflow-x: auto; padding: .15rem .1rem .4rem; scroll-snap-type: x proximity; }
.step { flex: 1 0 auto; min-width: 5.6rem; scroll-snap-align: start; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ico n" "l l"; align-items: center; gap: .15rem .5rem; text-align: left; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.step-ico { grid-area: ico; color: var(--tc); display: inline-flex; }
.step-n { grid-area: n; justify-self: end; font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; color: var(--tc); }
.step-l { grid-area: l; font-size: .78rem; font-weight: 650; color: var(--muted); white-space: nowrap; }
.step:hover:not(:disabled) { border-color: var(--tc); }
.step.is-on { background: var(--tb); border-color: var(--tc); box-shadow: 0 0 0 1px var(--tc) inset; }
.step.is-on .step-l { color: var(--ink); }
.step.is-zero { opacity: .5; cursor: default; background: transparent; border-style: dashed; }
.step.is-zero .step-n { color: var(--muted); }
@media (min-width: 900px) { .pipe { flex-direction: row; gap: 1.2rem; } .pipe-lane { flex: 1 1 0; min-width: 0; } .pipe-lane:first-child { flex-grow: 1; } .pipe-steps { overflow: visible; } .step { flex: 1 1 0; min-width: 0; } }
.pane { background: var(--tb); border: 1px solid color-mix(in srgb, var(--tc) 28%, var(--line)); border-radius: 18px; padding: 1rem; }
.pane[hidden] { display: none; }
.pane-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .9rem; margin-bottom: .8rem; }
.pane-head h3 { margin: 0; font-size: 1.1rem; color: var(--tc); }
.pane-head p { margin: 0; font-size: .85rem; color: var(--muted); flex: 1 1 auto; }
.pane-head p strong { color: var(--ink); }
.pane-all, .pane .col-more { font-weight: 700; font-size: .85rem; color: var(--tc); text-decoration: none; }
.pane-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
@media (min-width: 760px) { .pane-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .pane-list { grid-template-columns: 1fr 1fr 1fr; } }
.pane .col-more { display: inline-block; margin-top: .8rem; }
.pane .col-empty { padding: .6rem 0; }
.step-l { white-space: normal; line-height: 1.2; }
.step { align-content: start; }
@media (min-width: 900px) { .step { min-width: 0; padding: .6rem .7rem; } .step-l { overflow-wrap: anywhere; } }
.board-head { margin-bottom: 1rem; }
/* v61c: acabamento do pipeline */
.pipe-steps { --on: #fff; }
html[data-theme="dark"] .pipe-steps { --on: #101114; }
.step { position: relative; gap: .35rem .5rem; padding: .75rem .85rem .7rem; border-radius: 16px; background: linear-gradient(165deg, var(--card) 40%, color-mix(in srgb, var(--tc) 9%, var(--card))); box-shadow: 0 1px 2px rgb(0 0 0 / .05); transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.step-ico { width: 1.9rem; height: 1.9rem; align-items: center; justify-content: center; border-radius: 10px; background: var(--tb); }
.step-n { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.step:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--tc) 55%, transparent); }
.step.is-on { background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 100%, #fff 12%), var(--tc)); box-shadow: 0 10px 22px -10px var(--tc); }
.step.is-on .step-n, .step.is-on .step-l, .step.is-on .step-ico { color: var(--on); }
.step.is-on .step-ico { background: color-mix(in srgb, var(--on) 22%, transparent); }
.step.is-zero { box-shadow: none; background: transparent; }
.step:focus-visible { outline: 3px solid color-mix(in srgb, var(--tc) 55%, transparent); outline-offset: 2px; }
@media (min-width: 900px) {
  .step.is-on::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: var(--tc); transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
  .step + .step::before { content: "›"; position: absolute; left: -.62rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.1rem; opacity: .6; }
}
.pane { position: relative; background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 13%, var(--tb)), var(--tb) 150px); box-shadow: 0 14px 30px -22px var(--tc); border-radius: 20px; padding: 1.1rem 1.1rem 1rem; }
.pane-head h3 { font-size: 1.3rem; letter-spacing: -.01em; }
.ocard-av { background: var(--tc); color: var(--on, #fff); }
html[data-theme="dark"] .ocard-av { color: #101114; }
.pane .ocard { transition: transform .15s ease, box-shadow .15s ease; }
.pane .ocard:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--tc) 60%, transparent); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pane:not([hidden]) .pane-list li { animation: rise .35s ease both; }
.pane:not([hidden]) .pane-list li:nth-child(2) { animation-delay: .04s; } .pane:not([hidden]) .pane-list li:nth-child(3) { animation-delay: .08s; }
.pane:not([hidden]) .pane-list li:nth-child(4) { animation-delay: .12s; } .pane:not([hidden]) .pane-list li:nth-child(5) { animation-delay: .16s; }
.pane:not([hidden]) .pane-list li:nth-child(6) { animation-delay: .2s; } .pane:not([hidden]) .pane-list li:nth-child(n+7) { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .pane li, .step, .pane .ocard { animation: none !important; transition: none !important; } }

/* =====================================================================
   v62 · RÉGUA ÚNICA DO SISTEMA — mesma linguagem visual em todas as telas
   ===================================================================== */
.admin-main { --lift: 0 10px 22px -12px rgb(17 18 20 / .35); }
.admin-main .page-head { position: relative; margin-bottom: 1.5rem; padding-bottom: 1rem; }
.admin-main .page-head::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--ink), #2f6df6); }
.admin-main .page-head h1 { font-weight: 800; letter-spacing: -.02em; }
.admin-main .page-head p { margin-bottom: 0; }
.admin-main .panel, .admin-main .stat { border-radius: 18px; border-color: color-mix(in srgb, var(--line) 85%, transparent); box-shadow: 0 1px 2px rgb(17 18 20 / .05), 0 14px 30px -24px rgb(17 18 20 / .45); }
.admin-main .panel > h2:first-child, .admin-main .panel > .panel-head h2 { font-size: 1.1rem; font-weight: 750; letter-spacing: -.01em; }
.admin-main .order-row, .admin-main .attn-item a { border-radius: 16px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.admin-main .order-row:hover, .admin-main .attn-item a:hover { transform: translateY(-2px); box-shadow: var(--lift); border-color: color-mix(in srgb, var(--ink) 35%, var(--line)); }
.admin-main .ord-code { font-variant-numeric: tabular-nums; }
.admin-main .attn-strip { border-radius: 16px; }
.admin-main .attn-filters a, .admin-main .seg a { transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.admin-main .attn-filters a:hover { transform: translateY(-1px); border-color: var(--ink); }
.admin-main .attn-filters a.is-on { background: linear-gradient(165deg, #2a2c30, #111214); box-shadow: 0 8px 18px -10px rgb(17 18 20 / .6); }
.admin-main .btn-primary { background: linear-gradient(180deg, #2c2e33, #111214); box-shadow: 0 6px 14px -8px rgb(17 18 20 / .7); }
.admin-main .btn-primary:hover { background: linear-gradient(180deg, #111214, #000); }
.admin-main .btn:hover:not(:disabled) { transform: translateY(-1px); }
.admin-main .btn:active { transform: translateY(1px); }
.admin-main .input { border-radius: 12px; }
.admin-main .input:focus { outline-color: color-mix(in srgb, var(--focus) 40%, transparent); }
.admin-main .alert { border-radius: 14px; }
.admin-main .badge { letter-spacing: .01em; }
.admin-main table.diag th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.admin-main .filters .field label { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.admin-main .pager .btn { min-width: 7rem; }
html[data-theme="dark"] .admin-main .page-head::after { background: linear-gradient(90deg, #ecebe7, #8fb0ee); }
html[data-theme="dark"] .admin-main .btn-primary { background: #ecebe7; box-shadow: none; }
html[data-theme="dark"] .admin-main .attn-filters a.is-on { background: #ecebe7; color: #111214; box-shadow: none; }
html[data-theme="dark"] .admin-main { --lift: 0 10px 22px -12px rgb(0 0 0 / .8); }
/* selo "parado" nos cartões do Painel */
.ocard.is-stale { border-color: color-mix(in srgb, #d98a00 55%, var(--line)); }
.ocard.is-stale time { color: #8f5a00; font-weight: 750; }
html[data-theme="dark"] .ocard.is-stale time { color: #e8b653; }
@media (prefers-reduced-motion: reduce) { .admin-main .order-row, .admin-main .attn-item a, .admin-main .btn { transition: none !important; transform: none !important; } }
.admin-main .order-row { border-left: 4px solid var(--tc, var(--line)); }
.order-name { display: flex; align-items: center; gap: .6rem; }
.order-name .ocard-av { flex: 0 0 auto; }
.admin-main .order-row .ocard-av { width: 2rem; height: 2rem; font-size: .72rem; }

/* v62b: etapas como atalho + painéis com a mesma identidade do Painel */
a.step { text-decoration: none; }
.pipe-steps.is-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; overflow: visible; margin-bottom: 1.25rem; }
@media (min-width: 900px) { .pipe-steps.is-grid { grid-template-columns: repeat(4, 1fr); gap: .6rem; } }
.pipe-steps.is-grid .step { min-width: 0; }
.panel-title { display: flex; align-items: center; gap: .6rem; margin: 0 0 .5rem; }
.panel-title .step-ico { flex: 0 0 auto; }
.panel-head .panel-title { margin: 0; }
.admin-main .panel[class*="tone-"] { border-top: 3px solid var(--tc); background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 7%, var(--card)), var(--card) 130px); }
.admin-main .panel[class*="tone-"] .panel-title { color: var(--ink); }
.admin-main .page-head + .pipe-steps, .admin-main .page-head + .dash { margin-top: 0; }
.close-noreply { margin-top: .8rem; border-top: 1px dashed var(--line); padding-top: .7rem; }
.close-noreply summary { cursor: pointer; }
.close-noreply form { margin-top: .6rem; }
.proto-reg { margin: .8rem 0; border-top: 1px dashed var(--line); padding-top: .7rem; }
.proto-reg summary { cursor: pointer; }
.proto-reg form { margin-top: .6rem; }

/* v66 · Frete: remetente e conexão com o Melhor Envio */
.hint code { overflow-wrap: anywhere; word-break: break-all; }
.sender-form .btn[type="submit"] { margin-top: .75rem; }
.panel .pkg-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }

/* v71 · Abertura de pedidos (admin) */
.intake-form { display: grid; gap: 16px; max-width: 520px; }
.intake-switch { align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.nav-closed { display: block; margin: 0 0 14px; }

/* v73 · botão com aparência de link (valor declarado) */
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* v76 · Fila de espera (admin) */
.seg-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.wl-table td.nowrap, .wl-table td:nth-child(3) { white-space: nowrap; }
.wl-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 260px; }
.wl-actions .inline-form { margin: 0; }

/* v78 · Fotos adicionadas pela equipe */
.photo-cell { display: grid; gap: 6px; align-content: start; }
.photo-grid .photo-cell a { aspect-ratio: 1; }
.photo-grid a.is-team { border-color: var(--info); }
.photo-tag-team { background: var(--info); }
.photo-remove { margin: 0; }
.photo-remove .btn { width: 100%; }
.photo-add { display: grid; gap: 8px; margin-top: 14px; max-width: 460px; }
.photo-add-l { font-weight: 600; font-size: .9rem; }
.photo-add .btn { justify-self: start; }
.photo-tag-team { bottom: auto; top: 4px; color: #fff; }
html[data-theme="dark"] .photo-tag-team { background: var(--info); color: #fff; }

/* v79 · Barra de avisos do Painel: chips compactos em vez de faixas grandes */
.alertbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.25rem; }
.achip { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; max-width: 100%; padding: 6px 12px 6px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: inherit; text-decoration: none; font-size: .88rem; line-height: 1.2; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
a.achip:hover, a.achip:focus-visible { transform: translateY(-1px); box-shadow: var(--lift, 0 6px 16px rgba(0,0,0,.08)); }
.achip-b { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; font-weight: 700; font-size: .8rem; color: #fff; }
.achip-b svg { display: block; }
.achip-t { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.achip-t strong { font-weight: 700; white-space: nowrap; }
.achip-d { color: var(--muted, #555); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.achip-go { color: var(--muted, #555); font-size: 1.1rem; line-height: 1; flex: none; }
.achip-fail { border-color: #efc9c4; } .achip-fail .achip-b { background: #c0392b; }
.achip-warn { border-color: #efd9a6; background: var(--warn-bg); } .achip-warn .achip-b { background: #b7791f; }
.achip-info { border-color: #cdd6e6; background: var(--info-bg); } .achip-info .achip-b { background: var(--info); }
.achip-ok { border-color: #bfe0cd; background: var(--ok-bg); color: var(--ok); min-height: 34px; padding-right: 14px; } .achip-ok .achip-b { background: var(--ok); min-width: 22px; height: 22px; font-size: .75rem; }
.achip-ok .achip-t strong { font-weight: 600; }
.achip-d { max-width: 15rem; }
@media (max-width: 640px) {
    .alertbar { gap: 6px; }
    .achip { width: 100%; }
    .achip-t { flex: 1 1 auto; }
    .achip-d { max-width: none; flex: 1 1 0; }
    .achip-go { margin-left: auto; }
    .achip-ok { width: auto; }
}
html[data-theme="dark"] .achip-fail { border-color: #5e3a37; }
html[data-theme="dark"] .achip-warn { border-color: #5a4a22; background: #2a2416; }
html[data-theme="dark"] .achip-info { border-color: #34405a; background: #1d2330; }
html[data-theme="dark"] .achip-ok { border-color: #264a38; background: #17261f; color: #8fd3ad; }

/* v80 · Aviso de pagamento confirmado */
.notice-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; justify-content: space-between; padding: 12px 14px; margin: 0 0 14px; border: 1px solid #efd9a6; border-radius: 14px; background: var(--warn-bg); }
.notice-box.is-done { border-color: #bfe0cd; background: var(--ok-bg); }
.notice-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 16rem; }
.notice-box .inline-form { margin: 0; }
html[data-theme="dark"] .notice-box { background: #2a2416; border-color: #5a4a22; }
html[data-theme="dark"] .notice-box.is-done { background: #17261f; border-color: #264a38; }

/* v84: conteúdo dos avisos empilhado, com campo de tamanho confortável */
.sla-banner > .hint, .sla-banner > form.form, .sla-banner > details { flex-basis: 100%; margin: 0; }
#pos-pago form.form { max-width: 28rem; }
#pos-pago .hint { margin-bottom: .2rem; }

/* v85: projeção de faturamento nas Métricas */
.forecast { display: flex; gap: .75rem; align-items: flex-start; padding: .8rem 1rem; margin: 0 0 1rem; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface, transparent); }
.forecast-ico { color: var(--muted, #666); padding-top: .15rem; }
.forecast > div { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.forecast strong { font-size: 1rem; }
.forecast span { font-size: .88rem; }
.forecast small { color: var(--muted, #666); font-size: .8rem; line-height: 1.4; }

/* v90: busca e paginação da fila de espera */
.wl-search { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: 0 0 .9rem; }
.wl-search .input { flex: 1 1 14rem; max-width: 22rem; }

/* v95: aviso de pendências e erro junto do botão de enviar orçamento */
.send-quote .alert { margin-bottom: .75rem; }
.send-quote .send-missing { margin: .35rem 0 .5rem 1.1rem; padding: 0; }
.send-quote .send-missing a { color: inherit; text-decoration: underline; }
.send-quote button[disabled] { opacity: .5; cursor: not-allowed; }
#orcamento-enviar { scroll-margin-top: 5rem; }

/* Avisos da equipe (Telegram) */
.check-list{list-style:none;margin:0;padding:0;display:grid;gap:.5rem}
.stack{display:grid;gap:.75rem}
pre.code{background:var(--surface-2,#f3f3f3);border-radius:8px;padding:.75rem;overflow-x:auto;font-size:.85rem;white-space:pre-wrap;word-break:break-all}

/* Comercial: os resumos de "Aguardando resposta" viram filtros */
.sla-summary .sla-chip a { color: inherit; text-decoration: none; display: block; }
.sla-summary .sla-chip a:hover { text-decoration: underline; }
.sla-summary .sla-chip.is-active { box-shadow: 0 0 0 2px currentColor; }

/* Encerramento em lote (Comercial) */
.batch-bar { display: grid; gap: .6rem; padding: .9rem 1rem; margin: .5rem 0 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--fail-bg); }
.sla-queue li.has-check { display: flex; align-items: flex-start; gap: .6rem; }
.sla-queue li.has-check > a { flex: 1; min-width: 0; }
.batch-check { width: 1.15rem; height: 1.15rem; margin-top: .9rem; flex: none; }
