/* =========================================================
   Controle de Vendas — design system
   Bootstrap 5.3 como base + tokens próprios (claro/escuro)
   ========================================================= */

:root,
[data-bs-theme="light"] {
    --bg: #f4f5fa;
    --surface: #ffffff;
    --surface-2: #f7f8fc;
    --surface-3: #eef0f6;
    --border: #e6e8f0;
    --text: #0f172a;
    --muted: #6b7280;
    --primary: #5146e5;
    --primary-2: #7c3aed;
    --primary-soft: #eef0ff;
    --success: #059669;
    --success-soft: #e6f7f0;
    --warning: #d97706;
    --warning-soft: #fff4e2;
    --danger: #e11d48;
    --danger-soft: #fdebef;
    --info: #0284c7;
    --info-soft: #e5f4fc;
    --neutral-soft: #eef0f5;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
    --shadow-md: 0 4px 24px -6px rgba(15, 23, 42, .12);
    --shadow-lg: 0 18px 50px -12px rgba(81, 70, 229, .45);
    --hero: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #c026d3 100%);
    --glass: rgba(255, 255, 255, .78);

    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text);
    --bs-secondary-color: var(--muted);
    --bs-border-color: var(--border);
    --bs-primary: var(--primary);
    --bs-primary-rgb: 81, 70, 229;
    --bs-success-rgb: 5, 150, 105;
    --bs-danger-rgb: 225, 29, 72;
    --bs-warning-rgb: 217, 119, 6;
    --bs-link-color: var(--primary);
    --bs-link-color-rgb: 81, 70, 229;
    --bs-link-hover-color: var(--primary-2);
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-border-radius: .75rem;
    --bs-tertiary-bg: var(--surface-2);
}

[data-bs-theme="dark"] {
    --bg: #0a0d14;
    --surface: #121621;
    --surface-2: #171c29;
    --surface-3: #1e2433;
    --border: #232a3b;
    --text: #e8eaf1;
    --muted: #8d95aa;
    --primary: #8b83ff;
    --primary-2: #b48bff;
    --primary-soft: rgba(139, 131, 255, .14);
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, .13);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, .13);
    --danger: #fb7185;
    --danger-soft: rgba(251, 113, 133, .13);
    --info: #38bdf8;
    --info-soft: rgba(56, 189, 248, .13);
    --neutral-soft: rgba(148, 163, 184, .12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 8px 30px -10px rgba(0, 0, 0, .6);
    --shadow-lg: 0 18px 50px -12px rgba(124, 58, 237, .5);
    --hero: linear-gradient(135deg, #4338ca 0%, #6d28d9 55%, #a21caf 100%);
    --glass: rgba(18, 22, 33, .8);

    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text);
    --bs-secondary-color: var(--muted);
    --bs-border-color: var(--border);
    --bs-primary-rgb: 139, 131, 255;
    --bs-success-rgb: 52, 211, 153;
    --bs-danger-rgb: 251, 113, 133;
    --bs-warning-rgb: 251, 191, 36;
    --bs-link-color: var(--primary);
    --bs-link-color-rgb: 139, 131, 255;
    --bs-tertiary-bg: var(--surface-2);
}

