:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --sidebar: #14163a;
    --sidebar-2: #1c1f4a;
    --text: #1f2440;
    --text-soft: #6b7192;
    --muted: #9aa0bd;
    --border: #eaecf5;
    --primary: #6c5ce7;
    --primary-soft: #efedff;
    --accent: #ff7a59;
    --accent-2: #ffb84d;
    --pink: #ff5c8a;
    --green: #12b886;
    --red: #f0405a;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 10px 30px rgba(31, 36, 64, .06);
    --shadow-lg: 0 18px 44px rgba(31, 36, 64, .10);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.layout { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
    width: 264px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 22px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 22px; }
.brand-logo {
    width: 44px; height: 44px; border-radius: 13px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: grid; place-items: center; font-size: 22px;
    box-shadow: 0 8px 20px rgba(255, 122, 89, .4);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 18px; font-weight: 800; letter-spacing: .5px; }
.brand-text span { font-size: 11px; color: #a7abd6; }

.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: 12px;
    color: #c6c9ea; text-decoration: none; font-size: 14px; font-weight: 500;
    position: relative; transition: background .15s, color .15s;
}
.nav-item svg { width: 20px; height: 20px; fill: currentColor; opacity: .9; }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.is-active { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(108, 92, 231, .45); }
.nav-item[data-soon]::after {
    content: attr(data-soon);
    margin-left: auto; font-size: 9px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; background: rgba(255, 255, 255, .12); color: #cfd2f0;
    padding: 3px 7px; border-radius: 20px;
}