/* ---------- Base ---------- */
html { -webkit-tap-highlight-color: transparent; }
body {
    background: var(--bg);
    color: var(--text);
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    letter-spacing: -.005em;
}
a { text-decoration: none; }
.text-muted, .text-secondary { color: var(--muted) !important; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.num { text-align: right; }
.fw-600 { font-weight: 600; }
.min-w-0 { min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-primary { color: var(--primary) !important; }
::selection { background: var(--primary-soft); }

/* ---------- Estrutura ---------- */
.app { min-height: 100vh; }
.conteudo { padding: 20px 16px 120px; }
.container-app { max-width: 1240px; margin: 0 auto; }

@media (min-width: 992px) {
    .com-menu .conteudo { margin-left: 264px; padding: 32px 36px 48px; }
}

/* Sidebar (PC) */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 1030;
    flex-direction: column; padding: 22px 16px;
    background: var(--surface); border-right: 1px solid var(--border);
}
.marca { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; color: var(--text); }
.marca-logo {
    width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
    background: var(--hero); color: #fff; font-size: 1.1rem; box-shadow: var(--shadow-lg);
}
.marca-nome { font-weight: 700; font-size: 1.02rem; line-height: 1.1; }
.marca-sub { font-size: .72rem; color: var(--muted); font-weight: 500; }
.menu-grupo { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 18px 12px 6px; }
.menu-link {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
    color: var(--muted); font-weight: 500; font-size: .92rem; transition: background .15s, color .15s;
}
.menu-link i { font-size: 1.1rem; width: 20px; text-align: center; }
.menu-link:hover { background: var(--surface-2); color: var(--text); }
.menu-link.ativo { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.menu-link .contador { margin-left: auto; font-size: .7rem; font-weight: 700; background: var(--warning-soft); color: var(--warning); border-radius: 99px; padding: 2px 8px; }
.sidebar-rodape { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }
.usuario { display: flex; align-items: center; gap: 10px; padding: 8px; }

/* Topbar (celular) */
.topbar {
    position: sticky; top: 0; z-index: 1020; height: 60px;
    display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px;
    padding-top: env(safe-area-inset-top);
    background: var(--glass); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border);
}
.topbar .marca { padding: 0; }
.topbar .marca-logo { width: 32px; height: 32px; border-radius: 10px; font-size: .95rem; box-shadow: none; }
.topbar-titulo { font-weight: 600; font-size: 1.02rem; }

/* Barra inferior (celular) */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid var(--border);
}
.bottom-nav a, .bottom-nav button {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0;
    color: var(--muted); font-size: .68rem; font-weight: 600; background: none; border: 0;
}
.bottom-nav i { font-size: 1.32rem; line-height: 1; }
.bottom-nav .ativo { color: var(--primary); }
.bottom-nav .fab-centro { position: relative; top: -18px; }
.bottom-nav .fab-centro span {
    width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center;
    background: var(--hero); color: #fff; font-size: 1.6rem; box-shadow: var(--shadow-lg);
    transition: transform .15s;
}
.bottom-nav .fab-centro:active span { transform: scale(.92); }

/* Bottom sheet "Mais" */
.sheet { border-radius: 24px 24px 0 0 !important; border: 0 !important; background: var(--surface) !important; height: auto !important; padding-bottom: env(safe-area-inset-bottom); }
.sheet .alca { width: 40px; height: 5px; border-radius: 9px; background: var(--surface-3); margin: 10px auto 4px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: 18px;
    background: var(--surface-2); color: var(--text); font-size: .8rem; font-weight: 600; border: 0; width: 100%;
}
.tile i { font-size: 1.4rem; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }

/* ---------- Cabeçalho de página ---------- */
.cabecalho { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.cabecalho-titulo { font-size: 1.55rem; font-weight: 700; letter-spacing: -.025em; margin: 0; }
.cabecalho-sub { color: var(--muted); margin: 2px 0 0; font-size: .92rem; }
.cabecalho-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 992px) { .cabecalho-titulo { font-size: 1.85rem; } }

/* ---------- Cards ---------- */
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
    box-shadow: var(--shadow-sm); color: var(--text);
}
.card-header { background: transparent !important; border-bottom: 1px solid var(--border); padding: 16px 20px; font-weight: 600; }
.card-body { padding: 20px; }
.card-titulo { font-weight: 650; font-size: 1rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.card-titulo .bi { color: var(--muted); }
.card-topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; }

/* Hero */
.hero {
    position: relative; overflow: hidden; border-radius: 24px; padding: 24px; color: #fff;
    background: var(--hero); box-shadow: var(--shadow-lg); isolation: isolate;
}
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%; z-index: -1; filter: blur(2px);
    background: radial-gradient(circle, rgba(255,255,255,.28), rgba(255,255,255,0) 70%);
}
.hero::before { width: 320px; height: 320px; right: -90px; top: -140px; }
.hero::after { width: 220px; height: 220px; left: 30%; bottom: -150px; opacity: .6; }
.hero-rotulo { font-size: .82rem; font-weight: 500; opacity: .85; }
.hero-valor { font-size: 2.4rem; font-weight: 750; letter-spacing: -.035em; line-height: 1.1; margin: 6px 0 12px; }
.hero-linha { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .86rem; opacity: .92; }
.hero-chip { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,.18); border-radius: 99px; padding: 3px 10px; font-weight: 600; font-size: .78rem; backdrop-filter: blur(6px); }
@media (min-width: 768px) { .hero { padding: 30px 32px; } .hero-valor { font-size: 3rem; } }

/* Stat */
.stat { padding: 16px 18px; height: 100%; }
.stat-icone { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 1.15rem; margin-bottom: 12px; }
.stat-rotulo { font-size: .78rem; font-weight: 500; color: var(--muted); }
.stat-valor { font-size: 1.32rem; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; white-space: nowrap; }
.stat-dica { font-size: .76rem; color: var(--muted); margin-top: 2px; }
@media (min-width: 768px) { .stat-valor { font-size: 1.5rem; } }

/* Tons suaves */
.tom-primary { background: var(--primary-soft); color: var(--primary); }
.tom-success { background: var(--success-soft); color: var(--success); }
.tom-warning { background: var(--warning-soft); color: var(--warning); }
.tom-danger { background: var(--danger-soft); color: var(--danger); }
.tom-info { background: var(--info-soft); color: var(--info); }
.tom-secondary, .tom-dark { background: var(--neutral-soft); color: var(--muted); }

/* Pills de status */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: .73rem; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-success { background: var(--success-soft); color: var(--success); }
.pill-warning { background: var(--warning-soft); color: var(--warning); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-primary { background: var(--primary-soft); color: var(--primary); }
.pill-secondary, .pill-dark { background: var(--neutral-soft); color: var(--muted); }
.pill-plain::before { display: none; }

/* Avatar */
.avatar {
    flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 650; color: #fff;
    background: hsl(var(--h) 70% 55%); background: linear-gradient(135deg, hsl(var(--h) 75% 60%), hsl(calc(var(--h) + 40) 70% 50%));
    letter-spacing: -.02em;
}

/* ---------- Listas ---------- */
.lista { display: flex; flex-direction: column; }
.item {
    display: flex; align-items: center; gap: 12px; padding: 14px 18px; color: var(--text);
    border-top: 1px solid var(--border); transition: background .12s;
}
.item:first-child { border-top: 0; }
a.item:hover, .item.clicavel:hover { background: var(--surface-2); }
.item-titulo { font-weight: 600; font-size: .94rem; }
.item-sub { font-size: .8rem; color: var(--muted); }
.item-valor { font-weight: 650; font-size: .95rem; white-space: nowrap; }
.item-icone { flex: none; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 1.15rem; }
.grupo-data { font-size: .74rem; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 18px 4px 8px; display: flex; justify-content: space-between; }
.grupo-data:first-child { margin-top: 0; }

/* Menu de ações (⋯) */
.btn-icone {
    width: 38px; height: 38px; border-radius: 12px; display: inline-grid; place-items: center; padding: 0;
    background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); flex: none;
}
.btn-icone:hover { color: var(--text); background: var(--surface-3); }
.btn-icone.whats { color: #16a34a; background: rgba(22, 163, 74, .1); border-color: transparent; }
.dropdown-menu {
    border: 1px solid var(--border); border-radius: 16px; padding: 6px; background: var(--surface);
    box-shadow: var(--shadow-md); min-width: 200px;
}
.dropdown-item { border-radius: 10px; padding: 9px 12px; font-size: .9rem; display: flex; gap: 10px; align-items: center; color: var(--text); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-2); color: var(--text); }
.dropdown-item.perigo { color: var(--danger); }
.dropdown-item i { width: 18px; color: var(--muted); }
.dropdown-item.perigo i { color: var(--danger); }