.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); }
.user { display: flex; align-items: center; gap: 12px; padding: 6px 8px; }
.user-avatar {
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, var(--pink), var(--primary));
    display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.user-info { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.user-info strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-info span { font-size: 11px; color: #a7abd6; }
.user-logout {
    display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
    border-radius: 9px; color: #a7abd6; flex-shrink: 0; transition: background .12s, color .12s;
}
.user-logout:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.user-logout svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Main ---------- */
.main { flex: 1; padding: 28px 34px 44px; min-width: 0; }

.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.topbar h1 { font-size: 24px; font-weight: 800; }
.topbar-sub { color: var(--text-soft); font-size: 14px; margin-top: 4px; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.dash-filter { display: flex; gap: 8px; align-items: center; }
.dash-filter select {
    padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600;
    cursor: pointer; font-family: inherit;
}
.dash-filter select:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.link-reset { color: var(--primary); font-weight: 700; text-decoration: none; margin-left: 6px; }
.link-reset:hover { text-decoration: underline; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 16px; border-radius: 12px; border: none;
    background: var(--primary); color: #fff; font-weight: 600; font-size: 14px;
    cursor: pointer; text-decoration: none; transition: transform .1s, box-shadow .15s, background .15s;
}
.btn:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: #fbfbff; }
.btn.is-spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.alert { padding: 13px 18px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px; }
.alert-demo { background: #fff6e9; color: #8a5a00; border: 1px solid #ffe3b0; }
.alert-success { background: #e8f9f2; color: #0a7052; border: 1px solid #b6ecd8; }
.alert-error { background: #fdecef; color: #b3213a; border: 1px solid #f7c2cc; }
.alert code, .alert-demo code { background: rgba(0, 0, 0, .06); padding: 2px 6px; border-radius: 6px; font-size: 13px; }

/* ---------- Botões extras ---------- */
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-link { background: none; border: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--primary); padding: 4px 6px; }
.btn-link:hover { text-decoration: underline; }
.btn-link-danger { color: var(--red); }
.btn-danger-ghost { color: var(--red); border-color: #f7c2cc; }
.btn-danger-ghost:hover { background: #fdecef; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 44px 20px; }
.empty-ico { font-size: 48px; margin-bottom: 8px; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; }
.empty-state p { color: var(--text-soft); font-size: 14px; max-width: 460px; margin: 0 auto 20px; line-height: 1.6; }

/* ---------- Pills ---------- */
.pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; display: inline-block; }
.pill-ok { background: rgba(18, 184, 134, .14); color: var(--green); }
.pill-error { background: rgba(240, 64, 90, .12); color: var(--red); }
.pill-muted { background: #eef0f6; color: var(--text-soft); }
.cell-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Importação: upload ---------- */
.import-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.dropzone {
    display: block; border: 2px dashed #cfd3e8; border-radius: var(--radius);
    padding: 48px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-dragging { border-color: var(--primary); background: var(--primary-soft); }
.dropzone.has-file { border-color: var(--green); background: #f0fbf7; }
.dropzone-ico { font-size: 40px; margin-bottom: 10px; }
.dropzone-inner strong { display: block; font-size: 16px; margin-bottom: 4px; }
.dropzone-inner span { font-size: 13px; color: var(--text-soft); }
.form-actions { margin-top: 18px; display: flex; justify-content: flex-end; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.help-panel .panel-label { display: block; margin-bottom: 12px; }
.help-steps { padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text); }
.help-steps li { line-height: 1.5; }
.help-note { margin-top: 16px; padding: 12px 14px; background: var(--primary-soft); color: #4b3fb0; border-radius: 12px; font-size: 13px; line-height: 1.5; }

/* ---------- Importação: prévia ---------- */
.mapping-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.mapping-item { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); }
.mapping-item.is-mapped { background: #f0fbf7; border-color: #b6ecd8; }
.mapping-item.is-unmapped { background: #faf9fc; }
.mapping-field { display: block; font-size: 12px; color: var(--text-soft); }
.mapping-source { display: block; font-size: 14px; font-weight: 600; margin-top: 2px; }
.mapping-item.is-unmapped .mapping-source { color: var(--muted); font-weight: 500; font-style: italic; }

.table-scroll { overflow-x: auto; }
.confirm-bar {
    position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center;
    gap: 20px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow-lg);
}
.confirm-info strong { display: block; font-size: 15px; }
.confirm-info span { font-size: 13px; color: var(--text-soft); }

@media (max-width: 900px) {
    .import-cols { grid-template-columns: 1fr; }
}

/* ---------- KPI grid ---------- */
.kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px; margin-bottom: 20px;
}
.kpi-card {
    background: var(--surface); border-radius: var(--radius); padding: 20px;
    box-shadow: var(--shadow); border: 1px solid var(--border);
    transition: transform .12s, box-shadow .15s;
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.kpi-accent {
    background: linear-gradient(135deg, var(--primary), #8b7bff);
    color: #fff; border: none;
}
.kpi-accent .kpi-label, .kpi-accent .kpi-hint { color: rgba(255, 255, 255, .82); }
.kpi-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.kpi-label { font-size: 13px; color: var(--text-soft); font-weight: 500; }
.kpi-ico { font-size: 20px; }
.kpi-value { font-size: 27px; font-weight: 800; letter-spacing: -.5px; }
.kpi-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.kpi-tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.kpi-tag.is-up { background: rgba(18, 184, 134, .14); color: var(--green); }
.kpi-tag.is-down { background: rgba(240, 64, 90, .12); color: var(--red); }
.kpi-accent .kpi-tag { background: rgba(255, 255, 255, .22); color: #fff; }
.kpi-hint { font-size: 12px; color: var(--muted); }

/* ---------- Panels ---------- */
.panel {
    background: var(--surface); border-radius: var(--radius); padding: 22px;
    box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 20px;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.panel-label { font-size: 15px; font-weight: 700; }

/* Meta */
.goal-panel { display: flex; flex-direction: column; gap: 14px; }
.goal-info { display: flex; justify-content: space-between; align-items: center; }
.goal-numbers { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.goal-numbers strong { font-size: 24px; font-weight: 800; }
.goal-numbers span { color: var(--text-soft); font-size: 14px; }
.goal-percent { font-size: 30px; font-weight: 800; color: var(--primary); }
.progress { height: 12px; background: var(--primary-soft); border-radius: 20px; overflow: hidden; }
.progress-sm { height: 8px; }
.progress-bar {
    height: 100%; border-radius: 20px;
    background: linear-gradient(90deg, var(--primary), var(--pink));
    transition: width .6s ease;
}

/* ---------- Charts ---------- */
.charts-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; }
.charts-grid .chart-wide { grid-column: span 1; }
.chart-panel { margin-bottom: 0; }
.chart-box { position: relative; height: 300px; }
.chart-box-sm { height: 260px; }

/* ---------- Stock list ---------- */
.stock-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.stock-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; border-radius: 12px; background: #fff8f5; border: 1px solid #ffe3d8;
}
.stock-item strong { display: block; font-size: 14px; }
.stock-item span { font-size: 12px; color: var(--text-soft); }
.stock-badge { font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.stock-empty { color: var(--text-soft); font-size: 14px; padding: 8px; }

/* ---------- Canais de venda ---------- */
.panel-hint { font-size: 12px; color: var(--text-soft); font-weight: 500; }
.channel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.channel-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; background: var(--bg); }
.channel-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.channel-ico {
    width: 42px; height: 42px; border-radius: 12px; flex: none;
    display: grid; place-items: center; font-size: 20px;
    background: var(--surface); box-shadow: var(--shadow);
}
.channel-delivery .channel-ico { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.channel-id { display: flex; flex-direction: column; min-width: 0; }
.channel-id strong { font-size: 15px; }
.channel-id span { font-size: 12px; color: var(--text-soft); }
.channel-share { margin-left: auto; font-size: 15px; font-weight: 800; color: var(--primary); }
.channel-value { font-size: 23px; font-weight: 800; margin-bottom: 10px; }

/* ---------- Table ---------- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px;
    color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.data-table td { padding: 13px 12px; font-size: 14px; border-bottom: 1px solid var(--border); }
.data-table tbody tr:last-child td, .data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #fafaff; }
.ta-right { text-align: right; }
.ta-center { text-align: center; }
/* Cabeçalhos numéricos: sobrepõe o text-align padrão do th (mais específico). */
.data-table th.ta-right { text-align: right; }
.data-table th.ta-center { text-align: center; }
.rank {
    font-weight: 700; color: var(--primary);
}
.trend { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.trend.is-up, .trend.is-new { color: var(--green); }
.trend.is-down { color: var(--red); }
.trend.is-flat { color: var(--muted); font-weight: 600; }

/* ---------- Marketing / CRM ---------- */
.empty-panel { text-align: center; padding: 48px 24px; }
.empty-panel h2 { font-size: 20px; margin-bottom: 8px; }
.empty-panel p { color: var(--text-soft); font-size: 14px; max-width: 520px; margin: 0 auto 20px; line-height: 1.6; }

.segment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.segment-card {
    display: flex; flex-direction: column; gap: 5px; text-decoration: none; color: var(--text);
    border: 1px solid var(--border); border-left: 4px solid var(--seg-color);
    border-radius: var(--radius-sm); padding: 14px 16px; background: var(--bg);
    transition: transform .12s, box-shadow .15s;
}
.segment-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.segment-card.is-active { box-shadow: 0 0 0 2px var(--seg-color); background: var(--surface); }
.segment-top { display: flex; align-items: center; justify-content: space-between; }
.segment-emoji { font-size: 22px; }
.segment-count { font-size: 24px; font-weight: 800; color: var(--seg-color); }
.segment-label { font-size: 15px; font-weight: 700; }
.segment-pct { font-size: 12px; color: var(--text-soft); }
.segment-action { font-size: 12px; color: var(--text-soft); line-height: 1.45; margin-top: 4px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; align-items: center; }
.filter-input, .filter-select {
    padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-size: 14px; font-family: inherit;
}
.filter-input { flex: 1; min-width: 220px; }
.filter-input:focus, .filter-select:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }

.seg-badge {
    display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
    padding: 4px 10px; border-radius: 20px; white-space: nowrap;
    color: var(--seg-color); background: color-mix(in srgb, var(--seg-color) 15%, transparent);
}

.wa-link { display: inline-flex; align-items: center; gap: 6px; color: var(--green); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.wa-link svg { width: 16px; height: 16px; fill: currentColor; }

.campaign-form .form-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 14px;
}
.campaign-form .form-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-soft); }
.campaign-form .form-field input,
.campaign-form .form-field select,
.campaign-form .form-field textarea {
    padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font: inherit;
}
.campaign-form .form-check { flex-direction: row; align-items: center; gap: 10px; margin-top: 18px; }
.campaign-form .form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.campaign-preview-box { margin: 14px 0; padding: 14px; border: 1px dashed var(--border); border-radius: 12px; background: var(--surface); }
.campaign-preview-text {
    white-space: pre-wrap; font-family: inherit; font-size: 14px; line-height: 1.5;
    margin: 8px 0 0; color: var(--text);
}
.inline-form { display: inline; }
.wa-link:hover { text-decoration: underline; }

.pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 12px; flex-wrap: wrap; }
.pagination-info { font-size: 13px; color: var(--text-soft); }
.pagination-links { display: flex; gap: 8px; }
.btn-sm { padding: 7px 12px; font-size: 13px; }

/* ---------- Financeiro ---------- */
.kpi-value.pos { color: var(--green); }
.kpi-value.neg { color: var(--red); }

.cat-bars { display: flex; flex-direction: column; gap: 12px; }
.cat-row { display: grid; grid-template-columns: 190px 1fr 160px; align-items: center; gap: 14px; }
.cat-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.cat-track { height: 12px; background: #eef0f6; border-radius: 20px; overflow: hidden; }
.cat-fill { height: 100%; border-radius: 20px; }
.cat-val { font-size: 13px; color: var(--text-soft); text-align: right; white-space: nowrap; }

.cat-chip {
    display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px;
    color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
}

.amount { font-weight: 700; font-size: 14px; white-space: nowrap; }
.amount.pos { color: var(--green); }
.amount.neg { color: var(--red); }

.fin-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 20px; white-space: nowrap; }
.fin-badge.is-paid { background: rgba(18, 184, 134, .14); color: var(--green); }
.fin-badge.is-pending { background: #eef0f6; color: var(--text-soft); }
.fin-badge.is-overdue { background: rgba(240, 64, 90, .12); color: var(--red); }
.fin-badge.is-warn { background: #fff6e9; color: #b7791f; }

.row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.row-actions form { display: inline; }
.icon-btn {
    display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text-soft);
    font-size: 14px; cursor: pointer; text-decoration: none; transition: all .12s;
}
.icon-btn:hover { background: #f6f7fb; color: var(--text); border-color: #d9dcec; }
.icon-btn.icon-ok:hover { background: #e8f9f2; color: var(--green); border-color: #b6ecd8; }
.icon-btn.icon-danger:hover { background: #fdecef; color: var(--red); border-color: #f7c2cc; }

/* Formulário */
.form-panel { max-width: 720px; }
.field { margin-bottom: 16px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.field-input {
    width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-size: 14px; font-family: inherit;
}
.field-input:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
textarea.field-input { resize: vertical; }

.check-line { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; cursor: pointer; }
.check-line input { width: 18px; height: 18px; accent-color: var(--primary); }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg-opt {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 12px; border-radius: 12px; border: 1.5px solid var(--border);
    font-size: 14px; font-weight: 600; color: var(--text-soft); cursor: pointer; transition: all .12s;
}
.seg-opt input { position: absolute; opacity: 0; }
.seg-opt.is-on { border-color: var(--red); color: var(--red); background: #fdecef; }
.seg-opt.seg-income.is-on { border-color: var(--green); color: var(--green); background: #e8f9f2; }

/* ---------- Financeiro: categorias ---------- */
.cat-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

.cat-dot { display: inline-block; width: 14px; height: 14px; border-radius: 5px; vertical-align: middle; margin-right: 4px; }

.color-picker { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.color-input { width: 54px; height: 40px; padding: 2px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; }
.color-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.color-dot { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); cursor: pointer; transition: transform .1s; }
.color-dot:hover { transform: scale(1.15); }

/* Insights */
.insight-list { display: flex; flex-direction: column; gap: 10px; }
.insight { padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; border-left: 4px solid var(--muted); background: #f6f7fb; }
.insight-good { border-left-color: var(--green); background: #e8f9f2; color: #0a7052; }
.insight-bad { border-left-color: var(--red); background: #fdecef; color: #b3213a; }
.insight-neutral { border-left-color: var(--primary); background: var(--primary-soft); color: #4b3fb0; }

/* Gráfico de colunas */
.col-chart { display: flex; align-items: flex-end; gap: 8px; height: 240px; padding-top: 10px; }
.col-item { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.col-val { font-size: 10.5px; font-weight: 700; color: var(--text-soft); height: 16px; }
.col-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.col-bar { width: 66%; max-width: 44px; border-radius: 8px 8px 0 0; min-height: 3px; transition: opacity .15s; }
.col-bar:hover { opacity: .82; }
.col-bar.is-current { box-shadow: 0 4px 12px rgba(31, 36, 64, .14); }
.col-label { font-size: 11px; color: var(--muted); margin-top: 8px; font-weight: 600; }

@media (max-width: 900px) { .cat-cols { grid-template-columns: 1fr; } }

/* ---------- Estoque ---------- */
.alert-panel { border-left: 4px solid var(--accent-2); }
.alert-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.alert-chip {
    display: inline-flex; flex-direction: column; padding: 8px 14px; border-radius: 12px;
    background: #fff6e9; border: 1px solid #ffe3b0; font-size: 13px; color: #8a5a00; line-height: 1.35;
}
.alert-chip strong { color: var(--text); font-size: 13.5px; }

.unit { color: var(--muted); font-size: 12px; font-weight: 500; }
.unit-lg { font-size: 16px; color: var(--text-soft); font-weight: 600; }
.ta-right.pos { color: var(--green); font-weight: 700; }
.ta-right.neg { color: var(--red); font-weight: 700; }

.stock-cols { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }

.segmented.seg-4 { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.segmented.seg-4 .seg-opt { padding: 11px 6px; font-size: 13px; flex-direction: column; gap: 4px; }

.mv-chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.mv-in { background: rgba(18, 184, 134, .14); color: var(--green); }
.mv-out { background: #eef2ff; color: #4c6fff; }
.mv-loss { background: rgba(240, 64, 90, .12); color: var(--red); }
.mv-adj { background: var(--primary-soft); color: #4b3fb0; }

@media (max-width: 960px) { .stock-cols { grid-template-columns: 1fr; } }

/* ---------- Suprimentos: ações rápidas ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 22px; }
.quick-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.quick-title { font-size: 14px; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.quick-form { display: flex; flex-direction: column; gap: 10px; }
.quick-form input, .quick-form select {
    width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-size: 13.5px; font-family: inherit;
}
.quick-form input:focus, .quick-form select:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-hint { margin-top: 10px; font-size: 12px; color: var(--text-soft); line-height: 1.5; }

.btn-block { width: 100%; justify-content: center; }
.btn-green { background: var(--green); }
.btn-amber { background: var(--accent-2); color: #5a3d00; }

/* Tabela de estoque */
.row-alert { background: #fff5f5; }
.row-alert:hover { background: #ffeef0; }
.stock-name { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.stock-name:hover strong { color: var(--primary); }
.stock-dot {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.stock-dot.is-ok { background: rgba(18,184,134,.14); color: var(--green); }
.stock-dot.is-warn { background: #fff6e9; color: #b7791f; }
.stock-dot.is-danger { background: rgba(240,64,90,.12); color: var(--red); }
.stock-dot.is-neutral { background: #eef0f6; color: var(--muted); }

.alert-chip.is-danger { background: #fdecef; border-color: #f7c2cc; color: #b3213a; }

.fin-badge.is-ok { background: rgba(18,184,134,.14); color: var(--green); }
.fin-badge.is-danger { background: rgba(240,64,90,.12); color: var(--red); }
.fin-badge.is-neutral { background: #eef0f6; color: var(--text-soft); }
.kpi-value.warn { color: #b7791f; }

/* Detalhe do insumo */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; margin-bottom: 22px; }
.inline-form { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.inline-form select, .inline-form input {
    flex: 1; min-width: 120px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--surface); font-size: 13.5px; font-family: inherit;
}
.best-tag { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--green); background: rgba(18,184,134,.12); padding: 2px 8px; border-radius: 20px; }
.back-link { display: inline-block; font-size: 13px; color: var(--text-soft); text-decoration: none; margin-bottom: 6px; }
.back-link:hover { color: var(--primary); }
.field-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.field-hint[hidden] { display: none; }

/* Segmented dos tipos de movimentação */
.seg-opt.seg-entrada.is-on { border-color: var(--green); color: var(--green); background: #e8f9f2; }
.seg-opt.seg-saida.is-on { border-color: #4c6fff; color: #4c6fff; background: #eef2ff; }
.seg-opt.seg-perda.is-on { border-color: var(--red); color: var(--red); background: #fdecef; }
.seg-opt.seg-ajuste.is-on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* Chips do histórico */
.mv-chip.mv-entrada { background: rgba(18,184,134,.14); color: var(--green); }
.mv-chip.mv-saida { background: #eef2ff; color: #4c6fff; }
.mv-chip.mv-perda { background: rgba(240,64,90,.12); color: var(--red); }
.mv-chip.mv-ajuste { background: var(--primary-soft); color: #4b3fb0; }

/* Reposição */
.filter-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-soft); }
.filter-narrow { max-width: 90px; }
.buy-qty { color: var(--primary); }
.repl-form { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.repl-form > .btn { align-self: flex-start; }
.repl-block { display: flex; flex-direction: column; gap: 8px; }
.repl-legend { font-size: 13px; font-weight: 700; color: var(--text); }
.repl-block > .field-input { max-width: 340px; }
.repl-dates { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.repl-dates .field-input { max-width: 190px; }
.repl-sep { color: var(--text-soft); font-size: 13px; }
.repl-cycle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.repl-field { display: flex; flex-direction: column; gap: 6px; }
.repl-field > span { font-size: 12.5px; font-weight: 600; color: var(--text-soft); }
.repl-inline { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); flex-wrap: wrap; }
.repl-inline .field-input { max-width: 90px; }
.repl-advanced { border: 1px solid var(--border); border-radius: 12px; padding: 4px 14px; }
.repl-advanced summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--primary); padding: 10px 0; }
.repl-advanced[open] summary { margin-bottom: 6px; }
.repl-advanced .repl-cycle { margin-bottom: 8px; }
@media (max-width: 720px) { .repl-cycle { grid-template-columns: 1fr; } }
.data-table tfoot td { border-top: 2px solid var(--border); padding-top: 12px; font-size: 14px; }

@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

/* ---------- Admin: colaboradores ---------- */
.emp-name { display: inline-flex; align-items: center; gap: 10px; }
.emp-avatar, .picker-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 15px; flex-shrink: 0;
    overflow: hidden;
}
.emp-avatar img, .picker-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Portal do colaborador ---------- */
.portal-body { background: var(--bg); min-height: 100vh; }
.portal-flash { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50; width: min(92vw, 460px); }
.portal-flash:empty { display: none; }
.portal-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.portal-shell-wide { align-items: flex-start; padding-top: 32px; padding-bottom: 96px; }
.portal-card { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); width: 100%; }

/* Picker "Quem é você?" */
.picker-card { max-width: 430px; padding: 24px 22px; }
.picker-title { text-align: center; font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 18px; }
.picker-search input {
    width: 100%; padding: 13px 18px; border-radius: 30px; border: 1px solid var(--border);
    background: var(--surface); font-size: 15px; font-family: inherit; color: var(--text);
}
.picker-search input:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.picker-list { margin-top: 14px; max-height: 60vh; overflow-y: auto; }
.picker-item {
    display: flex; align-items: center; gap: 14px; padding: 14px 6px;
    border-bottom: 1px solid var(--border); text-decoration: none; transition: background .12s;
}
.picker-item:last-child { border-bottom: none; }
.picker-item:hover { background: #f6f7fb; }
.picker-avatar { width: 46px; height: 46px; font-size: 18px; }
.picker-info { display: flex; flex-direction: column; }
.picker-info strong { color: var(--text); font-size: 16px; }
.picker-info span { color: var(--text-soft); font-size: 13px; }
.picker-empty { text-align: center; color: var(--text-soft); padding: 24px; }

/* PIN */
.pin-card { max-width: 360px; padding: 24px 24px 28px; text-align: center; position: relative; }
.pin-back { position: absolute; top: 18px; left: 18px; font-size: 13px; color: var(--text-soft); text-decoration: none; }
.pin-back:hover { color: var(--primary); }
.pin-avatar {
    width: 64px; height: 64px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 26px;
    display: inline-flex; align-items: center; justify-content: center; margin: 8px auto 0;
}
.pin-name { font-size: 19px; font-weight: 800; color: var(--text); margin-top: 12px; }
.pin-hint { color: var(--text-soft); font-size: 14px; margin-top: 4px; }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 22px 0; }
.pin-dots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #cfd3e8; transition: all .12s; }
.pin-dots span.is-filled { background: var(--primary); border-color: var(--primary); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 280px; margin: 0 auto; }
.pin-key {
    height: 64px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface);
    font-size: 24px; font-weight: 700; color: var(--text); cursor: pointer; transition: background .1s, transform .05s;
}
.pin-key:hover { background: #f6f7fb; }
.pin-key:active { transform: scale(.96); }
.pin-key-ghost { color: var(--text-soft); font-size: 18px; }

/* Painel do colaborador */
.portal-shell-top { align-items: flex-start; }
.portal-container { width: 100%; max-width: 860px; margin: 0 auto; }

.portal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.portal-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text); }
.portal-brand-logo { font-size: 22px; }
.portal-logout {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 30px;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-soft);
    font-weight: 600; font-size: 14px; text-decoration: none; transition: all .12s;
}
.portal-logout:hover { color: var(--red); border-color: #f7c2cc; background: #fff5f6; }
.portal-logout svg { width: 17px; height: 17px; fill: currentColor; }

.portal-hero {
    display: flex; align-items: center; gap: 18px; padding: 26px 28px; margin-bottom: 28px;
    background: linear-gradient(120deg, #fff 0%, #faf9ff 100%);
    border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow);
}
.hero-avatar {
    width: 64px; height: 64px; border-radius: 20px; color: #fff; font-weight: 800; font-size: 28px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(31, 36, 64, .18);
}
.hero-date { font-size: 13px; color: var(--text-soft); font-weight: 600; text-transform: capitalize; }
.hero-text h1 { font-size: 24px; font-weight: 800; color: var(--text); margin: 3px 0; letter-spacing: -.4px; }
.hero-text p { font-size: 14px; color: var(--text-soft); }

.portal-section-title { font-size: 14px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 14px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 300px)); gap: 16px; justify-content: start; }
.feature-card {
    background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 20px;
    display: flex; align-items: center; gap: 16px; text-decoration: none;
    border: 1px solid var(--border); transition: transform .12s, box-shadow .15s, border-color .12s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #dcd8ff; }
.feature-ico {
    width: 54px; height: 54px; border-radius: 16px; font-size: 26px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.feature-body { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.feature-body strong { font-size: 16px; color: var(--text); }
.feature-desc { font-size: 13px; color: var(--text-soft); line-height: 1.4; }
.feature-arrow { color: var(--muted); font-size: 20px; font-weight: 700; transition: transform .12s, color .12s; }
.feature-card:hover .feature-arrow { color: var(--primary); transform: translateX(3px); }
.portal-empty { text-align: center; padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.portal-empty .feature-ico { background: #eef0f6; }
.portal-empty p { color: var(--text-soft); line-height: 1.6; }

/* Modal de ajuste de estoque (portal) */
.modal-overlay {
    position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
    background: rgba(31, 36, 64, .45); backdrop-filter: blur(2px); padding: 20px;
    animation: modalFade .12s ease-out;
}
.modal-overlay[hidden] { display: none; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
    background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg);
    width: 100%; max-width: 380px; padding: 28px 26px; text-align: center;
    animation: modalPop .14s ease-out;
}
@keyframes modalPop { from { transform: translateY(8px) scale(.97); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-ico {
    width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 14px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700;
}
.modal-ico.is-add { background: #e6f7ef; color: #12b886; }
.modal-ico.is-remove { background: #fdecef; color: var(--red); }
.modal-title { font-size: 19px; font-weight: 800; color: var(--text); }
.modal-prod { font-size: 15px; color: var(--text-soft); margin-top: 4px; font-weight: 600; }
.qty-stepper { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 22px 0 6px; }
.qty-step {
    width: 52px; height: 52px; border-radius: 16px; border: 1px solid var(--border); background: var(--bg);
    font-size: 26px; font-weight: 700; color: var(--text); cursor: pointer; flex-shrink: 0; transition: all .1s;
}
.qty-step:hover { background: #eef0f6; }
.qty-step:active { transform: scale(.94); }
.qty-input {
    width: 110px; height: 60px; border: 2px solid var(--border); border-radius: 16px; text-align: center;
    font-size: 30px; font-weight: 800; color: var(--text); background: var(--surface);
}
.qty-input:focus { outline: none; border-color: var(--primary); }
.qty-input.is-invalid { border-color: var(--red); animation: shake .3s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.modal-unit { font-size: 13px; color: var(--muted); text-transform: lowercase; }
.modal-question { font-size: 14px; color: var(--text-soft); margin: 18px 0 4px; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }

/* Gestão de Boletos */
.barcode-line { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.barcode-num {
    font-family: 'Courier New', monospace; font-size: 11.5px; color: var(--muted);
    max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copy-btn {
    border: 1px solid var(--border); background: var(--surface); color: var(--text-soft);
    border-radius: 7px; width: 24px; height: 22px; font-size: 12px; cursor: pointer; flex-shrink: 0; transition: all .12s;
}
.copy-btn:hover { background: #eef0f6; color: var(--text); }
.copy-btn.is-copied { background: #e6f7ef; color: #12b886; border-color: #b6ecd8; }

.pay-amount { font-size: 26px; font-weight: 800; color: var(--red); margin: 2px 0 18px; }
.modal-box .field-left { text-align: left; margin-bottom: 14px; }

/* Contas bancárias */
.two-col { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }
.account-list { display: flex; flex-direction: column; gap: 10px; }
.account-item {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
}
.account-ico {
    width: 44px; height: 44px; border-radius: 12px; background: #f1f0fb; font-size: 22px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.account-info { flex: 1; min-width: 0; }
.account-info strong { display: block; font-size: 15px; color: var(--text); }
.account-info span { font-size: 12.5px; color: var(--text-soft); }
.account-meta { text-align: right; }
.account-total { display: block; font-weight: 700; color: var(--text); font-size: 15px; }
.account-total.pos { color: var(--green); }
.account-total.neg { color: var(--red); }
.topbar-sub .pos { color: var(--green); }
.topbar-sub .neg { color: var(--red); }
.account-sub { font-size: 12px; color: var(--muted); }

/* Contas Fixas — painel colapsável */
.collapse-panel { padding: 0; overflow: hidden; }
.collapse-summary {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 16px 20px; cursor: pointer; font-weight: 700; color: var(--primary);
    list-style: none; user-select: none;
}
.collapse-summary::-webkit-details-marker { display: none; }
.collapse-arrow { color: var(--muted); transition: transform .15s; }
details[open] .collapse-arrow { transform: rotate(180deg); }
.collapse-body { padding: 4px 20px 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.fixed-grid { grid-template-columns: 2fr 1fr 1.2fr 1fr; }
@media (max-width: 900px) { .fixed-grid { grid-template-columns: 1fr 1fr; } }

/* Contas Fixas — calendário */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 8px; }
.cal-head {
    background: var(--bg); border-radius: 10px; padding: 8px 0; text-align: center;
    font-size: 12px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .4px;
}
.cal-cell {
    min-height: 84px; border: 1px solid var(--border); border-radius: 12px; padding: 8px;
    background: var(--surface); display: flex; flex-direction: column; gap: 6px;
}
.cal-cell.is-empty { background: var(--bg); border-style: dashed; opacity: .5; }
.cal-cell.is-today { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(108, 92, 231, .12); }
.cal-day-num { font-size: 12px; font-weight: 700; color: var(--text-soft); }
.cal-cell.is-today .cal-day-num { color: var(--primary); }

.bill-card {
    border-radius: 10px; padding: 8px 9px; font-size: 12.5px;
    border: 1px solid var(--border); background: var(--bg);
    display: flex; flex-direction: column; gap: 4px;
}
.bill-card.is-paid { background: #e9f9f1; border-color: #bfe8d2; }
.bill-card.is-late { background: #fdecef; border-color: #f5c3cd; }
.bill-name { display: flex; align-items: center; gap: 6px; }
.bill-name strong { font-size: 12.5px; color: var(--text); line-height: 1.25; }
.bill-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.bill-status { font-size: 11.5px; color: var(--text-soft); }
.bill-card.is-paid .bill-status { color: #0f9d58; font-weight: 600; }
.bill-card.is-late .bill-status { color: var(--red); font-weight: 600; }
.bill-actions { display: flex; gap: 4px; justify-content: flex-end; }
.bill-actions form { display: inline; }
.bill-btn {
    width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text-soft); font-size: 12px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
    transition: all .1s;
}
.bill-btn:hover { border-color: var(--primary); color: var(--primary); }
.bill-pay { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.bill-pay:hover { filter: brightness(1.08); color: #fff; border-color: var(--green); }
.bill-danger:hover { border-color: var(--red); color: var(--red); }

@media (max-width: 900px) {
    .cal-grid { grid-template-columns: repeat(2, 1fr); }
    .cal-head-row { display: none; }
    .cal-cell.is-empty { display: none; }
}

/* Login administrativo */
.login-card { max-width: 400px; padding: 32px 30px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-logo { font-size: 34px; }
.login-brand strong { display: block; font-size: 17px; color: var(--text); }
.login-brand span { font-size: 12.5px; color: var(--text-soft); }
.login-title { font-size: 20px; font-weight: 800; color: var(--text); }
.login-sub { font-size: 14px; color: var(--text-soft); margin: 4px 0 20px; }
.login-card .btn-block { margin-top: 6px; }

/* Estoque do portal */
.stock-card { max-width: 1000px; padding: 22px 24px; }
.stock-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.stock-heading h1 { font-size: 21px; font-weight: 800; color: var(--text); }
.stock-heading p { font-size: 13px; color: var(--text-soft); margin-top: 2px; }
.stock-search { position: relative; flex: 1; min-width: 220px; }
.stock-search-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); opacity: .5; font-size: 14px; }
.stock-search input {
    width: 100%; padding: 12px 14px 12px 38px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--surface); font-size: 14px; font-family: inherit; color: var(--text);
}
.stock-search input:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.stock-table { margin-top: 8px; }
.stock-row {
    display: grid; grid-template-columns: 1fr 220px 150px; align-items: center;
    padding: 16px 6px; border-bottom: 1px solid var(--border); gap: 12px;
}
.stock-row-head { border-bottom: 1px solid var(--border); }
.stock-row-head span { font-size: 12px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .4px; }
.stock-row-head .col-qty, .stock-row-head .col-act { padding-left: 4px; }
.stock-row .col-prod { font-size: 15px; color: var(--text); }
.col-qty { display: flex; align-items: center; gap: 12px; }
.qty-value { font-size: 18px; font-weight: 800; color: var(--text); min-width: 34px; }
.qty-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 4px 9px; border-radius: 20px; font-size: 12px; font-weight: 800; }
.qty-badge.is-ok { background: rgba(18,184,134,.14); color: var(--green); }
.qty-badge.is-warn { background: #fff6e9; color: #b7791f; font-size: 14px; }
.col-act { display: flex; gap: 10px; }
.step-btn {
    width: 46px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
    font-size: 22px; font-weight: 700; cursor: pointer; background: var(--surface); transition: all .1s;
}
.step-btn:disabled { opacity: .5; cursor: wait; }
.step-minus { color: var(--red); background: #fdecef; border-color: #f7c2cc; }
.step-minus:hover:not(:disabled) { background: #fcdbe1; }
.step-plus { color: var(--green); background: #e8f9f2; border-color: #b6ecd8; }
.step-plus:hover:not(:disabled) { background: #d6f5ea; }
.row-flash { background: var(--primary-soft); transition: background .1s; }

@media (max-width: 620px) {
    .stock-row { grid-template-columns: 1fr auto; }
    .stock-row .col-act { grid-column: 2; }
    .stock-row-head { display: none; }
}

/* ---------- Error ---------- */
.error-page { text-align: center; padding: 80px 20px; }
.error-page h1 { font-size: 72px; color: var(--primary); }
.error-page p { color: var(--text-soft); margin: 12px 0 24px; }

/* ---------- Escala de trabalho ---------- */
.schedule-layout { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: start; }
.schedule-side { position: sticky; top: 20px; }
.team-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.team-chip, .pick-emp {
    --chip: var(--primary);
    display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 20px;
    background: color-mix(in srgb, var(--chip) 14%, #fff); color: color-mix(in srgb, var(--chip) 80%, #000);
    border: 1px solid color-mix(in srgb, var(--chip) 35%, #fff);
    font-size: 13px; font-weight: 700;
}
.schedule-legend { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border); font-size: 12.5px; color: var(--text-soft); }
.schedule-legend p { margin-top: 6px; line-height: 1.5; }
.legend-plus { font-weight: 800; color: var(--primary); }

.schedule-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.schedule-title { font-size: 20px; font-weight: 800; color: var(--text); }
.schedule-nav { display: flex; align-items: center; gap: 8px; }
.schedule-nav .icon-btn { font-size: 18px; }
.schedule-filter { display: flex; gap: 8px; }

.schedule-cell { min-height: 150px; gap: 8px; }
.shift-block { border-radius: 10px; border: 1px dashed var(--border); padding: 6px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.shift-block.shift-noite { background: var(--bg); }
.shift-head { display: flex; align-items: center; justify-content: space-between; }
.shift-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--text-soft); }
.shift-add {
    width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text-soft); font-size: 12px; font-weight: 800;
    cursor: pointer; line-height: 1; transition: all .1s;
}
.shift-block:hover .shift-add { border-color: var(--primary); color: var(--primary); }
.shift-people { display: flex; flex-direction: column; gap: 4px; }
.shift-chip {
    --chip: var(--primary);
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    padding: 4px 8px; border-radius: 8px; font-size: 12px; font-weight: 700;
    background: color-mix(in srgb, var(--chip) 85%, #000 0%); color: #fff;
}
.chip-remove {
    border: 0; background: rgba(255,255,255,.25); color: #fff; width: 16px; height: 16px;
    border-radius: 50%; font-size: 11px; line-height: 1; cursor: pointer; flex: none;
}
.chip-remove:hover { background: rgba(255,255,255,.45); }

/* Escala no portal do colaborador (somente leitura) */
.my-shifts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.my-shifts-label { font-size: 13px; font-weight: 700; color: var(--text-soft); }
.my-shift-pill {
    display: inline-flex; padding: 5px 11px; border-radius: 20px; font-size: 12.5px; font-weight: 700;
    background: var(--primary-soft); color: var(--primary); border: 1px solid color-mix(in srgb, var(--primary) 25%, #fff);
}
.shift-chip.is-mine { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--chip); font-weight: 800; }

.pick-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 14px 0 4px; }
.pick-emp { cursor: pointer; transition: transform .1s; }
.pick-emp:hover:not(:disabled) { transform: translateY(-1px); }
.pick-emp:disabled { opacity: .35; cursor: not-allowed; }

@media (max-width: 1080px) {
    .schedule-layout { grid-template-columns: 1fr; }
    .schedule-side { position: static; }
}

/* ---------- Escala de Serviços (RH) ---------- */
.svc-shift-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.svc-shift-tab {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px; border-radius: 12px; text-decoration: none;
    font-size: 13px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--primary); background: var(--surface); border: 1px solid color-mix(in srgb, var(--primary) 35%, #fff);
    transition: all .12s;
}
.svc-shift-tab:hover { background: var(--primary-soft); }
.svc-shift-tab.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

.task-card {
    --chip: var(--primary);
    border: 1px solid color-mix(in srgb, var(--chip) 30%, #fff);
    border-left: 3px solid var(--chip);
    background: color-mix(in srgb, var(--chip) 6%, #fff);
    border-radius: 8px; padding: 5px 7px;
}
.task-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.task-emp { font-size: 12px; font-weight: 800; color: color-mix(in srgb, var(--chip) 80%, #000); }
.task-actions { display: inline-flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.task-card:hover .task-actions { opacity: 1; }
.task-edit, .task-remove {
    border: 0; background: none; cursor: pointer; width: 18px; height: 18px;
    border-radius: 6px; font-size: 11px; line-height: 1; color: var(--text-soft);
}
.task-edit:hover { background: var(--primary-soft); color: var(--primary); }
.task-remove:hover { background: #fdecef; color: var(--red); }
.task-service { font-size: 11.5px; color: var(--text); line-height: 1.35; margin-top: 2px; }
.task-time { font-size: 11px; font-weight: 700; color: var(--text-soft); margin-top: 2px; }

.pick-emp.is-picked {
    background: var(--chip); color: #fff;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--chip);
}
.svc-fields { display: grid; gap: 10px; margin: 14px 0 4px; text-align: left; }

/* Tipo de serviço no modal (atribuído / bônus / aviso) */
.svc-type-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 8px; }
.svc-type {
    border: 1px solid var(--border); background: var(--surface); cursor: pointer;
    border-radius: 10px; padding: 9px 6px; font-size: 12.5px; font-weight: 800; font-family: inherit;
    color: var(--text-soft); transition: all .12s;
}
.svc-type:hover { border-color: var(--primary); color: var(--primary); }
.svc-type.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.svc-type-hint { font-size: 12px; color: var(--text-soft); margin-bottom: 6px; line-height: 1.4; }

/* Cards por tipo */
.task-points { font-size: 11px; font-weight: 800; color: #b7791f; margin-top: 2px; }
.task-card.task-aviso .task-emp { color: var(--text-soft); }

/* Pontos bônus no ranking */
.pill-bonus { background: rgba(245, 179, 1, .16); color: #b7791f; }

/* Status de execução no card (admin) */
.task-status { font-size: 10.5px; font-weight: 700; margin-top: 3px; padding: 2px 6px; border-radius: 6px; display: inline-block; }
.task-status.is-done { background: rgba(18, 184, 134, .14); color: var(--green); }
.task-status.is-running { background: rgba(245, 179, 1, .16); color: #b7791f; }

/* Desempenho dos serviços (admin) */
.perf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .perf-grid { grid-template-columns: 1fr; } }
.perf-note { margin-top: 14px; font-size: 12.5px; color: var(--text-soft); }
.pill-warn { background: rgba(245, 179, 1, .16); color: #b7791f; }

/* Impressão da escala em A4 paisagem — modelo planilha (bordas pretas, P&B) */
@media print {
    @page { size: A4 landscape; margin: 6mm; }
    body { background: #fff; }
    body * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .sidebar, .sidebar-toggle, .sidebar-backdrop, .sidebar-close, .mobile-bar, .no-print, .alert { display: none !important; }
    .layout { display: block; }
    .main { padding: 0; }
    .schedule-layout { display: block; }
    .panel.schedule-main { border: 0; box-shadow: none; padding: 0; border-radius: 0; }

    .schedule-toolbar { justify-content: center; margin-bottom: 6px; }
    .schedule-title { width: 100%; text-align: center; font-size: 19px; text-transform: uppercase; letter-spacing: 1px; color: #000; }

    /* Grade estilo tabela: sempre 7 colunas, sem espaços, bordas contínuas */
    .schedule-grid { grid-template-columns: repeat(7, 1fr) !important; gap: 0 !important; margin-bottom: 0 !important; border-left: 1px solid #000; break-inside: avoid; }
    .cal-head-row.schedule-grid { display: grid !important; border-top: 1px solid #000; }
    .schedule-grid .cal-head {
        background: #d9d9d9 !important; color: #000; border-radius: 0;
        border-right: 1px solid #000; border-bottom: 1px solid #000;
        padding: 3px 0; font-size: 9.5px; letter-spacing: .5px;
    }
    .schedule-grid .cal-cell {
        border: 0; border-right: 1px solid #000; border-bottom: 1px solid #000;
        border-radius: 0 !important; padding: 0; gap: 0; min-height: 106px;
        display: flex !important; background: #fff !important; opacity: 1;
    }
    .schedule-grid .cal-cell.is-today { box-shadow: none; }
    .schedule-grid .cal-day-num {
        display: block; background: #d9d9d9 !important; color: #000 !important;
        font-size: 9px; font-weight: 800; padding: 1px 4px; border-bottom: 1px solid #000;
    }
    .cal-cell.is-empty .cal-day-num { display: none; }

    /* Turnos: sem molduras; noite separada por linha tracejada */
    .shift-block { border: 0 !important; border-radius: 0; background: #fff !important; padding: 3px 5px; gap: 2px; }
    .shift-block.shift-noite { border-top: 1px dashed #000 !important; }
    .shift-head { display: none; }
    .shift-people { gap: 1px; }
    .shift-chip {
        display: block; background: none !important; color: #000 !important;
        padding: 0; border-radius: 0; font-size: 9.5px; font-weight: 800;
        text-transform: uppercase; line-height: 1.25;
    }

    /* Escala de Serviços: cards viram texto P&B separado por linha tracejada */
    .svc-tasks { gap: 0; }
    .task-card {
        border: 0 !important; border-radius: 0; background: none !important;
        padding: 2px 0;
    }
    .task-card + .task-card { border-top: 1px dashed #000 !important; }
    .task-emp {
        color: #000 !important; font-size: 9.5px; font-weight: 800;
        text-transform: uppercase; line-height: 1.25;
    }
    .task-service { color: #000; font-size: 9px; line-height: 1.25; margin-top: 0; }
    .task-time { color: #000; font-size: 9px; font-weight: 700; margin-top: 0; }
    .task-points { color: #000; font-size: 9px; font-weight: 800; margin-top: 0; }
    .task-status { display: none; }
}

/* ---------- Módulo RH ---------- */
.rh-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.rh-tab {
    display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 10px;
    font-size: 13px; font-weight: 700; text-decoration: none;
    color: var(--primary); background: var(--surface); border: 1px solid color-mix(in srgb, var(--primary) 35%, #fff);
    transition: all .12s;
}
.rh-tab:hover { background: var(--primary-soft); }
.rh-tab.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.rh-tab-back { color: var(--text-soft); border-color: var(--border); }

.fin-badge.is-info { background: rgba(66, 99, 235, .12); color: #4263eb; }

.rh-date-picker { display: flex; align-items: center; gap: 10px; }
.rh-date-picker .field-label { margin: 0; }

/* Avaliação diária: estrelas */
.rh-eval-table th { white-space: nowrap; }
.rh-crit-head { font-size: 10.5px; letter-spacing: .3px; }
.rh-eval-table td { padding-top: 8px; padding-bottom: 8px; }
.rh-onduty { background: color-mix(in srgb, var(--primary) 5%, #fff); }

/* Coluna do colaborador fixa: só as notas rolam na horizontal. */
.rh-eval-table th:first-child,
.rh-eval-table td:first-child {
    position: sticky; left: 0; z-index: 2;
    background: var(--card, #fff);
    box-shadow: 6px 0 8px -6px rgba(15, 23, 42, .14);
    white-space: nowrap;
}
.rh-eval-table tbody tr:hover td:first-child { background: #fafaff; }
.rh-eval-table .rh-onduty td:first-child { background: color-mix(in srgb, var(--primary) 5%, #fff); }
.rh-eval-actions { display: flex; gap: 10px; }
.btn-danger-ghost { color: var(--red); border-color: #f7c2cc; }
.btn-danger-ghost:hover { background: #fdecef; }

.star-rating { display: inline-flex; gap: 1px; }
.star {
    border: 0; background: none; cursor: pointer; font-size: 19px; line-height: 1;
    color: #d7dbe4; padding: 1px; transition: transform .08s, color .08s;
}
.star:hover { transform: scale(1.2); }
.star.is-on { color: #f5b301; }

/* Rankings */
.emp-link {
    text-decoration: none; color: inherit;
    padding: 5px 10px 5px 5px; margin-left: -5px; border-radius: 24px;
    transition: background .12s;
}
.emp-link strong { color: var(--text); }
.emp-link-arrow { color: transparent; font-weight: 700; transition: all .12s; }
.emp-link:hover { background: var(--primary-soft); }
.emp-link:hover strong { color: var(--primary); }
.emp-link:hover .emp-link-arrow { color: var(--primary); transform: translateX(2px); }

.rh-rank-pos { font-size: 20px; font-weight: 800; color: var(--text-soft); }
.rh-avg-cell { display: flex; align-items: center; gap: 10px; }
.rh-avg-num { color: #b7791f; font-size: 15px; min-width: 42px; }
.rh-avg-bar { flex: 1; height: 7px; border-radius: 6px; background: #eef0f6; overflow: hidden; }
.rh-avg-bar span { display: block; height: 100%; border-radius: 6px; background: #f5b301; }

/* Gráficos */
.rh-charts { grid-template-columns: 3fr 2fr; }
.chart-wrap { position: relative; height: 320px; }

/* Alertas de queda */
.rh-alert-panel { border-left: 4px solid #f59f00; }
.rh-alert-list { display: flex; flex-wrap: wrap; gap: 10px; }
.rh-alert-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
    border-radius: 12px; background: #fff6e9; border: 1px solid #f4d8a6;
    text-decoration: none; color: var(--text); font-size: 13px;
}
.rh-alert-avg { font-weight: 800; color: #b7791f; }

/* Ficha de feedback */
.rh-sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; padding: 14px 16px; border-left: 4px solid var(--primary); background: var(--bg); border-radius: 10px; }
.rh-sheet-name { font-size: 20px; font-weight: 800; color: var(--primary); }
.rh-sheet-avg { text-align: right; }
.rh-sheet-avg strong { font-size: 24px; font-weight: 800; }
.rh-sheet-actions { display: flex; gap: 10px; }
.rh-sheet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
.rh-sheet-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.rh-sheet-crit { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.rh-sheet-comment { font-size: 13px; color: var(--text); }
.rh-sheet-tip { font-size: 12.5px; color: var(--text-soft); font-style: italic; margin-top: 4px; }
.rh-score-badge { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 14px; background: #fff6e9; color: #b7791f; }
.rh-score-badge.s0, .rh-score-badge.s1 { background: rgba(240,64,90,.12); color: var(--red); }
.rh-score-badge.s2 { background: #fdecef; color: #d6336c; }
.rh-score-badge.s4, .rh-score-badge.s5 { background: rgba(18,184,134,.14); color: var(--green); }
.rh-feedback-form { border-top: 1px dashed var(--border); padding-top: 16px; }
.rh-send-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }

/* Mensagens */
.rh-msg-list { display: flex; flex-direction: column; gap: 10px; }
.rh-msg { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.rh-msg-head {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 12px 16px; cursor: pointer; list-style: none;
}
.rh-msg-head::-webkit-details-marker { display: none; }
.rh-msg-who { display: inline-flex; align-items: center; gap: 8px; min-width: 170px; }
.rh-msg-title { flex: 1; font-size: 13.5px; color: var(--text); }
.rh-msg-meta { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rh-msg-body { padding: 4px 16px 14px; font-size: 13.5px; color: var(--text); line-height: 1.55; border-top: 1px dashed var(--border); margin-top: 2px; padding-top: 12px; }

@media (max-width: 1080px) {
    .rh-sheet-grid { grid-template-columns: 1fr; }
    .rh-charts { grid-template-columns: 1fr; }
}

/* ---------- Portal: painel estilo feed/rede social ---------- */
.feed-shell { min-height: 100vh; background: #f1f3f9; padding-bottom: 84px; }
.feed-topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 18px; background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.feed-brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; }
.feed-brand-logo { font-size: 20px; }
.feed-logout {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 12px; color: var(--text-soft);
    background: #eef0f6; transition: all .12s;
}
.feed-logout svg { width: 18px; height: 18px; fill: currentColor; }
.feed-logout:hover { background: #fdecef; color: var(--red); }

.feed-main { max-width: 560px; margin: 0 auto; padding: 16px 16px 24px; }

/* Perfil com capa */
.feed-profile { background: var(--surface); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 14px; }
.feed-cover {
    height: 86px;
    background: linear-gradient(120deg, var(--cover), color-mix(in srgb, var(--cover) 35%, #ffd43b));
}
.feed-profile-body { display: flex; align-items: flex-end; gap: 14px; padding: 0 18px; margin-top: -34px; }
.feed-avatar-wrap { position: relative; flex-shrink: 0; }
.feed-avatar {
    width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; font-weight: 800; color: #fff;
    border: 4px solid var(--surface); box-shadow: var(--shadow);
}
.feed-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-avatar-edit {
    position: absolute; bottom: -2px; right: -2px;
    width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 13px;
    background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
    transition: transform .12s;
}
.feed-avatar-edit:hover { transform: scale(1.12); }
.feed-profile-text { padding-top: 40px; }
.feed-date { font-size: 12px; color: var(--text-soft); text-transform: capitalize; }
.feed-profile-text h1 { font-size: 21px; font-weight: 800; line-height: 1.2; }

/* Ações rápidas (stories) */
.feed-actions { display: flex; gap: 18px; padding: 16px 18px 18px; }
.feed-action { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; }
.feed-action-ring {
    position: relative; width: 62px; height: 62px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--tint) 10%, #fff);
    border: 2.5px solid var(--tint);
    transition: transform .12s;
}
.feed-action:hover .feed-action-ring { transform: scale(1.07); }
.feed-action-ico { font-size: 25px; }
.feed-action-badge {
    position: absolute; top: -4px; right: -4px;
    min-width: 20px; height: 20px; padding: 0 5px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--red); color: #fff; font-size: 11px; font-weight: 800;
    border: 2px solid var(--surface);
}
.feed-action-label { font-size: 12px; font-weight: 700; color: var(--text); }

/* Destaques */
.feed-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.feed-highlights-3 { grid-template-columns: repeat(3, 1fr); }
.feed-stat {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow);
}
.feed-stat-ico { font-size: 24px; }
.feed-stat strong { display: block; font-size: 17px; font-weight: 800; line-height: 1.2; }
.feed-stat span:last-child { font-size: 11.5px; color: var(--text-soft); }

/* Meus serviços (Escala de Serviços) */
.feed-tasks { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.feed-task {
    display: flex; align-items: center; gap: 14px;
    background: var(--surface); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow);
}
.feed-task.is-today { box-shadow: 0 0 0 2px rgba(108, 92, 231, .35), var(--shadow); }
.feed-task-date {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 52px; height: 52px; flex-shrink: 0; border-radius: 14px;
    background: var(--primary-soft); color: var(--primary);
}
.feed-task.is-today .feed-task-date { background: var(--primary); color: #fff; }
.feed-task-date strong { font-size: 12px; font-weight: 800; text-transform: uppercase; line-height: 1.1; }
.feed-task-date span { font-size: 11px; font-weight: 700; opacity: .85; }
.feed-task-empty .feed-task-date { font-size: 22px; background: #e6fcf5; }
.feed-task-info { min-width: 0; flex: 1; }
.feed-task-info strong { display: block; font-size: 14px; font-weight: 700; line-height: 1.3; }
.feed-task-info span { font-size: 12px; color: var(--text-soft); }

/* Checklist: iniciar / finalizar */
.feed-task-side { flex-shrink: 0; margin-left: auto; }
.feed-task-btn {
    border: 0; cursor: pointer; border-radius: 12px; padding: 9px 16px;
    font-size: 13px; font-weight: 800; font-family: inherit; transition: transform .1s, opacity .1s;
}
.feed-task-btn:active { transform: scale(.96); }
.feed-task-btn:disabled { opacity: .5; cursor: wait; }
.feed-task-btn.is-start { background: var(--primary); color: #fff; }
.feed-task-btn.is-finish { background: #12b886; color: #fff; }
.feed-task-btn.is-claim { background: #f5b301; color: #4a3400; }
.feed-task-type-bonus { box-shadow: 0 0 0 2px rgba(245, 179, 1, .45), var(--shadow); }
.feed-task-type-bonus .feed-task-date { background: #fff3bf; color: #b7791f; }
.feed-task-type-aviso { background: #f4f6fb; box-shadow: none; border: 1px dashed var(--border); }
.feed-task-type-aviso .feed-task-date { background: #e9ecf3; color: var(--text-soft); }
.feed-task-pts { color: #b7791f; }
.feed-task.is-running { box-shadow: 0 0 0 2px rgba(245, 179, 1, .4), var(--shadow); }
.feed-task.is-done { opacity: .75; }
.feed-task.is-done .feed-task-date { background: #e6fcf5; color: var(--green); }
.feed-task-check { font-size: 13px; font-weight: 800; color: var(--green); white-space: nowrap; }
.feed-task-wait { font-size: 12px; font-weight: 700; color: var(--text-soft); }

/* Feed de posts */
.feed-section-title { font-size: 13px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--text-soft); margin: 0 4px 10px; }
.feed-post { background: var(--surface); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 12px; }
.feed-post.is-new { box-shadow: 0 0 0 2px rgba(66, 99, 235, .25), var(--shadow); }
.feed-post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.feed-post-avatar {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 19px;
    background: linear-gradient(135deg, #fff3bf, #ffd8a8);
}
.feed-post-who { flex: 1; min-width: 0; }
.feed-post-who strong { display: block; font-size: 13.5px; }
.feed-post-who span { font-size: 11.5px; color: var(--text-soft); }
.feed-post-new {
    font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
    background: rgba(66, 99, 235, .12); color: #4263eb; padding: 3px 9px; border-radius: 12px;
}
.feed-post-title { font-size: 15.5px; font-weight: 800; margin-bottom: 6px; }
.feed-post-body { font-size: 13.5px; line-height: 1.55; color: var(--text); }
.feed-post-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.feed-post-foot a { font-size: 13px; font-weight: 700; color: var(--primary); text-decoration: none; }
.feed-post-ai { font-size: 11.5px; color: var(--text-soft); }
.feed-post-empty { text-align: center; padding: 34px 20px; }
.feed-empty-ico { font-size: 34px; display: block; margin-bottom: 10px; }
.feed-post-empty p { font-size: 13.5px; color: var(--text-soft); line-height: 1.6; }
.feed-see-all {
    display: block; text-align: center; padding: 12px;
    font-size: 13.5px; font-weight: 700; color: var(--primary); text-decoration: none;
}

/* Navegação inferior (app) */
.feed-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    display: flex; justify-content: center; gap: 6px;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
    border-top: 1px solid var(--border); padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}
.feed-nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    min-width: 76px; padding: 6px 10px; border-radius: 14px;
    font-size: 11px; font-weight: 700; color: var(--text-soft); text-decoration: none;
    transition: all .12s;
}
.feed-nav-item:hover { background: #eef0f6; }
.feed-nav-item.is-active { color: var(--primary); background: var(--primary-soft); }
.feed-nav-ico { position: relative; font-size: 20px; line-height: 1; }
.feed-nav-dot {
    position: absolute; top: -2px; right: -6px; width: 9px; height: 9px;
    border-radius: 50%; background: var(--red); border: 2px solid #fff;
}

@media (max-width: 480px) {
    .feed-actions { justify-content: space-around; gap: 8px; }
    .feed-highlights { grid-template-columns: 1fr 1fr; gap: 10px; }
    .feed-highlights-3 { grid-template-columns: 1fr 1fr; }
    .feed-highlights-3 .feed-stat:first-child { grid-column: span 2; }
    .feed-profile-text h1 { font-size: 18px; }
}

/* ---------- Portal: Meus Feedbacks ---------- */
.feature-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px; margin-left: 8px;
    border-radius: 12px; background: var(--red); color: #fff;
    font-size: 11.5px; font-weight: 800; vertical-align: middle;
}
.pf-list { display: flex; flex-direction: column; gap: 14px; }
.pf-card { border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; background: var(--surface); }
.pf-card.is-new { border-color: #a5c4f5; box-shadow: 0 0 0 3px rgba(66, 99, 235, .08); }
.pf-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.pf-type { font-size: 12.5px; font-weight: 800; color: var(--primary); }
.pf-date { font-size: 12px; color: var(--text-soft); }
.pf-title { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.pf-body { font-size: 14px; line-height: 1.6; color: var(--text); white-space: normal; }
.pf-foot { margin-top: 10px; font-size: 12px; color: var(--text-soft); }

/* ---------- Portal: recado urgente (banner com ciência) ---------- */
.feed-urgent {
    background: linear-gradient(135deg, #fff5f5, #ffe3e3);
    border: 1.5px solid #ffa8a8;
    border-radius: 18px; padding: 16px 18px; margin-bottom: 14px;
    box-shadow: 0 6px 18px rgba(240, 64, 90, .12);
    animation: urgent-in .3s ease;
}
@keyframes urgent-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.feed-urgent-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.feed-urgent-ico { font-size: 22px; }
.feed-urgent-head strong { font-size: 15px; font-weight: 800; color: #b3213a; }
.feed-urgent-body { font-size: 13.5px; line-height: 1.6; color: var(--text); }
.feed-urgent-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.feed-urgent-date { font-size: 11.5px; color: var(--text-soft); }
.feed-urgent-btn {
    border: 0; cursor: pointer; border-radius: 12px; padding: 9px 18px;
    background: var(--red); color: #fff; font-size: 13px; font-weight: 800; font-family: inherit;
    transition: transform .1s, opacity .1s;
}
.feed-urgent-btn:hover { opacity: .92; }
.feed-urgent-btn:active { transform: scale(.96); }

/* ---------- RH: notificações disciplinares ---------- */
.warn-explainer { display: block; margin-bottom: 18px; font-size: 13px; line-height: 1.6; padding: 12px 16px; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #d92b4b; border-color: #d92b4b; }
.warn-dots { display: inline-flex; gap: 5px; margin-right: 8px; vertical-align: middle; }
.warn-dot {
    width: 13px; height: 13px; border-radius: 50%;
    background: #eef0f6; border: 1.5px solid #d9dcec;
}
.warn-dot.is-on { background: var(--red); border-color: var(--red); }

/* ---------- Notas Fiscais ---------- */
.nf-post { background: #0a9958; border-color: #0a9958; color: #fff; font-weight: 800; }
.nf-post:hover { background: #0b8a50; border-color: #0b8a50; color: #fff; }
.nf-revert { color: #b7791f; border-color: #f2d9a6; background: #fffaf0; }
.nf-revert:hover { background: #fff1d6; }

/* ---------- Estoque de Sorvetes ---------- */
.sorvete-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
@media (max-width: 1080px) { .sorvete-grid { grid-template-columns: 1fr; } }

/* Mais vendidos (barras) */
.top-flavors { display: flex; flex-direction: column; gap: 12px; }
.top-flavor { display: flex; align-items: center; gap: 12px; }
.top-flavor-info { flex: 1; min-width: 0; }
.top-flavor-line { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; }
.top-flavor-line span { color: var(--muted); }
.top-flavor-bar { height: 8px; border-radius: 99px; background: #eef0f6; overflow: hidden; }
.top-flavor-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #8b5cf6); }

/* Mapa do freezer de milk-shake */
.freezer-panel {
    margin-bottom: 20px; border: 1px solid #bfe8f0; border-radius: var(--radius-sm);
    background: #e4f7fa; overflow: hidden;
}
.freezer-summary {
    display: flex; align-items: center; justify-content: space-between; cursor: pointer;
    padding: 13px 18px; font-weight: 700; font-size: 14px; color: #0e7490; list-style: none;
}
.freezer-summary::-webkit-details-marker { display: none; }
.freezer-panel[open] .collapse-arrow { transform: rotate(180deg); }
.freezer-box {
    display: flex; flex-direction: column; gap: 12px; padding: 16px 20px 20px;
    border: 2px solid #7edce8; border-radius: 16px; margin: 0 16px 16px;
    background: #d9f3f8;
}
.freezer-edge {
    text-align: center; font-size: 11px; font-weight: 800; letter-spacing: 1px;
    text-transform: uppercase; color: #0e7490;
}
.freezer-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.freezer-slot {
    aspect-ratio: 1; border-radius: 50%; background: #fff; border: 1px solid #d3edf2;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    box-shadow: 0 4px 14px rgba(14, 116, 144, .12); padding: 10px; text-align: center;
    font-family: inherit; cursor: pointer; transition: transform .12s, box-shadow .12s;
}
button.freezer-slot:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(14, 116, 144, .2); }
.freezer-slot.is-empty { background: #eefafc; border: 2px dashed #9fd6e0; box-shadow: none; }
.freezer-slot-num { font-size: 10px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.freezer-slot strong { font-size: 13px; color: var(--primary); word-break: break-word; }
.freezer-slot.is-empty strong { color: #0e7490; }
.freezer-mini { margin: 0; background: #e9f8fb; }
.freezer-mini .freezer-slot { box-shadow: none; }
.freezer-mini .freezer-slot strong { font-size: 12px; }
div.freezer-slot { cursor: default; }

/* Cards de sabores (portal) */
.flavor-grid {
    display: grid; gap: 14px; margin-top: 18px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.flavor-card {
    background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
    display: flex; flex-direction: column; text-align: center;
}
.flavor-name {
    padding: 10px 12px; font-weight: 700; font-size: 14px;
    background: #f7f8fc; border-bottom: 1px solid var(--border);
}
.flavor-qty { padding: 14px 12px; }
.flavor-qty span { display: block; font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.flavor-count { font-size: 26px; font-weight: 800; color: var(--red); }
.flavor-count.is-zero { color: var(--red); }
.flavor-actions {
    display: flex; justify-content: space-between; padding: 10px 12px;
    border-top: 1px solid var(--border);
}
.flavor-step {
    width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
    font-size: 19px; font-weight: 700; display: grid; place-items: center;
    transition: transform .1s, filter .1s;
}
.flavor-step:hover { transform: scale(1.08); filter: brightness(.96); }
.flavor-step.is-minus { background: #fde5e9; color: var(--red); }
.flavor-step.is-plus { background: #dcf5e9; color: #0a7052; }

/* Escolha do sabor da posição do freezer */
.slot-picker {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
    max-height: 320px; overflow-y: auto; margin: 14px 0 4px; padding: 2px;
}
.slot-option {
    padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
    background: #fff; cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 600;
    transition: border-color .1s, background .1s;
}
.slot-option:hover { border-color: var(--primary); background: var(--primary-soft); }
.slot-option.is-clear { grid-column: 1 / -1; color: var(--muted); }
.slot-picker-hint { font-size: 12px; color: var(--muted); margin: 2px 0 10px; text-align: center; }

/* ---------- Abas de estoque (loja / fábrica) ---------- */
.stock-tabs {
    display: flex; gap: 6px; margin: 0 0 18px; padding: 4px;
    background: #eef0f6; border-radius: 12px; width: fit-content; max-width: 100%;
    flex-wrap: wrap;
}
.stock-tabs .px-tab,
.px-tabs .px-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
    color: var(--text-soft); text-decoration: none; transition: background .12s, color .12s;
}
.stock-tabs .px-tab:hover,
.px-tabs .px-tab:hover { color: var(--text); background: rgba(255,255,255,.55); }
.stock-tabs .px-tab.is-active,
.px-tabs .px-tab.is-active {
    background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(15,23,42,.08);
}

/* ---------- Precificação ---------- */
.px-callout {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-bottom: 18px; padding: 16px 18px;
}
.px-callout-body { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.px-callout-hint { font-size: 13px; color: var(--text-soft); line-height: 1.5; }
.px-product-link { color: inherit; text-decoration: none; }
.px-product-link:hover strong { color: var(--primary); }
.muted-sm { font-size: 12px; color: var(--muted); margin-top: 2px; }
.txt-neg { color: var(--red); }
.txt-pos { color: var(--green); }
.field-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.btn-danger-text { color: var(--red); }
.px-howto { margin-top: 8px; }
.px-howto-list { margin: 0 0 12px 18px; padding: 0; color: var(--text-soft); line-height: 1.7; font-size: 14px; }
.px-howto-list li + li { margin-top: 6px; }
.px-howto-foot { font-size: 13.5px; color: var(--text-soft); margin: 0; }
.px-howto-foot code, .px-formula-box code {
    display: inline-block; margin-top: 6px; padding: 6px 10px; border-radius: 8px;
    background: rgba(0,0,0,.05); font-size: 13px;
}
.px-detail .panel { min-width: 0; }
.px-recipe-form select { min-width: 200px; flex: 1; }
.px-lesson { list-style: none; margin: 0; padding: 0; }
.px-lesson li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.px-lesson li:last-child { border-bottom: none; }
.px-lesson strong { display: block; font-size: 14px; margin-bottom: 4px; color: var(--text); }
.px-lesson p { margin: 0; font-size: 13.5px; color: var(--text-soft); line-height: 1.6; }
.px-breakdown { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.px-bar-block + .px-bar-block { margin-top: 14px; }
.px-bar-label { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.px-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: #eef0f6; }
.px-bar span { display: block; min-width: 2px; }
.px-bar-legend { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 8px; font-size: 12px; color: var(--text-soft); }
.px-bar-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.px-tax-card { margin-bottom: 18px; }
.px-tax-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: end;
    margin: 8px 0 12px;
}
.px-tax-rate { font-size: 22px; color: var(--primary); }
.px-guide { display: grid; gap: 14px; }
.px-guide-item h3 { margin: 0 0 4px; font-size: 14.5px; }
.px-guide-item p { margin: 0; font-size: 13.5px; color: var(--text-soft); line-height: 1.65; }
.px-formula-box {
    margin-top: 18px; padding: 16px; border-radius: 12px;
    background: linear-gradient(135deg, rgba(76,111,255,.06), rgba(18,184,134,.06));
    border: 1px solid var(--border);
}
.px-mix-hero { margin-bottom: 18px; border: 1px solid rgba(76,111,255,.2); background: linear-gradient(135deg, rgba(76,111,255,.05), rgba(18,184,134,.05)); }
.px-mix-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.px-mix-num { font-size: 22px; font-weight: 800; display: block; margin: 4px 0; }
@media (max-width: 900px) { .px-mix-grid { grid-template-columns: 1fr 1fr; } }
.px-dual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.px-dual-card {
    padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border);
    background: #f8f9fc;
}
.px-dual-card.is-alt { background: rgba(18,184,134,.06); border-color: rgba(18,184,134,.2); }
.px-dual-unit { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.px-dual-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 4px 0; }
.px-dual-row .pos { color: var(--green); }
@media (max-width: 700px) { .px-dual-grid { grid-template-columns: 1fr; } }
.px-formula-box strong { display: block; margin-bottom: 4px; }
.px-formula-box p { margin: 10px 0 0; font-size: 13.5px; color: var(--text-soft); line-height: 1.65; }
@media (max-width: 900px) {
    .px-tax-grid { grid-template-columns: 1fr 1fr; }
    .px-callout { flex-direction: column; align-items: flex-start; }
}

/* ---------- RH · Lembretes de serviços ---------- */
.reminder-interval { display: flex; align-items: center; gap: 8px; }
.reminder-sep { font-size: 13px; color: var(--muted); }
.reminder-help { font-size: 13.5px; color: var(--text-soft); line-height: 1.7; }
.reminder-help p + p { margin-top: 8px; }
.reminder-help code { background: rgba(0, 0, 0, .06); padding: 2px 6px; border-radius: 6px; font-size: 12.5px; }

/* ---------- Currículos / Vagas (página pública) ---------- */
.jobs-body {
    --jobs-sun: #ffcc00;
    --jobs-sun-deep: #f0a800;
    --jobs-ink: #1c2733;
    --jobs-muted: #5c6b7a;
    --jobs-sand: #f4f1ea;
    --jobs-card: #ffffff;
    --jobs-ok: #1f9d55;
    margin: 0;
    min-height: 100vh;
    background: var(--jobs-sand);
    color: var(--jobs-ink);
    font-family: 'Nunito', system-ui, sans-serif;
}
.jobs-flash { max-width: 760px; margin: 0 auto; padding: 16px 16px 0; }
.jobs-public { padding-bottom: 56px; }
.jobs-public.is-form { padding-bottom: 72px; }

.jobs-hero {
    position: relative;
    background: linear-gradient(165deg, #ffe566 0%, var(--jobs-sun) 45%, var(--jobs-sun-deep) 100%);
    color: var(--jobs-ink);
    padding: 40px 20px 52px;
    text-align: center;
    overflow: hidden;
}
.jobs-hero-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.jobs-hero-ico {
    width: 72px; height: 72px; margin: 0 auto 16px;
    display: grid; place-items: center;
    background: #fff; border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    font-size: 32px;
}
.jobs-hero h1 {
    font-family: 'Fredoka', 'Nunito', sans-serif;
    font-size: clamp(1.85rem, 5vw, 2.55rem);
    font-weight: 700;
    font-style: italic;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
    text-transform: uppercase;
    line-height: 1.15;
}
.jobs-lead {
    margin: 0 auto;
    max-width: 28em;
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(28, 39, 51, .82);
    line-height: 1.55;
}
.jobs-hero-wave {
    position: absolute; left: 0; right: 0; bottom: -1px;
    width: 100%; height: 48px; color: var(--jobs-sand); display: block;
}

.jobs-board { max-width: 760px; margin: -8px auto 0; padding: 8px 16px 0; position: relative; z-index: 2; }
.jobs-board-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    margin-bottom: 16px;
}
.jobs-board-head h2 {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.25rem; font-weight: 600; margin: 0;
}
.jobs-bar {
    width: 5px; height: 1.1em; border-radius: 4px;
    background: var(--jobs-sun); display: inline-block;
}
.jobs-count {
    font-size: 12px; font-weight: 800; letter-spacing: .06em;
    text-transform: uppercase; color: var(--jobs-muted);
}

.jobs-cards { display: flex; flex-direction: column; gap: 14px; }
.job-card {
    background: var(--jobs-card);
    border-radius: 18px;
    padding: 18px 18px 16px;
    border: 1px solid rgba(28,39,51,.06);
    box-shadow: 0 10px 28px rgba(28, 39, 51, .06);
    transition: transform .18s ease, box-shadow .18s ease;
}
.job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(28, 39, 51, .1);
}
.job-card-top { margin-bottom: 10px; }
.job-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px; border-radius: 999px;
    background: rgba(31, 157, 85, .12); color: var(--jobs-ok);
    font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.job-card h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.2rem; font-weight: 600; margin: 0 0 4px; line-height: 1.25;
}
.job-loc { margin: 0 0 8px; font-size: 13.5px; font-weight: 700; color: var(--jobs-muted); }
.job-desc { margin: 0 0 14px; font-size: 14.5px; line-height: 1.55; color: var(--jobs-muted); }
.job-card-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding-top: 4px;
}
.job-updated {
    font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: #8a96a3;
}
.jobs-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 11px 18px; border-radius: 12px; border: none; cursor: pointer;
    background: var(--jobs-sun); color: var(--jobs-ink);
    font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 14.5px;
    text-decoration: none; box-shadow: 0 6px 0 rgba(200, 140, 0, .35);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.jobs-btn:hover {
    background: #ffd633;
    transform: translateY(-1px);
    box-shadow: 0 7px 0 rgba(200, 140, 0, .35);
}
.jobs-btn:active {
    transform: translateY(2px);
    box-shadow: 0 3px 0 rgba(200, 140, 0, .35);
}
.jobs-btn-lg { width: 100%; padding: 14px 20px; font-size: 16px; border-radius: 14px; }
.jobs-empty-card {
    background: #fff; border-radius: 18px; padding: 28px 22px; text-align: center;
    box-shadow: 0 10px 28px rgba(28,39,51,.06);
}
.jobs-empty-card p { color: var(--jobs-muted); margin: 0 0 16px; line-height: 1.55; }
.jobs-alt {
    text-align: center; margin: 22px 0 0; font-size: 14px; color: var(--jobs-muted);
}
.jobs-alt a { color: var(--jobs-ink); font-weight: 800; }

/* ---- Formulário / detalhe ---- */
.jobs-apply { max-width: 720px; margin: 0 auto; padding: 20px 16px 0; }
.jobs-back {
    display: inline-block; margin-bottom: 14px;
    color: var(--jobs-muted); font-weight: 700; text-decoration: none; font-size: 14px;
}
.jobs-back:hover { color: var(--jobs-ink); }

.jobs-detail-card {
    position: relative; overflow: hidden;
    background: linear-gradient(145deg, #ffe566, var(--jobs-sun) 55%, #f0b000);
    border-radius: 22px; padding: 22px 22px 20px;
    box-shadow: 0 14px 40px rgba(240, 168, 0, .28);
    margin-bottom: 18px;
}
.jobs-detail-sun {
    position: absolute; right: -20px; top: -30px;
    width: 140px; height: 140px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.45) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}
.job-pill {
    display: inline-block; margin-bottom: 12px;
    padding: 5px 12px; border-radius: 999px;
    background: rgba(255,255,255,.55); color: var(--jobs-ink);
    font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
.jobs-detail-card h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 700; text-transform: uppercase; margin: 0 0 8px; line-height: 1.2;
    position: relative;
}
.jobs-detail-body {
    position: relative;
    font-size: 15px; line-height: 1.65; font-weight: 600;
    color: rgba(28,39,51,.9); margin-top: 10px;
}
.jobs-detail-body p { margin: 0 0 .7em; }
.jobs-cta-hint {
    position: relative; margin: 16px 0 0;
    font-weight: 800; font-size: 15px;
}

.jobs-form-card {
    background: #fff; border-radius: 22px; padding: 22px 20px 24px;
    border: 1px solid rgba(28,39,51,.06);
    box-shadow: 0 12px 32px rgba(28,39,51,.06);
}
.jobs-form-section + .jobs-form-section {
    margin-top: 22px; padding-top: 22px;
    border-top: 1px solid rgba(28,39,51,.08);
}
.jobs-form-section h2 {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.15rem; font-weight: 600; margin: 0 0 16px;
}
.jobs-sec-ico {
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255, 204, 0, .28); font-size: 16px;
}
.jobs-fields {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.jobs-form .field-label {
    font-size: 12px; font-weight: 800; letter-spacing: .04em;
    text-transform: uppercase; color: var(--jobs-muted); margin-bottom: 6px;
}
.jobs-form .field-input {
    width: 100%; box-sizing: border-box;
    border: 1px solid rgba(28,39,51,.1);
    background: #f7f8fa; border-radius: 12px;
    padding: 12px 14px; font: inherit; color: var(--jobs-ink);
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.jobs-form .field-input:focus {
    outline: none; background: #fff;
    border-color: var(--jobs-sun-deep);
    box-shadow: 0 0 0 3px rgba(255, 204, 0, .35);
}
.jobs-q { margin-bottom: 14px; }

.jobs-upload {
    display: block; position: relative; cursor: pointer;
    border: 2px dashed rgba(240, 168, 0, .55);
    background: rgba(255, 204, 0, .08);
    border-radius: 16px; padding: 18px 16px; margin-bottom: 16px;
    text-align: center; transition: background .15s, border-color .15s;
}
.jobs-upload:hover { background: rgba(255, 204, 0, .14); border-color: var(--jobs-sun-deep); }
.jobs-upload input[type="file"] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.jobs-upload-label {
    display: block; font-size: 12px; font-weight: 800;
    letter-spacing: .05em; text-transform: uppercase; color: var(--jobs-muted);
}
.jobs-upload-hint { display: block; font-size: 13px; color: var(--jobs-muted); margin: 4px 0 10px; }
.jobs-upload-btn {
    display: inline-block; padding: 8px 14px; border-radius: 10px;
    background: var(--jobs-ink); color: #fff; font-size: 13px; font-weight: 700;
}
.jobs-upload-name { display: block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--jobs-ink); }

.jobs-choice-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.jobs-choice {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border-radius: 12px;
    background: #f7f8fa; border: 1px solid transparent;
    font-weight: 700; cursor: pointer; transition: background .12s, border-color .12s;
}
.jobs-choice:has(input:checked) {
    background: rgba(255, 204, 0, .18);
    border-color: rgba(240, 168, 0, .55);
}
.jobs-choice input { accent-color: var(--jobs-sun-deep); width: 16px; height: 16px; }
.jobs-form-actions { margin-top: 22px; }

.jobs-public.is-thanks .jobs-hero { min-height: 50vh; display: flex; flex-direction: column; justify-content: center; }
.jobs-public.is-thanks .jobs-btn { margin-top: 18px; }

@media (max-width: 640px) {
    .jobs-fields { grid-template-columns: 1fr; }
    .jobs-choice-grid { grid-template-columns: 1fr; }
    .job-card-foot { flex-direction: column; align-items: stretch; }
    .jobs-btn { width: 100%; }
}

/* ---------- Relatórios ---------- */
.report-section { break-inside: avoid; }
.report-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 12px;
}
.report-subtitle {
    margin: 18px 0 10px;
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}
.report-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}
.report-channels { margin-top: 14px; }
.print-only { display: none; }
.report-print-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 800;
}
.report-print-title span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.top-products-head {
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.top-products-head .panel-hint {
    display: block;
    margin-top: 4px;
}
.top-sort {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: #eef1f4;
    border: 1px solid var(--border);
}
.top-sort__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-soft);
    white-space: nowrap;
}
.top-sort__btn:hover { color: var(--text); background: rgba(255,255,255,.7); }
.top-sort__btn.is-active {
    background: var(--primary);
    color: #fff;
}

.money-panel { margin-bottom: 20px; }
.money-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.money-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 18px;
    background: var(--bg);
    display: grid;
    gap: 6px;
}
.money-card--main {
    background: linear-gradient(135deg, var(--primary), #8b7bff);
    border: none;
    color: #fff;
}
.money-card__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
}
.money-card--main .money-card__label { color: rgba(255,255,255,.82); }
.money-card__value {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--text);
}
.money-card--main .money-card__value { color: #fff; }
.money-card__hint {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}
.money-card--main .money-card__hint { color: rgba(255,255,255,.78); }
.money-accounts {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.money-accounts li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
}
.money-accounts strong { font-weight: 800; }

@media (max-width: 860px) {
    .money-grid { grid-template-columns: 1fr; }
}

@media print {
    .print-only { display: block !important; }
    .report-section {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 14px;
    }
    .report-section .kpi-grid { gap: 10px; }
    .report-split { grid-template-columns: 1fr 1fr; }
    .btn, .dash-filter, .topbar-actions { display: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .charts-grid { grid-template-columns: 1fr; }
}

.mobile-bar { display: none; }
.sidebar-close { display: none; }
.sidebar-toggle { display: none; }

@media (max-width: 860px) {
    /* Barra no topo em largura total — não como coluna do flex */
    .layout {
        display: block;
        min-height: 100vh;
    }

    .mobile-bar {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 55;
        align-items: center;
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
        min-height: 56px;
        padding: 10px 14px;
        padding-top: max(10px, env(safe-area-inset-top, 0px));
        margin: 0;
        background: rgba(247, 248, 252, .94);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
    }
    .mobile-bar-brand {
        display: flex;
        flex-direction: column;
        min-width: 0;
        line-height: 1.2;
    }
    .mobile-bar-brand strong {
        font-size: 15px;
        font-weight: 800;
        color: var(--text);
    }
    .mobile-bar-brand span {
        font-size: 12px;
        color: var(--text-soft);
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 70vw;
    }

    .sidebar-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        padding: 10px;
        border: 0;
        border-radius: 12px;
        background: var(--sidebar);
        box-shadow: 0 4px 14px rgba(20, 22, 58, .22);
        cursor: pointer;
    }
    .sidebar-toggle span {
        display: block;
        height: 2px;
        width: 100%;
        background: #fff;
        border-radius: 2px;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 60;
        background: rgba(15, 18, 40, .5);
        border: 0;
        padding: 0;
        cursor: pointer;
    }
    .sidebar-backdrop[hidden] { display: none !important; }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 70;
        width: min(300px, 86vw);
        transform: translateX(-105%);
        transition: transform .22s ease;
        height: 100vh;
        max-height: 100dvh;
        padding-top: max(14px, env(safe-area-inset-top, 0px));
        box-shadow: 8px 0 28px rgba(15, 18, 40, .28);
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open { overflow: hidden; }

    .sidebar .brand {
        position: relative;
        padding-right: 44px;
    }
    .sidebar-close {
        display: grid;
        place-items: center;
        position: absolute;
        top: 4px;
        right: 0;
        width: 40px;
        height: 40px;
        border: 0;
        border-radius: 10px;
        background: rgba(255, 255, 255, .1);
        color: #fff;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
    }

    .main {
        display: block;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 16px;
        padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
        min-width: 0;
        overflow-x: hidden;
    }

    /* Headers: título em cima, ações embaixo */
    .topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 16px;
    }
    .topbar > div:first-child { min-width: 0; width: 100%; }
    .topbar h1 {
        font-size: 1.35rem;
        line-height: 1.25;
        word-break: break-word;
    }
    .topbar-sub {
        font-size: 13px;
        line-height: 1.45;
        max-width: 100%;
    }
    .topbar-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    .topbar-actions .btn {
        flex: 1 1 auto;
        min-height: 44px;
        justify-content: center;
    }
    .dash-filter {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    .dash-filter select {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        min-height: 44px;
    }
    .dash-filter .btn {
        flex: 1 1 100%;
        min-height: 44px;
    }

    .panel-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .panel-hint {
        line-height: 1.4;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .kpi-card { padding: 16px; }
    .kpi-value { font-size: 1.45rem; }

    .panel { padding: 16px; }
    .goal-info { flex-wrap: wrap; gap: 8px; }
    .goal-numbers { flex-wrap: wrap; }
    .goal-percent { font-size: 1.5rem; }

    .channel-grid,
    .segment-grid,
    .quick-grid,
    .charts-grid,
    .import-cols,
    .stock-cols,
    .detail-grid,
    .cat-cols,
    .two-col {
        grid-template-columns: 1fr;
    }

    .quick-row { grid-template-columns: 1fr; }
    .field-grid { grid-template-columns: 1fr; }
    .fixed-grid { grid-template-columns: 1fr; }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-bar .field-input,
    .filter-bar .filter-input,
    .filter-bar select,
    .filter-bar .filter-select,
    .filter-bar .btn {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        flex: 1 1 auto;
    }

    .chart-wrap { height: 240px; }

    .stock-heading h1 {
        font-size: 1.15rem;
        padding-right: 8px;
    }
    .stock-top {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .stock-top > *:last-child {
        max-width: 100%;
        align-self: flex-start;
    }
    .stock-search {
        order: 2;
        flex: none;
        width: 100%;
        min-width: 0;
    }
    .stock-heading { order: 1; }
    .stock-top > .btn { order: 3; }
    .stock-search input {
        font-size: 16px;
        min-height: 48px;
        padding: 14px 14px 14px 42px;
        border-radius: 14px;
    }
    .stock-search-ico {
        font-size: 16px;
        left: 16px;
    }

    .rh-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        margin-left: -4px;
        margin-right: -4px;
        padding-left: 4px;
        padding-right: 4px;
    }
    .rh-tab { flex: 0 0 auto; min-height: 40px; }

    .segmented.seg-4 { grid-template-columns: repeat(2, 1fr); }
    /* width already set above for .stock-search */

    .table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -4px;
        padding: 0 4px;
    }
    .table-scroll .data-table {
        min-width: 560px;
    }
    .data-table th,
    .data-table td {
        white-space: nowrap;
    }
    .data-table td:nth-child(2),
    .data-table th:nth-child(2) {
        white-space: normal;
        min-width: 120px;
    }

    /* Freezer milk-shake: 4+4 com espaço visível entre os slots */
    .freezer-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
        column-gap: 10px;
        row-gap: 10px;
    }
    .freezer-slot {
        min-height: 0;
        aspect-ratio: 1;
        padding: 6px 3px;
        border-radius: 50%;
        box-sizing: border-box;
    }
    .freezer-slot-num {
        font-size: 8px;
        letter-spacing: .4px;
    }
    .freezer-slot strong {
        font-size: 9px;
        line-height: 1.15;
    }
    .freezer-box {
        padding: 12px 12px 14px;
        gap: 12px;
        margin: 0 10px 12px;
    }

    .report-split { grid-template-columns: 1fr; }
}