/* ---------- Botões ---------- */
.btn { border-radius: 12px; font-weight: 600; padding: .6rem 1rem; font-size: .9rem; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-sm { padding: .4rem .75rem; font-size: .82rem; border-radius: 10px; }
.btn-lg { padding: .85rem 1.3rem; font-size: 1rem; border-radius: 16px; }
.btn-primary { background: var(--hero); border: 0; color: #fff; box-shadow: 0 6px 18px -6px rgba(81, 70, 229, .6); }
.btn-primary:hover, .btn-primary:focus { color: #fff; filter: brightness(1.07); background: var(--hero); }
.btn-primary:active { transform: scale(.98); }
.btn-light, .btn-outline-secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn-light:hover, .btn-outline-secondary:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-soft { background: var(--primary-soft); color: var(--primary); border: 0; }
.btn-soft:hover { color: var(--primary); filter: brightness(.97); }
.btn-whats { background: #16a34a; color: #fff; border: 0; }
.btn-whats:hover { background: #15803d; color: #fff; }

/* ---------- Formulários ---------- */
.form-label { font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.form-control, .form-select {
    background-color: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
    min-height: 46px; font-size: .95rem; color: var(--text);
}
.form-control:focus, .form-select:focus {
    background-color: var(--surface); border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft); color: var(--text);
}
.form-control::placeholder { color: var(--muted); opacity: .7; }
.form-text { color: var(--muted); font-size: .76rem; }
.input-group-text { background: var(--surface-3); border: 1px solid var(--border); border-radius: 12px; color: var(--muted); font-weight: 600; font-size: .85rem; }
.input-group > .form-control { border-radius: 0 12px 12px 0; }
.input-group > .input-group-text:first-child { border-radius: 12px 0 0 12px; }
.busca { position: relative; }
.busca .bi { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.busca .form-control { padding-left: 40px; border-radius: 14px; }
.form-select-sm, .form-control-sm { min-height: 38px; font-size: .85rem; border-radius: 10px; }

/* Chips (rádio estilizado) */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px;
    background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .84rem; font-weight: 600;
    cursor: pointer; user-select: none; transition: all .15s;
}
.chip:hover { color: var(--text); }
.chip.ativo, input:checked + .chip { background: var(--text); border-color: var(--text); color: var(--surface); }
.chip .contagem { font-size: .7rem; opacity: .7; }

/* Segmentado */
.segmentado { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-3); border-radius: 14px; padding: 4px; gap: 4px; }
.segmentado label { text-align: center; padding: 9px 6px; border-radius: 10px; font-size: .86rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .15s; }
.segmentado input:checked + label { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* Cartões de produto (rádio) */
.opcao-produto { display: block; cursor: pointer; }
.opcao-produto > div {
    border: 1.5px solid var(--border); border-radius: 16px; padding: 14px 16px; background: var(--surface-2);
    display: flex; align-items: center; gap: 12px; transition: all .15s;
}
.opcao-produto input:checked + div { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-soft); }
.opcao-produto .check { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; color: transparent; }
.opcao-produto input:checked + div .check { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Stepper */
.stepper { display: flex; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 4px; }
.stepper button { width: 46px; height: 46px; border-radius: 12px; border: 0; background: var(--surface); color: var(--text); font-size: 1.3rem; box-shadow: var(--shadow-sm); }
.stepper button:active { transform: scale(.94); }
.stepper input { flex: 1; min-width: 0; text-align: center; border: 0; background: transparent; font-size: 1.4rem; font-weight: 700; color: var(--text); -moz-appearance: textfield; }
.stepper input:focus { outline: none; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Seção de formulário */
.secao { padding: 20px; }
.secao + .secao { border-top: 1px solid var(--border); }
.secao-titulo { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.secao-titulo .num-passo { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: .72rem; }

/* Barra de resumo fixa (celular) */
.barra-resumo {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid var(--border); display: flex; align-items: center; gap: 12px;
}
.barra-resumo .total { font-size: 1.35rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.barra-resumo .sub { font-size: .76rem; color: var(--muted); }
.resumo-linha { display: flex; justify-content: space-between; padding: 7px 0; font-size: .9rem; }
.resumo-linha.total { border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 12px; font-weight: 700; font-size: 1.05rem; }

/* ---------- Gráfico ---------- */
.grafico svg { width: 100%; height: auto; display: block; overflow: visible; }
.grafico .barra-fat { fill: var(--primary); opacity: .9; }
.grafico .barra-res { fill: var(--success); }
.grafico .barra-neg { fill: var(--danger); }
.grafico .rotulo { fill: var(--muted); font-size: 11px; font-weight: 500; }
.grafico .grade { stroke: var(--border); stroke-dasharray: 3 4; }
.legenda { display: flex; gap: 14px; font-size: .78rem; color: var(--muted); }
.legenda span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; background: var(--c); }

/* Cascata do resultado */
.cascata .linha { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: .9rem; }
.cascata .ponto { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cascata .linha.forte { font-weight: 700; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 12px; }
.cascata .linha .valor { margin-left: auto; font-variant-numeric: tabular-nums; }

/* Progresso */
.progresso { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progresso > div { height: 100%; border-radius: 99px; background: var(--hero); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.progresso.ok > div { background: var(--success); }
.progresso.alerta > div { background: var(--warning); }
.progresso.perigo > div { background: var(--danger); }

/* Estoque */
.estoque-saldo { font-size: 2.6rem; font-weight: 750; letter-spacing: -.04em; line-height: 1; }
.mini-grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-grade > div { background: var(--surface-2); border-radius: 14px; padding: 10px 12px; }
.mini-grade .r { font-size: .7rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.mini-grade .v { font-weight: 700; font-size: 1.02rem; margin-top: 2px; }

/* Vazio */
.vazio { text-align: center; padding: 40px 20px; }
.vazio .bi { font-size: 2rem; width: 68px; height: 68px; border-radius: 22px; display: inline-grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 14px; }
.vazio h3 { font-size: 1.02rem; font-weight: 650; margin-bottom: 4px; }
.vazio p { color: var(--muted); font-size: .88rem; margin: 0 auto 14px; max-width: 340px; }

/* Tabelas (PC) */
.tabela { margin: 0; --bs-table-bg: transparent; --bs-table-color: var(--text); }
.tabela th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tabela td { padding: 14px 16px; border-color: var(--border); vertical-align: middle; white-space: nowrap; }
.tabela tbody tr:hover td { background: var(--surface-2); }

/* Modal estilo "sheet" no celular */
.modal-content { border: 0; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-md); }
.modal-header, .modal-footer { border-color: var(--border); }
@media (max-width: 575.98px) {
    .modal-sheet .modal-dialog { margin: 0; position: fixed; bottom: 0; left: 0; right: 0; max-width: none; transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1) !important; }
    .modal-sheet.show .modal-dialog { transform: none; }
    .modal-sheet .modal-content { border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}

/* Toasts */
.toasts { position: fixed; z-index: 1090; top: 16px; right: 16px; left: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
@media (min-width: 768px) { .toasts { left: auto; align-items: flex-end; } }
.aviso {
    pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 440px; width: 100%;
    background: var(--text); color: var(--surface); padding: 12px 14px 12px 16px; border-radius: 16px;
    box-shadow: var(--shadow-md); font-size: .9rem; font-weight: 500;
    animation: entra .35s cubic-bezier(.2, .8, .2, 1);
}
.aviso .bi { font-size: 1.15rem; }
.aviso.ok .bi { color: #34d399; }
.aviso.aviso-warning .bi { color: #fbbf24; }
.aviso.erro .bi { color: #fb7185; }
.aviso button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .6; }
.aviso.sai { animation: sai .3s forwards; }
@keyframes entra { from { opacity: 0; transform: translateY(-12px) scale(.97); } }
@keyframes sai { to { opacity: 0; transform: translateY(-12px) scale(.97); } }

/* Animação de entrada do conteúdo */
.entra > * { animation: sobe .45s cubic-bezier(.2, .8, .2, 1) both; }
.entra > *:nth-child(2) { animation-delay: .04s; }
.entra > *:nth-child(3) { animation-delay: .08s; }
.entra > *:nth-child(4) { animation-delay: .12s; }
.entra > *:nth-child(5) { animation-delay: .16s; }
@keyframes sobe { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Login */
.login { min-height: 100vh; display: grid; }
@media (min-width: 992px) { .login { grid-template-columns: 1.1fr 1fr; } }
.login-arte { background: var(--hero); color: #fff; padding: 56px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.login-arte::after { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.25), transparent 70%); }
.login-form { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.login-card { width: 100%; max-width: 400px; }
.vidro { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 20px; padding: 18px 20px; backdrop-filter: blur(10px); }

/* Diversos */
.paginacao .pagination { gap: 6px; justify-content: center; }
.paginacao .page-link { border-radius: 10px !important; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; font-size: .85rem; }
.paginacao .active > .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.paginacao .disabled > .page-link { background: var(--surface-2); color: var(--muted); }
.divisor { height: 1px; background: var(--border); margin: 16px 0; }
.kbd { font-size: .7rem; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font-weight: 600; }
.ocultar-scroll { scrollbar-width: none; }
.alerta-suave { border-radius: 16px; padding: 12px 16px; font-size: .88rem; display: flex; gap: 10px; align-items: flex-start; }

/* Barra de resumo ao lado do menu lateral (telas médias) */
@media (min-width: 992px) {
    .com-menu .barra-resumo { left: 264px; padding-left: 36px; padding-right: 36px; }
}

/* Mini-grade compacta em telas estreitas */
.mini-grade .r, .mini-grade .v { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) {
    .mini-grade { gap: 6px; }
    .mini-grade > div { padding: 8px 10px; }
    .mini-grade .r { font-size: .62rem; letter-spacing: .02em; }
    .mini-grade .v { font-size: .9rem; }
    .stat { padding: 14px; }
    .stat-icone { width: 34px; height: 34px; border-radius: 11px; font-size: 1rem; margin-bottom: 10px; }
    .stat-valor { font-size: 1.15rem; }
}

/* Busca com sugestões (combobox) */
.combo { position: relative; }
.combo-lista {
    position: absolute; z-index: 1040; left: 0; right: 0; top: calc(100% + 6px);
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    box-shadow: var(--shadow-md); padding: 6px; max-height: 340px; overflow-y: auto;
    animation: entra .18s ease-out;
}
.combo-item {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 12px;
    background: transparent; color: var(--text); font-size: .92rem;
}
.combo-item .item-icone { width: 36px; height: 36px; border-radius: 11px; font-size: 1rem; }
.combo-item:hover, .combo-item.ativo { background: var(--surface-2); }
.combo-item.ativo { box-shadow: inset 0 0 0 1.5px var(--primary-soft); }
.combo-item mark { background: var(--primary-soft); color: var(--primary); padding: 0 1px; border-radius: 4px; }
.combo-rodape { font-size: .76rem; color: var(--muted); padding: 6px 10px 4px; }
